Politics, Programming and Possibilities
27 Feb
For anyone not following the discussion on the rails dev mailing list, you’ll need to upgrade to Rake 0.7.0 to use any of the standard ‘rake’ commands from now on. An error message that you might get without upgrading, for example, would be:
[duane@mail1 socialconference]$ rake -T
(in /home/www/socialconference)
rake aborted!
undefined method `namespace’ for main:Object
./Rakefile:10
So go on and ’sudo gem update rake’ or whatever it is you do to upgrade your gems under your environment and get those namespaces in to rake!
8 Responses for "Need to Upgrade Rake for Edge Rails"
Thanks! You just saved me some time. Googled my error and the first result is the solution. Can’t beat that.
DITTO! Thanks!
Thanks a ton…I appreciate the tip…
Indeed more praise to you.
This should be added somewhere else… i checked google, but couldn’t find this page the first time. so i tried almost everything… luckily i came across this hint!
Im updated to Rake 0.7.0, but, when running script/server after doing a freeze_edge, I still get something like:
=> Booting lighttpd (use ’script/server webrick’ to force WEBrick)
./script/../config/../vendor/rails/railties/lib/commands/../tasks/tmp.rake:1: undefined method `namespace’ for # (NoMethodError)
from ./script/../config/../vendor/rails/activesupport/lib/active_support/dependencies.rb:142:in `load’
from ./script/../config/../vendor/rails/railties/lib/commands/server.rb:29
from script/server:3
Any ideas as to what would be causing this ?
Dylan: you’re not the only one. I’m stumped.
Just solved it–that problem comes from having two versions of rake. You probably have one installed via gems and one installed via apt-get or whatever package manager you use.
For some reason running “rake -V” from the console will use the gem one, but rails will use the non-gem one if it’s installed.
ruby -r rake -e “” should give you an error. If it doesn’t, you have a non-gem rake installed, and it’s messing up rails.
Leave a reply