# Sqlite3-ruby Not Needed for Rails?

**URL:** <https://www.ruby-forum.com/t/sqlite3-ruby-not-needed-for-rails/175755>\
**Category:** Rails\
**Created:** [September 19, 2009, 12:29am UTC](https://www.ruby-forum.com/t/sqlite3-ruby-not-needed-for-rails/175755 "2009-09-19T00:29:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nbnbnb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/a87d85/32.png) [@nbnbnb](https://www.ruby-forum.com/u/nbnbnb)\
**Post date:** [September 19, 2009, 12:29am UTC](https://www.ruby-forum.com/t/sqlite3-ruby-not-needed-for-rails/175755/1 "2009-09-19T00:29:27Z")

</div>

I’ve always thought the sqlite3-ruby gem is needed for Rails apps to  
use SQLite3 databases, until the other day.

I set up a VM running Ubuntu 9.0.4, 32-bit server edition with Rails  
2.2.2 to host an app I had written (by the way, the VM was  
surprisingly easier to setup than the Mac it replaced).

I had neglected to install the sqlite3-ruby gem on the VM, which I had  
installed on the Mac, but my app runs just fine on the VM anyway.  
What gives?

If someone can enlighten me, I’d appreciate it.

Thanks!

---

<div class="post-metadata">

**Author:** ![nbnbnb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/a87d85/32.png) [@nbnbnb](https://www.ruby-forum.com/u/nbnbnb)\
**Post date:** [September 19, 2009, 9:48pm UTC](https://www.ruby-forum.com/t/sqlite3-ruby-not-needed-for-rails/175755/2 "2009-09-19T21:48:57Z")

</div>

Your first thought was correct. If you’re using sqlite3 to support  
your app’s DB you can’t even do “rake db:migrate” without having  
sqlite3-ruby installed. My guess is that the either gem was already  
in place or you had a “config.gem ‘sqlite3-ruby’…” line in your  
app’s environment.rb and ran “rake gems:install” as part of the app  
port to the server.

---

<div class="post-metadata">

**Author:** ![nbnbnb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/a87d85/32.png) [@nbnbnb](https://www.ruby-forum.com/u/nbnbnb)\
**Post date:** [September 19, 2009, 10:01pm UTC](https://www.ruby-forum.com/t/sqlite3-ruby-not-needed-for-rails/175755/3 "2009-09-19T22:01:49Z")

</div>

On Sep 19, 7:56 pm, Rick [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Your first thought was correct. If you’re using sqlite3 to support  
> your app’s DB you can’t even do “rake db:migrate” without having  
> sqlite3-ruby installed. My guess is that the either gem was already  
> in place or you had a “config.gem ‘sqlite3-ruby’…” line in your  
> app’s environment.rb and ran “rake gems:install” as part of the app  
> port to the server.

You need sqlite3-ruby, but it doesn’t have to be installed as a gem.  
Linux distros often make ruby libraries available via their own  
packaging system, if sqlite3-ruby was installed in that way then you  
wouldn’t need the gem on top of that.

Fred
