Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

Adler Hsieh
Adler Hsieh
1,823 Points

"Rake aborted!" when deploying Treebook to Heroku

The following message is what I got when deploying the treebook application after running

$git push heroku master
Running: rake assets:precompile
       DEPRECATION WARNING: Paths in SQLite3 database URLs of the form `sqlite3:///path` will be treated as absolute in Rails 4.2. Please switch to `sqlite3:dbname`. (called from <top (required)> at /tmp/build_1b216552-cf3a-44eb-85dc-e96afb04dc2a/Rakefile:6)
       rake aborted!
       Gem::LoadError: Specified 'sqlite3' for database adapter, but the gem is not loaded. Add `gem 'sqlite3'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).

I've changed the gemfile as instructed to the following:

group :development, :test do
       gem 'sqlite3'
end

group :production do
    gem 'pg'
end

I also run the "bundle install" and changed the database.yml file as follow:

production:
  adapter: postgresql
  database: treebook
  pool: 5
  timeout: 5000

However all these do not work, and I get the error message repeatedly. I'll appreciate if anyone can solve this problem. Thanks.

I got the same error. From your notes, it sounds like you might have already tried this, but I followed the instructions here and it worked for me: http://www.jackiejohnston.us/blog/switching-to-postgresql-production-database-for-heroku-deployment/

You also want to setup postgres on your computer (I used brew) and commit the changes in git.