我正在尝试在 3.2.8 上通过我的 Rails 应用程序使用 Capistrano 时使用 gem,使用 RVM 和该 Rails 版本的 gemset。
我收到以下错误:在任何源中都找不到 rake-10.0.3 (Bundler::GemNotFound)
这是错误的输出(我登录了一个文件):
/home/some_user/.rvm/gems/ruby-1.9.3-p286@global/gems/bundler-1.2.1/lib/bundler/spec_set.rb:90:in `block in materialize': Could not find rake-10.0.3 in any of the sources (Bundler::GemNotFound)
from /home/some_user/.rvm/gems/ruby-1.9.3-p286@global/gems/bundler-1.2.1/lib/bundler/spec_set.rb:83:in `map!'
from /home/some_user/.rvm/gems/ruby-1.9.3-p286@global/gems/bundler-1.2.1/lib/bundler/spec_set.rb:83:in `materialize'
from /home/some_user/.rvm/gems/ruby-1.9.3-p286@global/gems/bundler-1.2.1/lib/bundler/definition.rb:113:in `specs'
from /home/some_user/.rvm/gems/ruby-1.9.3-p286@global/gems/bundler-1.2.1/lib/bundler/definition.rb:158:in `specs_for'
from /home/some_user/.rvm/gems/ruby-1.9.3-p286@global/gems/bundler-1.2.1/lib/bundler/definition.rb:147:in `requested_specs'
from /home/some_user/.rvm/gems/ruby-1.9.3-p286@global/gems/bundler-1.2.1/lib/bundler/environment.rb:23:in `requested_specs'
from /home/some_user/.rvm/gems/ruby-1.9.3-p286@global/gems/bundler-1.2.1/lib/bundler/runtime.rb:11:in `setup'
from /home/some_user/.rvm/gems/ruby-1.9.3-p286@global/gems/bundler-1.2.1/lib/bundler.rb:116:in `setup'
from /home/some_user/.rvm/gems/ruby-1.9.3-p286@global/gems/bundler-1.2.1/lib/bundler/setup.rb:17:in `<top (required)>'
from /home/some_user/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
from /home/some_user/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
from /home/some_user/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
from /home/some_user/some_user/config/boot.rb:6:in `<top (required)>'
from /home/some_user/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/some_user/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from script/rails:5:in `<main>'
我在使用 Rake 10.0.2 时也遇到了错误(我进行了捆绑更新并获得了 Rake 10.0.3,然后将其留待测试)。另外,我注意到捆绑器正在搜索@global,而我认为它应该搜索gemset(称为@r328,位于/home/some_user/.rvm/gems)。
.rvmrc(位于项目内部)
source ~/.profile
rvm use 1.9.3@r328
rvm_trust_rvmrcs_flag=1
。轮廓
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function
schedule.rb(用于测试)
set :output, "#{path}/log/cron.log"
every 1.minute do
runner "MenuOrder.send_resume(2)"
end
部署.rb
set :whenever_command, "bundle exec whenever"
require "whenever/capistrano"
宝石列表的输出
actionmailer (3.2.8)
actionpack (3.2.8)
active_utils (1.0.5)
activeadmin (0.5.0)
activemerchant (1.29.3, 1.28.0)
activemodel (3.2.8)
activerecord (3.2.8)
activeresource (3.2.8)
activesupport (3.2.8)
arbre (1.0.1)
arel (3.0.2)
authorize-net (1.5.2)
bcrypt-ruby (3.0.1)
bourbon (3.0.1, 2.1.2, 2.1.1)
builder (3.0.4)
bundler (1.2.1)
capistrano (2.13.5)
carrierwave (0.8.0, 0.7.1, 0.7.0)
chronic (0.9.0)
cocaine (0.4.2)
coffee-rails (3.2.2)
coffee-script (2.2.0)
coffee-script-source (1.4.0)
daemon_controller (1.1.0)
daemons (1.1.9)
delayed_job (3.0.4)
delayed_job_active_record (0.3.3)
devise (2.2.0, 2.1.2)
erubis (2.7.0)
execjs (1.4.0)
fastercsv (1.5.5)
fastthread (1.0.7)
formtastic (2.2.1)
has_scope (0.5.1)
highline (1.6.15)
hike (1.2.1)
i18n (0.6.1)
inherited_resources (1.3.1)
journey (1.0.4)
jquery-rails (2.1.4, 2.1.3)
json (1.7.6, 1.7.5)
kaminari (0.14.1)
mail (2.4.4)
meta_search (1.1.3)
mime-types (1.19)
money (5.1.0)
multi_json (1.5.0, 1.3.7, 1.3.6)
mysql2 (0.3.11)
net-scp (1.0.4)
net-sftp (2.0.5)
net-ssh (2.6.2)
net-ssh-gateway (1.1.0)
nokogiri (1.5.6, 1.5.5)
orm_adapter (0.4.0)
paperclip (3.4.0, 3.3.1)
passenger (3.9.1.beta, 3.0.19, 3.0.18)
polyamorous (0.5.0)
polyglot (0.3.3)
rack (1.4.3, 1.4.1)
rack-cache (1.2)
rack-raw-upload (1.1.1, 1.1.0)
rack-ssl (1.3.2)
rack-test (0.6.2)
rails (3.2.8)
railties (3.2.8)
rake (10.0.3, 10.0.2, 0.9.2.2)
rdoc (3.12)
recaptcha (0.3.4)
responders (0.9.3)
rich (1.4.1, 1.3.1)
rmagick (2.13.1)
rubygems-bundler (1.1.0)
rvm (1.11.3.5)
sass (3.2.5, 3.2.3, 3.2.1)
sass-rails (3.2.5)
sprockets (2.1.3)
thor (0.16.0)
tilt (1.3.3)
treetop (1.4.12)
tzinfo (0.3.35, 0.3.34)
uglifier (1.3.0)
warden (1.2.1)
whenever (0.8.1)
我尝试使用捆绑更新,删除 Gemfile.lock 并进行捆绑安装,卸载所有 rake gem(10.0.3 和 10.0.2)并使用捆绑安装安装 gem,但没有任何效果。