How to install in Heroku without installing PostgreSQL locally?

For a Rails 3.1 application, I want to develop locally using SQLite and deploy to Heroku (which requires PostgreSQL).

I installed my gemfile with

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

I can successfully click on Heroku, but the application does not work 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 pg gem to my Gemfile and run the package installation, 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 do not have PostgreSQL installed locally.

I do not want to install PostgreSQL locally.

Is there a way to deploy to Heroku without installing PostgreSQL locally?

+4
source share
2 answers
bundle install --without production 

gotta do the trick. See docs for more details.

+7
source

Looks at deploying application 3.1 for heroku, since you have already created your application, go to the video deployment part. Your problem is @ 9.50 in the video

http://www.youtube.com/watch?v=p_3dIPgXgkg

+2
source

Source: https://habr.com/ru/post/1387435/


All Articles