When I run the command "git push -f heroku", I get the following problem:
当我运行“git push -f heroku”命令时,我得到以下问题:
Fetching repository, done. Counting objects: 55, done. Delta compression using up to 4 threads. Compressing objects: 100% (30/30), done. Writing objects: 100% (35/35), 9.26 KiB | 0 bytes/s, done. Total 35 (delta 20), reused 14 (delta 2)
获取存储库,完成了。统计对象:55岁,完成了。使用最多4个线程的压缩。压缩对象:100%(30/30),完成。写入对象:100% (35/35),9.26 KiB |字节/秒,完成。共35 (delta 20),重复使用14 (delta 2)
-----> Removing .DS_Store files
- - - - - - >删除.DS_Store文件
-----> Ruby app detected
- - - - - - > Ruby应用程序检测到
-----> Compiling Ruby/Rails
- - - - - - >编译Ruby / Rails
-----> Using Ruby version: ruby-2.0.0
--->使用Ruby版本:Ruby -2.0.0
-----> Installing dependencies using 1.5.2
--->使用1.5.2安装依赖项
Ruby version change detected. Clearing bundler cache. Old: ruby 2.0.0p353 (2013-11-22 revision 43784) [x86_64-linux] New: ruby 2.0.0p451 (2014-02-24 revision 45167) [x86_64-linux] Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --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 deleted from the Gemfile: * geocoder 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 deleted from the Gemfile: * geocoder
! ! Failed to install gems via Bundler. !
!!未能通过Bundler安装宝石。!
! Push rejected, failed to compile Ruby app
!拒绝Push,无法编译Ruby应用
To git@heroku.com:tummystuffer.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'git@heroku.com:tummystuffer.git'
git@heroku.com:tummystuffer.git ![远程拒绝]master -> master(预接收钩子谢绝)错误:未能将一些refs推到“git@heroku.com:tummystuffer.git”
So I added the gem 'geocoder' inside of my Gemfile, removed Gemfile.lock, ran "bundle install", "git add", "git commit", and pushed again, but got the same exact error.
所以我在Gemfile里面加上了gem“geocoder”,去掉了Gemfile。锁定,运行“bundle install”,“git添加”,“git提交”,然后再次推送,但是得到了同样的错误。
I tried to solve the problem from this: heroku push rejected, failed to compile Ruby/rails app, but still gave me the same error.
我试着解决这个问题:heroku push被拒绝,无法编译Ruby/rails应用,但还是给了我同样的错误。
I've ran "gem cleanup" and ran "gem update" as well, but did not work.
我已经运行了“gem清理”和“gem更新”,但是没有工作。
Here is my Gemfile:
这是我Gemfile:
source 'https://rubygems.org'
ruby '2.0.0'
gem 'rails', '4.0.0'
# Rails defaults
gem 'sass-rails', '~> 4.0.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 1.2'
# rails-bootstrap
gem 'activerecord-tableless'
gem 'bootstrap-sass'
gem 'figaro'
gem 'google_drive'
gem 'high_voltage'
gem 'simple_form', '>= 3.0.0.rc'
group :development, :test do
gem 'sqlite3'
gem 'better_errors'
gem 'quiet_assets'
end
group :production do
gem 'pg'
gem 'thin'
gem 'rails_on_heroku'
end
gem 'therubyracer'
gem 'less-rails'
gem 'twitter-bootstrap-rails'
gem 'mail'
gem 'oauth2'
gem 'omniauth-facebook'
gem 'omniauth-twitter'
gem 'best_in_place'
gem "font-awesome-rails"
gem 'geocoder'
EDIT:
编辑:
Here is my Gemfile.lock:
这是我Gemfile.lock:
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.1.0)
actionpack (= 4.1.0)
actionview (= 4.1.0)
mail (~> 2.5.4)
actionpack (4.1.0)
actionview (= 4.1.0)
activesupport (= 4.1.0)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
actionview (4.1.0)
activesupport (= 4.1.0)
builder (~> 3.1)
erubis (~> 2.7.0)
activemodel (4.1.0)
activesupport (= 4.1.0)
builder (~> 3.1)
activerecord (4.1.0)
activemodel (= 4.1.0)
activesupport (= 4.1.0)
arel (~> 5.0.0)
activerecord-tableless (1.3.3)
activerecord (>= 2.3.0)
activesupport (4.1.0)
i18n (~> 0.6, >= 0.6.9)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.1)
tzinfo (~> 1.1)
arel (5.0.1.20140414130214)
best_in_place (0.2.3)
rails (>= 3.0.0)
better_errors (1.1.0)
coderay (>= 1.0.0)
erubis (>= 2.6.6)
bootstrap-sass (3.1.1.1)
sass (~> 3.2)
builder (3.2.2)
coderay (1.1.0)
coffee-rails (4.0.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.7.0)
commonjs (0.2.7)
daemons (1.1.9)
erubis (2.7.0)
eventmachine (1.0.3)
execjs (2.0.2)
faraday (0.9.0)
multipart-post (>= 1.2, < 3)
figaro (0.7.0)
bundler (~> 1.0)
rails (>= 3, < 5)
font-awesome-rails (4.0.3.1)
railties (>= 3.2, < 5.0)
geocoder (1.2.0)
google_drive (0.3.9)
nokogiri (>= 1.4.4, != 1.5.2, != 1.5.1)
oauth (>= 0.3.6)
oauth2 (>= 0.5.0)
hashie (2.1.1)
high_voltage (2.1.0)
hike (1.2.3)
i18n (0.6.9)
jbuilder (2.0.6)
activesupport (>= 3.0.0, < 5)
multi_json (~> 1.2)
jquery-rails (3.1.0)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.8.1)
jwt (0.1.11)
multi_json (>= 1.5)
less (2.5.0)
commonjs (~> 0.2.7)
less-rails (2.5.0)
actionpack (>= 3.1)
less (~> 2.5.0)
libv8 (3.16.14.3)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.25.1)
mini_portile (0.5.3)
minitest (5.3.3)
multi_json (1.9.2)
multi_xml (0.5.5)
multipart-post (2.0.0)
nokogiri (1.6.1)
mini_portile (~> 0.5.0)
oauth (0.4.7)
oauth2 (0.9.3)
faraday (>= 0.8, < 0.10)
jwt (~> 0.1.8)
multi_json (~> 1.3)
multi_xml (~> 0.5)
rack (~> 1.2)
omniauth (1.2.1)
hashie (>= 1.2, < 3)
rack (~> 1.0)
omniauth-facebook (1.6.0)
omniauth-oauth2 (~> 1.1)
omniauth-oauth (1.0.1)
oauth
omniauth (~> 1.0)
omniauth-oauth2 (1.1.2)
faraday (>= 0.8, < 0.10)
multi_json (~> 1.3)
oauth2 (~> 0.9.3)
omniauth (~> 1.2)
omniauth-twitter (1.0.1)
multi_json (~> 1.3)
omniauth-oauth (~> 1.0)
pg (0.17.1)
polyglot (0.3.4)
quiet_assets (1.0.2)
railties (>= 3.1, < 5.0)
rack (1.5.2)
rack-test (0.6.2)
rack (>= 1.0)
rails (4.1.0)
actionmailer (= 4.1.0)
actionpack (= 4.1.0)
actionview (= 4.1.0)
activemodel (= 4.1.0)
activerecord (= 4.1.0)
activesupport (= 4.1.0)
bundler (>= 1.3.0, < 2.0)
railties (= 4.1.0)
sprockets-rails (~> 2.0)
rails_on_heroku (0.0.2)
rails_serve_static_assets
rails_stdout_logging
rails_serve_static_assets (0.0.2)
rails_stdout_logging (0.0.3)
railties (4.1.0)
actionpack (= 4.1.0)
activesupport (= 4.1.0)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.3.1)
ref (1.0.5)
sass (3.2.19)
sass-rails (4.0.3)
railties (>= 4.0.0, < 5.0)
sass (~> 3.2.0)
sprockets (~> 2.8, <= 2.11.0)
sprockets-rails (~> 2.0)
simple_form (3.1.0.rc1)
actionpack (~> 4.0)
activemodel (~> 4.0)
sprockets (2.11.0)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.1.3)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (~> 2.8)
sqlite3 (1.3.9)
therubyracer (0.12.1)
libv8 (~> 3.16.14.0)
ref
thin (1.6.2)
daemons (>= 1.0.9)
eventmachine (>= 1.0.0)
rack (>= 1.0.0)
thor (0.19.1)
thread_safe (0.3.3)
tilt (1.4.1)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
turbolinks (2.2.2)
coffee-rails
twitter-bootstrap-rails (2.2.8)
actionpack (>= 3.1)
execjs
rails (>= 3.1)
railties (>= 3.1)
tzinfo (1.1.0)
thread_safe (~> 0.1)
uglifier (2.5.0)
execjs (>= 0.3.0)
json (>= 1.8.0)
PLATFORMS
ruby
DEPENDENCIES
activerecord-tableless
best_in_place
better_errors
bootstrap-sass
coffee-rails (>= 4.0.0)
figaro
font-awesome-rails
geocoder
google_drive
high_voltage
jbuilder (>= 1.2)
jquery-rails
less-rails
mail
oauth2
omniauth-facebook
omniauth-twitter
pg
quiet_assets
rails (>= 4.0.0)
rails_on_heroku
sass-rails (>= 4.0.0)
simple_form (>= 3.0.0.rc)
sqlite3
therubyracer
thin
turbolinks
twitter-bootstrap-rails
uglifier (>= 1.3.0)
Any help will be appreciated.
如有任何帮助,我们将不胜感激。
3 个解决方案
#1
5
The error states:
错误:
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.
在更改Gemfile之后,您正在尝试以部署模式安装。运行bundle安装在其他地方,并添加更新的Gemfile。锁到版本控制中。
This basically means you've either not committed your Gemfile.lock
, or have not run the bundle install
command, which basically rebuilds Gemfile.lock
. There's now a conflict which you'll have to resolve using bundle install
on your development environment:
这基本上意味着您没有提交Gemfile。锁定,或者没有运行bundle install命令,该命令基本上重新构建Gemfile.lock。现在有一个冲突,您将不得不在开发环境中使用bundle install来解决:
$ bundle install
$ git add .
$ git commit -a -m "Geocoder"
$ git push -f heroku
#2
2
I had the same problem. A simple bundle install solved the problem for me. After bundle install
, git add .
and git commit
, I pushed the code to heroku master and it worked! $ git push -f heroku master
我也有同样的问题。一个简单的捆绑安装为我解决了这个问题。包安装后,git添加。git提交,我把代码推给heroku master,它成功了!$ git push -f heroku master。
#3
0
I was actually able to solve the issue. I found out I was trying to push the project to another branch (not the master branch). I solved the issue by merging the branch with master branch and pushed it again.
我确实解决了这个问题。我发现我试图将项目推到另一个分支(而不是主分支)。我通过将分支与主分支合并来解决这个问题,并再次推动它。
#1
5
The error states:
错误:
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.
在更改Gemfile之后,您正在尝试以部署模式安装。运行bundle安装在其他地方,并添加更新的Gemfile。锁到版本控制中。
This basically means you've either not committed your Gemfile.lock
, or have not run the bundle install
command, which basically rebuilds Gemfile.lock
. There's now a conflict which you'll have to resolve using bundle install
on your development environment:
这基本上意味着您没有提交Gemfile。锁定,或者没有运行bundle install命令,该命令基本上重新构建Gemfile.lock。现在有一个冲突,您将不得不在开发环境中使用bundle install来解决:
$ bundle install
$ git add .
$ git commit -a -m "Geocoder"
$ git push -f heroku
#2
2
I had the same problem. A simple bundle install solved the problem for me. After bundle install
, git add .
and git commit
, I pushed the code to heroku master and it worked! $ git push -f heroku master
我也有同样的问题。一个简单的捆绑安装为我解决了这个问题。包安装后,git添加。git提交,我把代码推给heroku master,它成功了!$ git push -f heroku master。
#3
0
I was actually able to solve the issue. I found out I was trying to push the project to another branch (not the master branch). I solved the issue by merging the branch with master branch and pushed it again.
我确实解决了这个问题。我发现我试图将项目推到另一个分支(而不是主分支)。我通过将分支与主分支合并来解决这个问题,并再次推动它。