heroku推被拒绝,无法编译Ruby应用程序

时间:2014-04-23 06:32:16

标签: ruby-on-rails ruby ruby-on-rails-3 git heroku

当我运行命令“git push -f heroku”时,我遇到以下问题:

  

获取存储库,完成。   计数对象:55,完成。   Delta压缩最多使用4个线程。   压缩对象:100%(30/30),完成。   书写对象:100%(35/35),9.26 KiB | 0字节/秒,完成。   总计35(delta 20),重复使用14(delta 2)

     

- - - - >删除.DS_Store文件

     

- - - - >检测到Ruby应用

     

- - - - >编译Ruby / Rails

     

- - - - >使用Ruby版本:ruby-2.0.0

     

- - - - >使用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
     

!    !无法通过Bundler安装gem。    !

     

!推送拒绝,无法编译Ruby应用程序

     

到git@heroku.com:sudmystuffer.git    ! [远程拒绝]主人 - >主人(预先接收挂钩拒绝)   错误:未能将某些引用推送到'git@heroku.com:tummystuffer.git'

所以我在我的Gemfile里面添加了gem'geocoder',删除了Gemfile.lock,运行了“bundle install”,“git add”,“git commit”,再次推送,但得到了同样的错误。

我试图解决这个问题:heroku push rejected, failed to compile Ruby/rails app,但仍然给了我同样的错误。

我已经运行了“gem cleanup”并运行了“gem update”,但是没有用。

这是我的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'

编辑:

这是我的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)

任何帮助将不胜感激。

4 个答案:

答案 0 :(得分:5)

错误说明:

  

您正在尝试在更改Gemfile后以部署模式安装。在其他地方运行bundle install并添加更新的Gemfile.lock   版本控制。

这基本上意味着您未提交Gemfile.lock或未运行bundle install命令,该命令基本上会重建Gemfile.lock。现在您需要在开发环境中使用bundle install解决冲突:

$ bundle install
$ git add .
$ git commit -a -m "Geocoder"
$ git push -f heroku

答案 1 :(得分:2)

我遇到了同样的问题。一个简单的捆绑安装解决了我的问题。 在b[2]bundle installgit add .之后,我将代码推送到了heroku master并且它有效! git commit

答案 2 :(得分:0)

我实际上能够解决这个问题。我发现我试图将项目推送到另一个分支(而不是主分支)。我通过将分支与主分支合并并再次推送来解决了这个问题。

答案 3 :(得分:0)

这是一个旧线程,但仍然有意义...我通过执行以下操作解决了这个问题: 1)在终端中创建新的分支修订

git checkout -b fixes

2)删除gemfile.lock
3)在gemfile中,将此

替换为gem'squlite3'和gem'pg'
group :development, :test do
  gem 'sqlite3'
end

group :production do
  gem 'pg', '0.20.0'
end

4)在终端中运行这些命令

bundle update
bundle install --without production
git add .
git commit "Update files for heroku"
git checkout master
git merge fixes
git push -f heroku master