FIX: Rails Gem::LoadError: Specified ‘sqlite3’ for database adapter, but the gem is not loaded. Add `gem ‘sqlite3’` to your Gemfile.

image

The error message simply indicating the Sqlite3 gem is NOT installed on your system.

The fix is to just have it installed using the command: gem install sqlite3

C:Usersadmin>gem install sqlite3
Fetching: sqlite3-1.3.8-x64-mingw32.gem (100%)
Successfully installed sqlite3-1.3.8-x64-mingw32
Parsing documentation for sqlite3-1.3.8-x64-mingw32
unable to convert "x90" from ASCII-8BIT to UTF-8 for lib/sqlite3/2.0/sqlite3_native.so, skipping
Installing ri documentation for sqlite3-1.3.8-x64-mingw32
1 gem installed

C:Usersadmin>

image

 

In case if you already have built Rail Apps, you need to update the respective Apps Gemfile.lock to point it to the x64-bit version of SQLite3 DB instead of its default 32-bit SQLite3 which causes this error.

 

Edit File: Gemfile.lock file (say C:RailAppsDialogExpressGemfile.lock").

Replace string:

sqlite3 (1.3.8-x86-mingw32)  with sqlite3 (1.3.8-x64-mingw32)

 

image

 

Now launch your Rail App and it should come up fine.

image

Leave a Reply

Your email address will not be published. Required fields are marked *