Monday, November 05, 2007

Playing with InstantRails behind a Firewall

Normally I will just use the trusty Command prompt to play with Rails stuff. Just got around to play with InstantRails lately , while reading "Build Your Own Ruby on Rails Web Application". Perhaps this is not really InstantRails specific, rather more for setting up rails for behind a firewalled environment. I used to go it via the manual way, download all the gem, and do the install from local.

Found this while playing with InstantRails, might be handy if you are in the same situation as well.
  • Install InstantRails.
  • Unzip to C:\InstantRails. Spaces in path name will not work, also, Windows Compression option might have problem in extracting the file, use other options like 7zip, or winzip instead.
  • After extraction, double-Click on InstantRails.exe file in the folder. A message pop-up to confirm on regenerating the configuration files. Click on ok.

  • And so, InstantRails started.

Next up will be updating gem version as well as installation of Rails. Now, if you are not behind a firewall, that will be pretty straightforward, just do these,

Rails Application > Open Ruby Console Windows, type

  • C:\InstantRails> gem update –system
  • C:\InstantRails> gem install rails –include-dependencies

However, if you are behind a firewall, then you will have to do set the http_proxy first.

set http_proxy=

then, you should be able to do the normal

  • C:\InstantRails>gem update –system
  • C:\InstantRails>gem install rails –include-dependencies

No comments: