我需要在ruby中使用openssl。我應該如何安裝?我已經通過rbenv安裝了ruby,並且正在使用Ubuntu 12.04。在ruby/rbenv中安裝openssl
[email protected]:~$ ruby -v
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-linux]
[email protected]:~$ irb
irb(main):001:0> require 'openssl'
LoadError: no such file to load -- openssl
from /home/kprakasam/.rbenv/versions/1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/kprakasam/.rbenv/versions/1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from (irb):1
from /home/kprakasam/.rbenv/versions/1.9.2-p180/bin/irb:12:in `<main>'
我認爲你必須編譯OpenSSL的 –
'sudo易於得到-y構建紅寶石 - 必須安裝zlib1g-dev libreadline-dev libssl-dev libcurl4-openssl-dev',而不是使用rbenv再次安裝ruby,並且您將擁有openssl支持 – Nebojsa