简体   繁体   English

Ruby on Rails:没有这样的文件可以加载 - 在RedHat Linux Enterprise上打开openssl

[英]Ruby on Rails: no such file to load — openssl on RedHat Linux Enterprise

I am trying to do 'rake db:migrate' and getting the error message 'no such file to load -- openssl'. 我正在尝试'rake db:migrate'并收到错误消息'没有这样的文件加载 - openssl'。 Both 'openssl' and 'openssl-devel' packages are installed. 安装了'openssl'和'openssl-devel'软件包。 Others on Debian or Ubuntu seem to be able to get rid of this by installing 'libopenssl-ruby', which is not available for RedHat. Debian或Ubuntu上的其他人似乎可以通过安装“libopenssl-ruby”来解决这个问题,而这个问题并不适用于RedHat。 Has anybody run into this and have a solution for it? 有没有人遇到这个并有解决方案?

I had this problem on Ubuntu, after upgrading to 8.10. 升级到8.10后,我在Ubuntu上遇到了这个问题。 The solution for Ubuntu was Ubuntu的解决方案是

sudo apt-get install libopenssl-ruby

it seems you need to make the ruby header file 看来你需要制作ruby头文件

go into the openssl directory and: 进入openssl目录并:

ruby extconf.rb
cd ../..
make
make install

See here 看到这里

If you are using RVM to manage your rubies follow the directions here: 如果您使用RVM管理红宝石,请按照以下说明操作:

http://rvm.io/packages/openssl/ http://rvm.io/packages/openssl/

I had the same issue. 我遇到过同样的问题。 I tried going into the openssl folder and running make etc but it couldnt find the libraries lcrypto. 我尝试进入openssl文件夹并运行make等但它无法找到库lcrypto。 I solved the issue by running ruby 1.9.3-p327. 我通过运行ruby 1.9.3-p327解决了这个问题。

Hope this helps! 希望这可以帮助!

There is probably a gem you are missing. 你可能缺少一颗宝石。 Can you provide the stack trace and the line of code where it originates? 你能提供堆栈跟踪和它产生的代码行吗?

Re-run rake with --trace to get the stack trace printed. 使用--trace重新运行rake以打印堆栈跟踪。

EDIT: Also what version of Ruby are you running? 编辑:你还运行什么版本的Ruby? openssl.rb is in my 1.8.6 install openssl.rb在我的1.8.6安装中

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM