Keith Salisbury
2009-Jul-07 20:40 UTC
Problems running rake test (possibly gem/debian issues)
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 -- Posted via http://www.ruby-forum.com/.
John Barnette
2009-Jul-07 21:37 UTC
Re: Problems running rake test (possibly gem/debian issues)
Hi, On Tue, Jul 7, 2009 at 1:40 PM, Keith Salisbury<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> 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 > Missing these required gems: > cucumber = 0.3.0This is a very specific version requirement. It means *exactly* version 0.3.0. Not 0.3.11, not 0.3.6.> ~/code/tradertips(with_clearance) $ gem list cuc* > > *** LOCAL GEMS *** > > cucumber (0.3.11, 0.3.6)I''d try relaxing your gem requirement (above), or manually installing cucumber 0.3.0, e.g., $ sudo gem install -v 0.3.0 cucumber ~ j.
Keith Salisbury
2009-Jul-07 21:40 UTC
Re: Problems running rake test (possibly gem/debian issues)
So i have a small update, having now removed all versions of cucumber from my machine using: ~/code/tradertips(with_clearance) $ sudo gem uninstall cucumber [sudo] password for keith: Select gem to uninstall: 1. cucumber-0.3.6 2. cucumber-0.3.11 3. All versions> 3blah blah.... This allows me to run the install command: ~/code/tradertips(with_clearance) $ sudo rake gems:install RAILS_ENV=test (in /home/keith/workspace/tradertips) gem install cucumber --version "= 0.3.0" Successfully installed cucumber-0.3.0 1 gem installed Installing ri documentation for cucumber-0.3.0... Installing RDoc documentation for cucumber-0.3.0... Which only spits me out at this problem: ~/code/tradertips(with_clearance) $ rake test (in /home/keith/workspace/tradertips) rake aborted! undefined method `fork='' for #<Cucumber::Rake::Task:0xb79b4be8> /home/keith/workspace/tradertips/Rakefile:10 (See full trace by running task with --trace) Which i assume is a dependency issue. So i re-install the lastest cucumber: ~/code/tradertips(with_clearance) $ sudo gem install cucumber Successfully installed cucumber-0.3.11 1 gem installed Installing ri documentation for cucumber-0.3.11... Installing RDoc documentation for cucumber-0.3.11... And try running tests again: ~/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 /home/keith/workspace/tradertips/vendor/rails/activesupport/lib/active_support/dependencies.rb:443:in `load_missing_constant'': uninitialized constant Clearance::Test (NameError) from /home/keith/workspace/tradertips/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:in `const_missing'' from ./test/unit/clearance_mailer_test.rb:5 from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `load'' from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5 from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `each'' from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5 /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 /home/keith/workspace/tradertips/vendor/rails/activesupport/lib/active_support/dependencies.rb:443:in `load_missing_constant'': uninitialized constant Clearance::Test (NameError) from /home/keith/workspace/tradertips/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:in `const_missing'' from ./test/functional/passwords_controller_test.rb:8 from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `load'' from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5 from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `each'' from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5 /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! So this is a different error, which may or may not be good, but i''m still no better off. Any advice would be most welcome, thanks... Am i doing something wrong here? -- Posted via http://www.ruby-forum.com/.
Keith Salisbury
2009-Jul-07 21:58 UTC
Re: Problems running rake test (possibly gem/debian issues)
John Barnette wrote:> I''d try relaxing your gem requirement (above), or manually installing > cucumber 0.3.0, e.g.,Thanks John, I went back and tried this and it did help resolve the dependency issue, however i still find myself unable to run the tests: ~/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/dependencies.rb:443:in `load_missing_constant'': uninitialized constant Clearance::Test (NameError) from /home/keith/workspace/tradertips/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:in `const_missing'' from ./test/unit/clearance_mailer_test.rb:5 from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `load'' from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5 from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `each'' from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5 /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/dependencies.rb:443:in `load_missing_constant'': uninitialized constant Clearance::Test (NameError) from /home/keith/workspace/tradertips/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:in `const_missing'' from ./test/functional/passwords_controller_test.rb:8 from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `load'' from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5 from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `each'' from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5 /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! I''m assuming this might be a Clearance issue now? -- Posted via http://www.ruby-forum.com/.
Keith Salisbury
2009-Jul-08 12:29 UTC
Re: Problems running rake test (possibly gem/debian issues)
Bumpety bump.....does anyone have any ideas about this? please? thanks -- Posted via http://www.ruby-forum.com/.
Matt Jones
2009-Jul-08 18:28 UTC
Re: Problems running rake test (possibly gem/debian issues)
Given that the error states that Clearance::Test is missing, I''d say a Clearance issue is quite likely... --Matt Jones On Jul 7, 5:58 pm, Keith Salisbury <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> John Barnette wrote: > > I''d try relaxing your gem requirement (above), or manually installing > > cucumber 0.3.0, e.g., > > Thanks John, I went back and tried this and it did help resolve the > dependency issue, however i still find myself unable to run the tests: > > ~/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_supp ort/dependencies.rb:443:in > `load_missing_constant'': uninitialized constant Clearance::Test > (NameError)[snip]> > I''m assuming this might be a Clearance issue now?
Keith Salisbury
2009-Jul-08 23:35 UTC
Re: Problems running rake test (possibly gem/debian issues)
Matt Jones wrote:> Given that the error states that Clearance::Test is missing, I''d say a > Clearance issue is quite likely... > > --Matt Jones > > On Jul 7, 5:58�pm, Keith Salisbury <rails-mailing-l...@andreas-s.net> > wrote: >> "/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" >> (NameError) > [snip]Thanks for replying Matt, i''ve continued the questioning over in the clearance google group so hopefully someone there can point me in the right direction. -- Posted via http://www.ruby-forum.com/.