捆扎机版本1.0.22为什么Bundler报告“无法在任何来源中找到capistrano-2.11.1”?
部署到RedHat Linux上6
红宝石1.9.3p0
的Rails 3.2.1
我读的捆扎机文档并采取这些步骤.. 。
在dev上设置了一切工作站,所以所有的宝石安装和应用程序的工作和测试通过。
检查了
Gemfile
和Gemfile.lock
进入源控制。确保不要检查.bundle
进入源代码管理。
我跑$ cap deploy
。现在我的代码在生产服务器上。
继在docs的指示,我登录时,cd到我的应用程序根目录,并运行...
$ bundle install --development
这是结果...
$ bundle install --deployment
Fetching source index for https://rubygems.org/
Could not find capistrano-2.11.1 in any of the sources
没有人有任何想法为什么这个错误发生?
任何想法如何说服Bundler安装我所需的宝石?
我试图找到从什么捆扎机认为是创业板环境中的线索......
$ bundle exec gem environment
Could not find rake-0.9.2.2 in any of the sources
我看着捆扎机排查页面,按照说明有删除了一堆东西...
# remove user-specific gems and git repos
rm -rf ~/.bundle/ ~/.gem/
# remove system-wide git repos and git checkouts
rm -rf $GEM_HOME/bundler/ $GEM_HOME/cache/bundler/
# remove project-specific settings and git repos
rm -rf .bundle/
# remove project-specific cached .gem files
rm -rf vendor/cache/
# remove the saved resolve of the Gemfile
#
# For now, did not delete this. If I understand the Bundler docs correctly,
# this file is sort of the whole point of Bundler. If I delete it, my deployed
# dependencies won't be the same as in development.
# rm -rf Gemfile.lock
# try to install one more time
bundle install
捆扎机还称...
$ bundle install --deployment
Fetching source index for https://rubygems.org/
Could not find capistrano-2.11.1 in any of the sources
OK,挺好的。我将删除Gemfile.lock
...
$ bundle install --deployment
The --deployment flag requires a Gemfile.lock. Please make sure you have checked
your Gemfile.lock into version control before deploying.
我将不胜感激任何帮助。
rake-0.9.2.2怎么样?据我所知,这还没有被抽出。你有没有想过为什么Bundler总体上不能像我的系统上宣传的那样运作。 – Ethan 2012-02-25 00:45:09
说实话,我做到了这一点,我意识到你正在使用一个被抽出并且没有进一步阅读的Capistrano版本。这可能是一个不完整的捆绑安装。恢复您的Gemfile.lock删除并更新Capistrano的版本。如果在Gemfile中没有指定准确的版本,那么运行'bundle update capistrano'。如果是,那么只需将其更改为下一个可用版本。 – 2012-02-25 01:16:52
好的,完成了。你是对的。 'bundle install --development'能够继续下去。 (直到遇到nokogiri并且因此而ch咽,但那是另一个问题) – Ethan 2012-02-25 01:27:42