Setting up your Ruby on Rails (Rails) development environment can be challenging. Thus, rather than providing step-by-step installation instructions for each operating system, which would be out-of-date very soon after posting them, I will provide some hints and guidelines that I believe will be more useful to you.
The best site I have found for providing up-to-date instructions for installing Rails is: http://railsapps.github.io/installing-rails.html
From this site, find your operating system, select “Install Ruby on Rails” and then follow the instructions, which should involve installing RVM, the Ruby programming language and then Rails. I’ll describe each of these in more detail next.
RVM (Ruby Version Manager)
A command-line tool that allows you to install, manage and work with multiple Ruby programming language versions. If you followed the instructions provided above, you probably installed this first and the Ruby programming language at the same time.
To check to see if you have RVM installed, at the command prompt in a terminal window, type:
$ rvm -v
If you type the following command:
$ rvm list
You will see a list of the Ruby versions you have installed on your computer, along with a marker indicating which version your system will use by default.
A list of all rvm commands is provided by typing:
$ rvm help
Ruby
The instructions above should have led you to install the latest stable version of Ruby. To check the version of Ruby your system will use, type:
$ ruby –v
This should match what RVM reported when you listed the Ruby versions on your system
Ruby on Rails (Rails)
Rails is a Ruby software package (library). In Ruby, it is common to use the RubyGems package management, and the package themselves are then referred to as Gems.
To learn more about Gems, see: http://guides.rubygems.org
The instructions provided above should have lead you to install the latest stable release of Rails. To check the version you have installed type:
$ rails -v
Alternatives
I suggest that you try to install your development environment from scratch in the manner I have described above – this is the preferred approach. However, if you’re having difficulties, you may want to consider the other options I provide below.
Use a virtual machine – this involves first installing a virtualization system on your computer that will allow you to run other operating systems within that environment. Two of the leading vendors of virtualization systems are VMware and VirtualBox, the latter is free works very well. Once you have installed the virtualization system, you can download a Linux virtual machine that has RVM, Ruby and Rails pre-installed from: https://bitnami.com/stack/ruby/virtual-machine
I believe this is your second best deployment option.
Use a hosted development environment – Nitrous.io provides a hosted development environment that you can access from your web browser, i.e., you will be using a Rails environment hosted in the cloud. If all else fails, use this!
For installation instructions, visit: http://railsapps.github.io/rubyonrails-nitrous-io.html