2

私はUbuntu12.04Ruby 1.9.3RVMを使用するRails3.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

何か案は?

4

1 に答える 1

5

再起動すると、rvmを使用したruby1.9.3のセットアップが失われました。それを元に戻し、デフォルト(再起動プルーフ)として設定するには、次のようにします。

rvm --default 1.9.3
于 2012-10-04T18:59:00.197 に答える