Question

J'essaie d'installer des rails sur Ubuntu 10.10, mais obtenir un fichier non trouvé: lib à chaque fois. Ruby et Rubygems ont été installés correctement. J'ai vu ce problème affiché sur le Web, mais aucune solution ne fonctionne pour moi. J'ai réinstallé RDOC et j'ai toujours le même résultat.

$ 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
Était-ce utile?

La solution

J'ai écrit un Guide approfondi de l'installation de Ruby et Rails sur Ubuntu 10.10 Cela vous aidera avec cela.

Garanti, ou votre argent!

Autres conseils

Vous devez éviter la version emballée de Ruby (c'est-à-dire, éviter la version de Ruby qui vient de apt-get install ruby). Le système d'emballage Debian (qu'Ubuntu utilise) entre en conflit avec ce que Ruby attend.

Au lieu de cela, vous devez installer Ruby à partir de la source.

Il y a un bel outil appelé RVM pour vous aider à faire cela.

# 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
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top