Timeout::Error on capybara - ruby-on-rails-3

I have following gems in my Gemfile
gem 'steak'
gem 'capybara', '~>0.4.1'
When I run a test for single file there seems to be no problem however, if I run all the tests at once, I am getting Timeout::Error. Before timing out, the test hangs so I manually clicked a button and the error was Element not found in the cache. Is this some caching problem? I am also getting Selenium::WebDriver::Element#value is deprecated, please use Selenium::WebDriver::Element#attribute('value') warning when I run some of the tests. I hope the question is clear, if anything is required for answering please let me know.
Note: I had set up steak through steak-because-cucumber-is-for-vegerarians

yeah I found this, seems like selenium does not support firefox 4. seleniumhq.org I really hope this issue gets solved soon...

Related

typo3 update 4.7 -> 6.2 - broken backend

I've performed an update from typo3 4.7.20 to 6.2.15. The process worked fine and there were no critical errors while running the install tool.
The frontend looks fine but the backend is broken:
I've removed all uncompatible extensions before I run the update. I've also checked all settings in the installationtool und deleted the temp/cache folder first.
I've got the feeling that the error is caused by the TemplaVoila! extension, I'm using v. 1.9.8. Firebug does not shows any error.
Does anyone had a similar problem and have already solved it?
Thank you very much!
I have come across this one multiple times. More often it is because there is a broken TBE_STYLES. I suggest you look around for $TBE_STYLES in your typo3conf folder and disable it for the time being. Most likely it will be in the extTables.php or some other file which is included dynamically.
seems BE is working, but you css does not got loaded.
check your 'web inspecter' to see if you get errors on loading CSS.
clear your cache (remove everything in typo3temp) and try again

Capybara Webkit Capybara::Webkit::ConnectionError failed to start

I'm using capybara webkit on Ubuntu (14.04 LTS) and I'm getting the following error when trying to use it:
Capybara::Webkit::ConnectionError: /srv/www/app/shared/bundle/ruby/2.1.0/gems/capybara-webkit-1.3.1/bin/webkit_server failed to start.
from /srv/www/app/shared/bundle/ruby/2.1.0/gems/capybara-webkit-1.3.1/lib/capybara/webkit/connection.rb:75:in `parse_port'
from /srv/www/app/shared/bundle/ruby/2.1.0/gems/capybara-webkit-1.3.1/lib/capybara/webkit/connection.rb:81:in `discover_port'
from /srv/www/app/shared/bundle/ruby/2.1.0/gems/capybara-webkit-1.3.1/lib/capybara/webkit/connection.rb:62:in `start_server'
from /srv/www/app/shared/bundle/ruby/2.1.0/gems/capybara-webkit-1.3.1/lib/capybara/webkit/connection.rb:25:in `initialize'
from /srv/www/app/shared/bundle/ruby/2.1.0/gems/capybara-webkit-1.3.1/lib/capybara/webkit/driver.rb:17:in `new'
I installed QT using:
sudo apt-get install libqt4-dev libqtwebkit-dev libqt5webkit5-dev
Using gem versions: capybara (2.4.4) and capybara-webkit (1.3.1)
The same program works fine on mac (qt installed using homebrew)
Thanks
It has been a long time since this question was asked, but I had the same problem even though I used much more ancient versions of anything. It turned out that webkit needs to be able to connect to some X-Server and this is its reaction if it fails. I ended up installing xvfb and using
xvfb-run --auto-servernum bundle exec rake test
(aliased of course) when running my tests. This is probably less than optimal, but it was good enough for me. Maybe this helps the next person who stumbles across this error.
I beat my head against this all morning. Turns out I had omitted this code from rails_helper.rb :
if ENV['HEADLESS']
require 'headless'
headless = Headless.new
headless.start
at_exit { headless.stop }
end
We use the HEADLESS environment variable to trigger this. Not sure if that's typical or a local convention. Regardless, I needed to add export HEADLESS=1 to .env to fire that off.
I also had to add gem 'headless', '~> 1.0.2' in Gemfile.

Capybara element not found just on Travis

I'm trying to put the free software where I'm one of the collaborators to run the acceptance tests on Travis. Everything went very well except for the acceptance tests with selenium.
And this is a difficult issue because the software uses only the gem versions avaiable on Debian 6. So, everything is really outdated.
Being more specific, just the steps where I'm looking for some text on the screen, with the step:
page.should have_content(text)
I've already tried to:
to add some waiting since it could be looking for the element before it was rendered;
update the xpath;
remove the webrat, because I've read that it could be conclicting with capybara;
run the tests locally with xvfb;
create a VM with Ubuntu Server 12.04 32 bits (Travis version), install everything and run the tests on xvfb;
update Capybara from 1.1.1 to 1.1.4.
But the problem persists:
# features/step_definitions/web_steps.rb:107
Unable to find xpath "/html" (Capybara::ElementNotFound)
(eval):2:in `send'
(eval):2:in `text'
./features/step_definitions/web_steps.rb:110
./features/step_definitions/web_steps.rb:14:in `with_scope'
./features/step_definitions/web_steps.rb:108:in `/^(?:|I )should see "([^"]*)"(?: within "([^"]*)")?$/'
plugins/mezuro/features/repository.feature:101:in `And I should see "My Name"'
Here is the link for the build:
https://travis-ci.org/rafamanzo/mezuro-travis/builds/6231714
Anyone have any idea? I'm afraid that it is related with the gem versions and I'll not be able to fix it by any means.
Here are links for what I was able to find about it on Google:
https://groups.google.com/forum/#!msg/ruby-capybara/PDr7sZ124Vw/qLXqHXs0XdMJ
https://github.com/rspec/rspec-rails/issues/406
Thank you very much!

