0

I am learning RoR for the first time and I am stuck on this part of the tutorial http://www.railstutorial.org/book/static_pages#sec-first_tests

Specifically in the beginning where I am supposed to configure this gem file. I know there are other more up to date versions out but I am trying to follow the tutorial with this specific version. My gemfile is the same as the one displayed in the link.

When I run: bundle install --without production I get:

Bundler could not find compatible versions for gem "sprockets-rails":
  In snapshot (Gemfile.lock):
    sprockets-rails (2.1.3)

  In Gemfile:
    rails (= 4.0.5) ruby depends on
      sprockets-rails (~> 2.0.0) ruby

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

I tried bundle update but I get:

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

I tried gem install nokogiri -v '1.6.1' but get:

ERROR:  Error installing nokogiri:
    ERROR: Failed to build gem native extension.

    /Users/bradfordli/.rvm/rubies/ruby-2.0.0-p481/bin/ruby extconf.rb
Building nokogiri using packaged libraries.
-----
libiconv is missing.  please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
-----
*** 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.
Liondancer
  • 15,721
  • 51
  • 149
  • 255
  • I think you are leaving out some details :o the zero to deploy chapter of the linked book doesn't show nokogiri at all. – Ben Jun 26 '14 at 23:09
  • @BenjaminUdinktenCate I dont recall ever seeing anything in the book regarding nokogiri =/ i can check again – Liondancer Jun 26 '14 at 23:15
  • @BenjaminUdinktenCate everything worked fine up until the beginning of chapter 3 =/ – Liondancer Jun 26 '14 at 23:16
  • well if you really need it, have a look at http://nokogiri.org/tutorials/installing_nokogiri.html as the error message suggests. You probably need to install a package manager like homebrew or macports before you can install libiconv – Ben Jun 26 '14 at 23:30
  • @BenjaminUdinktenCate i followed the instructions to install nokogiri but libiconv is always missing even though I have it installed. – Liondancer Jun 26 '14 at 23:53
  • are you on mac/windows/linux ? – Taryn East Jun 27 '14 at 00:28
  • cool, try this one: http://stackoverflow.com/questions/5528839/why-does-installing-nokogiri-on-mac-os-fail-with-libiconv-is-missing it has several different possible solutions for solving the iconv problem on mac - you may have to try more than one to find the one that solves it for you. – Taryn East Jun 27 '14 at 00:29

0 Answers0