Closed jonhyman closed 10 years ago
+1. However, after running specs manually via rake konacha:serve
, konacha:run does not hang... until I remove tmp cached assets.
I'm seeing konacha hang too, apparently at random, and I'm also using ruby 2.0.0. If I try to ctrl-c out of it, it doesn't respond. I have to ctrl-z and kill -9 the process to get it to stop.
I'll see if I can find out more about when it hangs and when it works.
I am experiencing this too on ruby 2.0.0 with poltergeist.
+1 same here, rake tmp:clear hangs konacha:run on poltergeist, but on other drivers it is working fine
(but we need nice headless ;) )
If you do use Unicorn, you might want to try this
Capybara.server do |app, port|
Unicorn::Configurator::RACKUP[:port] = port
Unicorn::Configurator::RACKUP[:set_listener] = true
server = Unicorn::HttpServer.new(app, worker_processes: 2)
server.start
end
@sevos Unicorn didn't fix it for me but Thin did:
Capybara.server do |app, port|
require 'rack/handler/thin'
Rack::Handler::Thin.run(app, :Port => port)
end
Has anyone else had success fixing this? The Unicorn and Thin attempts haven't worked for me.
Same problem here; some additional info:
This problem didn't occur even after a ruby 2 upgrade, but did once I later upgraded capybara (from 1.1 to 2.1) and poltergeist (from 1.0.3 to 1.3.0). I'm using thin anyhow, and that fix works for me.
This works for us:
if defined?(Konacha)
require 'capybara/poltergeist'
Capybara.register_driver :slow_poltergeist do |app|
Capybara::Poltergeist::Driver.new(app, :timeout => 5.minutes)
end
Konacha.configure do |config|
config.spec_dir = "spec/javascripts"
config.driver = :slow_poltergeist
end
end
Konacha works fine with ruby-2.0.0-p247
Also just upgraded to ruby 2.0.0-p247 and it is hanging, both on OSX and CentOS 6. Strangely, it hangs in our core app, but not in an engine.
unfortunately that didn't solved the problem on my CI but it does work if you use thin, i am posting the hack that worked for me bellow:
Konacha.configure do |config|
require 'capybara/poltergeist'
config.spec_dir = "spec/javascripts"
config.driver = :poltergeist
Capybara.server do |app, port|
require 'rack/handler/thin'
Rack::Handler::Thin.run(app, Port: port)
end
end if defined?(Konacha)
@jrust btw you will need gem 'thin'
@3den thank you! I had seen that workaround above but wasn't sure where to put it. That worked great.
That hack does not work for me.
@Emerson you're using thin?
@EamonNerbonne - update totally works now using thin. I had some weird issue that was solved when I emptied my /tmp
folder.
Great!
+1 for deleting my_rails_app/tmp
folder and running again.
Hey all, I've seen some other "konacha hanging on Ruby 2.0.0" threads, but I'm still having issues. We're using the default selenium driver and a
bundle exec rake konacha:run
opens up Firefox but then hangs for hours, it does not time out.The really weird thing is that if I do this, it works temporarily:
Has anyone else experienced this or anything similar?