ruby on rails openssl
2013-01-11 22:42
246 查看
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:
然后编译出一个共享库来安装进去就可以了,方法如下:
进入ruby源码目录下,然后
之后编译出.so文件安装:
不需要重新编译ruby,直接可用。重新创建demo项目,成功;启动服务器,成功。访问http 3000端口,成功。
参考:http://lunae.cc/solve-can-not-load-such-file-openssl-error
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 | sudo apt-get install libssl-dev |
进入ruby源码目录下,然后
1 | cd ext/openssl |
1 | ruby extconf.rb |
2 | make |
3 | sudo make install |
参考:http://lunae.cc/solve-can-not-load-such-file-openssl-error
相关文章推荐
- Ruby on rails: no such file to load -- openssl
- Ruby on Rails 安装出现`require’: cannot load such file — openssl (LoadError)的解决方法
- Windows下编译OpenSSL for Ruby On Rails
- 使用 XForms 和 Ruby on Rails 开发小型门诊管理系统,第 3 部分:实现护士和医生 XForm
- Ruby on rails 安装教程
- Ruby on Rails 入门之:(5) Ruby中基本数据类型
- 使用ruby on rails快速开发
- ruby on rails demo建立
- Ruby on Rails 入门之:(15) Ruby中的文件的导入
- Window7上安装Ruby on Rails
- Ruby on Rails 入门之:(23) Ruby 中文件,目录的操作
- Ruby on Rails,使用where方法对持久化对象进行条件查询
- ruby on rails 的片头曲
- 最轻省的MVC,ORM方案原来在别处--Ruby on Rails 2nd
- 面试ruby on rails时会遇见的哪些梗
- Ruby On Rails开发所需插件整理
- ruby on rails中创建xml数据
- 为什么Ruby on Rails: 一张有趣的图片。
- Ruby on rails开发从头来(windows)(五)-对输入进行验证 (修正原版错误)
- Ruby on Rails,环境安装和Gems(转载)