Rake gem not found issue
I am running ROR 3.0.1 with Ruby 1.9.2p0 on a Mac Mini with Snow Leopard 10.6.4.
when I run rake db:migrate I get the following error
/usr/local/lib/ruby/1.9.开发者_如何学运维1/rubygems.rb:340:in bin_path': can't find executable rake for rake-0.8.7 (Gem::Exception)
from /usr/local/bin/rake:19:in
'
I have uninstalled and reinstalled rake but I still get the same error.
Thank you for your assistance!
When you're running the gem command, are you using "sudo"? Also, what do you get when you do "gem list rake"? And finally, what does "echo $PATH" give you? Check the return value of "which rake" while you're there in the terminal.
I had the same problem and my solution was to remove this file:
/usr/local/lib/ruby/gems/1.9.1/specifications/rake.gemspec
Apparently 1.9.2 comes with a version of rake internally, but has a problem finding it because of this gemspec file.
精彩评论