ruby app is giving problems with incompatible libraries - ruby-on-rails

while generating controllers, I am getting this error message:
Leticias-MacBook-Pro:portfolio Tish$ rails g controller welcome index about music loops projects
/Users/Tish/.rvm/gems/ruby-2.3.1/gems/sqlite3-1.3.12/lib/sqlite3.rb:6:in `require': incompatible library version - /Users/Tish/.rvm/gems/ruby-2.3.1/gems/sqlite3-1.3.12/lib/sqlite3/sqlite3_native.bundle (fatal)
from /Users/Tish/.rvm/gems/ruby-2.3.1/gems/sqlite3-1.3.12/lib/sqlite3.rb:6:in `rescue in <top (required)>'
from /Users/Tish/.rvm/gems/ruby-2.3.1/gems/sqlite3-1.3.12/lib/sqlite3.rb:2:in `<top (required)>'
from /Users/Tish/.rvm/gems/ruby-2.3.1/gems/bundler-1.13.6/lib/bundler/runtime.rb:91:in `require'
from /Users/Tish/.rvm/gems/ruby-2.3.1/gems/bundler-1.13.6/lib/bundler/runtime.rb:91:in `block (2 levels) in require'
from /Users/Tish/.rvm/gems/ruby-2.3.1/gems/bundler-1.13.6/lib/bundler/runtime.rb:86:in `each'
from /Users/Tish/.rvm/gems/ruby-2.3.1/gems/bundler-1.13.6/lib/bundler/runtime.rb:86:in `block in require'
from /Users/Tish/.rvm/gems/ruby-2.3.1/gems/bundler-1.13.6/lib/bundler/runtime.rb:75:in `each'
from /Users/Tish/.rvm/gems/ruby-2.3.1/gems/bundler-1.13.6/lib/bundler/runtime.rb:75:in `require'
from /Users/Tish/.rvm/gems/ruby-2.3.1/gems/bundler-1.13.6/lib/bundler.rb:106:in `require'
from /Users/Tish/Projects/portfolio/config/application.rb:7:in `<top (required)>'
from /Users/Tish/.rvm/gems/ruby-2.3.1/gems/spring-2.0.0/lib/spring/application.rb:82:in `require'
from /Users/Tish/.rvm/gems/ruby-2.3.1/gems/spring-2.0.0/lib/spring/application.rb:82:in `preload'
from /Users/Tish/.rvm/gems/ruby-2.3.1/gems/spring-2.0.0/lib/spring/application.rb:143:in `serve'
from /Users/Tish/.rvm/gems/ruby-2.3.1/gems/spring-2.0.0/lib/spring/application.rb:131:in `block in run'
from /Users/Tish/.rvm/gems/ruby-2.3.1/gems/spring-2.0.0/lib/spring/application.rb:125:in `loop'
from /Users/Tish/.rvm/gems/ruby-2.3.1/gems/spring-2.0.0/lib/spring/application.rb:125:in `run'
from /Users/Tish/.rvm/gems/ruby-2.3.1/gems/spring-2.0.0/lib/spring/application/boot.rb:19:in `<top (required)>'
from /usr/local/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `<main>'
Nothing I have tried makes it stop. I have reinstalled every gem it complains about, but the changes do not persist. I've followed every fix I can find/understand but I am chasing my tail on this one.
Working on OSX...

Your rails is not linked with the right ruby version. Use the following code:
rvm use ruby-<version number> like: (rvm use ruby-2.1.4)
then reinstall the bundler:
gem uninstall bundler
gem install bundler
bundle install once again with the new version.
bundle install
Then proceed with your rails g command.

Related

Nokogiri Incompatible Library Error when trying to Use Carrierwave Gem uploader - Rails

I'm trying to use the Carrierwave gem to add pictures to my site. As soon as I use the gem uploader, I get the following error telling me that I have an incompatible library version referencing Nokogiri 1.8.1 ...
/Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/nokogiri-1.8.1/lib/nokogiri.rb:32:in `require': incompatible library version - /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/nokogiri-1.8.1/lib/nokogiri/nokogiri.bundle (fatal)
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/nokogiri-1.8.1/lib/nokogiri.rb:32:in `rescue in <top (required)>'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/nokogiri-1.8.1/lib/nokogiri.rb:28:in `<top (required)>'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/loofah-2.1.1/lib/loofah.rb:3:in `require'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/loofah-2.1.1/lib/loofah.rb:3:in `<top (required)>'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/rails-html-sanitizer-1.0.3/lib/rails-html-sanitizer.rb:2:in `require'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/rails-html-sanitizer-1.0.3/lib/rails-html-sanitizer.rb:2:in `<top (required)>'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/actionview-5.0.6/lib/action_view/helpers/sanitize_helper.rb:2:in `require'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/actionview-5.0.6/lib/action_view/helpers/sanitize_helper.rb:2:in `<top (required)>'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/actionview-5.0.6/lib/action_view/helpers/text_helper.rb:32:in `require'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/actionview-5.0.6/lib/action_view/helpers/text_helper.rb:32:in `<module:TextHelper>'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/actionview-5.0.6/lib/action_view/helpers/text_helper.rb:29:in `<module:Helpers>'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/actionview-5.0.6/lib/action_view/helpers/text_helper.rb:6:in `<module:ActionView>'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/actionview-5.0.6/lib/action_view/helpers/text_helper.rb:4:in `<top (required)>'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/actionview-5.0.6/lib/action_view/helpers/form_tag_helper.rb:18:in `require'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/actionview-5.0.6/lib/action_view/helpers/form_tag_helper.rb:18:in `<module:FormTagHelper>'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/actionview-5.0.6/lib/action_view/helpers/form_tag_helper.rb:14:in `<module:Helpers>'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/actionview-5.0.6/lib/action_view/helpers/form_tag_helper.rb:8:in `<module:ActionView>'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/actionview-5.0.6/lib/action_view/helpers/form_tag_helper.rb:6:in `<top (required)>'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/actionview-5.0.6/lib/action_view/helpers/form_helper.rb:4:in `require'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/actionview-5.0.6/lib/action_view/helpers/form_helper.rb:4:in `<top (required)>'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/actionview-5.0.6/lib/action_view/helpers.rb:50:in `require'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/actionview-5.0.6/lib/action_view/helpers.rb:50:in `<module:Helpers>'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/actionview-5.0.6/lib/action_view/helpers.rb:4:in `<module:ActionView>'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/actionview-5.0.6/lib/action_view/helpers.rb:3:in `<top (required)>'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/context.rb:1:in `require'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/context.rb:1:in `<top (required)>'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/sprockets-rails-3.2.1/lib/sprockets/railtie.rb:7:in `require'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/sprockets-rails-3.2.1/lib/sprockets/railtie.rb:7:in `<top (required)>'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/railties-5.0.6/lib/rails/all.rb:14:in `require'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/railties-5.0.6/lib/rails/all.rb:14:in `block in <top (required)>'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/railties-5.0.6/lib/rails/all.rb:12:in `each'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/railties-5.0.6/lib/rails/all.rb:12:in `<top (required)>'
from /Users/danieluribe/code/one_stop_ror/yelpdemo/config/application.rb:3:in `require'
from /Users/danieluribe/code/one_stop_ror/yelpdemo/config/application.rb:3:in `<top (required)>'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/spring-2.0.2/lib/spring/application.rb:92:in `require'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/spring-2.0.2/lib/spring/application.rb:92:in `preload'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/spring-2.0.2/lib/spring/application.rb:153:in `serve'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/spring-2.0.2/lib/spring/application.rb:141:in `block in run'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/spring-2.0.2/lib/spring/application.rb:135:in `loop'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/spring-2.0.2/lib/spring/application.rb:135:in `run'
from /Users/danieluribe/.rvm/gems/ruby-2.3.0/gems/spring-2.0.2/lib/spring/application/boot.rb:19:in `<top (required)>'
from /Users/danieluribe/.rvm/rubies/ruby-2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/danieluribe/.rvm/rubies/ruby-2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
Most of the solutions I've seen online include references to libxml2 but I see no references in my error to that. I have however tried the solution here with no success.
I have uninstalled and reinstalled both nokogiri and libxml multiple times using brew. I've also used the installation for Nokogiri on Mac as mentioned on their page here.
I'm not 100-percent sure if it's simply a Nokogiri error or whether libxml2 requires a different version than the default. The current version I'm using for libxml2 is 2.9.3. Any help or pointing in the right direction will be greatly appreciated. Let me know if more details are needed.
Try installing the development files if you haven't already:
sudo apt-get install g++ build-essential -y
EDIT: Oops, for mac try this: https://github.com/kennethreitz/osx-gcc-installer
EDIT: Another idea, remove Nokogiri version from the Gemfile then try
gem install nokogiri -v 1.6.8.1 -- --use-system-libraries=true --with-xml2-include=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/libxml2

Incompatible library versions ruby, rvm, bundler

I am having troubles with Ruby using rvm. First I thought problem was with specific gem pg. But now I was able to reproduce error using mysql2. I have troubles to diagnose the problem...
Here is the last log.
bundle exec rake secret
rake aborted!
LoadError: incompatible library version - /home/dominim6/ror/dapps/releases/20160315195705/vendor/bundle/ruby/2.2.0/gems/mysql2-0.3.20/lib/mysql2/mysql2.so
/home/dominim6/ror/dapps/releases/20160315195705/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `require'
/home/dominim6/ror/dapps/releases/20160315195705/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `block in require'
/home/dominim6/ror/dapps/releases/20160315195705/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:240:in `load_dependency'
/home/dominim6/ror/dapps/releases/20160315195705/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `require'
/home/dominim6/ror/dapps/releases/20160315195705/vendor/bundle/ruby/2.2.0/gems/mysql2-0.3.20/lib/mysql2.rb:31:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.2.3#424_dapps/gems/bundler-1.11.2/lib/bundler/runtime.rb:77:in `require'
/usr/local/rvm/gems/ruby-2.2.3#424_dapps/gems/bundler-1.11.2/lib/bundler/runtime.rb:77:in `block (2 levels) in require'
/usr/local/rvm/gems/ruby-2.2.3#424_dapps/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
/usr/local/rvm/gems/ruby-2.2.3#424_dapps/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
/usr/local/rvm/gems/ruby-2.2.3#424_dapps/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
/usr/local/rvm/gems/ruby-2.2.3#424_dapps/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
/usr/local/rvm/gems/ruby-2.2.3#424_dapps/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
/home/dominim6/ror/dapps/releases/20160315195705/config/application.rb:7:in `<top (required)>'
/home/dominim6/ror/dapps/releases/20160315195705/Rakefile:4:in `require'
/home/dominim6/ror/dapps/releases/20160315195705/Rakefile:4:in `<top (required)>'
Why does it search for 2.2.0 here? Why not 2.2.3? (which, by the way, is not installed under vendor)
/home/dominim6/ror/dapps/releases/20160315195705/vendor/bundle/ruby/2.2.0/gems/mysql2-0.3.20/lib/mysql2.rb:31:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.2.3#424_dapps/gems/bundler-1.11.2/lib/bundler/runtime.rb:77:in `require'
Similar case, I believe, is this other question about pg. I had that trouble, that is why I tested now with mysql. I even created a bug at ruby, which was rejected because is a mix of library extensions...
Question is what is mixing libraries. My guess is rvm. Any similar cases? Any help to diagnose? I can put more info using both pg and mysql2.

