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

Ruby Build a Todo List Application with Rails 4 Build a Todo List Application with Rails 4 Generate a Rails Application

require:cannot load such file -- sqlite3/sqlite3_native (load error) I keep getting this error

I keep getting this error I also got it in the testapp stage I cannot get it to load in local host.

2 Answers

Daniel Cunningham
Daniel Cunningham
21,109 Points

A few things could be causing the error. There could be an issue with the SQLite gem that you're calling for your project. Here's a similar error that was found on another forum. If that fix doesnt work, post the exact text of the error, and maybe we can get closer to the solution. Good luck!

http://stackoverflow.com/questions/17643897/cannot-load-such-file-sqlite3-sqlite3-native-loaderror-on-ruby-on-rails

Tjitze de Boer
Tjitze de Boer
4,947 Points

I have the same error and can't get the proposed fixes on stackoverflow to work for me. Here's the whole thing that I get back when trying to set things up..:

C:\Users\radia\Documents\testapp>bundle exec rails server C:/Ruby23/lib/ruby/gems/2.3.0/gems/sqlite3-1.3.11-x86-mingw32/lib/sqlite3.rb:6:in require': cannot load such file -- sqlite3/sqlite3_native (LoadError) from C:/Ruby23/lib/ruby/gems/2.3.0/gems/sqlite3-1.3.11-x86-mingw32/lib/sqlite3.rb:6:inrescue in <top (required)>' from C:/Ruby23/lib/ruby/gems/2.3.0/gems/sqlite3-1.3.11-x86-mingw32/lib/sqlite3.rb:2:in <top (required)>' from C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:86:inrequire' from C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:86:in block (2 levels) in require' from C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:81:ineach' from C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:81:in block in require' from C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:70:ineach' from C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:70:in require' from C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.12.5/lib/bundler.rb:102:inrequire' from C:/Users/radia/Documents/testapp/config/application.rb:7:in <top (required)>' from C:/Ruby23/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:78:inrequire' from C:/Ruby23/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:78:in block in server' from C:/Ruby23/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:75:intap' from C:/Ruby23/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:75:in server' from C:/Ruby23/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:39:inrun_command!' from C:/Ruby23/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/commands.rb:17:in <top (required)>' from bin/rails:4:inrequire' from bin/rails:4:in `<main>'