[Rubygems-developers] rubygems LoadError driving me insane

Chad Fowler chad at chadfowler.com
Wed Sep 7 10:18:26 EDT 2005

On 06-Sep-05, at 5:12 PM, Ryan Raaum wrote:

> Hello everyone,
> I am slowly being driven over the edge by a small loading problem  
> in Mac OS X.
> I want my ruby/gems install to be self-contained and capable of being
> moved around on the system - feeding it the appropriate paths and what
> not through environment variables.
> If I set PATH and RUBYLIB on the command line to point to my mobile
> ruby install, everything seems to work fine.  I can run anything I
> try.  I can fire up irb and require 'rubygems', etc.
> BUT, when I do the exact same thing programmatically (NSTask from
> Cocoa) - that is, set PATH, set RUBYLIB, then try to fire off a
> script, I get:
> No such file to load -- rubygems (LoadError)
> Any ideas??
> I'm setting
> PATH=/path/to/mobile/ruby/bin:$PATH
> RUBYLIB=/path/to/mobile/ruby/lib/ruby/site-ruby/1.8:...site-ruby/ 
> 1.8/powerpc-darwin7.9.0:.../site-ruby:...1.8:...1.8/powerpc- 
> darwin7.9.0
> (with ... just cutting out the verbosity for this post).
> It doesn't seem to matter if the shebang in the script I am trying to
> run points directly to the ruby interpreter or use /usr/bin/env

Hi Ryan!  Can you perhaps print out the contents of $: from within  
the forked script?


More information about the Rubygems-developers mailing list