Error: no such theme PatternSkinTheme

Use SQLite Locally and Postgres on Heroku

Everything went fine for me until I tried to deploy to Heroku on p. 69. When I tried to use heroku rake db:migrate, I got an error message indicating that the pg gem was not found.

Here's what I did to fix it.

I searched Google (again) for fixes to the problem that we use SQLite in development but Postgres on Heroku. The solution that worked for me was to go to my Gemfile and edit as follows:
#gem 'sqlite3-ruby', :require => 'sqlite3', :group => 'development'
group :development, :test do
 gem 'sqlite3'
end
group :production, :staging do
 gem 'pg'
end

This directs the bundler to use the sqlite3 gem in development and testing (on your own machine or the MathLAN) and the pg gem in production and staging (on Heroku).

Then, I did a bundle install, excluding the gems that are only for production or staging (i.e., the pg gem):
bundle install --path=~/.gem/ruby/1.8 --without production:staging

Next, I had to commit my changes to the Gemfile and Gemfile.lock:
git add Gemfile Gemfile.lock
git commit -m "Updated Gemfile to use sqlite3 in development/test and pg in production/staging on Heroku"

Then, I retried the instructions as written at the top of page 69 and it worked! So did the commands used to push data from your development database up to Heroku, a bit later on p. 69.

-- JanetDavis - 2012-09-11
Topic revision: r1 - 2012-09-11, JanetDavis
 

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback