0

バージョン管理と展開のために、git と Heroku を使用して単純な Ruby on Rails を構築中です。私が使用している基本的なアウトラインは次のとおりです。

rails ne test_app

cd test_app

git add .

git commit -, “initial install”

heroku create

I modify the gemfile to get the sql out of production

I add gem pg to production

bundle install

rails generate test_app (with credentials)

git add .

git commit -m “updated”

git push heroku master

すべてがうまくいっているように見えますが、次のようになります。

remote: -----> Installing node-v6.11.1-linux-x64
remote: -----> Detecting rake tasks
remote: -----> Preparing app for Rails asset pipeline
remote:        Running: rake assets:precompile
remote:        rake aborted!
remote:        Gem::LoadError: Specified 'postgresql' for database adapter,     but the gem is not loaded. Add `gem 'pg'` to your Gemfile (and     ensure its version is at the minimum required by ActiveRecord).

リモート: /tmp/build_cfee4fae63659bd06c3737f67849dc42/vendor/bundle/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/connection_specification.rb:188:in rescue in spec' remote: /tmp/build_cfee4fae63659bd06c3737f67849dc42/vendor/bundle/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/connection_specification.rb:185:inspec'

これが私が使用しているものです:

ruby 2.4.3p205 (2017-12-14 revision 61247) [x64-mingw32]
rails 5.1.4
4

1 に答える 1