Home Rails bundle install not working error with nokogiri
Reply: 0

Rails bundle install not working error with nokogiri

user11581
1#
user11581 Published in September 19, 2018, 3:19 am

I started a new rails project, cd'd inside it and then tried to bundle install

I got the following error

An error occurred while installing nokogiri (1.6.7), and Bundler cannot continue. Make sure that gem install nokogiri -v '1.6.7' succeeds before bundling.

I am pretty sure this is a level A problem I tried googling it but found nothing, hope i didnt overlook it

Thanks for any help

edit: if i try to manually install nokogiri it gives the following error

Adams-MacBook-Pro:fancy_cars adamkatz$ gem install nokiogiri
ERROR:  Could not find a valid gem 'nokiogiri' (>= 0) in any repository
ERROR:  Possible alternatives: nokogiri, nokogirl, niceogiri, onigiri
Adams-MacBook-Pro:fancy_cars adamkatz$ gem install nokogiri
Building native extensions.  This could take a while...
ERROR:  Error installing nokogiri:
    ERROR: Failed to build gem native extension.

    /Users/adamkatz/.rbenv/versions/2.2.3/bin/ruby -r ./siteconf20151213-2420-12wvig2.rb extconf.rb
checking if the C compiler accepts ... *** 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=/Users/adamkatz/.rbenv/versions/2.2.3/bin/$(RUBY_BASE_NAME)
    --help
    --clean
/Users/adamkatz/.rbenv/versions/2.2.3/lib/ruby/2.2.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
    from /Users/adamkatz/.rbenv/versions/2.2.3/lib/ruby/2.2.0/mkmf.rb:571:in `block in try_compile'
    from /Users/adamkatz/.rbenv/versions/2.2.3/lib/ruby/2.2.0/mkmf.rb:522:in `with_werror'
    from /Users/adamkatz/.rbenv/versions/2.2.3/lib/ruby/2.2.0/mkmf.rb:571:in `try_compile'
    from extconf.rb:80:in `nokogiri_try_compile'
    from extconf.rb:87:in `block in add_cflags'
    from /Users/adamkatz/.rbenv/versions/2.2.3/lib/ruby/2.2.0/mkmf.rb:619:in `with_cflags'
    from extconf.rb:86:in `add_cflags'
    from extconf.rb:336:in `'

extconf failed, exit code 1

Gem files will remain installed in /Users/adamkatz/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.7 for inspection.
Results logged to /Users/adamkatz/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-14/2.2.0-static/nokogiri-1.6.7/gem_make.out
share|improve this question
  • What's the result of trying to gem install nokogiri -v '1.6.7' manually? – RyanWilcox Dec 13 '15 at 20:38
  • it gives this error ERROR: Could not find a valid gem 'nokiogiri' (>= 0) in any repository ERROR: Possible alternatives: nokogiri, nokogirl, niceogiri, onigiri – Adam Katz Dec 13 '15 at 20:40
  • I think you made a spelling mistake when trying to install it manually ;) Anyway, run it and please update the question with the result – RyanWilcox Dec 13 '15 at 20:41
  • yes sorry, It gave this error when i spell it right – Adam Katz Dec 13 '15 at 20:41
  • sorry never posted it as it was too long ends with exit code 1 not sure what other information you need? – Adam Katz Dec 13 '15 at 20:42

1 Answer 1

active oldest votes
up vote 1 down vote accepted
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.302935 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO