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.