How to install Ruby on Rails (ROR) in Ubuntu Linux

      There are a lot of posts out there to install Ruby on Rails in Linux and Windows which are not clear explained. The reason is that latest version of Ruby and Gem are causing some issues due to which we are not able to use Rails. So I have given simple steps to install Ruby on Rails in Ubuntu Linux.

  1. Install Ruby – sudo apt-get install ruby
  2. Use ruby -v to check for the version you are using.
  3. Configure system to use the Ruby version 1.9 –  sudo update-alternatives –config ruby. Select which version to use.
  4. Install rubygem – sudo apt-get install rubygems
  5. Configure system to use the gem version 1.9- sudo update-alternatives –config gem. Select which version to use.
  6. Install Rails – sudo apt-get install rails
  7. MYSQL & Apache will be installed by default. If it is not installed use the following command to install it.
  8. Install MYSQL – sudo apt-get install mysql-server 
  9. Install Nodejs – sudo apt-get install nodejs
  10. To install mysql2 gem, you need to install the following sudo apt-get install libmysql-ruby libmysqlclient-dev
  11. Check whether Rails is working – rails new app1
  12. Start the app – rails server inside app1 folder.

Note: This setup was tested in Ubuntu 12.04 LTS.

One thought on “How to install Ruby on Rails (ROR) in Ubuntu Linux

  1. Pingback: coach outlets

Leave a Reply