2011-02-13 31 views
2

當我試圖打開一個頁面時,出現「沒有這樣的文件加載 - openssl」錯誤!RubyOnRails/OSX:沒有這樣的文件加載 - openssl

我GOOGLE了好幾個小時,現在,沒有一個解決方案,我對我:(

發現工作,我對我的OSX(10.6.6)運行紅寶石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) 

請幫助...我是新來的Ruby on Rails和完全失去了在這一點上這裏:(

THX

的Matthias

更新:
我試圖用手重新編譯的OpenSSL這樣做(如根用戶):

 
cd /usr/local/rvm/src/ruby-1.9.2-p136/ext/openssl 
ruby extconf.rb 
make 
sudo make install 

但紅寶石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. 
[email protected]~$ 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切換到紅寶石1.8.5 everth這只是起作用。所以爲什麼當我切換到1.9.2頭!

解決方案:

Openssl的莫名其妙地被編譯爲32位。我固定它通過刪除所有的OpenSSL版本,並通過MAC端口與重新安裝:

 
sudo port install openssl +universal 

MAC端口上的/ opt /默認本地安裝OpenSSL的,所以你需要添加這個路徑安裝Ruby時:

 
sudo rvm install 1.9.2 --with-openssl-dir=/opt/local 

瞧:)

回答

1

刪除我的useless評論,因爲Matthias找到了解決方案。

+0

已經做到了....不工作:( – Matthias 2011-02-13 19:48:41

相關問題