我遵循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?我该如何解决这个问题?
你的意思是1.4.8? – manojlds
从我的理解〜它会放弃最后一个号码并使用最新版本。所以〜> 1.4.4会使用最新版本,直到1.4.9 http://docs.rubygems.org/read/chapter/16#page74有更多关于版本选择器的信息。 –