After running bundle update I have suddenly found that my cucumber tests are failing to get going.
Running cucumber features gives me:
$ cucumber features
Using the default profile...
uninitialized constant ActiveRecord (NameError)
/Library/Ruby/Gems/1.8/gems/rspec-expectations-2.3.0/lib/rspec/expectations/backward_compatibility.rb:6:in `const_missing'
/Library/Ruby/Gems/1.8/gems/default_value_for-1.0.1/lib/rails.rb:23
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `require'
/Library/Ruby/Gems/1.8/gems/cucumber-rails-0.4.1/lib/cucumber/rails.rb:1
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `require'
/Users/petenixey/Rails_apps/kind-advice/features/support/env.rb:7
/Library/Ruby/Gems/1.8/gems/cucumber-0.10.2/bin/../lib/cucumber/rb_support/rb_language.rb:143:in `load'
/Library/Ruby/Gems/1.8/gems/cucumber-0.10.2/bin/../lib/cucumber/rb_support/rb_language.rb:143:in `load_code_file'
/Library/Ruby/Gems/1.8/gems/cucumber-0.10.2/bin/../lib/cucumber/runtime/support_code.rb:176:in `load_file'
/Library/Ruby/Gems/1.8/gems/cucumber-0.10.2/bin/../lib/cucumber/runtime/support_code.rb:78:in `load_files!'
/Library/Ruby/Gems/1.8/gems/cucumber-0.10.2/bin/../lib/cucumber/runtime/support_code.rb:77:in `each'
/Library/Ruby/Gems/1.8/gems/cucumber-0.10.2/bin/../lib/cucumber/runtime/support_code.rb:77:in `load_files!'
/Library/Ruby/Gems/1.8/gems/cucumber-0.10.2/bin/../lib/cucumber/runtime.rb:137:in `load_step_definitions'
/Library/Ruby/Gems/1.8/gems/cucumber-0.10.2/bin/../lib/cucumber/runtime.rb:39:in `run!'
/Library/Ruby/Gems/1.8/gems/cucumber-0.10.2/bin/../lib/cucumber/cli/main.rb:43:in `execute!'
/Library/Ruby/Gems/1.8/gems/cucumber-0.10.2/bin/../lib/cucumber/cli/main.rb:20:in `execute'
/Library/Ruby/Gems/1.8/gems/cucumber-0.10.2/bin/cucumber:14
/usr/bin/cucumber:19:in `load'
/usr/bin/cucumber:19
I have tried "reinstalling" Cucumber using
rails generate cucumber:install
However this doesn't seem to have any effect.
My gemfile is:
source :rubygems
source "http://rubygems.org"
gem "rails", "~>3.0.3"
gem "sqlite3-ruby", :require => "sqlite3"
gem "hoptoad_notifier"
gem "pony"
gem "default_value_for"
gem "authlogic"
gem 'jquery-rails', '>= 0.2.6'
gem "rake"
group :development, :test do
gem "faker"
gem "launchy"
gem "test-unit"
gem "autotest"
gem "autotest-growl"
gem "autotest-rails-pure"
gem "autotest-fsevent"
gem "factory_girl_rails"
gem "rspec-rails", "~> 2.3.0"
gem "ruby-debug"
gem "capybara", "0.3.9"
gem "webrat"
gem 'cucumber-rails'
gem 'database_cleaner'
gem 'metric_fu'
end
And my gemfile.lock is:
GEM
remote: http://rubygems.org/
remote: http://rubygems.org/
specs:
Saikuro (1.1.0)
ZenTest (4.5.0)
abstract (1.0.0)
actionmailer (3.0.7)
actionpack (= 3.0.7)
mail (~> 2.2.15)
actionpack (3.0.7)
activemodel (= 3.0.7)
activesupport (= 3.0.7)
builder (~> 2.1.2)
erubis (~> 2.6.6)
i18n (~> 0.5.0)
rack (~> 1.2.1)
rack-mount (~> 0.6.14)
rack-test (~> 0.5.7)
tzinfo (~> 0.3.23)
activemodel (3.0.7)
activesupport (= 3.0.7)
builder (~> 2.1.2)
i18n (~> 0.5.0)
activerecord (3.0.7)
activemodel (= 3.0.7)
activesupport (= 3.0.7)
arel (~> 2.0.2)
tzinfo (~> 0.3.23)
activeresource (3.0.7)
activemodel (= 3.0.7)
activesupport (= 3.0.7)
activesupport (3.0.7)
arel (2.0.9)
arrayfields (4.7.4)
authlogic (2.1.6)
activesupport
autotest (4.4.6)
ZenTest (>= 4.4.1)
autotest-fsevent (0.2.5)
sys-uname
autotest-growl (0.2.9)
autotest-rails-pure (4.1.2)
builder (2.1.2)
capybara (0.3.9)
culerity (>= 0.2.4)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
selenium-webdriver (>= 0.0.3)
childprocess (0.1.8)
ffi (~> 1.0.6)
chronic (0.3.0)
churn (0.0.13)
chronic (>= 0.2.3)
hirb
json_pure
main
ruby_parser (~> 2.0.4)
sexp_processor (~> 3.0.3)
colored (1.2)
columnize (0.3.2)
configuration (1.2.0)
cucumber (0.10.2)
builder (>= 2.1.2)
diff-lcs (>= 1.1.2)
gherkin (>= 2.3.5)
json (>= 1.4.6)
term-ansicolor (>= 1.0.5)
cucumber-rails (0.4.1)
cucumber (>= 0.10.1)
nokogiri (>= 1.4.4)
rack-test (>= 0.5.7)
culerity (0.2.15)
database_cleaner (0.6.6)
default_value_for (1.0.1)
diff-lcs (1.1.2)
erubis (2.6.6)
abstract (>= 1.0.0)
factory_girl (1.3.3)
factory_girl_rails (1.0.1)
factory_girl (~> 1.3)
railties (>= 3.0.0)
faker (0.9.5)
i18n (~> 0.4)
fattr (2.2.0)
ffi (1.0.7)
rake (>= 0.8.7)
flay (1.4.2)
ruby_parser (~> 2.0)
sexp_processor (~> 3.0)
flog (2.5.1)
ruby_parser (~> 2.0)
sexp_processor (~> 3.0)
gherkin (2.3.6)
json (>= 1.4.6)
haml (3.0.25)
hirb (0.4.3)
hoptoad_notifier (2.4.9)
activesupport
builder
i18n (0.5.0)
jquery-rails (0.2.7)
rails (~> 3.0)
thor (~> 0.14.4)
json (1.5.1)
json_pure (1.5.1)
launchy (0.4.0)
configuration (>= 0.0.5)
rake (>= 0.8.1)
linecache (0.43)
mail (2.2.17)
activesupport (>= 2.3.6)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
main (4.4.0)
arrayfields (>= 4.7.4)
fattr (>= 2.1.0)
metric_fu (2.1.1)
Saikuro (>= 1.1.0)
activesupport (>= 2.0.0)
chronic (~> 0.3.0)
churn (>= 0.0.7)
flay (>= 1.2.1)
flog (>= 2.3.0)
rails_best_practices (>= 0.6.4)
rcov (>= 0.8.3.3)
reek (>= 1.2.6)
roodi (>= 2.1.0)
syntax
mime-types (1.16)
nokogiri (1.4.4)
polyglot (0.3.1)
pony (1.1)
mail (> 2.0)
rack (1.2.2)
rack-mount (0.6.14)
rack (>= 1.0.0)
rack-test (0.5.7)
rack (>= 1.0)
rails (3.0.7)
actionmailer (= 3.0.7)
actionpack (= 3.0.7)
activerecord (= 3.0.7)
activeresource (= 3.0.7)
activesupport (= 3.0.7)
bundler (~> 1.0)
railties (= 3.0.7)
rails_best_practices (0.7.5)
activesupport
colored (~> 1.2)
erubis (~> 2.6.6)
haml (~> 3.0.18)
i18n
ruby-progressbar (~> 0.0.9)
ruby_parser (~> 2.0.4)
railties (3.0.7)
actionpack (= 3.0.7)
activesupport (= 3.0.7)
rake (>= 0.8.7)
thor (~> 0.14.4)
rake (0.8.7)
rcov (0.9.9)
reek (1.2.8)
ruby2ruby (~> 1.2)
ruby_parser (~> 2.0)
sexp_processor (~> 3.0)
roodi (2.1.0)
ruby_parser
rspec (2.3.0)
rspec-core (~> 2.3.0)
rspec-expectations (~> 2.3.0)
rspec-mocks (~> 2.3.0)
rspec-core (2.3.1)
rspec-expectations (2.3.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.3.0)
rspec-rails (2.3.1)
actionpack (~> 3.0)
activesupport (~> 3.0)
railties (~> 3.0)
rspec (~> 2.3.0)
ruby-debug (0.10.4)
columnize (>= 0.1)
ruby-debug-base (~> 0.10.4.0)
ruby-debug-base (0.10.4)
linecache (>= 0.3)
ruby-progressbar (0.0.10)
ruby2ruby (1.2.5)
ruby_parser (~> 2.0)
sexp_processor (~> 3.0)
ruby_parser (2.0.6)
sexp_processor (~> 3.0)
rubyzip (0.9.4)
selenium-webdriver (0.1.4)
childprocess (>= 0.1.7)
ffi (>= 1.0.7)
json_pure
rubyzip
sexp_processor (3.0.5)
sqlite3 (1.3.3)
sqlite3-ruby (1.3.3)
sqlite3 (>= 1.3.3)
syntax (1.0.0)
sys-uname (0.8.5)
term-ansicolor (1.0.5)
test-unit (2.3.0)
thor (0.14.6)
treetop (1.4.9)
polyglot (>= 0.3.1)
tzinfo (0.3.26)
webrat (0.7.3)
nokogiri (>= 1.2.0)
rack (>= 1.0)
rack-test (>= 0.5.3)
PLATFORMS
ruby
DEPENDENCIES
authlogic
autotest
autotest-fsevent
autotest-growl
autotest-rails-pure
capybara (= 0.3.9)
cucumber-rails
database_cleaner
default_value_for
factory_girl_rails
faker
hoptoad_notifier
jquery-rails (>= 0.2.6)
launchy
metric_fu
pony
rails (~> 3.0.3)
rake
rspec-rails (~> 2.3.0)
ruby-debug
sqlite3-ruby
test-unit
webrat
I've tried removing all of the code in my cucumber files to see if they're affecting things but it makes not difference. I'm at a loss as to how to fix this.
I finally discovered the issue here.
Since the problem appeared after a bundle update I eventually figured out that it probably wasn't my code causing the issue.
I tried doing a fresh rails install with the new set of gems and sure enough I got the same problem.
One by one I went through and tried removing gems to see if it made a difference. Finally I uninstalled the default_value_for 1.0.1 gem and everything started to run again.
For some reason there was a conflict between default_value_for 1.0.1 and something in the latest RSpec gem. I reported this as a bug on the default_value_for github repository so this may no longer be an issue but I have not tried reinstalling it yet.