$ git push heroku master
Counting objects: 70, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (61/61), done.
Writing objects: 100% (70/70), 16.06 KiB | 0 bytes/s, done.
Total 70 (delta 2), reused 0 (delta 0)
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.0.0
-----> Installing dependencies using Bundler version 1.3.2
New app detected loading default bundler cache
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment
You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.
You have added to the Gemfile:
* pg
* rails_12factor
Bundler Output: You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.
You have added to the Gemfile:
* pg
* rails_12factor
!
! Failed to install gems via Bundler.
!
! Push rejected, failed to compile Ruby app
To git@heroku.com:obscure-reaches-5507.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:obscure-reaches-5507.git'
我该如何解决这个问题?
答案 0 :(得分:0)
这个问题很糟糕,因为你向heroku服务器提交了错误的Gemfile.lock(pg和rails_12factor gems)。您需要在heroku上更新Gemfile.lock。
执行以下步骤:
答案 1 :(得分:0)
在您的宝石文件中,您可以添加所有必需的宝石以及rails_12factor并尝试
gem 'rails_12factor', group: :production
gem 'rails_serve_static_assets','~> 0.0.4', group: :production
gem 'rails_stdout_logging','~> 0.0.3',group: :production