« New Options for Technical Books | Main | Trouble with MySQL Gem »
Install Rails From Behind a Squid Proxy
This is just for future reference, and to help anyone else in this situation. To install Ruby on Rails on a Mac OS X system (or any system, actually) which sits behind a Squid proxy it is necessary to tell gem about the proxy's existence. Here's one way to do it:
# sudo gem install rails --include-dependencies --http-proxy http://192.168.254.1:3128
where 192.168.254.1 is the IP address of the system running Squid, and 3128 is the port number on which Squid runs.
Alternatively, you can create a .gemrc configuration file in your home directory ($HOME) containing the line
gem: --http-proxy http://192.168.254.1:3128
so you don't have to include the http-proxy directive each time you use the gem command.
Tags: rails, squidproxy | Permalink

