1

我想尝试使用本指南安装 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
4

3 回答 3

1

看起来您的 ruby​​ 没有使用 openssl 支持编译。

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

于 2012-10-09T16:23:14.947 回答
1

虽然不确定问题所在,但这我有帮助。

于 2012-10-09T16:16:21.080 回答
0

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

尝试:

sudo apt-get install libssl-dev

于 2012-10-09T16:21:45.677 回答