使用rails 4无法推送到heroku

时间:2014-01-08 03:41:27

标签: ruby-on-rails heroku

我尝试将我的rails应用程序部署到heroku,但是当git push heroku master我得到这样的错误时:

-----> 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
       * carrierwave
       * debugger
       * 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
       * carrierwave
       * debugger
       * rails_12factor
 !
 !     Failed to install gems via Bundler.
 !

 !     Push rejected, failed to compile Ruby app

为什么我会收到这样的错误?我已经尝试bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment并再次运行git push heroku master,但我仍然像以前一样得到同样的错误???

我正在使用ruby 2.0和rails 4,请告诉我,如果我错了?

之前谢谢

修改

我的gemfile:

source 'rubygems.org'; 
gem 'rails', '4.0.1' 
group :development do 
  gem 'sqlite3' 
end 
group :production do 
  gem 'pg' 
end 
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' 
group :doc do 
  gem 'sdoc', require: false 
end 
gem 'devise' 
gem "twitter-bootstrap-rails" 
gem 'carrierwave' 
gem 'debugger', 
group: [:development, :test] gem 'rails_12factor'

1 个答案:

答案 0 :(得分:0)

您只需删除Gemfile.lock文件然后提交并再次推送到heroku。