2013-08-31 34 views
1

輸出:無法推送到Heroku。不明白什麼是錯

Counting objects: 96, done. 
Delta compression using up to 4 threads. 
Compressing objects: 100% (73/73), done. 
Writing objects: 100% (73/73), 7.87 KiB | 0 bytes/s, done. 
Total 73 (delta 56), reused 0 (delta 0) 

-----> Ruby/Rails app detected 
-----> Using Ruby version: ruby-1.9.3 
-----> Installing dependencies using Bundler version 1.3.2 
     Fixing nokogiri install. Clearing bundler cache. 
     See https://github.com/sparklemotion/nokogiri/issues/923. 
     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: 
     * postmark-rails (~> 0.5.2) 
     You have deleted from the Gemfile: 
     * postmark-rails 
     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: 
     * postmark-rails (~> 0.5.2) 

     You have deleted from the Gemfile: 
     * postmark-rails 
! 
!  Failed to install gems via Bundler. 
! 

!  Push rejected, failed to compile Ruby/Rails app 

Auto packing the repository for optimum performance. 
To [email protected]:sutra-staging.git 
! [remote rejected] master -> master (pre-receive hook declined) 
error: failed to push some refs to '[email protected]:sutra-staging.git' 
Everything up-to-date 

Gemfile.lock是版本控制。

回答

5

你說你的Gemfile.lock是版本控制,但是你的錯誤信息是說Gemfile.lock與你的Gemfile不匹配。

您需要在本地bundle install並提交修改後的Gemfile.lock

3

發生了什麼事情,你已經改變了你的Gemfile,但你沒有使用Bundler在本地更新你的寶石。這意味着您的Gemfile文件和Gemfile.lock文件不同步。

爲了解決這個問題,請運行bundle install,提交您的更改並再次推送到Heroku。這將安裝您添加的postmark-rails寶石,更新Gemfile.lock並使所有內容重新同步。

什麼可能會困惑你使用gem install安裝寶石不會更新Bundler知道的寶石。 Bundler的工作是管理項目的寶石,所以每當你添加一個新的寶石時,一定要運行Bundler來更新東西。

相關問題