0

我正在使用本指南 - https://www.digitalocean.com/community/articles/how-to-install-ruby-on-rails-on-ubuntu-12-04-lts-precise-pangolin-with-rvm .

我知道它适用于 12.04,但它是由有经验的用户推荐的,所以我使用了它。

我正在遵循本指南,并且在跑步时:

  rvm install 1.9.3

我进入控制台

 denys@denys-N68S3:~/Desktop$ rvm install 1.9.3
 No binary rubies available for: ubuntu/10.10/i386/ruby-1.9.3-p194.
 Continuing with compilation. Please read 'rvm mount' to get more information on binary 
 rubies.

然后一切正常并告诉我安装完成。

我按照所有其他说明进行到最后。而现在,当我跑步时

  rails new project

我在控制台中收到错误:

  /home/denys/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': libcrypto.so.1.0.0: cannot open shared object file: No such file or directory - /home/denys/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/i686-linux/digest/md5.so (LoadError)
from /home/denys/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/denys/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/generators/app_base.rb:1:in `<top (required)>'
from /home/denys/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/denys/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/denys/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/generators/rails/app/app_generator.rb:1:in `<top (required)>'
from /home/denys/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/denys/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/denys/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/commands/application.rb:24:in `<top (required)>'
from /home/denys/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/denys/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/denys/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/cli.rb:15:in `<top (required)>'
from /home/denys/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/denys/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/denys/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/bin/rails:7:in `<top (required)>'
from /home/denys/.rvm/gems/ruby-1.9.3-p194/bin/rails:19:in `load'
from /home/denys/.rvm/gems/ruby-1.9.3-p194/bin/rails:19:in `<main>'
from /home/denys/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `eval'
from /home/denys/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `<main>'

我认为这是问题,因为我正在尝试安装,然后 Rails 无法正常工作。

请在这件事上给予我帮助。

4

1 回答 1

0

一些 Ruby 库对一些系统库有外部依赖。对于您的错误,似乎缺少的是openssl.

如果您键入rvm requirements,它将告诉您操作系统需要哪些系统库。在 Ubuntu 中对我来说,它说我需要安装以下内容:

apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion pkg-config

嗯...这并不意味着您一定需要所有这些 - 但有些是绝对必要的,例如 openssl/libssl、libxml 等

于 2012-10-10T08:11:54.817 回答