首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >在Ubuntu 10.10上Rails安装失败

在Ubuntu 10.10上Rails安装失败
EN

Stack Overflow用户
提问于 2011-03-23 10:38:42
回答 2查看 692关注 0票数 2

我试图在Ubuntu 10.10上安装rails,但每次都会得到File not found: lib。Ruby和Rubygems已正确安装。我在网上看到过这个问题,但是没有一个解决方案对我有效。我重新安装了rdoc,但仍然得到相同的结果。

代码语言:javascript
运行
复制
$ 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
EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2011-03-23 10:55:16

我写了一个detailed how-to guide on installing Ruby and Rails on Ubuntu 10.10,它可以帮助你解决这个问题。

保证,否则你的钱将退还!

票数 4
EN

Stack Overflow用户

发布于 2011-03-23 10:51:58

你应该避免使用Ruby的打包版本(例如,避免使用来自apt-get install ruby的Ruby版本)。Debian打包系统( Ubuntu使用的)与Ruby所期望的相冲突。

相反,您应该从源代码安装Ruby。

有一个名为RVM的很好的工具可以帮助您做到这一点。

代码语言:javascript
运行
复制
# 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
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/5400267

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档