Just do ‘gem install rails’. You can be in the project directory but I
don’t think you need to since it will go to a global copy in the .rvm
directory of your home directory. I never even worried about where it
goes. Especially if you are new to this, it’s not a thing I would worry
Type gem env from a terminal to see where things are installing to.
Maybe also look at this:
Do gem list and you’ll see what versions you have installed locally.
That can be done either inside or outside a project directory.
When you create your new app, you can edit the gemfile and specify
specific versions of things in you want. The gem install rails will get
you rails 4.1.x but that’s probably what you want now if you’re just
getting started. It’s the latest and it works fine for me (ok with a
little trouble with turbolinks and some jquery). Older blog posts will
likely be describing rails 3.2 or 4.0. If you change your gemfile to
reference 3.2 that will load when you bundle.
Once you create a specific project, do bundle list to see what gems are
being used for that particular project.
You can even do things like specifying the ruby version you want for
each particular directory (1.9) but just pick a default with the rvm and
stick with it for now.
Also, you can put the directory anywhere you want. I have a sandbox
directory in my home with a rails subdirectory.