ruby的ssl问题

师弟的ruby出了点问题,启动rails的时候报错:

$ ruby script/server
=> Booting Mongrel (use ‘script/server webrick’ to force WEBrick)
=> Rails 2.1.0 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment…
Exiting
/usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:225:in require_frameworks': no such file to load -- openssl (RuntimeError)
from /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:113:in
process’
from /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:93:in send'
from /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:93:in
run’
from /home/xulei/ROR/mybook/config/environment.rb:13
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require’
…………………….

一大堆错误。

尝试使用apt安装ruby和rails,没想到ubuntu 8.04存在依赖性关系,未遂。看来这件事情将我转到ubuntu的yy想法无情打破。

源码安装ruby和rubygem,然后gem安装rails,还是以上问题,未遂。

google一下,说是先装openssl-dev,然后“reconfigure all the ruby packages from scratch”,一直没理解这个reconfigure是什么意思。后来弄明白了,原来是到ruby的源码目录configure、make和make install,这样就ok了。

Leave a Comment

Your email address will not be published. Required fields are marked *