Cannot start rails server, I get an error

I'm new to Ruby on Rails. So, I'd got this error before, and I reinstalled rails and ruby and installed them again, but I still get it.
The error is:
/home/X/.rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler/runtime.rb:80:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'uglifier'. (Bundler::GemRequireError)
from /home/X/.rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /home/X/.rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
from /home/X/.rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
from /home/X/.rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
from /home/X/.rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
from /home/X/.rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
from /home/X/Documents/Appw/config/application.rb:7:in `<top (required)>'
from /home/X/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:78:in `require'
from /home/X/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:78:in `block in server'
from /home/X/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /home/X/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:75:in `server'
from /home/X/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /home/X/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/commands.rb:17:in `<top (required)>'
from /home/X/Documents/Appw/bin/rails:9:in `require'
from /home/X/Documents/Appw/bin/rails:9:in `<top (required)>'
from /home/X/.rvm/gems/ruby-2.2.1/gems/spring-1.6.1/lib/spring/client/rails.rb:28:in `load'
from /home/X/.rvm/gems/ruby-2.2.1/gems/spring-1.6.1/lib/spring/client/rails.rb:28:in `call'
from /home/X/.rvm/gems/ruby-2.2.1/gems/spring-1.6.1/lib/spring/client/command.rb:7:in `call'
from /home/X/.rvm/gems/ruby-2.2.1/gems/spring-1.6.1/lib/spring/client.rb:28:in `run'
from /home/X/.rvm/gems/ruby-2.2.1/gems/spring-1.6.1/bin/spring:51:in `<top (required)>'
from /home/X/.rvm/gems/ruby-2.2.1/gems/spring-1.6.1/lib/spring/binstub.rb:11:in `load'
from /home/X/.rvm/gems/ruby-2.2.1/gems/spring-1.6.1/lib/spring/binstub.rb:11:in `<top (required)>'
from /home/X/Documents/Appw/bin/spring:13:in `require'
from /home/X/Documents/Appw/bin/spring:13:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
I tried updating the uglifier gem, but nothing happened.
It looks like you have't installed nodejs
sudo apt-get install nodejs
Should work !!!
The problem was that I didn't have nodejs installed. After I've installed it, everything worked smoothly.
What is you gemfile/gem list?
Actually having meteor installed doesn't count as having nodejs installed. nodejs is required for uglifier package, so simple: yum install nodejs resolves the issue.

in `<module:Helpers>': uninitialized constant ActionView::Helpers::ActiveModelHelper (NameError)

