Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Konacha just hanging on Ruby 2.0.0 #146

Closed
jonhyman opened this issue Jul 9, 2013 · 19 comments
Closed

Konacha just hanging on Ruby 2.0.0 #146

jonhyman opened this issue Jul 9, 2013 · 19 comments

Comments

@jonhyman
Copy link
Contributor

jonhyman commented Jul 9, 2013

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:

rvm use 1.9.3
#1.9.3 works fine
bundle exec rake konacha:run
rvm use 2.0.0
# now it magically works on 2.0.0!
bundle exec rake konacha:run
# but if I run it again, it hangs!
bundle exec rake konacha:run

Has anyone else experienced this or anything similar?

@artemave
Copy link

+1. However, after running specs manually via rake konacha:serve, konacha:run does not hang... until I remove tmp cached assets.

@adambaker
Copy link

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.

@genebot
Copy link

genebot commented Jul 11, 2013

I am experiencing this too on ruby 2.0.0 with poltergeist.

@Baael
Copy link

Baael commented Jul 12, 2013

+1 same here, rake tmp:clear hangs konacha:run on poltergeist, but on other drivers it is working fine

(but we need nice headless ;) )

@sevos
Copy link

sevos commented Jul 12, 2013

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

@artemave
Copy link

@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

@jonhyman
Copy link
Contributor Author

jonhyman commented Aug 1, 2013

Has anyone else had success fixing this? The Unicorn and Thin attempts haven't worked for me.

@EamonNerbonne
Copy link

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.

@deltadd
Copy link

deltadd commented Sep 10, 2013

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

@3den
Copy link

3den commented Oct 17, 2013

Konacha works fine with ruby-2.0.0-p247

@jrust
Copy link

jrust commented Nov 15, 2013

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.

@3den
Copy link

3den commented Nov 15, 2013

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)

@3den
Copy link

3den commented Nov 15, 2013

@jrust btw you will need gem 'thin'

@jrust
Copy link

jrust commented Nov 15, 2013

@3den thank you! I had seen that workaround above but wasn't sure where to put it. That worked great.

makimoto pushed a commit to makimoto/fastladder that referenced this issue Dec 23, 2013
@Emerson
Copy link

Emerson commented Apr 12, 2014

That hack does not work for me.

@EamonNerbonne
Copy link

@Emerson you're using thin?

@Emerson
Copy link

Emerson commented Apr 14, 2014

@EamonNerbonne - update totally works now using thin. I had some weird issue that was solved when I emptied my /tmp folder.

@EamonNerbonne
Copy link

Great!

@westonplatter
Copy link

+1 for deleting my_rails_app/tmp folder and running again.

danielkza added a commit to mezuro/prezento that referenced this issue Jun 26, 2015
Use Thin when running Konacha tests, as recommended in
jfirebaugh/konacha#146.
Hopefully it will make Travis stop exploding.
danielkza added a commit to mezuro/prezento that referenced this issue Jun 26, 2015
Use Thin when running Konacha tests, as recommended in
jfirebaugh/konacha#146.
Hopefully it will make Travis stop exploding.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests