Ruby on rails 3.2 我如何在别处运行bundle安装?
如何解决此问题?此问题是因为您向heroku服务器提交了错误的Gemfile.lock(pg和rails\u 12factor gems)。您需要更新heroku上的Gemfile.lock 执行以下步骤:Ruby on rails 3.2 我如何在别处运行bundle安装?,ruby-on-rails-3.2,Ruby On Rails 3.2,如何解决此问题?此问题是因为您向heroku服务器提交了错误的Gemfile.lock(pg和rails\u 12factor gems)。您需要更新heroku上的Gemfile.lock 执行以下步骤: 保存HEROKU_APP_现有HEROKU APP的名称(HEROKU_APP_NAME.herokuapp.com) 从中删除heroku应用程序并创建新应用程序 将新heroku应用程序重命名为旧heroku_应用程序_名称 从git repo中删除Gemfile.lock 从本地项目和
在gem文件中,您可以添加所有必需的gem以及rails\u 12factor,然后重试
$ 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'
你推锁文件了吗?可能是重复的
gem 'rails_12factor', group: :production
gem 'rails_serve_static_assets','~> 0.0.4', group: :production
gem 'rails_stdout_logging','~> 0.0.3',group: :production