开发者

Why does my rails project not have the ruby standard lib in $LOAD_PATH on OSX?

开发者 https://www.devze.com 2022-12-22 07:43 出处:网络
I need to do a: require \'generator\' Inside of a rails project, but it is not working for me on OSX, because开发者_如何学Python the ruby standard library (which is located in my /usr/lib/ruby/1.8

I need to do a:

require 'generator'

Inside of a rails project, but it is not working for me on OSX, because开发者_如何学Python the ruby standard library (which is located in my /usr/lib/ruby/1.8) is not in my $LOAD_PATH once rails boots.

If I just run irb outside of rails it is there.

Where/What do I need to config?


I suppose to have ruby and rubygems by macport.

I advise you to use rvm it's really great and help to manage your LOAD_PATH

With MacOS, it's better to save all your gem in your user home not in root.

0

精彩评论

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