本文介绍了我应该将属于Ruby标准库的文件添加到`Gemfile`中吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在代码中执行 require'openssl'>。否则,我得到 NameError:未初始化的常量Object :: OpenSSL 。但是,当我做 gem list 时,我没有看到 openssl 。我正在部署一个Sinatra应用程序到Heroku stack bamboo-mri-1.9.2。我应该向 Gemfile 添加 openssl 吗?我不这么认为,因为我认为。另外,?

I need to do require 'openssl' in my code. Otherwise, I get NameError: uninitialized constant Object::OpenSSL. But, when I do gem list, I don't see openssl. I'm deploying a Sinatra app to Heroku stack bamboo-mri-1.9.2. Should I add openssl to the Gemfile? I don't think so because I think openssl is part of the Ruby Standard Library. Also, what about base64?

推荐答案

很可能你已经编译了没有openssl支持的ruby。如果您使用的是RVM,则可以尝试

It's very likely that you have compiled ruby without openssl support. If you are using RVM, you can try this

这篇关于我应该将属于Ruby标准库的文件添加到`Gemfile`中吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 07:16