开发者

How do I change the directory of Rake? (currently /usr/bin/rake)

I am using Ruby 1.8.7 and Rails 3 on OS X. I'm getting an error when I run rake db:create on a new installation of rails for the first time. Here is the error in Terminal:

(in /Users/Michael/Sites/rails/blog)
rake aborted!
undefined local variable or method `bundler' for main:Object
/Users/Michael/Sites/rails/blog/Rakefile:4

Using which commands I get:

$ which ruby
/opt/local/bin/ruby
$ which rake
/usr/bin/rake

I installed ruby using MacPorts, hence the opt/ path. How do I change rake's config to g开发者_如何学Co to that path instead of /usr/bin/rake?


you could try to change the PATH env variable so that the /opt/local/bin is prepended to the /usr/bin. For instance in your $HOME/.bash_profile file you could write

export PATH=/opt/local/bin:$PATH


Install Rake from MacPorts (rb-rake). Or, install Rake manually using the MacPorts Ruby.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