Open chadrem opened 8 years ago
+1
I was seeing the same problem. I believe I tracked it down to having plugin :tmp_restart
at the bottom of my config/puma.rb
file. I replaced that line with:
if ENV["RAILS_ENV"] != "test"
plugin :tmp_restart
end
and the problem seems to have gone away.
Yeah, we just use your configuration to start a server (in a thread), so if starting that server forces others to restart, it would also potentially be an issue in capybara too (though I think it might default harder to webrick).
Anyway, thanks for the info @arrbee. I'll leave this around for others if it's a confirmed fix.
@arrbee thanks for tracking it down! Jut to confirm your code works for me. One additional note... I have to run RAILS_ENV=test rake teaspoon
for this to work. Or else the rails server
in my other terminal dies.
I have teaspoon (and teaspoon-jasmine) setup/installed in a rails 5rc2 app. I am using two terminal windows. In the first one I am running "rails server" and in the second I am running "teaspoon". Whenever teaspoon runs in the second terminal, it starts it's own rails server and this appears to signal the other rails server (in the first terminal) to exit. Because of this, my workflow has turned into having to manually restart rails server every time I execute my javascript tests. Here is the output I see from the rails server in the first terminal:
I suspect this has something to do with a new restart feature in Rails 5, but I haven't dug into it yet. Can anyone else confirm this behavior?