Hi,
I seem to have a constant battle going on my machine about gems. The
latest problem is when i attempt to run “rake test” on my rails project,
here is the output:
~/code/tradertips(with_clearance) $ rake test
(in /home/keith/workspace/tradertips)
/usr/bin/ruby1.8 -I"lib:test"
“/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb”
“test/unit/clearance_mailer_test.rb” “test/unit/mailer_test.rb”
“test/unit/helpers/passwords_helper_test.rb”
“test/unit/helpers/users_helper_test.rb”
“test/unit/helpers/confirmations_helper_test.rb”
“test/unit/helpers/home_helper_test.rb”
“test/unit/helpers/invites_helper_test.rb”
“test/unit/helpers/sessions_helper_test.rb” “test/unit/user_test.rb”
“test/unit/invite_test.rb”
/home/keith/workspace/tradertips/vendor/rails/activesupport/lib/active_support/test_case.rb:6:
warning: already initialized constant Mocha
Missing these required gems:
cucumber = 0.3.0
You’re running:
ruby 1.8.7.72 at /usr/bin/ruby1.8
rubygems 1.3.2 at /home/keith/.gem/ruby/1.8, /usr/lib/ruby/gems/1.8
Run rake gems:install
to install the missing gems.
/usr/bin/ruby1.8 -I"lib:test"
“/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb”
“test/functional/passwords_controller_test.rb”
“test/functional/confirmations_controller_test.rb”
“test/functional/invites_controller_test.rb”
“test/functional/home_controller_test.rb”
“test/functional/sessions_controller_test.rb”
“test/functional/users_controller_test.rb”
/home/keith/workspace/tradertips/vendor/rails/activesupport/lib/active_support/test_case.rb:6:
warning: already initialized constant Mocha
Missing these required gems:
cucumber = 0.3.0
You’re running:
ruby 1.8.7.72 at /usr/bin/ruby1.8
rubygems 1.3.2 at /home/keith/.gem/ruby/1.8, /usr/lib/ruby/gems/1.8
Run rake gems:install
to install the missing gems.
/usr/bin/ruby1.8 -I"lib:test"
“/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb”
Errors running test:units and test:functionals!
~/code/tradertips(with_clearance) $
Ok so we might think that message is useful, but look:
~/code/tradertips(with_clearance) $ gem list cuc*
*** LOCAL GEMS ***
cucumber (0.3.11, 0.3.6)
Ok, so i’ll try following the suggestion (i’ve declared the gems in
test.rb so we need to set the environment also):
~/code/tradertips(with_clearance) $ rake gems:install RAILS_ENV=test
(in /home/keith/workspace/tradertips)
rake aborted!
can’t activate , already activated cucumber-0.3.11
(See full trace by running task with --trace)
Grrrrr, so here i am, stuck in this crazy loop, and nothing is coming up
in google that i can find.
Does anyone here have a suggestion i can try to resolve this?
Many thanks
Keith