我在尝试打开页面时收到“没有这样的文件加载 - openssl”错误!
我现在用谷歌搜索了几个小时,我找到的解决方案都没有为我工作:(
我在OSX(10.6.6)上运行ruby 1.9.2p136(通过rvm(多用户安装)安装)
这是我的本地宝石列表:
*** LOCAL GEMS *** abstract (1.0.0) actionmailer (3.0.4, 3.0.3) actionpack (3.0.4, 3.0.3) activemodel (3.0.4, 3.0.3) activerecord (3.0.4, 3.0.3) activeresource (3.0.4, 3.0.3) activesupport (3.0.4, 3.0.3) arel (2.0.8, 2.0.7, 2.0.4) bcrypt-ruby (2.1.4) builder (3.0.0, 2.1.2) bundler (1.0.10) devise (1.1.5, 1.1.4) erubis (2.6.6) haml (3.0.25) i18n (0.5.0, 0.4.2) mail (2.2.15, 2.2.10) mime-types (1.16) openssl-extensions (1.1.0) polyglot (0.3.1) rack (1.2.1) rack-mount (0.6.13) rack-test (0.5.7, 0.5.6) rails (3.0.4, 3.0.3) railties (3.0.4, 3.0.3) rake (0.8.7) sqlite3 (1.3.3) sqlite3-ruby (1.3.3, 1.3.2) thor (0.14.6) treetop (1.4.9) tzinfo (0.3.24, 0.3.23) warden (1.0.3)
请帮助......我是铁轨上的红宝石,在这一点上完全迷失了:(
THX
的Matthias
更新
我尝试手动重新编译openssl(以root用户身份):
cd /usr/local/rvm/src/ruby-1.9.2-p136/ext/openssl ruby extconf.rb make sudo make install
但ruby extconf.rb输出错误:
=== 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.
我该怎么办呢?
更新2:
现在通过自制软件安装openssl:
brew install openssl sudo brew link openssl
一切正常,没有错误!
然后做了以下事情:
rvm remove 1.9.2 rvm install 1.9.2 --with-openssl-dir=/usr/local/etc
最后一个输出了这个:
/usr/local/rvm/rubies/ruby-1.9.2-p136, this may take a while depending on your cpu(s)... ruby-1.9.2-p136 - #fetching ruby-1.9.2-p136 - #extracting ruby-1.9.2-p136 to /usr/local/rvm/src/ruby-1.9.2-p136 ruby-1.9.2-p136 - #extracted to /usr/local/rvm/src/ruby-1.9.2-p136 ruby-1.9.2-p136 - #configuring ruby-1.9.2-p136 - #compiling Error running 'make ', please read /usr/local/rvm/log/ruby-1.9.2-p136/make.log There has been an error while running make. Halting the installation. root@MatthiasMacBookPro~$ Error running 'make ', please read /usr/local/rvm/log/ruby-1.9.2-p136/make.log Error: Only takes 0 or 1 arguments
在这里获取make.log:http://matthias-ptx4s.posterous.com/private/kksnjfiJoB
更新3:
当我通过rvm切换到ruby 1.8.5 everthings正常工作。那么为什么不切换到1.9.2-head!?
解决方案:
Openssl以某种方式编译为32位。我通过删除所有openssl版本并通过mac端口重新安装它来修复它:
sudo port install openssl +universal默认情况下, mac ports在/ opt / local安装openssl,因此在安装ruby时需要添加此路径:
sudo rvm install 1.9.2 --with-openssl-dir=/opt/local瞧瞧:)
答案 0 :(得分:1)
在Matthias找到解决方案时删除了我的useless
评论。