[英]Rails install fails on Ubuntu 10.10
I'm trying to install rails on Ubuntu 10.10, but get File not found: lib every time. 我正在尝试在Ubuntu 10.10上安装rails,但每次都找不到File:lib。 Ruby and Rubygems have been installed correctly.
Ruby和Rubygems已正确安装。 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.
我重新安装了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 wrote a detailed how-to guide on installing Ruby and Rails on Ubuntu 10.10 that will help you with this. 我写了一份详细的使用指南,说明如何在Ubuntu 10.10上安装Ruby和Rails 。
Guaranteed, or your money back! 品质保证,退款保证!
You should avoid the packaged version of Ruby (ie, avoid the version of Ruby that comes from apt-get install ruby
). 您应该避免使用Ruby的打包版本(即,避免使用
apt-get install ruby
附带的Ruby版本)。 The Debian packaging system (which Ubuntu uses) conflicts with what Ruby expects. Debian打包系统(Ubuntu使用的)与Ruby期望的相冲突。
Instead, you should install Ruby from source. 相反,您应该从源代码安装Ruby。
There's a nice tool called RVM to help you do this. 有一个名为RVM的不错的工具可以帮助您完成此任务。
# Install prerequisites
$ sudo apt-get install git curl wget
# Download and install RVM
$ bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-latest )
# Install RVM into your .bash_profile
$ cat >> ~/.bash_profile <<-PROFILE
> [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
> PROFILE
# Load RVM into the current shell
$ rvm reload
# Install prerequisites
$ rvm notes
$ sudo apt-get install \
> build-essential bison openssl libreadline6 libreadline6-dev curl \
> git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 \
> libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev \
> ncurses-dev
# Install Ruby
$ rvm install ruby-1.9.2-p180 # latest version as of now
$ rvm use ruby-1.9.2-p180 --default
# Check it
$ ruby -v
$ which ruby
$ gem install rails
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.