有没有办法在不使用RVM的情况下在Squeeze上安装RoR? 我尝试过虚拟机,当我运行“bundle install”时,我收到此错误消息:
gem_prelude.rb:79:in `undef_method': undefined method `default_dir' for `Gem' (NameError)
from gem_prelude.rb:79:in `block in singletonclass'
from gem_prelude.rb:78:in `each'
from gem_prelude.rb:78:in `singletonclass'
from gem_prelude.rb:77:in `load_full_rubygems_library'
from gem_prelude.rb:192:in `method_missing'
from /usr/lib/ruby/gems/1.9.0/gems/bundler-1.0.10/lib/bundler.rb:262:in `configure_gem_home_and_path'
from /usr/lib/ruby/gems/1.9.0/gems/bundler-1.0.10/lib/bundler.rb:78:in `configure'
from /usr/lib/ruby/gems/1.9.0/gems/bundler-1.0.10/lib/bundler.rb:134:in `definition'
from /usr/lib/ruby/gems/1.9.0/gems/bundler-1.0.10/lib/bundler/cli.rb:226:in `install'
from /usr/lib/ruby/gems/1.9.0/gems/bundler-1.0.10/lib/bundler/vendor/thor/task.rb:22:in `run'
from /usr/lib/ruby/gems/1.9.0/gems/bundler-1.0.10/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /usr/lib/ruby/gems/1.9.0/gems/bundler-1.0.10/lib/bundler/vendor/thor.rb:246:in `dispatch'
from /usr/lib/ruby/gems/1.9.0/gems/bundler-1.0.10/lib/bundler/vendor/thor/base.rb:389:in `start'
from /usr/lib/ruby/gems/1.9.0/gems/bundler-1.0.10/bin/bundle:13:in `<top (required)>'
from /usr/bin/bundle:19:in `load'
from /usr/bin/bundle:19:in `<main>'`
Ruby -v = 1.9.2
gem -v = 1.6.2
我修复了以下内容后出现此错误:
<internal:gem_prelude>:114:in `push_gem_version_on_load_path': undefined method `<=>' for nil:NilClass (NoMethodError)
做:
export GEM_HOME=/usr/lib/ruby/gems/1.9.0
答案 0 :(得分:0)
我的错误...... 我不知道为什么,但我的netinst已将lenny存储库放在我的sources.list文件中。经过一些修改,一切都很好。