2011-10-18 54 views
2

我遵循Getting Started with Heroku的部署文章。在Heroku上部署失敗:無法在任何源中找到devise-1.4.4

我試圖將我的應用程序部署到heroku。在開始的時候我有這個問題

-----> Gemfile detected, running Bundler version 1.0.7 
    Unresolved dependencies detected; Installing... 
    Using --without development:test 
    Fetching source index for http://rubygems.org/ 
    Could not find devise-1.4.4 in any of the sources 
    FAILED: http://devcenter.heroku.com/articles/bundler 
    Heroku push rejected, failed to install gems via Bundler 

然後我嘗試了一些解決方案,例如heroku-deploy-cant-find-devise-1-4-6。 我跟着這些步驟

bundle update 
git add . 
git commit -a "please work" 
git push heroku master 

但它仍然有問題。 這裏是我的Gemfile

source 'http://rubygems.org' 
gem 'rails', '3.0.9' 
gem 'kaminari' 
gem "paperclip", "~> 2.4" 
gem "devise" 
gem 'web-app-theme', '>= 0.6.2' 
gem 'gmaps4rails' 
gem 'populator' 
gem 'mysql2', '~> 0.2.6' 
gem 'capistrano' 

和Gemfile.lock的

... 
capistrano-ext (1.2.1) 
capistrano (>= 1.0.0) 
cocaine (0.2.0) 
crack (0.3.1) 
devise (1.4.8) 
    bcrypt-ruby (~> 3.0) 
    orm_adapter (~> 0.0.3) 
    warden (~> 1.0.3) 
    ... 

這似乎是不錯的。

但爲什麼它仍然有同樣的問題。

Could not find devise-1.4.4 in any of the sources 

爲什麼我的Gemfile.lock使用devise 1.4.8,但它仍然部署devise-1.4.4?我該如何解決這個問題?

回答

0

嘗試把你的Gemfile

寶石「設計」,「〜> 1.4.4」

,然後運行recommiting

+0

你的意思是1.4.8? – manojlds

+0

從我的理解〜它會放棄最後一個號碼並使用最新版本。所以〜> 1.4.4會使用最新版本,直到1.4.9 http://docs.rubygems.org/read/chapter/16#page74有更多關於版本選擇器的信息。 –

0

它看起來像你的其他的寶石之一前束安裝時需要設計1.4.4,這是從紅寶石形成的。檢查你的gemfile.lock是否有其他寶石提及的設計。

只是爲了消除任何其他可能的有趣的業務,試試這個在您的Gemfile:

gem "devise", "1.4.8" 

,然後運行:

bundle update devise 
git commit 
git push heroku master 
+0

感謝您的幫助,我嘗試這種方法,但它仍然有問題 – AlohaCC

0

我嘗試愚蠢和複雜的方法,但對我的工作。 我把我的項目放到Github之前。 所以我盡我這沒有FB插件前的代碼。(也許有人rfacebook問題!?)

mkdir test-for-another-sol 
cd test-for-another-sol 
git init 
git pull [email protected]:your_name/your_git.git feature/your_former_project 
bundle update devise 
git add . 
git commit -a "please work" 
git push [email protected]:your_app_in_heroku.git master 

它的工作!

1

Devise 1.4.4 was yanked對於RubyGems,您需要使用任何大於1.4.4的版本。

你似乎沒有在任何來源中使用1.4.4。確保指定一個版本,否則其他寶石可能會強制捆綁器使用被抽出的版本。

# Gemfile 
gem "devise", "~> 1.4.8" 

然後運行

$ bundle update devise 

此外,確保Gemfile.lock文件存儲在您的git倉庫。否則Heroku會嘗試解決它自己的依賴關係。提交更改,然後推送到Heroku。