2011-10-18 70 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。

相关问题