If you want Rails set up alongside Ruby, then follow these steps:
- Open Terminal and enter ruby --version. You should see "ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin1".
- Check that you have sqlite3 installed. Enter sqlite3 --version. You should see "184.108.40.206" followed by the installation date and hash code.
- Now enter sudo gem install rails. Gem is a package installer that comes with Ruby. It can take a while for Rails to be installed on your system (it took around half an hour on our test system), so let the Terminal window do its thing uninterrupted. In the end, you should see "33 gems installed".
- Enter rails --version to ensure that it's been setup correctly. You should see "Rails 4.2.6" (or later).
Learn Ruby: The best courses
Now that you've checked Ruby and installed Rails, it's a good idea to see what you can do with them.
There are hundreds of great Ruby and Ruby on Rails courses. Here are just a few to get started with:
- Udemy: Complete Ruby on Rails developer course.
- TeamTreeHouse: Learn Ruby. This interactive course takes you from a complete newcomer to expert.
- Learn Ruby the Hard Way. The "Hard Way" courses are an acquired taste, but they really do give you a thorough grounding in programming.
- Codecademy: Learn Ruby on Rails. Codecademy remains one of the best interactive courses around. Free too.
- Lynda: Ruby training tutorials. Lynda has a fantastic selection of video tutorials that get you up and running in Ruby..
Sign up for CIO Asia eNewsletters.