Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add step for including `pg` in the Gemfile.

When following the instructions step by step, Heroku is broken because
the `pg` gem is not installed. This commit adds a step for doing so in a
logical place and provides a brief introduction to the purpose of the
Gemfile.
  • Loading branch information...
commit 712f0d75d6d97dbbadee10779e043a279d7a8260 1 parent ee250fd
@nuclearsandwich nuclearsandwich authored
Showing with 22 additions and 1 deletion.
  1. +22 −1 lessons/11.yaml
View
23 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.
Please sign in to comment.
Something went wrong with that request. Please try again.