I have just started learning Ruby on Rails. I installed all the related softwares and started exploring the same. When I try to start the default server in Rails (WEBrick), I am getting the following error.
C:/Apps/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.5/lib/action_view/helpers.rb:40:in `<module:Helpers>': uninitialized constant ActionView::Helpers::ActiveModelHelper (NameError)
from C:/Apps/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.5/lib/action_view/helpers.rb:4:in `<module:ActionView>'
from C:/Apps/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.5/lib/action_view/helpers.rb:3:in `<top (required)>'
from C:/Apps/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.5/lib/action_view/base.rb:5:in `require'
from C:/Apps/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.5/lib/action_view/base.rb:5:in `<top (required)>'
from C:/Apps/Ruby22-x64/lib/ruby/gems/2.2.0/gems/web-console-2.2.1/lib/web_console/template.rb:7:in `<class:Template>'
from C:/Apps/Ruby22-x64/lib/ruby/gems/2.2.0/gems/web-console-2.2.1/lib/web_console/template.rb:6:in `<module:WebConsole>'
from C:/Apps/Ruby22-x64/lib/ruby/gems/2.2.0/gems/web-console-2.2.1/lib/web_console/template.rb:1:in `<top (required)>'
from C:/Apps/Ruby22-x64/lib/ruby/gems/2.2.0/gems/web-console-2.2.1/lib/web_console.rb:12:in `require'
from C:/Apps/Ruby22-x64/lib/ruby/gems/2.2.0/gems/web-console-2.2.1/lib/web_console.rb:12:in `<top (required)>'
from C:/Apps/Ruby22-x64/lib/ruby/gems/2.2.0/gems/web-console-2.2.1/lib/web-console.rb:1:in `require'
from C:/Apps/Ruby22-x64/lib/ruby/gems/2.2.0/gems/web-console-2.2.1/lib/web-console.rb:1:in `<top (required)>'
from C:/Apps/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:in `require'
from C:/Apps/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from C:/Apps/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in `each'
from C:/Apps/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in `block in require'
from C:/Apps/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in `each'
from C:/Apps/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in `require'
from C:/Apps/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler.rb:134:in `require'
from C:/Temp/Rails-Project/Sites/simple_cms/config/application.rb:7:in `<top (required)>'
from C:/Apps/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:78:in`require'
from C:/Apps/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:78:in`block in server'
from C:/Apps/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:75:in`tap'
from C:/Apps/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:75:in`server'
from C:/Apps/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:39:in`run_command!'
from C:/Apps/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
Upon research in SOF, found from the link and other link that the nokogiri needs to be updated in the Gemfile. I updated and executed the Bundle Install command. Even after that, its not working. Please suggest me the ways to fix it. FYI, I am using the latest versions of gems.
I also updated my Gemfile with
gem 'rack', '~> 1.6.0'
It did not work.
Install an older version of rails (4.0.0) because I think windows doesn't have stable version of rails > 4.0.
Change the version in gemfile.

