Debian Squeeze ->安装 Ruby on Rails
有没有办法在 Squeeze 上安装 RoR,而不使用 RVM? 我在虚拟机上尝试过,当我运行“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
is there any way to install RoR on Squeeze, without using RVM?
I've tried on a Virtual Machine, and when I run "bundle install", I get this error message :
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
This error appeared after I've fixed the following :
<internal:gem_prelude>:114:in `push_gem_version_on_load_path': undefined method `<=>' for nil:NilClass (NoMethodError)
by doing :
export GEM_HOME=/usr/lib/ruby/gems/1.9.0
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我的错误...
我不知道为什么,但我的 netinst 已将 lenny 存储库放入我的 resources.list 文件中。经过一些修改后,一切都OK了。
My mistake...
I don't know why, but my netinst had put lenny repositories in my sources.list file. After few modifications, everything is OK.