Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools Installing a Ruby Development Environment Installing a Ruby Development Environment Installing Ruby on Windows

When trying to bundle exec rails server or trying rails s I get cannot load such file -- nokogiri/nokogir.

I also get a long list of other required files, actionvew, loofah, rails-html-sanitizer, sass-rails and a bundler-1.8.4. I'm running windows 7 and installing ruby 2.2. I also ran bundle install and bundle update, everything is installed and up to date.

C:\Users\David\testapp>rails s C:/Ruby22/lib/ruby/gems/2.2.0/gems/sqlite3-1.3.10-x86-mingw32/lib/sqlite3.rb:6:i n require': cannot load such file -- sqlite3/sqlite3_native (LoadError) from C:/Ruby22/lib/ruby/gems/2.2.0/gems/sqlite3-1.3.10-x86-mingw32/lib/s qlite3.rb:6:inrescue in <top (required)>' from C:/Ruby22/lib/ruby/gems/2.2.0/gems/sqlite3-1.3.10-x86-mingw32/lib/s qlite3.rb:2:in <top (required)>' from C:/Ruby22/lib/ruby/gems/2.2.0/gems/bundler-1.8.4/lib/bundler/runtim e.rb:76:inrequire' from C:/Ruby22/lib/ruby/gems/2.2.0/gems/bundler-1.8.4/lib/bundler/runtim e.rb:76:in block (2 levels) in require' from C:/Ruby22/lib/ruby/gems/2.2.0/gems/bundler-1.8.4/lib/bundler/runtim e.rb:72:ineach' from C:/Ruby22/lib/ruby/gems/2.2.0/gems/bundler-1.8.4/lib/bundler/runtim e.rb:72:in block in require' from C:/Ruby22/lib/ruby/gems/2.2.0/gems/bundler-1.8.4/lib/bundler/runtim e.rb:61:ineach' from C:/Ruby22/lib/ruby/gems/2.2.0/gems/bundler-1.8.4/lib/bundler/runtim e.rb:61:in require' from C:/Ruby22/lib/ruby/gems/2.2.0/gems/bundler-1.8.4/lib/bundler.rb:134 :inrequire' from C:/Users/David/testapp/config/application.rb:7:in <top (required)> ' from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/command s/commands_tasks.rb:78:inrequire' from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/command s/commands_tasks.rb:78:in block in server' from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/command s/commands_tasks.rb:75:intap' from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/command s/commands_tasks.rb:75:in server' from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/command s/commands_tasks.rb:39:inrun_command!' from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/command s.rb:17:in <top (required)>' from bin/rails:4:inrequire' from bin/rails:4:in `<main>'

Windows 7 64bit Ruby 2.2.1 Rail 4.2.0 using cmd promt

Anthony Lucio
Anthony Lucio
20,431 Points

Start over and install Ruby 2.0.

2 Answers

Hey Kevin, thanks, you're absolutely right. Before I saw this I already figured out to roll back to 2.0 and it fixed the issue. Also I made the decision that developing in windows is not the best route for Ruby, I'm making the switch to Linux.

Kevin Khlom
Kevin Khlom
14,369 Points

Hello David,

I ran into the same issue and I took 2 hours trying to go through each gem file and changing the path from "lib" to the URL of the file. I gave up and uninstalled ruby 2.2 and installed ruby 2.0 instead. I haven't had any issues since. My advice is follow the video with the exact version Treehouse downloads.

Later on you'll run into an issue of establishing a virtual box in CMDer. The command "vagrant up" won't work. If you already ran "vagrant up", type in "rm vagrantfile" to remove that folder and then type in "vagrant init hashicorp/precise32" to establish a base file. Then you can run "vagrant up" with no problem.

Good luck and hope this helps.