root@yz00-Ideapad-Z460:~# gem source -r https://rubygems.org/ https://rubygems.org/ removed from sources root@yz00-Ideapad-Z460:~# gem source -l *** CURRENT SOURCES ***
root@yz00-Ideapad-Z460:~# gem source -a http://ruby.taobao.org http://ruby.taobao.org added to sources root@yz00-Ideapad-Z460:~# gem source -l *** CURRENT SOURCES ***
http://ruby.taobao.org root@yz00-Ideapad-Z460:~# gem install rails Fetching: i18n-0.7.0.gem (100%) Successfully installed i18n-0.7.0 Fetching: thread_safe-0.3.4.gem (100%) Successfully installed thread_safe-0.3.4 Fetching: tzinfo-1.2.2.gem (100%) Successfully installed tzinfo-1.2.2 Fetching: minitest-5.5.1.gem (100%) Successfully installed minitest-5.5.1 Fetching: activesupport-4.2.0.gem (100%) Successfully installed activesupport-4.2.0 Fetching: rack-1.6.0.gem (100%) Successfully installed rack-1.6.0 Fetching: rack-test-0.6.3.gem (100%) Successfully installed rack-test-0.6.3 Fetching: mini_portile-0.6.2.gem (100%) Successfully installed mini_portile-0.6.2 Fetching: nokogiri-1.6.6.2.gem (100%) Building native extensions. This could take a while... ERROR: Error installing rails: ERROR: Failed to build gem native extension.
/usr/local/bin/ruby -r ./siteconf20150213-4741-m4wolb.rb extconf.rb checking if the C compiler accepts ... yes Building nokogiri using packaged libraries. *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/bin/ruby
--help
--clean
--use-system-libraries
/usr/local/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in require': cannot load such file -- openssl (LoadError)
from /usr/local/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in
require'
from /usr/local/lib/ruby/2.1.0/net/https.rb:22:in <top (required)>'
from /usr/local/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in
require'
from /usr/local/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in require'
from /usr/local/lib/ruby/gems/2.1.0/gems/mini_portile-0.6.2/lib/mini_portile.rb:3:in
'
from /usr/local/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:128:in require'
from /usr/local/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:128:in
rescue in require'
from /usr/local/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:39:in require'
from extconf.rb:395:in
extconf failed, exit code 1
Gem files will remain installed in /usr/local/lib/ruby/gems/2.1.0/gems/nokogiri-1.6.6.2 for inspection. Results logged to /usr/local/lib/ruby/gems/2.1.0/extensions/x86-linux/2.1.0-static/nokogiri-1.6.6.2/gem_make.out
安装 rails 时报错,就报这个错,大家帮忙看下,万分感谢!