"no such file to load -- sqlite3" Rails

Did you install the dev package for sqlite3? All of these errors:

ERROR: Failed to build gem native extension.

Are related to the missing source files for Ruby libraries that are
wrappers around native libraries.


Aníbal Rojas

http://en.anibal.rojas.com.ve

On Mar 9, 10:43 pm, Cyberg Cg [email protected]

Sorry, I meant version 1.2.1 … since effort to install 1.2.2 were not
successful … encountered same issues as listed in this thread.

thnaks
cg

M. Figueiroa wrote:

In my case I just downloaded the sqllite3.dll from the
SQLite Download Page (This is a DLL of the SQLite library
without the TCL bindings. The only external dependency is MSVCRT.DLL.)
and then copied it to the Windows\System32 folder. It worked.

MY PROBLEM HAS BEEN RESOLVED ITS WORKING NOW… im so very thankful to
you Figueiro

Mojca M. wrote:

Now I need to test (I have switched to mysql).

On the server I had a different issue (table created, but application
claimed it was not), so I have switched to mysql on both the local
machine and server.

I had a similar issue, but it turned out that I hadn’t run the db
migration for the production environment, which is what I was running
in. You could solve the issue without switching over to mysql for
development by making sure that you’re running in the environment you
intend. For me, running through apache using phusion passenger, this
meant adding a RailsEnv value into the VirtualHost block in the
appropriate apache .conf

Ehtsham Abbas wrote:

M. Figueiroa wrote:

In my case I just downloaded the sqllite3.dll from the
SQLite Download Page (This is a DLL of the SQLite library
without the TCL bindings. The only external dependency is MSVCRT.DLL.)
and then copied it to the Windows\System32 folder. It worked.

MY PROBLEM HAS BEEN RESOLVED ITS WORKING NOW… im so very thankful to
you Figueiro

For some reason this doesn’t work for me. I moved the dll file into my
Windows\System32 folder and I get the same error.

Robert Huberdeau wrote:

Ehtsham Abbas wrote:

M. Figueiroa wrote:

In my case I just downloaded the sqllite3.dll from the
SQLite Download Page (This is a DLL of the SQLite library
without the TCL bindings. The only external dependency is MSVCRT.DLL.)
and then copied it to the Windows\System32 folder. It worked.

MY PROBLEM HAS BEEN RESOLVED ITS WORKING NOW… im so very thankful to
you Figueiro

For some reason this doesn’t work for me. I moved the dll file into my
Windows\System32 folder and I get the same error.

try downloading the precompiled files from:
SQLite Download Page

in windows you will need the
sqlite3.def, sqlite3.dll, sqlite3.exe.
Save this files to the Ruby/bin directory,
then use the ‘gem install sqlite3-ruby’
(you may get some definition error messages about the documentation but
it shoud work anyways)

Check that you have gcc installed.

This error comes up if it is not installed, because of the method they
use to check the existence of sqlite3.h: They simply try to compile this
one-line program:

#include <sqlite3.h>

If the compilation fails, they tell you that sqlite3.h is missing, but
the compilation will also fail if gcc is not present. It’s not a very
smart check…

Lisa Concli wrote in post #641008:

Hi to everyone!

I’m new with Ruby on Rails…
I use linux (an italian distribution, that is just like Slackware)

I’m writing my first program with rails… Nothing special… it is the
famous Hello World…!
(I’m reading the book of Dave T. “Agile Web D. with Rails”)

Well the problem is that when I point my browser to
http://localhost:3000/dire/ciao
(“dire” is my controller and “ciao” is the action)
the browser displays this problem:

MissingSourceFile in DireController#ciao

no such file to load – sqlite3

This error occurred while loading the following files:
sqlite3

So I write in my shell:
gem install sqlite3-ruby

The gem was installed, but the problem remains…!

Do you know what should I do?

I don’t know if I have to change something in the file database.yml…?
database.yml:

SQLite version 3.x

gem install sqlite3-ruby (not necessary on OS X Leopard)

development:
adapter: sqlite3
database: db/development.sqlite3
timeout: 5000

Warning: The database defined as ‘test’ will be erased and

re-generated from your development database when you run ‘rake’.

Do not set this db to the same as development or production.

test:
adapter: sqlite3
database: db/test.sqlite3
timeout: 5000

production:
adapter: sqlite3
database: db/production.sqlite3
timeout: 5000

Can someone help me?
Thanks!!!

Lisa