Install Ruby On Rails (RoR) on Cygwin
Windows command console is quite primitive, it is good to have the power of Unix console on your Windows. If you are like me, you could have installed Cygwin and you probably have installed Ruby using One-Click Ruby Installer, but encountered some problems running ruby, rails and other ruby-related commands on Cygwin.
Well, same here, and I think it is easier to install a seperate copy of Ruby under Cygwin. Fixing the path differences between Windows and Cygwin consoles can be messy, here are some tips to install RoR on Cygwin:
-
Install a seperate copy of Ruby using Cygwin setup wizard. Expand All > Devel and select ruby and proceed with the setup.
-
After you have installed Ruby, download Ruby Gems, extract the setup files to a temporary directory, and when you try to run the setup, you probably will encounter an error.
ruby setup.rb ruby: No such file to load -- ubygems (LoadError)
Tips:
When you install Ruby using One-Click installer, it will set an environment variable RUBYOPT=rubygems. It tells ruby to load rubygems library when running a ruby file. You have not installed Rugy Gems, thus the setup.rb execution failed.Just unset RUBYOPT variable and re-run the Ruby Gems setup:
unset RUBYOPT ruby setup.rb
-
Then you can install Rails using Ruby Gems by running:
gem install rails --include-dependencies
-
You have
irbconfiguration file (.irbrcfile) under your windows home directory, and you still want to use it in Cygwin, create a symbolic link to the file in Cygwin home directory
cd $HOME ln -s [/path/to/windows-user/homepath/].irbrc .irbrc



