Rake Error

1 view
Skip to first unread message

dwaonsolo

unread,
May 5, 2009, 6:33:05 PM5/5/09
to Beginning Ruby on Rails E-Commerce
I have a problem with the Rake funtion, i was told i can do the whole
thinkg without raking but when it came to chapter 11 on acceptance
testing then it seems like i need it for selenium to work. Here is
what happens when i do the rake trace:

dwain@ubuntu:~/Documents/stuad$ rake --trace
(in /home/dwain/Documents/stuad)
/home/dwain/Documents/stuad/config/boot.rb:29:Warning: require_gem is
obsolete. Use gem instead.
** Invoke default (first_time)
** Invoke test (first_time)
** Execute test
** Invoke test:units (first_time)
** Invoke db:test:prepare (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:test:prepare
** Invoke db:test:clone (first_time)
** Invoke db:schema:dump (first_time)
** Invoke environment
** Execute db:schema:dump
** Invoke db:test:purge (first_time)
** Invoke environment
** Execute db:test:purge
** Execute db:test:clone
** Invoke db:schema:load (first_time)
** Invoke environment
** Execute db:schema:load
** Execute test:units
** Invoke test:functionals (first_time)
** Invoke db:test:prepare
** Execute test:functionals
** Invoke test:integration (first_time)
** Invoke db:test:prepare
** Execute test:integration
rake aborted!
Test failures
/usr/local/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/tasks/testing.rake:
50
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `call'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in
`execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in
`execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:357:in
`invoke'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in
`synchronize'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in
`invoke'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:364:in
`invoke_prerequisites'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:999:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:999:in `send'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:999:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:363:in
`invoke_prerequisites'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:356:in
`invoke'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in
`synchronize'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in
`invoke'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in
`each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/bin/rake:7
/usr/local/bin/rake:16:in `load'
/usr/local/bin/rake:16

can you tell me what the error for this is?

Jarkko Laine

unread,
May 6, 2009, 1:35:48 AM5/6/09
to railsec...@googlegroups.com

On 6.5.2009, at 1.33, dwaonsolo wrote:

>
> I have a problem with the Rake funtion, i was told i can do the whole
> thinkg without raking but when it came to chapter 11 on acceptance
> testing then it seems like i need it for selenium to work. Here is
> what happens when i do the rake trace:
>
> dwain@ubuntu:~/Documents/stuad$ rake --trace
> (in /home/dwain/Documents/stuad)
> /home/dwain/Documents/stuad/config/boot.rb:29:Warning: require_gem is
> obsolete. Use gem instead.

>
> can you tell me what the error for this is?

See above. Use 'gem' instead of 'require_gem' in line 29 of boot.rb. I
think running 'rake rails:update' would fix that as well, but if
running rake breaks it's not much help :-)

Just a word of warning. The book is written about 3 years ago. A lot
has changed in the syntax since then so you'll end up doing this kind
of debugging for quite a bit.

//jarkko


>
> >

--
Jarkko Laine
http://jlaine.net
http://dotherightthing.com
http://www.railsecommerce.com
http://odesign.fi

dwaonsolo

unread,
May 7, 2009, 8:40:53 AM5/7/09
to Beginning Ruby on Rails E-Commerce


On May 6, 6:35 am, Jarkko Laine <jarks...@gmail.com> wrote:
> On 6.5.2009, at 1.33, dwaonsolo wrote:
>
>
>
> > I have a problem with the Rake funtion, i was told i can do the whole
> > thinkg without raking but when it came to chapter 11 on acceptance
> > testing then it seems like i need it for selenium to work. Here is
> > what happens when i do the rake trace:
>
> > dwain@ubuntu:~/Documents/stuad$ rake --trace
> > (in /home/dwain/Documents/stuad)
> > /home/dwain/Documents/stuad/config/boot.rb:29:Warning: require_gem is
> > obsolete.  Use gem instead.
>
> > can you tell me what the error for this is?
>
> See above. Use 'gem' instead of 'require_gem' in line 29 of boot.rb. I  
> think running 'rake rails:update' would fix that as well, but if  
> running rake breaks it's not much help :-)
>
> Just a word of warning. The book is written about 3 years ago. A lot  
> has changed in the syntax since then so you'll end up doing this kind  
> of debugging for quite a bit.
>
> //jarkko


Thanks for the word of warning, i have been debugging for a while coz
there seem to be alot of problems. And because i am new to ruby on
rails its just annoying fixing the bugs.

This is what i get now:

dwain@ubuntu:~/Documents/stuad$ rake
(in /home/dwain/Documents/stuad)
rake aborted!
Test failures

(See full trace by running task with --trace)
dwain@ubuntu:~/Documents/stuad$ rake --trace
(in /home/dwain/Documents/stuad)
dwain@ubuntu:~/Documents/stuad$ rake db:migrate
(in /home/dwain/Documents/stuad)


If i run "rake rails:update" would the current version of rake work
well with the other gems because my gems are in the 1. versions?

Jarkko Laine

unread,
May 7, 2009, 10:25:13 AM5/7/09
to railsec...@googlegroups.com

I'm pretty sure the code in the book won't work even with Rails 1.2.1
(that you're running now). It's just way older than that. I would thus
get the latest versions of all the gems (including rake), run rake
rails:update and see how it goes. I can try to help you then but it's
pretty hard with the stack trace above, since it doesn't actually
produce any errors, just test failures which are for some reason not
listed there.

Reply all
Reply to author
Forward
0 new messages