I always wants to try Ruby but i didn’t determine to make it. Now i decide to create an Ruby on Rails web application as a learning goal.
So the first thing is to setup the development environment. As stated in the Rails documentation, there maybe some problems when running on Windows. so i created a virtual machine which is a Ubuntu Lucid and get everything ready there. Moreover, Rails 3.0 requires Ruby 1.9.2. So let’s start install the ruby first.
Please note that the following steps does not require root account. Just login with your own account with sudo enabled.
1. Install curl and git-core
- sudo apt-get install curl git-core
2. Install rvm
- bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
3. Append the following line in .bashrc which is under your $HOME directory
if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then source "$HOME/.rvm/scripts/rvm" ; fi
4. Restart Linux
5. Check if the rvm is running properly
- rvm notes
6. Install other required dependencies
- sudo aptitude install curl bison build-essential zlib1g zlib1g-dev libssl-dev libreadline5-dev libreadline6-dev libxml2-dev git-core subversion autoconf
7. Install Ruby 1.9.2
# If install on 64bit OS rvm install 1.9.2 # If not ok, try rvm install 1.9.2-head
8. Check if you got Ruby 1.9.2 installed
- rvm list
9. Set Ruby 1.9.2 as default
# If install on 64bit OS rvm --default ruby-1.9.2 # If not ok, try rvm --default ruby-1.9.2-head
10. Check the Current Ruby version
- ruby -v