Ubuntu 10.10 上的 Rails 安装失败
我尝试在 Ubuntu 10.10 上安装 Rails,但每次都会出现 File not found: lib 。 Ruby 和 Rubygems 已正确安装。我在网络上看到过这个问题,但没有解决方案对我有用。我重新安装了 rdoc,仍然得到相同的结果。
$ sudo gem install rails
...
Successfully installed rails-3.0.1
24 gems installed
...
Installing ri documentation for builder-2.1.2...
ERROR: While generating documentation for builder-2.1.2
... MESSAGE: Unhandled special: Special: type=17, text="<!-- HI -->"
... RDOC args: --ri --op /var/lib/gems/1.8/doc/builder-2.1.2/ri --title Builder -- Easy XML Building --main README --line-numbers --quiet lib CHANGES Rakefile README doc/releases/builder-1.2.4.rdoc doc/releases/builder-2.0.0.rdoc doc/releases/builder-2.1.1.rdoc --title builder-2.1.2 Documentation
(continuing with the rest of the installation)
...
Installing ri documentation for rails-3.0.1...
File not found: lib
$ rails -v
The program 'rails' is currently not installed. You can install it by typing:
sudo apt-get install rails
I'm trying to install rails on Ubuntu 10.10, but get File not found: lib every time. Ruby and Rubygems have been installed correctly. I've seen this problem posted all over the web but no solutions work for me. I reinstalled rdoc and I still get the same result.
$ sudo gem install rails
...
Successfully installed rails-3.0.1
24 gems installed
...
Installing ri documentation for builder-2.1.2...
ERROR: While generating documentation for builder-2.1.2
... MESSAGE: Unhandled special: Special: type=17, text="<!-- HI -->"
... RDOC args: --ri --op /var/lib/gems/1.8/doc/builder-2.1.2/ri --title Builder -- Easy XML Building --main README --line-numbers --quiet lib CHANGES Rakefile README doc/releases/builder-1.2.4.rdoc doc/releases/builder-2.0.0.rdoc doc/releases/builder-2.1.1.rdoc --title builder-2.1.2 Documentation
(continuing with the rest of the installation)
...
Installing ri documentation for rails-3.0.1...
File not found: lib
$ rails -v
The program 'rails' is currently not installed. You can install it by typing:
sudo apt-get install rails
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我写了一篇详细的安装 Ruby 和 Rails 的指南Ubuntu 10.10 将帮助你解决这个问题。
有保证,否则退款!
I wrote a detailed how-to guide on installing Ruby and Rails on Ubuntu 10.10 that will help you with this.
Guaranteed, or your money back!
您应该避免使用打包版本的 Ruby(即避免来自 apt-get install ruby 的 Ruby 版本)。 Debian 打包系统(Ubuntu 使用的)与 Ruby 期望的相冲突。
相反,您应该从源代码安装 Ruby。
有一个名为 RVM 的好工具可以帮助您做到这一点。
You should avoid the packaged version of Ruby (i.e., avoid the version of Ruby that comes from
apt-get install ruby
). The Debian packaging system (which Ubuntu uses) conflicts with what Ruby expects.Instead, you should install Ruby from source.
There's a nice tool called RVM to help you do this.