Please note : I am in no way an expert – I’m just learning Ruby and Ruby on Rails and hope people may point out my mistakes by reading these posts.
Ensure you have the latest version of XCode installed. This is a big download, but ensure you get it before trying to update Ruby or install Rails.
Install RVM (Ruby Version Manager)
Simply copy the install command into a terminal window at:
to install the latest version of RVM from Github
Once RVM is installed you’ll see a long message. Read through this and notice the line you need to add into your .bash_profile file. If you are new to mac os/unix like me then .bash_profile and .bash_rc files are a bit of a mystery so I used this link to edit mine:
Close your terminal window and open a new one. Type in:
to see the versions of ruby installed. If version 1.9.2 isn’t installed type in:
rvm install 1.9.2
Once it is installed, run rvm -list again just to see if there. To switch to the new version you simply type:
to make it the default next time you open a terminal window use:
rvm 1.9.2 –default
Now lets make sure we have the latest version of Ruby Gems. Ruby Gems is an easy way to download and manage packages – you can think of packages as .NET assemblies and libraries that you will want to use in your Ruby or Ruby on Rails apps. It is a good idea to make sure you are running the latest version of Ruby Gems by using the command:
gem update –system
Once that is done, lets install rails:
gem install rails
and then make sure we have Sqlite3 – which is a light weight database Ruby on Rails will use by default during development
gem install sqlite3
Now you should be able to get up and running with creating your first rails app!