Getting error in Hartl's tutorial running "bundle exec rspec spec/requests/static_pages_spec.rb"

I'm learning Ruby from Michael Hartl's tutorial. I'm following the steps one by one, but I can't get passed this one. When I input "bundle exec rspec spec/requests/static_pages_spec.rb" I get a very long error response as opposed to a simple "1 example, 0 failures". I changed the necessary code in the static pages directories and I'm fairly confident the code is correct as I simply copied and pasted. The error message is this:
/Users/marlon/.rvm/gems/ruby-1.9.2-p320/gems/nokogiri-1.6.0/lib/nokogiri.rb:28:in `require': dlopen(/Users/marlon/.rvm/gems/ruby-1.9.2-p320/gems/nokogiri-1.6.0/lib/nokogiri/nokogiri.bundle, 9): Library not loaded: /Users/marlon/.bundler/tmp/1219/gems/nokogiri-1.6.0/ports/i686-apple-darwin11/libxml2/2.8.0/lib/libxml2.2.dylib (LoadError)
Referenced from: /Users/marlon/.rvm/gems/ruby-1.9.2-p320/gems/nokogiri-1.6.0/lib/nokogiri/nokogiri.bundle
Reason: Incompatible library version: nokogiri.bundle requires version 11.0.0 or later, but libxml2.2.dylib provides version 10.0.0 - /Users/marlon/.rvm/gems/ruby-1.9.2-p320/gems/nokogiri-1.6.0/lib/nokogiri/nokogiri.bundle
from /Users/marlon/.rvm/gems/ruby-1.9.2-p320/gems/nokogiri-1.6.0/lib/nokogiri.rb:28:in `<top (required)>'
from /Users/marlon/.rvm/gems/ruby-1.9.2-p320/gems/capybara-1.1.2/lib/capybara.rb:2:in `require'
from /Users/marlon/.rvm/gems/ruby-1.9.2-p320/gems/capybara-1.1.2/lib/capybara.rb:2:in `<top (required)>'
from /Users/marlon/.rvm/gems/ruby-1.9.2-p320#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
from /Users/marlon/.rvm/gems/ruby-1.9.2-p320#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from /Users/marlon/.rvm/gems/ruby-1.9.2-p320#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
from /Users/marlon/.rvm/gems/ruby-1.9.2-p320#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
from /Users/marlon/.rvm/gems/ruby-1.9.2-p320#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
from /Users/marlon/.rvm/gems/ruby-1.9.2-p320#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
from /Users/marlon/.rvm/gems/ruby-1.9.2-p320#global/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
from /Users/marlon/rails_projects/sample_app/config/application.rb:7:in `<top (required)>'
from /Users/marlon/rails_projects/sample_app/config/environment.rb:2:in `require'
from /Users/marlon/rails_projects/sample_app/config/environment.rb:2:in `<top (required)>'
from /Users/marlon/rails_projects/sample_app/spec/spec_helper.rb:3:in `require'
from /Users/marlon/rails_projects/sample_app/spec/spec_helper.rb:3:in `<top (required)>'
from /Users/marlon/rails_projects/sample_app/spec/requests/static_pages_spec.rb:1:in `require'
from /Users/marlon/rails_projects/sample_app/spec/requests/static_pages_spec.rb:1:in `<top (required)>'
from /Users/marlon/.rvm/gems/ruby-1.9.2-p320/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:780:in `load'
from /Users/marlon/.rvm/gems/ruby-1.9.2-p320/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:780:in `block in load_spec_files'
from /Users/marlon/.rvm/gems/ruby-1.9.2-p320/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:780:in `map'
from /Users/marlon/.rvm/gems/ruby-1.9.2-p320/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:780:in `load_spec_files'
from /Users/marlon/.rvm/gems/ruby-1.9.2-p320/gems/rspec-core-2.11.1/lib/rspec/core/command_line.rb:22:in `run'
from /Users/marlon/.rvm/gems/ruby-1.9.2-p320/gems/rspec-core-2.11.1/lib/rspec/core/runner.rb:69:in `run'
from /Users/marlon/.rvm/gems/ruby-1.9.2-p320/gems/rspec-core-2.11.1/lib/rspec/core/runner.rb:8:in `block in autorun'
dyn172-30-28-254:sample_app marlon$
Please let me know what I can do to fix this. I appreciate all the help, thanks in advance!
You should install nokogiri dependencies:
brew install libxml2 --with-xml2-config
brew install libxslt

Resources