Nokogiri on Mac: "Symbol not found: _xmlAddChild" How do I fix this?

I have been running Cucumber for my Rails app for quite some time without problems. Looks like something changed (but I don't know what), because now Nokogiri does not want to work. Apparently it's having trouble finding the symbol "_xmlAddChild". Not sure I even know what that means. Can you point me in the direction of reading material that can educate me, or suggest a solution?
Here's my error output:
/Users/me/.rvm/rubies/ruby-1.9.3-p0/bin/ruby -S bundle exec cucumber --profile default
Using the default profile...
dlopen(/Users/me/Sites/myapp/nokogiri/ruby/1.9.1/gems/nokogiri-1.5.0/lib/nokogiri/nokogiri.bundle, 9): Symbol not found: _xmlAddChild
Referenced from: /Users/me/Sites/myapp/nokogiri/ruby/1.9.1/gems/nokogiri-1.5.0/lib/nokogiri/nokogiri.bundle
Expected in: flat namespace
in /Users/me/Sites/myapp/nokogiri/ruby/1.9.1/gems/nokogiri-1.5.0/lib/nokogiri/nokogiri.bundle - /Users/me/Sites/myapp/nokogiri/ruby/1.9.1/gems/nokogiri-1.5.0/lib/nokogiri/nokogiri.bundle (LoadError)
Here's what I've found online:
http://rubyforge.org/tracker/index.php?func=detail&aid=27256&group_id=494&atid=1971
I tried updating the nokogiri gem alone, and with all other gems. No luck so far.
Really stupid solution here. The problem arose when another developer on the project put this line into the features/support/env.rb file used to run Cucumber.
require 'capybara'
It doesn't seem to serve a purpose, and when I removed it, the whole issue went away. I really have no idea what the error involving "_xmlAddChild" was.

no such file to load -- map_by_method

This question was asked before here, but can't say that the answer helps me. I am using Rails 3.1.3. When I run rails console on my local dev machine, I get the following message:
no such file to load -- map_by_method
The message doesn't prevent the irb session from launching, so it's benign. But I'd like to get rid of it. At one point in time I had the map_by_method gem installed, but I removed it from the Gemfile and gemset -- yet the message still appears. Any idea how to vanquish it?
there might be some causes for this:
there might be some other gem which has it as a dependency
you might have a require 'map_by_method' in your code
you might have a require in your .irbrc
the .irbrc can be located in your user home or in the current working directory.
have a look at an example .irbrc here: http://matthewhutchinson.net/2010/9/19/rails-3-bash-aliases-and-irbrc-configs
Probably the gem map_by_method has done some permanent changes on your system. Try re-installing it. It should fixed your problem. Same thing happened to me once. If it doesn't, try specifying it in development section of gemfile.