红联Linux门户
Linux帮助

ubuntu安装rails遇到的问题及解决办法

发布时间:2015-09-29 10:29:13来源:linux网站作者:逆风飞翔2012

安装顺序 ruby -->gem-->rails 安装 ruby 、gem都比较顺利,按照rails问题很多。


1.ERROR: Possible alternatives: rails

更换安装源 gem sources -a http://ruby.taobao.org/:

增加新镜像 gem sources -r https://rubygems.org/:

移除原有镜像 gem sources -l;查看镜像列表(必须确保只有淘宝一个镜像地址)


2.ERROR: Error installing rails:

ERROR: Failed to build gem native extension. /usr/bin/ruby2.0 extconf.rb mkmf.rb can’t find header files for ruby at /usr/lib/ruby/include/ruby.h

安装ruby2.1-dev

sudo apt-get install ruby2.1-dev


3.ERROR: Error installing rails:

ERROR: Failed to build gem native extension. Gem files will remain installed in /var/lib/gems/2.1.0/gems/nokogiri-1.6.6.2 for inspection.

安装 libpq-dev

sudo apt-get install libpq-dev


4.sqlite  error

apt-get install libsqlite3-dev


在Ubuntu 15.04中安装Ruby on Rails:http://www.linuxdiyf.com/linux/12897.html

ubuntu 15.04下ruby on rails环境相关问题:http://www.linuxdiyf.com/linux/12741.html

在Ubuntu上搭建RoR(Ruby on Rails)环境:http://www.linuxdiyf.com/linux/10880.html

CentOS系统搭建Ruby On Rails平台:http://www.linuxdiyf.com/linux/10330.html