no such file to load — openssl

2020-05-08 06:30发布

Am trying to load my rails app onto a new linux machine and i have done all the installations required and the bundle install is working .Now my problem is when i start the server (rails s) and then try to open the web app its tells me " no such file to load -- openssl "

LoadError in MembersController#index

no such file to load -- openssl

This error occurred while loading the following files: openssl i tried uninstalling openssl (apt-get remove openssl) but still the problem persist.Can some body please help me with it.thanks

Am using ruby 1.8.7 and rails 3.0.0

3条回答
仙女界的扛把子
2楼-- · 2020-05-08 07:09

For me, this issue was fixed (on Debian Lenny) by installing libopenssl-ruby:

$ sudo apt-get install libopenssl-ruby

Debian (did) split the openssl support into a separate package, see what's the role of libopenssl-ruby? for more information.

查看更多
混吃等死
3楼-- · 2020-05-08 07:10

Are you using RVM?

If so you may want to reinstall ruby with the location of your openssl installation passed as an option:

$ rvm remove 1.8.7
$ rvm install 1.8.7 --with-openssl-dir=/usr/local/openssl  # or wherever openssl is installed

On a Debian-based system, you can find where openssl is installed by running the following command:

$ dpkg -L openssl

Alternatively you can have RVM install openssl for you:

$ rvm package install openssl
$ rvm remove 1.8.7
$ rvm install 1.8.7 --with-openssl-dir=$HOME/.rvm/usr

Note that afterwards you'll need to re-install rails:

$ gem install rails
查看更多
该账号已被封号
4楼-- · 2020-05-08 07:25

I had this problem with OpenSUSE 12.1 after installing rvm (according to website instructions) and using it to install and use ruby 1.9.2.

Specifying --with-openssl-dir DID NOT solve it for me. But, after I installed libopenssl-devel with the OpenSUSE Software Management utility, "bundle install" complleted successfully.

查看更多
登录 后发表回答