Search code examples
ruby-on-railsrubyrubygemsload-path

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


I need to do a:

require 'generator'

Inside of a rails project, but it is not working for me on OSX, because 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?


Solution

  • 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.