我使用 RVM Ubuntu 12.04 , Ruby 1.9.3 , Rails 3.2.8 。
昨天我使用Capistrano就好了,我重启了我的ubuntu,现在我正在尝试使用capistrano进行部署我得到了这个:
$ cap deploy
/usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require': no such file to load -- rvm/capistrano (LoadError)
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /var/lib/gems/1.8/gems/capistrano-2.13.4/lib/capistrano/configuration/loading.rb:152:in `require'
from ./config/deploy.rb:4:in `load'
from /var/lib/gems/1.8/gems/capistrano-2.13.4/lib/capistrano/configuration/loading.rb:172:in `load_from_file'
from /var/lib/gems/1.8/gems/capistrano-2.13.4/lib/capistrano/configuration/loading.rb:89:in `load'
from /var/lib/gems/1.8/gems/capistrano-2.13.4/lib/capistrano/configuration/loading.rb:86:in `load'
from /var/lib/gems/1.8/gems/capistrano-2.13.4/lib/capistrano/configuration/loading.rb:86:in `each'
from /var/lib/gems/1.8/gems/capistrano-2.13.4/lib/capistrano/configuration/loading.rb:86:in `load'
from Capfile:5:in `load'
from /var/lib/gems/1.8/gems/capistrano-2.13.4/lib/capistrano/configuration/loading.rb:172:in `load_from_file'
from /var/lib/gems/1.8/gems/capistrano-2.13.4/lib/capistrano/configuration/loading.rb:89:in `load'
from /var/lib/gems/1.8/gems/capistrano-2.13.4/lib/capistrano/configuration/loading.rb:86:in `load'
from /var/lib/gems/1.8/gems/capistrano-2.13.4/lib/capistrano/configuration/loading.rb:86:in `each'
from /var/lib/gems/1.8/gems/capistrano-2.13.4/lib/capistrano/configuration/loading.rb:86:in `load'
from /var/lib/gems/1.8/gems/capistrano-2.13.4/lib/capistrano/cli/execute.rb:65:in `load_recipes'
from /var/lib/gems/1.8/gems/capistrano-2.13.4/lib/capistrano/cli/execute.rb:65:in `each'
from /var/lib/gems/1.8/gems/capistrano-2.13.4/lib/capistrano/cli/execute.rb:65:in `load_recipes'
from /var/lib/gems/1.8/gems/capistrano-2.13.4/lib/capistrano/cli/execute.rb:31:in `execute!'
from /var/lib/gems/1.8/gems/capistrano-2.13.4/lib/capistrano/cli/execute.rb:14:in `execute'
from /var/lib/gems/1.8/gems/capistrano-2.13.4/bin/cap:4
from /usr/local/bin/cap:19:in `load'
from /usr/local/bin/cap:19
这是我的PATH变量:
$ echo $PATH
/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/danpe/.rvm/bin
有什么想法吗?
答案 0 :(得分:5)
当你重新启动时,你使用rvm丢失了ruby 1.9.3设置。要将其恢复并将其设置为默认值(重启证明),请执行以下操作:
rvm --default 1.9.3