无法在Ubuntu 10.10上安装Rails

时间:2012-10-09 16:10:30

标签: ruby-on-rails ubuntu install

我想尝试使用本指南安装Rails - http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you/

我的最后一个命令是:

  gem install rails -v 3.2.3

现在,当我正在运行

 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/sha1.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/bundler-1.2.1/lib/bundler/definition.rb:1:in `<top (required)>'
from /home/denys/.rvm/gems/ruby-1.9.3-p194/gems/bundler-1.2.1/lib/bundler.rb:144:in `definition'
from /home/denys/.rvm/gems/ruby-1.9.3-p194/gems/bundler-1.2.1/lib/bundler.rb:112:in `setup'
from /home/denys/.rvm/gems/ruby-1.9.3-p194/gems/bundler-1.2.1/lib/bundler/setup.rb:7:in `<top (required)>'
from /home/denys/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
from /home/denys/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
from /home/denys/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
from /home/denys/Desktop/pull/printitgreen/printitgreen/config/boot.rb:6: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 script/rails:5:in `<main>'
denys@denys-N68S3:~/Desktop/pull/printitgreen/printitgreen/script$ rails -v
 /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/sha1.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/bundler-1.2.1/lib/bundler
/definition.rb:1:in `<top (required)>'
from /home/denys/.rvm/gems/ruby-1.9.3-p194/gems/bundler-1.2.1/lib/bundler.rb:144:in `definition'
from /home/denys/.rvm/gems/ruby-1.9.3-p194/gems/bundler-1.2.1/lib/bundler.rb:112:in `setup'
from /home/denys/.rvm/gems/ruby-1.9.3-p194/gems/bundler-1.2.1/lib/bundler/setup.rb:7:in `<top (required)>'
from /home/denys/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
from /home/denys/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
from /home/denys/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
from /home/denys/Desktop/pull/printitgreen/printitgreen/config/boot.rb:6: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 script/rails:5:in `<main>'

 ---------------------------

更多信息:

    denys@denys-N68S3:~/Desktop$ rvm list

 rvm rubies

 ruby-1.9.2-p320 [ i686 ]
=* ruby-1.9.3-p194 [ i686 ]

# => - current
# =* - current && default
#  * - default

3 个答案:

答案 0 :(得分:1)

虽然不确定问题,但this帮助了我。

答案 1 :(得分:1)

看起来你的ruby没有用openssl支持编译。

安装openssl-dev并重新安装/重新编译ruby

答案 2 :(得分:0)

您是否执行教程中列出的apt-get命令?

尝试:

sudo apt-get install libssl-dev