# Problems running rake test (possibly gem/debian issues)

**URL:** <https://www.ruby-forum.com/t/problems-running-rake-test-possibly-gem-debian-issues/171705>\
**Category:** Rails\
**Created:** [July 7, 2009, 10:40pm UTC](https://www.ruby-forum.com/t/problems-running-rake-test-possibly-gem-debian-issues/171705 "2009-07-07T22:40:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ksader](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/49beb7/32.png) [@ksader](https://www.ruby-forum.com/u/ksader)\
**Post date:** [July 7, 2009, 10:40pm UTC](https://www.ruby-forum.com/t/problems-running-rake-test-possibly-gem-debian-issues/171705/1 "2009-07-07T22:40:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ksader](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/49beb7/32.png) [@ksader](https://www.ruby-forum.com/u/ksader)\
**Post date:** [July 7, 2009, 11:37pm UTC](https://www.ruby-forum.com/t/problems-running-rake-test-possibly-gem-debian-issues/171705/2 "2009-07-07T23:37:57Z")

</div>

Hi,

On Tue, Jul 7, 2009 at 1:40 PM, Keith  
Salisbury[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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.0

This 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.

---

<div class="post-metadata">

**Author:** ![ksader](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/49beb7/32.png) [@ksader](https://www.ruby-forum.com/u/ksader)\
**Post date:** [July 7, 2009, 11:40pm UTC](https://www.ruby-forum.com/t/problems-running-rake-test-possibly-gem-debian-issues/171705/3 "2009-07-07T23:40:49Z")

</div>

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

> 3

blah 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?

---

<div class="post-metadata">

**Author:** ![ksader](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/49beb7/32.png) [@ksader](https://www.ruby-forum.com/u/ksader)\
**Post date:** [July 7, 2009, 11:58pm UTC](https://www.ruby-forum.com/t/problems-running-rake-test-possibly-gem-debian-issues/171705/4 "2009-07-07T23:58:32Z")

</div>

John B. 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?

---

<div class="post-metadata">

**Author:** ![ksader](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/49beb7/32.png) [@ksader](https://www.ruby-forum.com/u/ksader)\
**Post date:** [July 8, 2009, 2:29pm UTC](https://www.ruby-forum.com/t/problems-running-rake-test-possibly-gem-debian-issues/171705/5 "2009-07-08T14:29:38Z")

</div>

Bumpety bump…does anyone have any ideas about this? please?

thanks

---

<div class="post-metadata">

**Author:** ![ksader](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/49beb7/32.png) [@ksader](https://www.ruby-forum.com/u/ksader)\
**Post date:** [July 8, 2009, 8:28pm UTC](https://www.ruby-forum.com/t/problems-running-rake-test-possibly-gem-debian-issues/171705/6 "2009-07-08T20:28:56Z")

</div>

Given that the error states that Clearance::Test is missing, I’d say a  
Clearance issue is quite likely…

–Matt J.

On Jul 7, 5:58 pm, Keith S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> “/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake\_test\_loader.rb”  
> (NameError)  
> [snip]

---

<div class="post-metadata">

**Author:** ![ksader](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/49beb7/32.png) [@ksader](https://www.ruby-forum.com/u/ksader)\
**Post date:** [July 9, 2009, 1:35am UTC](https://www.ruby-forum.com/t/problems-running-rake-test-possibly-gem-debian-issues/171705/7 "2009-07-09T01:35:29Z")

</div>

Matt J. wrote:

> Given that the error states that Clearance::Test is missing, I’d say a  
> Clearance issue is quite likely…
> 
> –Matt J.
> 
> On Jul 7, 5:58ï¿½pm, Keith S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> 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.
