jasmine / jasmine-gem

Jasmine ruby gem
682 stars 274 forks source link

`rake jasmine` doesn't play well with Passenger + Rails 5 #284

Closed nicholaspufal closed 7 years ago

nicholaspufal commented 7 years ago

I couldn't find anything about this subject yet. Basically I followed all the setup steps in my Rails 5.0.2 app but when running rake jasmine it's just serving my own app instead of the JS runner - so if I go to localhost:8888 I see my app there.

It's worth to mention that I'm using Passenger (5.1.0) so I'm not sure if there are any incompatibilities with it.

I've created a sample app that demonstrates and isolates the issue: https://github.com/nicholaspufal/jasmine-rails-issue/commits/master

Just do bundle, run rake jasmine and then open localhost:8888 -> you will see the Rails app default page

Now if you do git checkout HEAD~ and run rake jasmine it will work (as that will ignore the commit that introduces passenger).

slackersoft commented 7 years ago

Jasmine should be trying to set itself up as the Rack application to be run, but it looks like we've got an old hack in there that might not always work in certain situations.

nicholaspufal commented 7 years ago

Thank you 👍

Could you please bump the version and push to Rubygems?

nicholaspufal commented 7 years ago

@slackersoft Did the new version fix the problem for you?

I just updated that sample project above to use the latest version (2.6.1) and I still see the same behavior when running it with passenger.

slackersoft commented 7 years ago

I didn't really get a chance to check it out fully. At this point Jasmine is going through the official Rack channels to set itself up as the application for the Rack::Server being started, so if that isn't working, it's probably Passengers fault for assuming that only one app would be run.

Hope this helps. Thanks for using Jasmine!