For a Rails 3.1 app, I want to develop locally using SQLite and deploy to Heroku (which requires PostgreSQL).
I've set up my gemfile with
group :development, :test do gem 'sqlite3' end
I can push to Heroku successfully but the app fails with
"Please install the postgresql adapter: `gem install activerecord-postgresql-adapter` (pg is not part of the bundle. Add it to Gemfile.)"
If I add the pg gem to my Gemfile and run bundle install, I get:
"ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError) /opt/local/bin/ruby extconf.rb checking for pg_config . . . not found"
because I don't have PostgreSQL installed locally.
I don't want to install PostgreSQL locally.
Is there a way to deploy to Heroku without installing PostgreSQL locally?
bundle install --without production
should do the trick. See docs for further information.
This walks you through deploying a 3.1 app to heroku, since you already have your app built, skip to the deployment part of the video. Your issue is encountered @9.50 in the video
http://www.youtube.com/watch?v=p_3dIPgXgkg
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With