ruby on rails openssl

在尝试使用Ruby 1.9.3-p362和Rails 3.2.11创建新项目时,遇到由于缺少OpenSSL支持导致的错误。通过将Gemfile中的源从'https'更改为'http',或者重新编译Ruby并启用OpenSSL支持,可以解决此问题。在修改Gemfile后,项目成功创建。
摘要由CSDN通过智能技术生成

ruby使用的是1.9.3-p362 自己编译安装的:configure && make && make install

Rails使用的是3.2.11

在创建新项目时报错:

$:rails new demo

         run  bundle install
Fetching gem metadata from https://rubygems.org/.
Could not load OpenSSL.
You must recompile Ruby with OpenSSL support or change the sources in your
Gemfile from 'https' to 'http'. Instructions for compiling with OpenSSL
using RVM are available at rvm.io/packages/openssl.

修改demo/Gemfile第一行后重新创建项目,项目创建成功

source 'https://rubygems.org' --> source 'https://rubygems.org'


$:cd demo

$:rails server
`require’: cannot load such file — openssl (LoadError)”
处理办法:

先安装libssl-dev:

1
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值