Rails 3-没有这样的文件要加载-openssl [英] Rails 3 - no such file to load -- openssl
问题描述
在运行Rails服务器时,出现以下错误: 没有要加载的文件-openssl
when running a Rails server, I get the following error: no such file to load -- openssl
我尝试在网上找到的解决方案.我去〜/.rvm/src/ruby-1.9.2-head/ext/openssl.我输入:ruby extconf.rb,但得到以下信息:
I try a solution I find online. I go to ~/.rvm/src/ruby-1.9.2-head/ext/openssl. I type : ruby extconf.rb, but I get the following:
=== OpenSSL for Ruby configurator ===
=== Checking for system dependent stuff... ===
checking for t_open() in -lnsl... no
checking for socket() in -lsocket... no
checking for assert.h... yes
=== Checking for required stuff... ===
checking for openssl/ssl.h... no
=== Checking for required stuff failed. ===
Makefile wasn't created. Fix the errors above.
我既不能使用make也不能进行make install.
I cannot use make nor make install.
推荐答案
rvm pkg install openssl
(旧格式-rvm package install openssl
)
rvm pkg install iconv
(旧格式-rvm package install iconv
)
rvm remove 1.9.2
rvm install 1.9.2 -C --with-openssl-dir=$HOME/.rvm/usr,--with-iconv-dir=$HOME/.rvm/usr
rvm pkg install openssl
(older format - rvm package install openssl
)
rvm pkg install iconv
(older format - rvm package install iconv
)
rvm remove 1.9.2
rvm install 1.9.2 -C --with-openssl-dir=$HOME/.rvm/usr,--with-iconv-dir=$HOME/.rvm/usr
这篇关于Rails 3-没有这样的文件要加载-openssl的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!