I have been trying to get Ruby on Rails setup for a while. I had no trouble with Ruby, but when it gets down to Rails, things just turned south. I thinks things start to fall apart after I updated my Ruby to 2.3.1. First it was the openssl problem, now I reinstalled Ruby using RVM and when I want to reinstall Rails using gem install rails, I get this:
Yiqiaos-MBP:bookstore Richard$ gem install rails
Fetching: rack-1.6.4.gem (100%)
Successfully installed rack-1.6.4
Fetching: concurrent-ruby-1.0.2.gem (100%)
Successfully installed concurrent-ruby-1.0.2
Fetching: sprockets-3.6.0.gem (100%)
Successfully installed sprockets-3.6.0
Fetching: thread_safe-0.3.5.gem (100%)
Successfully installed thread_safe-0.3.5
Fetching: tzinfo-1.2.2.gem (100%)
Successfully installed tzinfo-1.2.2
Fetching: i18n-0.7.0.gem (100%)
Successfully installed i18n-0.7.0
Fetching: activesupport-4.2.6.gem (100%)
Successfully installed activesupport-4.2.6
Building native extensions. This could take a while...
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
current directory: /Users/Richard/.rvm/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/nokogiri-1.6.8/ext/nokogiri
/Users/Richard/.rvm/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20160607-53149-klvpv1.rb extconf.rb
Using pkg-config version 1.1.7
checking if the C compiler accepts ... yes
checking if the C compiler accepts -Wno-error=unused-command-line-argument-hard-error-in-future... no
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
--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=/Users/Richard/.rvm/rubies/ruby-2.3.1/bin/$(RUBY_BASE_NAME)
--help
--clean
--use-system-libraries
/Users/Richard/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- openssl (LoadError)
from /Users/Richard/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/Richard/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/net/https.rb:23:in `<top (required)>'
from /Users/Richard/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/Richard/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/Richard/.rvm/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/mini_portile2-2.1.0/lib/mini_portile2/mini_portile.rb:3:in `<top (required)>'
from /Users/Richard/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/Richard/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/Richard/.rvm/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/mini_portile2-2.1.0/lib/mini_portile2.rb:2:in `<top (required)>'
from /Users/Richard/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/Richard/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from extconf.rb:468:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Users/Richard/.rvm/gems/ruby-2.3.1@global/extensions/x86_64-darwin-15/2.3.0/nokogiri-1.6.8/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /Users/Richard/.rvm/gems/ruby-2.3.1@global/gems/nokogiri-1.6.8 for inspection.
Results logged to /Users/Richard/.rvm/gems/ruby-2.3.1@global/extensions/x86_64-darwin-15/2.3.0/nokogiri-1.6.8/gem_make.out
Here is the mkmf,log file, which does not seem to be helpful either
I looked through stack overflow all over the place and could not find an answer. Let me know what you think!
Aucun commentaire:
Enregistrer un commentaire