Heroku error when launch rails3.1 app missing postgres gem

前端 未结 3 482
野的像风
野的像风 2020-12-16 15:02

I am trying to deploy to heroku.

Rails 3.1.0.rc4,

I get the following error from Heroku logs:

Starting process with command: `thin -p 48902          


        
3条回答
  •  有刺的猬
    2020-12-16 15:28

    You don't have to install Postgres locally. In your Gemfile, put 'pg' in group :production, as johnny-grass suggests, and then when you run bundle, just specify --without production, like this:

    bundle --without production
    

    Unfortunately, you have to remember this argument when you run bundler, but at least you don't have to install and maintain postgres locally.

    Please note that Heroku "strongly recommends against" using sqlite, saying that "Your production and development environment should be as close to identical as possible" http://devcenter.heroku.com/articles/rails3

提交回复
热议问题