ruby - Rails fails to install on Sierra -


(thank maxple answer! worked)

i'm attempting install rails on macos 10.12 (sierra). i'm using terminal install using command:

$ sudo gem install rails 

this produces following output:

building native extensions.  take while... error:  error installing rails:     error: failed build gem native extension.      current directory: /users/paullantow/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/nokogiri-1.7.0.1/ext/nokogiri /users/paullantow/.rbenv/versions/2.2.3/bin/ruby -r ./siteconf20170111-22393-xqzt1j.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... yes checking iconv... yes ************************************************************************ important notice:  building nokogiri packaged version of libxml2-2.9.4.  team nokogiri keep on doing best provide security updates in timely manner, if concern , want use system library instead; abort installation process , reinstall nokogiri follows:      gem install nokogiri -- --use-system-libraries         [--with-xml2-config=/path/to/xml2-config]         [--with-xslt-config=/path/to/xslt-config]  if using bundler, tell use option:      bundle config build.nokogiri --use-system-libraries     bundle install  note, however, nokogiri not compatible arbitrary versions of libxml2 provided os/package vendors. ************************************************************************ extracting libxml2-2.9.4.tar.gz tmp/x86_64-apple-darwin16.3.0/ports/libxml2/2.9.4... ok running 'configure' libxml2 2.9.4... ok running 'compile' libxml2 2.9.4... error, review '/users/paullantow/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/nokogiri-1.7.0.1/ext/nokogiri/tmp/x86_64-apple-darwin16.3.0/ports/libxml2/2.9.4/compile.log' see happened. last lines are: ========================================================================     unsigned short* in = (unsigned short*) inb;                          ^~~~~~~~~~~~~~~~~~~~~ encoding.c:815:27: warning: cast 'unsigned char *' 'unsigned short *' increases required alignment 1 2 [-wcast-align]     unsigned short* out = (unsigned short*) outb;                           ^~~~~~~~~~~~~~~~~~~~~~ 4 warnings generated.   cc       error.lo   cc       parserinternals.lo   cc       parser.lo   cc       tree.lo   cc       hash.lo   cc       list.lo   cc       xmlio.lo xmlio.c:1450:52: error: use of undeclared identifier 'lzma_ok'     ret =  (__libxml2_xzclose((xzfile) context) == lzma_ok ) ? 0 : -1;                                                    ^ 1 error generated. make[2]: *** [xmlio.lo] error 1 make[1]: *** [all-recursive] error 1 make: *** [all] error 2 ======================================================================== *** 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.  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=/users/paullantow/.rbenv/versions/2.2.3/bin/$(ruby_base_name)     --help     --clean     --use-system-libraries     --enable-static     --disable-static     --with-zlib-dir     --without-zlib-dir     --with-zlib-include     --without-zlib-include=${zlib-dir}/include     --with-zlib-lib     --without-zlib-lib=${zlib-dir}/lib     --enable-cross-build     --disable-cross-build /users/paullantow/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/mini_portile2-2.1.0/lib/mini_portile2/mini_portile.rb:366:in `block in execute': failed complete compile task (runtimeerror)     /users/paullantow/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/mini_portile2-2.1.0/lib/mini_portile2/mini_portile.rb:337:in `chdir'     /users/paullantow/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/mini_portile2-2.1.0/lib/mini_portile2/mini_portile.rb:337:in `execute'     /users/paullantow/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/mini_portile2-2.1.0/lib/mini_portile2/mini_portile.rb:111:in `compile'     /users/paullantow/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/mini_portile2-2.1.0/lib/mini_portile2/mini_portile.rb:150:in `cook'     extconf.rb:364:in `block (2 levels) in process_recipe'     extconf.rb:257:in `block in chdir_for_build'     extconf.rb:256:in `chdir'     extconf.rb:256:in `chdir_for_build'     extconf.rb:363:in `block in process_recipe'     extconf.rb:262:in `tap'     extconf.rb:262:in `process_recipe'     extconf.rb:547:in `<main>'  see why extension failed compile, please check mkmf.log can found here:    /users/paullantow/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-16/2.2.0-static/nokogiri-1.7.0.1/mkmf.log  extconf failed, exit code 1  gem files remain installed in /users/paullantow/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/nokogiri-1.7.0.1 inspection. results logged /users/paullantow/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-16/2.2.0-static/nokogiri-1.7.0.1/gem_make.out 

i've installed xcode command line tools (8.21), lack of common reason i've seen when searching others problem.

i have multiple versions of ruby installed, using rvm.

i've uninstalled , reinstalled homebrew.

i appreciate advice getting rails , running on system.

try using

gem install nokogiri -v 1.7.0.1 -- --use-system-libraries=true --with-xml2-include=/applications/xcode.app/contents/developer/platforms/macosx.platform/developer/sdks/macosx10.12.sdk/usr/include/libxml2


Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -