Notes on learning Rails

Everything I wish a book or tutorial had just come out and told me:

How to install a gem.

Most of the time people will tell you to add the gem to your gemfile and bundle it.  But what does that actually mean for the total noobs?!?

1. Open your file browser and go to your project directory.

2. Open the file called “Gemfile”  there is no file extension.  You don’t want “Gemfile.lock”.

3. add your gem with the same syntax your other gems are using there:

ex.  gem ‘rails’, ‘3.0.5′

includes the version number or

gem ‘haml’

to not include the version number

just so you know, all the lines that start with # are commented out, so unless you have a lot of gems, there may not be much in there

4. open the terminal in your project directory and run this command:

sudo bundle install

5. Your done!  That was super easy!

2 Comments

  1. Jenny G says:

    I have no idea what any of that actually meant.
    Thanks Tom!

  2. Incredibly educating blog, bookmarked the web site in interest to see additional!

Leave a Reply