Should I add files that are part of the Ruby Standard Library to the `Gemfile`?

两盒软妹~` 提交于 2019-12-10 10:15:36

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/4778071/should-i-add-files-that-are-part-of-the-ruby-standard-library-to-the-gemfile

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!