small medium large xlarge

Generic-user-small
31 Jul 2010, 20:03
Philip Puccio (1 post)

Hi,

I get an error (undefined local variable or method `rdoc_task_name’ for #) when I try to run the first migration in the B6.0 printing, July 27, 2010, of the 4th Edition.

Here’s some assorted version info, followed by the full stack trace for the error.

Any advice is appreciated … Phil

$ rails –version Rails 3.0.0.rc

$ gem –version 1.3.7

$ rake –version rake, version 0.8.3

$ which rake /opt/local/bin/rake

$ which ruby /opt/local/bin/ruby

$ which gem /opt/local/bin/gem

$ rake db:migrate –trace (in /Users/POOCH/Development/RubyAndRails/depot) rake aborted! undefined local variable or method rdoc_task_name' for #<RDocTaskWithoutDescriptions:0x1010e3808> /opt/local/lib/ruby/gems/1.8/gems/railties-3.0.0.rc/lib/rails/tasks/documentation.rake:6:in define’ /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/rdoctask.rb:81:in initialize' /opt/local/lib/ruby/gems/1.8/gems/railties-3.0.0.rc/lib/rails/tasks/documentation.rake:40:in new’ /opt/local/lib/ruby/gems/1.8/gems/railties-3.0.0.rc/lib/rails/tasks/documentation.rake:40 /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1851:in in_namespace' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:892:in namespace’ /opt/local/lib/ruby/gems/1.8/gems/railties-3.0.0.rc/lib/rails/tasks/documentation.rake:34 /opt/local/lib/ruby/gems/1.8/gems/railties-3.0.0.rc/lib/rails/tasks.rb:15:in load' /opt/local/lib/ruby/gems/1.8/gems/railties-3.0.0.rc/lib/rails/tasks.rb:15 /opt/local/lib/ruby/gems/1.8/gems/railties-3.0.0.rc/lib/rails/tasks.rb:6:in each’ /opt/local/lib/ruby/gems/1.8/gems/railties-3.0.0.rc/lib/rails/tasks.rb:6 /opt/local/lib/ruby/gems/1.8/gems/railties-3.0.0.rc/lib/rails/application.rb:212:in require' /opt/local/lib/ruby/gems/1.8/gems/railties-3.0.0.rc/lib/rails/application.rb:212:in initialize_tasks’ /opt/local/lib/ruby/gems/1.8/gems/railties-3.0.0.rc/lib/rails/application.rb:139:in load_tasks' /opt/local/lib/ruby/gems/1.8/gems/railties-3.0.0.rc/lib/rails/application.rb:77:in send’ /opt/local/lib/ruby/gems/1.8/gems/railties-3.0.0.rc/lib/rails/application.rb:77:in method_missing' /Users/POOCH/Development/RubyAndRails/depot/rakefile:7 /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2349:in load’ /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2349:in raw_load_rakefile' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1985:in load_rakefile’ /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in standard_exception_handling' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1984:in load_rakefile’ /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1969:in run' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in standard_exception_handling’ /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1967:in run' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/bin/rake:31 /opt/local/bin/rake:19:in load’ /opt/local/bin/rake:19

Samr_small_pragsmall
01 Aug 2010, 16:02
Sam Ruby (634 posts)

I haven’t seen that error, nor can I reproduce it, nor can I find it via a google search. I also mentioned it to the Rails Core team, and came up with nothing.

Try a fresh installation with rvm. Make sure that curl and git are installed, then enter:

bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )

Add the following to .bashrc:

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"

And then in a new session:

rvm install 1.8.7
rvm 1.8.7
gem install rails --pre
gem install sqlite3-ruby
Pete-lowres-50_pragsmall
02 Aug 2010, 22:14
Pete Lasko (3 posts)

Got the same exact error. Gonna try to spin up a new toy app see if I still get it.

-Update: still getting the error, same versions as Phillip, except my location is usr/bin not opt/local

This is a clean version of ruby on snowleopard, not messed with, only upgraded from 2.3.X to 3.0 b4 to the rc.

Downgraded to beta4, works fine.

Samr_small_pragsmall
02 Aug 2010, 23:09
Sam Ruby (634 posts)

What version of ruby? ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0] is known to be broken…

Generic-user-small
12 Aug 2010, 22:09
Aaron Suggs (1 post)

You need a newer version of rake. Anything newer than 0.8.3.

Run gem update rake

Img_0373_pragsmall
13 Aug 2010, 19:24
John Burnaman (2 posts)

I ran into this issue myself, but then I remembered that you still have to enforce the version of Ruby installed if you have more than one. When I started again with rails new depot -d mysql 3.0.0.rc –version everything worked just fine.

You must be logged in to comment