ruby - Can't install Rails on Yosemite - I feel like I've tried everything -
i feel i've read every tutorial , stackexchange posts, , still same error when trying install rails. here common error get:
$ gem install rails --no-ri --no-rdoc building native extensions. take while... error: error installing rails: error: failed build gem native extension. /users/jdesilvio/.rvm/rubies/ruby-2.2.0/bin/ruby -r ./siteconf20150409-59802-iosiis.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. checking gzdopen() in -lz... yes checking iconv... yes ************************************************************************ important notice: building nokogiri packaged version of libxml2-2.9.2 following patches applied: - 0001-revert-missing-initialization-for-the-catalog-module.patch - 0002-fix-missing-entities-after-cve-2014-3660-fix.patch 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.2.tar.gz tmp/x86_64-apple-darwin14.1.0/ports/libxml2/2.9.2... ok running patch /users/jdesilvio/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2/ports/patches/libxml2/0001-revert-missing-initialization-for-the-catalog-module.patch... running 'patch' libxml2 2.9.2... ok running patch /users/jdesilvio/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2/ports/patches/libxml2/0002-fix-missing-entities-after-cve-2014-3660-fix.patch... running 'patch' libxml2 2.9.2... ok running 'configure' libxml2 2.9.2... ok running 'compile' libxml2 2.9.2... ok running 'install' libxml2 2.9.2... ok activating libxml2 2.9.2 (from /users/jdesilvio/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2/ports/x86_64-apple-darwin14.1.0/libxml2/2.9.2)... ************************************************************************ important notice: building nokogiri packaged version of libxslt-1.1.28 following patches applied: - 0001-adding-doc-update-related-to-1.1.28.patch - 0002-fix-a-couple-of-places-where-f-printf-parameters-wer.patch - 0003-initialize-pseudo-random-number-generator-with-curre.patch - 0004-exslt-function-str-replace-is-broken-as-is.patch - 0006-fix-str-padding-to-work-with-utf-8-strings.patch - 0007-separate-function-for-predicate-matching-in-patterns.patch - 0008-fix-direct-pattern-matching.patch - 0009-fix-certain-patterns-with-predicates.patch - 0010-fix-handling-of-utf-8-strings-in-exslt-crypto-module.patch - 0013-memory-leak-in-xsltcompileidkeypattern-error-path.patch - 0014-fix-for-bug-436589.patch - 0015-fix-mkdir-for-mingw.patch 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 ************************************************************************ extracting libxslt-1.1.28.tar.gz tmp/x86_64-apple-darwin14.1.0/ports/libxslt/1.1.28... ok running patch /users/jdesilvio/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2/ports/patches/libxslt/0001-adding-doc-update-related-to-1.1.28.patch... running 'patch' libxslt 1.1.28... ok running patch /users/jdesilvio/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2/ports/patches/libxslt/0002-fix-a-couple-of-places-where-f-printf-parameters-wer.patch... running 'patch' libxslt 1.1.28... ok running patch /users/jdesilvio/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2/ports/patches/libxslt/0003-initialize-pseudo-random-number-generator-with-curre.patch... running 'patch' libxslt 1.1.28... ok running patch /users/jdesilvio/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2/ports/patches/libxslt/0004-exslt-function-str-replace-is-broken-as-is.patch... running 'patch' libxslt 1.1.28... ok running patch /users/jdesilvio/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2/ports/patches/libxslt/0006-fix-str-padding-to-work-with-utf-8-strings.patch... running 'patch' libxslt 1.1.28... ok running patch /users/jdesilvio/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2/ports/patches/libxslt/0007-separate-function-for-predicate-matching-in-patterns.patch... running 'patch' libxslt 1.1.28... ok running patch /users/jdesilvio/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2/ports/patches/libxslt/0008-fix-direct-pattern-matching.patch... running 'patch' libxslt 1.1.28... ok running patch /users/jdesilvio/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2/ports/patches/libxslt/0009-fix-certain-patterns-with-predicates.patch... running 'patch' libxslt 1.1.28... ok running patch /users/jdesilvio/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2/ports/patches/libxslt/0010-fix-handling-of-utf-8-strings-in-exslt-crypto-module.patch... running 'patch' libxslt 1.1.28... ok running patch /users/jdesilvio/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2/ports/patches/libxslt/0013-memory-leak-in-xsltcompileidkeypattern-error-path.patch... running 'patch' libxslt 1.1.28... ok running patch /users/jdesilvio/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2/ports/patches/libxslt/0014-fix-for-bug-436589.patch... running 'patch' libxslt 1.1.28... ok running patch /users/jdesilvio/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2/ports/patches/libxslt/0015-fix-mkdir-for-mingw.patch... running 'patch' libxslt 1.1.28... ok running 'configure' libxslt 1.1.28... ok running 'compile' libxslt 1.1.28... ok running 'install' libxslt 1.1.28... ok activating libxslt 1.1.28 (from /users/jdesilvio/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2/ports/x86_64-apple-darwin14.1.0/libxslt/1.1.28)... checking main() in -llzma... yes checking xmlparsedoc() in libxml/parser.h... no checking xmlparsedoc() in -lxml2... no checking xmlparsedoc() in -llibxml2... no ----- libxml2 missing. please locate mkmf.log investigate how failing. ----- *** 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/jdesilvio/.rvm/rubies/ruby-2.2.0/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 --with-xml2lib --without-xml2lib --with-libxml2lib --without-libxml2lib extconf failed, exit code 1 gem files remain installed in /users/jdesilvio/.rvm/gems/ruby-2.2.0@global/gems/nokogiri-1.6.6.2 inspection. results logged /users/jdesilvio/.rvm/gems/ruby-2.2.0@global/extensions/x86_64-darwin-14/2.2.0-static/nokogiri-1.6.6.2/gem_make.out
os os x yosemite 10.10.2
here's have installed far, used rmv
install ruby:
$ ruby -v ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin14] $ xcode-select -p /applications/xcode.app/contents/developer $ gcc --version configured with: --prefix=/applications/xcode.app/contents/developer/usr -- with-gxx-include-dir=/usr/include/c++/4.2.1 apple llvm version 6.0 (clang-600.0.57) (based on llvm 3.5svn) target: x86_64-apple-darwin14.1.0 thread model: posix $ gem -v 2.4.6
i've used following install rails , keep getting error above:
$ gem install rails --no-ri --no-rdoc $ gem install rails -v 4.2.0 $ gem install nokogiri -- --use-system-libraries --with-xml2-include=/opt/local/include/libxml2 --with-xml2-lib=/opt/local/lib --with-xslt-dir=/opt/local $ sudo gem install rails --no-ri --no-rdoc
i don't know else do, please help.
@rainkinz:
$ cat /users/jdesilvio/.rvm/gems/ruby-2.2.0@global/extensions/x86_64-darwin-14/2.2.0-static/nokogiri-1.6.6.2/gem_make.out /users/jdesilvio/.rvm/rubies/ruby-2.2.0/bin/ruby -r ./siteconf20150409-82655-12gg3g1.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. checking gzdopen() in -lz... yes checking iconv... yes ************************************************************************ important notice: building nokogiri packaged version of libxml2-2.9.2 following patches applied: - 0001-revert-missing-initialization-for-the-catalog-module.patch - 0002-fix-missing-entities-after-cve-2014-3660-fix.patch 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.2.tar.gz tmp/x86_64-apple-darwin14.1.0/ports/libxml2/2.9.2... ok running patch /users/jdesilvio/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2/ports/patches/libxml2/0001-revert-missing-initialization-for-the-catalog-module.patch... running 'patch' libxml2 2.9.2... ok running patch /users/jdesilvio/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2/ports/patches/libxml2/0002-fix-missing-entities-after-cve-2014-3660-fix.patch... running 'patch' libxml2 2.9.2... ok running 'configure' libxml2 2.9.2... ok running 'compile' libxml2 2.9.2... ok running 'install' libxml2 2.9.2... ok activating libxml2 2.9.2 (from /users/jdesilvio/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2/ports/x86_64-apple-darwin14.1.0/libxml2/2.9.2)... ************************************************************************ important notice: building nokogiri packaged version of libxslt-1.1.28 following patches applied: - 0001-adding-doc-update-related-to-1.1.28.patch - 0002-fix-a-couple-of-places-where-f-printf-parameters-wer.patch - 0003-initialize-pseudo-random-number-generator-with-curre.patch - 0004-exslt-function-str-replace-is-broken-as-is.patch - 0006-fix-str-padding-to-work-with-utf-8-strings.patch - 0007-separate-function-for-predicate-matching-in-patterns.patch - 0008-fix-direct-pattern-matching.patch - 0009-fix-certain-patterns-with-predicates.patch - 0010-fix-handling-of-utf-8-strings-in-exslt-crypto-module.patch - 0013-memory-leak-in-xsltcompileidkeypattern-error-path.patch - 0014-fix-for-bug-436589.patch - 0015-fix-mkdir-for-mingw.patch 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 ************************************************************************ extracting libxslt-1.1.28.tar.gz tmp/x86_64-apple-darwin14.1.0/ports/libxslt/1.1.28... ok running patch /users/jdesilvio/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2/ports/patches/libxslt/0001-adding-doc-update-related-to-1.1.28.patch... running 'patch' libxslt 1.1.28... ok running patch /users/jdesilvio/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2/ports/patches/libxslt/0002-fix-a-couple-of-places-where-f-printf-parameters-wer.patch... running 'patch' libxslt 1.1.28... ok running patch /users/jdesilvio/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2/ports/patches/libxslt/0003-initialize-pseudo-random-number-generator-with-curre.patch... running 'patch' libxslt 1.1.28... ok running patch /users/jdesilvio/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2/ports/patches/libxslt/0004-exslt-function-str-replace-is-broken-as-is.patch... running 'patch' libxslt 1.1.28... ok running patch /users/jdesilvio/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2/ports/patches/libxslt/0006-fix-str-padding-to-work-with-utf-8-strings.patch... running 'patch' libxslt 1.1.28... ok running patch /users/jdesilvio/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2/ports/patches/libxslt/0007-separate-function-for-predicate-matching-in-patterns.patch... running 'patch' libxslt 1.1.28... ok running patch /users/jdesilvio/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2/ports/patches/libxslt/0008-fix-direct-pattern-matching.patch... running 'patch' libxslt 1.1.28... ok running patch /users/jdesilvio/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2/ports/patches/libxslt/0009-fix-certain-patterns-with-predicates.patch... running 'patch' libxslt 1.1.28... ok running patch /users/jdesilvio/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2/ports/patches/libxslt/0010-fix-handling-of-utf-8-strings-in-exslt-crypto-module.patch... running 'patch' libxslt 1.1.28... ok running patch /users/jdesilvio/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2/ports/patches/libxslt/0013-memory-leak-in-xsltcompileidkeypattern-error-path.patch... running 'patch' libxslt 1.1.28... ok running patch /users/jdesilvio/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2/ports/patches/libxslt/0014-fix-for-bug-436589.patch... running 'patch' libxslt 1.1.28... ok running patch /users/jdesilvio/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2/ports/patches/libxslt/0015-fix-mkdir-for-mingw.patch... running 'patch' libxslt 1.1.28... ok running 'configure' libxslt 1.1.28... ok running 'compile' libxslt 1.1.28... ok running 'install' libxslt 1.1.28... ok activating libxslt 1.1.28 (from /users/jdesilvio/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2/ports/x86_64-apple-darwin14.1.0/libxslt/1.1.28)... checking main() in -llzma... yes checking xmlparsedoc() in libxml/parser.h... no checking xmlparsedoc() in -lxml2... no checking xmlparsedoc() in -llibxml2... no ----- libxml2 missing. please locate mkmf.log investigate how failing. ----- *** 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/jdesilvio/.rvm/rubies/ruby-2.2.0/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 --with-xml2lib --without-xml2lib --with-libxml2lib --without-libxml2lib extconf failed, exit code 1
**output brew doctor
:
$ brew doctor please note these warnings used homebrew maintainers debugging if file issue. if use homebrew working fine: please don't worry , ignore them. thanks! warning: directories in /usr/local/share/man aren't writable. can happen if "sudo make install" software isn't managed homebrew. if brew tries add locale information 1 of these directories, install fail during link step. should `chown` them: /usr/local/share/man/mann warning: newer command line tools release available. update them software update in app store. warning: "config" scripts exist outside system or homebrew directories. `./configure` scripts *-config scripts determine if software packages installed, , additional flags use when compiling , linking. having additional scripts in path can confuse software installed via homebrew if config script overrides system or homebrew provided script of same name. found following "config" scripts: /opt/local/bin/libpng-config /opt/local/bin/libpng16-config /opt/local/bin/ncurses5-config /opt/local/bin/ncursesw5-config /opt/local/bin/pkg-config /opt/local/bin/python2.7-config /users/jdesilvio/anaconda/bin/curl-config /users/jdesilvio/anaconda/bin/freetype-config /users/jdesilvio/anaconda/bin/libdynd-config /users/jdesilvio/anaconda/bin/libpng-config /users/jdesilvio/anaconda/bin/libpng15-config /users/jdesilvio/anaconda/bin/llvm-config /users/jdesilvio/anaconda/bin/python-config /users/jdesilvio/anaconda/bin/python2-config /users/jdesilvio/anaconda/bin/python2.7-config /users/jdesilvio/anaconda/bin/xml2-config /users/jdesilvio/anaconda/bin/xslt-config /library/frameworks/python.framework/versions/3.4/bin/python3-config /library/frameworks/python.framework/versions/3.4/bin/python3.4-config /library/frameworks/python.framework/versions/3.4/bin/python3.4m-config warning: python installed @ /library/frameworks/python.framework homebrew supports building against system-provided python or brewed python. in particular, pythons installed /library can interfere other software installs. warning: have macports or fink installed: /opt/local/bin/port can cause trouble. don't have uninstall them, may want temporarily move them out of way, e.g. sudo mv /opt/local ~/macports warning: unbrewed dylibs found in /usr/local/lib. if didn't put them there on purpose cause problems when building homebrew formulae, , may need deleted. unexpected dylibs: /usr/local/lib/libmonoposixhelper.dylib /usr/local/lib/libsffilemonitor.32.dylib /usr/local/lib/libsfipc.32.dylib /usr/local/lib/libsfipc.i.dylib /usr/local/lib/libsfsqlite3.7.4.dylib /usr/local/lib/libsfsyncengine.i.dylib /usr/local/lib/libtcl8.6.dylib /usr/local/lib/libtk8.6.dylib warning: unbrewed header files found in /usr/local/include. if didn't put them there on purpose cause problems when building homebrew formulae, , may need deleted. unexpected header files: /usr/local/include/fakemysql.h /usr/local/include/fakepq.h /usr/local/include/fakesql.h /usr/local/include/itcl.h /usr/local/include/itcl2tcloo.h /usr/local/include/itcldecls.h /usr/local/include/itclint.h /usr/local/include/itclintdecls.h /usr/local/include/itclmigrate2tclcore.h /usr/local/include/itcltclintstubsfcn.h /usr/local/include/mysqlstubs.h /usr/local/include/odbcstubs.h /usr/local/include/pqstubs.h /usr/local/include/tcl.h /usr/local/include/tcldecls.h /usr/local/include/tcloo.h /usr/local/include/tcloodecls.h /usr/local/include/tclplatdecls.h /usr/local/include/tclthread.h /usr/local/include/tcltommath.h /usr/local/include/tcltommathdecls.h /usr/local/include/tdbc.h /usr/local/include/tdbcdecls.h /usr/local/include/tdbcint.h /usr/local/include/tk.h /usr/local/include/tkdecls.h /usr/local/include/tkplatdecls.h warning: unbrewed .pc files found in /usr/local/lib/pkgconfig. if didn't put them there on purpose cause problems when building homebrew formulae, , may need deleted. unexpected .pc files: /usr/local/lib/pkgconfig/tcl.pc /usr/local/lib/pkgconfig/tk.pc warning: unbrewed static libraries found in /usr/local/lib. if didn't put them there on purpose cause problems when building homebrew formulae, , may need deleted. unexpected static libraries: /usr/local/lib/libtclstub8.6.a /usr/local/lib/libtkstub8.6.a warning: have non-homebrew 'pkg-config' in path: /opt/local/bin/pkg-config `./configure` may have problems finding brew-installed packages using other pkg-config. warning: xcode (6.2) outdated please update xcode 6.3. xcode can updated app store.
based on brew doctor output:
sudo mv /opt/local ~/macports mv /users/jdesilvio/anaconda /users/jdesilvio/anaconda.back gem install nokogiri
then optionally put macports (you shouldn't have both macports , homebrew) , optionally put anaconda (whatever is). guess libxml2 install in anaconda directory messing path headers of libxml2 installed nokogiri.