jasmine / jasmine-gem

Jasmine ruby gem
681 stars 275 forks source link

jasmine:ci keeps waiting for jasmine server to start with Puma 3.7 #279

Closed hackergil closed 7 years ago

hackergil commented 7 years ago

Hey guys. It seems like the jasmine server does not start when running Puma 3.7. Works fine on 3.6.2.

Puma starting in single mode...

Any ideas around why this might be happening?

basawyer commented 7 years ago

I have seen this problem also. It seems related to #272. Jasmine will only run on the port that is in my config/puma.rb. This makes CI impossible on a random port. Looks like we both should get off Puma for now.

spilin commented 7 years ago

My puma.rb had this port ENV.fetch("PORT") { 3000 } So this workaround worked for me rake jasmine:ci PORT=3001 I also had to configure jasmine properly

Jasmine.configure do |config| config.ci_port = ENV.fetch("PORT") end

slackersoft commented 7 years ago

Sounds like it might be an issue with Puma. The Jasmine gem attempts to start up a rake server and tell it what port to start on (https://github.com/jasmine/jasmine-gem/blob/master/lib/jasmine/server.rb#L9).

If puma is not respecting the Port option that is given to Rack::Server theres not much we can do there. The only thing I could think of would be to explicitly set ENV['PORT'] to the port we're trying to launch on. Seems hacky, but it might work.

I'd be happy to review a pull request to solve this issue.

slackersoft commented 7 years ago

Good? news... looks like Jasmine-Gem's own specs have this same problem. I'm looking into it now.

jesseclark commented 7 years ago

I was experimenting with adding an initializer which contained "require 'resolv-replace'" and that triggered this same error. Removing the initializer fixed the issue. Just adding this comment in case that is relevant to anyone else.