Browse files

Merge pull request #4 from nuclearsandwich/master

Make sure the `pg` gem gets included in the Gemfile for Heroku.
  • Loading branch information...
alexch committed Nov 19, 2011
2 parents 3fe1ea4 + 712f0d7 commit aa14916430c85dad5e66c3ff8360ab94139db53f
Showing with 22 additions and 1 deletion.
  1. +22 −1 lessons/11.yaml
@@ -3,10 +3,26 @@ goal_title: Commit and push to heroku
goal: |
We just added a whole new feature. Let's push it to heroku so our
- friends can play with it.
+ friends can play with it. In order to do so, we need to make a
+ small change to our `Gemfile`
steps: |
+ Open the file called `Gemfile` in KomodoEdit, or your preferred editor
+ and find the line beginning:
+ gem 'sqlite3'
+ Remove this line and replace it with:
+ group :development do
+ gem 'sqlite3'
+ end
+ group :production do
+ gem 'pg'
+ end
In your terminal, try: (**note:** there is a period after the word
add in the first line)
@@ -17,6 +33,11 @@ steps: |
explanation: |
+ * The Gemfile is a list of all the Ruby libraries your application needs.
+ what we've declared here, is that we want to use the `sqlite3` library
+ while we're developing on our computer (the development group) but when
+ deploying to heroku (the production group) we want to use the `pg` library,
+ which is made for the type of database that Heroku uses.
* We've done the first three steps before, so we won't go over that again...
* `heroku rake` executes a rake task on your server, in this case,
`db:migrate`, just like you did locally.

0 comments on commit aa14916

Please sign in to comment.