ruby - Rails install fails - cause by Nokogiri gem? -


i trying setup ruby on rails environment on mac in order start using rubymine ide. have used homebrew, rbenv , other required libraries in order install ruby/rails - when sudo gem install rails install fails due :

building native extensions.  take while... error:  error installing rails:     error: failed build gem native extension.      current directory: /usr/local/lib/ruby/gems/2.3.0/gems/nokogiri-1.6.8.1/ext/nokogiri /usr/local/opt/ruby/bin/ruby -r ./siteconf20161110-767-xwnfls.rb extconf.rb checking if c compiler accepts ... yes checking if c compiler accepts -wno-error=unused-command-line-argument-hard-error-in-future... no building nokogiri using packaged libraries. using mini_portile version 2.1.0 checking iconv.h... yes checking gzdopen() in -lz... no zlib missing; necessary building libxml2 *** extconf.rb failed *** not create makefile due reason, lack of necessary libraries and/or headers.  check mkmf.log file more details.  may need configuration options. 

i have tried install nokogiri on it's own , following error:

error:  while executing gem ... (errno::eacces)     permission denied @ rb_sysopen - /usr/local/lib/ruby/gems/2.3.0/gems/nokogiri-1.6.8.1/.autotest 

i hope can me quite noob ronr , feel things have gotten messy directory/permission wise,

thank you.

let's take quick @ small part of error have provided us.

zlib missing; necessary building libxml2 

it's trying tell you not have zlib, let's it. since said you're using mac, install package manager homebrew. try doing brew install zlib install package.

additionally, if you're starting out learning ruby, regardless of platform using, might helpful use rbenv or rvm manage different versions of ruby , gems go along versions. run less permissions issues (e.g. having run gem install privileged user), of may easy solve, of may send down rabbit hole few hours.


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -