bundle exec失败,“在任何来源都找不到rake-10.1.0”

时间:2013-10-10 00:10:42

标签: ruby-on-rails ruby ruby-on-rails-3 gem bundler

我正在尝试使用capistrano部署到临时服务器,现有的似乎的应用程序可以正常部署到生产服务器。登台服务器是一个新的构建,我认为这是一个配置问题,但我无法弄明白。

capistrano在资产上失败:预编译尝试运行

executing "cd -- /www/sites/{appname} /releases/20131009211055 && RAILS_ENV=production RAILS_GROUPS=assets bundle exec rake assets:precompile"

此时它失败并显示以下内容:

  

[out :: {servername}]在任何来源

中找不到rake-10.1.0

当我在本地运行相同的命令时,我也得到相同的错误消息。事实上,当我尝试运行任何bundle exec命令(例如,bundle exec rails --version)时,我得到相同的错误消息。

我的.bundle / config如下:

---
BUNDLE_FROZEN: '1'
BUNDLE_PATH: /www/sites/{appname?/shared/bundle
BUNDLE_WITHOUT: development:test
BUNDLE_DISABLE_SHARED_GEMS: '1'

我认为这是与未安装到捆绑路径的宝石相关的问题。查看BUNDLE_PATH / ruby​​ / 1.9.1,文件夹为空

我已经尝试过Bundle Install,它说它使用了我的Gemfile中的所有gem并安装到BUNDLE_PATH,但它们没有出现。

我的Gemfile如下:

source 'https://rubygems.org'

gem 'rails', '3.2.11'
gem 'rake', '10.1.0'
gem 'mysql2'
gem 'devise'

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'

  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  gem 'therubyracer', :platforms => :ruby

  gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'
gem 'jquery-ui-rails'
gem "paperclip"
gem "rmagick"
gem 'omniauth'
gem 'omniauth-facebook'
gem 'omniauth-google-oauth2'
gem 'oauth2'
gem 'koala'
gem 'httparty'
gem "carrierwave"
gem 'activeadmin'
gem "activeadmin-settings"
gem 'mini_magick'
gem 'rabl'
gem 'rest-open-uri'
gem 'apipie-rails'
gem "capistrano", :group => :development

来自宝石环境的其他相关信息:

RubyGems Environment:
  - RUBYGEMS VERSION: 2.1.4
  - RUBY VERSION: 1.9.3 (2013-06-27 patchlevel 448) [x86_64-linux]
  - INSTALLATION DIRECTORY: /usr/local/rvm/gems/ruby-1.9.3-p448
  - RUBY EXECUTABLE: /usr/local/rvm/rubies/ruby-1.9.3-p448/bin/ruby
  - EXECUTABLE DIRECTORY: /usr/local/rvm/gems/ruby-1.9.3-p448/bin
  - SPEC CACHE DIRECTORY: /home/ec2-user/.gem/specs
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-linux
  - GEM PATHS:
     - /usr/local/rvm/gems/ruby-1.9.3-p448
     - /usr/local/rvm/gems/ruby-1.9.3-p448@global
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
 - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /usr/local/rvm/gems/ruby-1.9.3-p448/bin
     - /usr/local/rvm/gems/ruby-1.9.3-p448@global/bin
     - /usr/local/rvm/rubies/ruby-1.9.3-p448/bin
     - /usr/local/rvm/bin
     - /usr/local/bin
     - /bin
     - /usr/bin
     - /usr/local/sbin
     - /usr/sbin
     - /sbin
     - /opt/aws/bin
     - /home/ec2-user/bin

此时我对调查内容感到茫然。关于什么是错的任何想法?

0 个答案:

没有答案