我在我的虛擬機ubuntu12.04lts中安裝了openssl。無法在ruby中需要openssl
當我運行gem命令時會給出錯誤。
Error: while executing gem (Gem::Exception)
Unable to require openssl. install openSSL and rebuilt ruby (preferred) or use non HTTPs sources
而且我也在irb模式下測試需要openssl。 它給出了錯誤。
Loaderror: cannot load such file --openssl
from /usr/local/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55 `require'
我有OpenSSL的
$openssl version
OpenSSL 1.0.1 14 mar 2012
如何修正這個錯誤?
您使用的是什麼版本的Ruby,以及您是如何安裝它的?您可能必須按照錯誤消息中所述重新構建Ruby。 –
嗨大衛我正在使用ruby2.1.0p0的紅寶石。我通過構建它的源代碼來安裝它。 –
這個問題看起來像文件名:'--openssl'相對於'openssl'(除非Ruby在錯誤輸出中預先加上破折號)。 'openssl'意外地被格式化爲一個開關? – jww