Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error on rails server - cannot load such file -- sqlite3/sqlite3_native (LoadError)

I have installed ruby 2.0 using rubyinstaller, devkit and rails 4.0 beta (all 32 bit) on my 64 bit windows (because ruby weirdly misinterprets 64 bit processor to be a 32 bit)

I have added sqlite3 binaries (downloaded separately) to my PATH.

When I run rails server command, i get the following error

C:/Ruby200/lib/ruby/gems/2.0.0/gems/sqlite3-1.3.7-x86-mingw32/lib/sqlite3.rb:6:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError) from C:/Ruby200/lib/ruby/gems/2.0.0/gems/sqlite3-1.3.7-x86-mingw32/lib/sqlite3.rb:6:

I have tried the fix at https://groups.google.com/forum/?fromgroups=#!topic/rubyinstaller/gedIaMryCFQ to reinstall sqlite3 gem from source, but it fails with error cannot find sqlite3.

After hours of debugging I cannot fix this problem. This has totally broken my motivation to learn the infallible Ruby on Rails framework. Ruby was supposed to be easy! Can someone help?

like image 998
Sumit Jain Avatar asked Nov 04 '22 01:11

Sumit Jain


1 Answers

We had problems with version Ruby 2.0 on a Windows 64bit machine ("missing sqlite3_native") so we reverted to Ruby 1.93 and it worked.

like image 137
Rocky Avatar answered Nov 10 '22 16:11

Rocky