2. Installation Questions
I installed rubygems 0.8.3 and get the following error when trying to run the gem command: Could not find RubyGem sources (> 0.0.0). What’s wrong?
You may have been bitten by a 0.8.3 install bug. Try installing 0.8.7 or above.
During a fresh install of RubyGems, I get the following error … “in ‘require’: No such file to load — rubygems/builder (LoadError)”. What’s wrong?
Check to see that you have all the libraries needed by rubygems/builder. Missing libzlib-ruby or libyaml-ruby in particular can cause this error.
Debian Linux users may also need to apt-get install libdrb-ruby and liberb-ruby and rdoc.
How can I install a gem from behind a Windows proxy that requires authentication? I’ve tried username(colon)password(at)proxyaddress in the —http-proxy url but that doesn’t seem to work.
This suggests you’re behind an MS Proxy that does NTLM authentication. The proxy support in Ruby is currently only for Basic authentication.
A workaround is to install http://apserver.sourceforge.net apserver on your local machine, configure it and run gems through this proxy.
- Install: Just download apserver 097 (and not the experimental 098!) and unpack.
- Configure: Edit the server.cfg file and put the values for your MS proxy in PARENT_PROXY and PARENT_PROXY_PORT. Enter the values for DOMAIN and USER. Leave PASSWORD blank (nothing after the colon) – you will be prompted when launching it.
- Run apserver: cd aps097; python main.py
- Run Gems: gem install —http-proxy http://localhost:5865/ library
How do I install gems in a non-standard location, such as my home directory?
You have to redefine the location of the GEM_HOME variable and add the paths to the gem repositories in the RUBYLIB variable before launching the installation into a custom directory.
GEM_HOME should point to $PREFIX/lib/ruby/gems/1.8 if it used with the 1.8 version of ruby.
RUBYLIB should point to the $PREFIX/lib/ruby and $PREFIX/lib/site_ruby/1.8
Here is a shell script that runs in the rubygems
distribution directory to install into /home/user :
You may add GEM_HOME and RUBYLIB into your ~/.profile file to automatically load on login.