I haven an Rspec which has the following:
visit '/static_pages/home'
It works fine under Capybara 1.1.2, now when I switch to Capybara 2.0.2 I get an NoMethod exception on visit.
What is going wrong?
What testing framework are you using? Have you included Capybara::DSL as specified in the README?
Related
Ubuntu 20.04
Rails 3.2.22.5
Ruby 2.3.7
mysql2 8.0.29
Above are the versions that currently i'm using for my project(app).
In Gemfile mysql2 version is 0.3.18 but this version throwing me errors and not allowing me to run complete bundle.
But, when i'm trying to run bundle with different version of mysql2 gem like 0.5.4, bundle successfully running but after that when i try to create db(database) or to start server this above error mentioned in question appears.
Anyone please help me out in this regard if you guys have any idea about that.
Thanks in advance
I am using rspec + spork + selenium webdriver to test my app. I don't know how to access my app from selenium(while running rspec) for eg what url should i type in driver.navigate.to to get access to my website?
Best regards
Artur
You can see what's going on by starting spork this way:
SELENIUM='true' spork
When you start your tests by:
rspec spec --drb
Then the browser will open and you can see your test.
I restarted working on an older rails project today. One problem driving me crazy is that I can't get my javascript test cases to run, although I remember them all passing when I left the project. I am using
selenium-webdriver 2.25.0
capybara 1.1.2
cucumber 1.2.1
but firefox doesn't start when I run the tests. All I get is
unable to start Firefox cleanly, args: ["-silent"]
(Selenium::WebDriver::Error::WebDriverError)
I guess this is because of updating firefox and I tried to install several older versions but none of them works. Which version is supported by selenium-webdriver 2.25.0?
Yes, this is annoying. I just upgrade the driver and it usually does the trick:
bundle update selenium-webdriver
Selenium Webdriver 2.25 supports Firefox up to version 17
This is a long running issue which I have faced, not being able to use s3sync and s3cmd from ruby ver 1.9.2, although it works fine under ruby 1.8.7.
Tried making the changes as give here
lib/HTTPStreaming.rb is missing the line:
require 'delegate')
Gets me past first level of error but then i get 403 Forbidden error.
Found the answer in the new gem - frahugo-s3sync (1.3.8)
Seems to work in the initial tests.
Another fork that works fine with Ruby 1.9.x is https://github.com/aproxacs/s3sync.
I using the rails by Instantrails on windows.It can run well before I update the rails version to rails 3 .
The error message is :
E:\InstantRails-2.0-win\rails_apps\myproject>rails server
E:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/lo
ckfile_parser.rb:48:in parse_source': undefined method[]' for nil:NilClass (N
oMethodError)
from E:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/bundler-1.0.0/l
ib/bundler/lockfile_parser.rb:20:in send'
from E:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/bundler-1.0.0/l
ib/bundler/lockfile_parser.rb:20:ininitialize'
from E:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/bundler-1.0.0/l
ib/bundler/lockfile_parser.rb:14:in each'
from E:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/bundler-1.0.0/l
ib/bundler/lockfile_parser.rb:14:ininitialize'
from E:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/bundler-1.0.0/l
ib/bundler/definition.rb:43:in new'
from E:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/bundler-1.0.0/l
ib/bundler/definition.rb:43:ininitialize'
What cause this error?
I found that answer,because the old version project can't run on the new version.
You're troubling the trouble by using a legacy environment like InstantRails for rails3.
InstantRails hasn't been updated for nearly 3 years and its latest version includes ruby 1.8.6 which is incomplatible with rails 3.
From the official Ruby on Rails website:
We recommend Ruby 1.8.7 or Ruby 1.9.2 for use with Rails. Ruby 1.8.6 and earlier are not supported, neither is version 1.9.1
If you really insist on using windows as a development environment, the recommended way of getting rails 3 to work on Windows right now is to install ruby via the Windows installer: http://rubyforge.org/frs/?group_id=167 and then just install RubyGems by running its installation script and afterwards install rails3 as gem.