2014-01-16 68 views
0

首先,我得到了很多其他錯誤,但是我想先從錯誤引導開始。好吧,我想將我的項目推送到我的heroku服務器。我在我的應用程序目錄,然後我運行 「混帳推Heroku的主」,這是我所得到的Git在rubyonrails中推Heroku Master錯誤

Identity added: /Users/some_ayodele/.ssh/id_rsa (/Users/some_ayodele/.ssh/id_rsa) 
Initializing repository, done. 
Counting objects: 145, done. 
Delta compression using up to 8 threads. 
Compressing objects: 100% (124/124), done. 
Writing objects: 100% (145/145), 31.06 KiB, done. 
Total 145 (delta 27), reused 0 (delta 0) 

-----> Ruby app detected 
-----> Compiling Ruby/Rails 
-----> Using Ruby version: ruby-2.0.0 
-----> Installing dependencies using Bundler version 1.5.2 
     New app detected loading default bundler cache 
     Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment 
     Your Gemfile lists the gem pg (>= 0) more than once. 
     You should probably keep only one of them. 
     While it's not a problem now, it could cause errors if you change the version of just one of them later. 
     Your Gemfile lists the gem pg (>= 0) more than once. 
     You should probably keep only one of them. 
     While it's not a problem now, it could cause errors if you change the version of just one of them later. 
     Your Gemfile lists the gem jquery-rails (>= 0) more than once. 
     You should probably keep only one of them. 
     While it's not a problem now, it could cause errors if you change the version of just one of them later. 
     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: 
     * carrierwave 
     * rmagick 
     * heroku 
     * git-rails 
     * hoe (~> 1.5.1) 
     * RedCloth 
     * i18n 
     You have deleted from the Gemfile: 
     * thin 
     Bundler Output: Your Gemfile lists the gem pg (>= 0) more than once. 
     You should probably keep only one of them. 
     While it's not a problem now, it could cause errors if you change the version of just one of them later. 
     Your Gemfile lists the gem pg (>= 0) more than once. 
     You should probably keep only one of them. 
     While it's not a problem now, it could cause errors if you change the version of just one of them later. 
     Your Gemfile lists the gem jquery-rails (>= 0) more than once. 
     You should probably keep only one of them. 
     While it's not a problem now, it could cause errors if you change the version of just one of them later. 
     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: 
     * carrierwave 
     * rmagick 
     * heroku 
     * git-rails 
     * hoe (~> 1.5.1) 
     * RedCloth 
     * i18n 

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

!  Push rejected, failed to compile Ruby app 

To [email protected]:desolate-temple-6370.git 
! [remote rejected] master -> master (pre-receive hook declined) 
error: failed to push some refs to '[email protected]:desolate-temple-6370.git' 
+0

你有'pg' gem多次聽你的Gemfile嗎? –

+0

不,它曾被列入 gem'pg' –

回答

1

首先,我覺得Postgres的是這裏的問題。我相信Heroku和Rails內置PG會導致一些問題。嘗試像這樣編輯您的寶石頁面:

group :development, :test do 
    gem 'sqlite3' 
end 

group :production do 
    gem 'pg' 
    gem 'rails_12factor' 
end 

然後,執行「捆綁安裝」。

如果這不起作用嘗試做「捆綁安裝--without生產的」

希望這有助於。

+0

所以我做了你的建議,然後「捆綁安裝」,我得到以下「從 獲取寶石元數據安裝耙(10.1.1)時發生錯誤, Bundler無法繼續 確保'gem install rake -v '10.1.1''在捆綁之前成功。「 –

+0

你有沒有嘗試過'捆綁安裝 - 沒有生產'? –

+0

它現在有效,捆綁安裝給了我錯誤,因爲我沒有將我的gemfile.lock文件添加到我的倉庫,一旦我做了捆綁安裝就像一個魅力。然後我刪除的寶石「PG」從我的Gemfile因爲它在 組已經提到:生產做 寶石「PG」 寶石「rails_12factor」 結束 現在一切都很好,謝謝! –