# Sqlite3 has gone

**URL:** <https://www.ruby-forum.com/t/sqlite3-has-gone/153736>\
**Category:** Rails\
**Created:** [November 20, 2008, 5:48pm UTC](https://www.ruby-forum.com/t/sqlite3-has-gone/153736 "2008-11-20T17:48:09Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jej](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b782af/32.png) [@Jej](https://www.ruby-forum.com/u/Jej)\
**Post date:** [November 20, 2008, 5:48pm UTC](https://www.ruby-forum.com/t/sqlite3-has-gone/153736/1 "2008-11-20T17:48:09Z")

</div>

Hi all,

I’m struggling since hours with sqlite3. Maybe I’m wrong to post here,  
as I feel the problem is not directly related to rails.

After a “gem clean” this morning, mongrel doesn’t want to start  
anymore:

/Library/Ruby/Site/1.8/rubygems/custom\_require.rb:36:in  
`gem\_original\_require’: no such file to load – sqlite3  
(MissingSourceFile)

But sqlite3-ruby is well installed under gem (I reinstalled to be  
sure, desinstalled, resinstalled, etc) but it can’t be loaded: ruby -  
rubygems -e “require ‘sqlite3’” returns the same error as above. It  
loads well if I cd in the sqlite directory.

## Here is my gem env:

RubyGems Environment:

- RUBYGEMS VERSION: 1.3.1
- RUBY VERSION: 1.8.6 (2008-03-03 patchlevel 114) [universal-  
darwin9.0]
- INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8
- RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/  
Versions/1.8/usr/bin/ruby
- EXECUTABLE DIRECTORY: /usr/bin
- RUBYGEMS PLATFORMS:
  - ruby
  - universal-darwin-9

- GEM PATHS:
  - /Library/Ruby/Gems/1.8
  - /Volumes/Maison/.gem/ruby/1.8
  - /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/  
ruby/gems/1.8

- GEM CONFIGURATION:
  - :update\_sources =\> true
  - :verbose =\> true
  - :benchmark =\> false
  - :backtrace =\> false
  - :bulk\_threshold =\> 1000

- REMOTE SOURCES:
  - [http://gems.rubyforge.org/](http://gems.rubyforge.org/)

* * *

sqlite is locate here: /Library/Ruby/Gems/1.8/gems/sqlite3-ruby-1.2.4/

I checked the permissions, as mentioned in some forums. I reinstalled  
gem and all the gems that where uninstalled by the cleanup.

I’m locked now, I don’t know what to look for… Any help welcome.

Thanks,  
Jej

---

<div class="post-metadata">

**Author:** ![Jej](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b782af/32.png) [@Jej](https://www.ruby-forum.com/u/Jej)\
**Post date:** [November 20, 2008, 7:16pm UTC](https://www.ruby-forum.com/t/sqlite3-has-gone/153736/2 "2008-11-20T19:16:04Z")

</div>

In case it helps someone, I removed /Library/Ruby and reinstalled  
everything. Strange bug…

Jej

---

<div class="post-metadata">

**Author:** ![Jej](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b782af/32.png) [@Jej](https://www.ruby-forum.com/u/Jej)\
**Post date:** [November 20, 2008, 11:58pm UTC](https://www.ruby-forum.com/t/sqlite3-has-gone/153736/3 "2008-11-20T23:58:12Z")

</div>

Hi all

I’ve the same problem since this morning.  
Trying to uninstall/install didn’t do the trick.

The only thing i’ve done since this yesterday (all work fine  
yesterday) is installing updating datamapper.

If anyone has some clues or tips to help me.

---

<div class="post-metadata">

**Author:** ![Jej](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b782af/32.png) [@Jej](https://www.ruby-forum.com/u/Jej)\
**Post date:** [November 21, 2008, 7:42am UTC](https://www.ruby-forum.com/t/sqlite3-has-gone/153736/4 "2008-11-21T07:42:03Z")

</div>

Some precision :  
launching the same command in the sqlite3 gem work.  
I install sqlite3 gem iin my local gem path (~/.gem/ruby/1 .8/gems)  
but the result is the same

---

<div class="post-metadata">

**Author:** ![Jej](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b782af/32.png) [@Jej](https://www.ruby-forum.com/u/Jej)\
**Post date:** [November 21, 2008, 3:44pm UTC](https://www.ruby-forum.com/t/sqlite3-has-gone/153736/5 "2008-11-21T15:44:30Z")

</div>

Hi,

this is closely related to datamapper and data\_objects. It happened to  
me yesterday when installed Integrity app and it was _quite_ nasty (no  
such file… in every Rake task etc).

Solution which has worked for me was from namelessjohn at  
#sinatra@freenode [1]:

namelessjon\_ # karmi\_: sudo rm /path/to/gems/do\_sqlite-0.9.7/lib/  
sqlite3.dll

Apparently do\_sqlite3 gets into the path somehow.

–karmi

[1] [http://irclogger.com/sinatra/2008-11-20](http://irclogger.com/sinatra/2008-11-20)

---

<div class="post-metadata">

**Author:** ![Jej](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b782af/32.png) [@Jej](https://www.ruby-forum.com/u/Jej)\
**Post date:** [November 21, 2008, 6:52pm UTC](https://www.ruby-forum.com/t/sqlite3-has-gone/153736/6 "2008-11-21T18:52:14Z")

</div>

It work for me too.

Big thanks for the help.

I think I couldn’t find it alone.

---

<div class="post-metadata">

**Author:** ![Jej](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b782af/32.png) [@Jej](https://www.ruby-forum.com/u/Jej)\
**Post date:** [November 21, 2008, 7:02pm UTC](https://www.ruby-forum.com/t/sqlite3-has-gone/153736/7 "2008-11-21T19:02:11Z")

</div>

After reflecting here what iI think,

In fact when you use rubygems it add all lib folder of each gem to the  
load path. So when you require sqlite3 the system try loading all or  
the first file the file named sqlite3 exinsting in the load path and  
loading a dll file on a system different than windows cause an error.

---

<div class="post-metadata">

**Author:** ![Jej](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b782af/32.png) [@Jej](https://www.ruby-forum.com/u/Jej)\
**Post date:** [December 7, 2008, 8:07pm UTC](https://www.ruby-forum.com/t/sqlite3-has-gone/153736/8 "2008-12-07T20:07:04Z")

</div>

I found this at  
[http://www.rubyhead.com/2008/11/25/no-such-file-to-load-sqlite3-on-rails-22/](http://www.rubyhead.com/2008/11/25/no-such-file-to-load-sqlite3-on-rails-22/)  
for me, it also turned out that

> o\_sqlite3 gem that came with Merb caused this problem. The solution is to get rid of this gem by running "sudo gem \>uninstall do\_sqlite3e$B!me(B. However, if you’re running JRuby and have Merb installed, this won’t work.

it also worked to add

> gem ‘sqlite3-ruby’

to my environment.rb file from [no such file to load -- sqlite3 - RubyFlow](http://www.rubyflow.com/items/1252)

---

<div class="post-metadata">

**Author:** ![Jej](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b782af/32.png) [@Jej](https://www.ruby-forum.com/u/Jej)\
**Post date:** [December 7, 2008, 8:11pm UTC](https://www.ruby-forum.com/t/sqlite3-has-gone/153736/9 "2008-12-07T20:11:12Z")

</div>

for me two different things worked. adding  
gem ‘sqlite3-ruby’  
to my environment.rb file. from post at:[http://www.rubyflow.com/items/](http://www.rubyflow.com/items/)  
1252

or remove a problem with a merb gem by

sudo gem uninstall do\_sqlite3

from a post at  
[http://www.rubyhead.com/2008/11/25/no-such-file-to-load-sqlite3-on-rails-22/](http://www.rubyhead.com/2008/11/25/no-such-file-to-load-sqlite3-on-rails-22/)
