DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
How To Avoid The Ubygems Load Error
If you install Ruby & RubyGems from scratch (like described <a href="http://danbenjamin.com/articles/2007/02/ruby-rails-mongrel-mysql-osx">here</a> or <a href="http://danbenjamin.com/articles/2008/02/ruby-rails-leopard">here</a>), beginning with:
sudo mv /usr/local/lib/ruby ~/Desktop
and at some point have to execute the command:
sudo /usr/local/bin/ruby setup.rb
... you may see an error message that says:
/usr/local/bin/ruby: no such file to load -- ubygems (LoadError)
This can be avoided by setting the RUBYLIB path variable to include the lib directory of the downloaded RubyGems version:
unset RUBYOPT export GEM_HOME=/usr/local/lib/ruby/gems/1.8 export RUBYLIB=/usr/local/lib/ruby:/path/to/download/dir/rubygems-1.3.1/lib sudo /usr/local/bin/ruby setup.rb
or
sudo mkdir -p /usr/local/lib/ruby/gems/1.8 sudo mkdir -p /usr/local/lib/ruby/site_ruby/1.8 unset RUBYOPT export GEM_HOME=/usr/local/lib/ruby/gems/1.8 export RUBYLIB=/usr/local/lib/ruby:/usr/local/lib/ruby/site_ruby/1.8 sudo cp -R -p /path/to/download/dir/rubygems-1.3.1/lib/* /usr/local/lib/ruby/site_ruby/1.8 sudo /usr/local/bin/ruby setup.rb






Comments
Lucescu Lucescudsa replied on Wed, 2012/12/19 - 8:56pm
I must say your article is astonishing. The clarity of it is simply amazing and no doubt you are a proficient in this field. If you allow me I will with please subscribe to your feed via my chat server to keep up to date with new post. jilbab serba murah harga grosir
Snippets Manager replied on Tue, 2009/12/08 - 10:08pm
Snippets Manager replied on Wed, 2009/11/25 - 4:14am
Snippets Manager replied on Sat, 2009/11/21 - 5:29pm
Snippets Manager replied on Thu, 2009/11/19 - 8:42pm
Snippets Manager replied on Sat, 2009/11/21 - 5:29pm
Snippets Manager replied on Wed, 2009/09/09 - 10:04am
Snippets Manager replied on Thu, 2009/11/19 - 8:42pm
Snippets Manager replied on Mon, 2009/04/13 - 3:10pm
Snippets Manager replied on Mon, 2009/02/02 - 1:45pm
Snippets Manager replied on Wed, 2008/12/10 - 1:55pm
Snippets Manager replied on Sun, 2008/11/23 - 9:50pm