# What gem needs to be installed so that 'require sqlite3' will work?

**URL:** <https://rubytalk.org/t/what-gem-needs-to-be-installed-so-that-require-sqlite3-will-work/49385>\
**Category:** ruby-talk\
**Created:** [30 September 2008 20:11 UTC](https://rubytalk.org/t/what-gem-needs-to-be-installed-so-that-require-sqlite3-will-work/49385 "2008-09-30T20:11:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kenneth\_McDonald](https://avatars.discourse-cdn.com/v4/letter/k/dc4da7/32.png) [@Kenneth\_McDonald](https://rubytalk.org/u/Kenneth_McDonald)\
**Post date:** [30 September 2008 20:11 UTC](https://rubytalk.org/t/what-gem-needs-to-be-installed-so-that-require-sqlite3-will-work/49385/1 "2008-09-30T20:11:06Z")

</div>

I've installed sqlite3-ruby, but that wasn't enough; I'm still getting:

irb(main):001:0\> require 'sqlite3'  
LoadError: no such file to load -- sqlite3  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from (irb):1:in `require'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from (irb):1

Thanks,  
Ken

---

<div class="post-metadata">

**Author:** ![Stefano\_Crocco](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@Stefano\_Crocco](https://rubytalk.org/u/Stefano_Crocco)\
**Post date:** [30 September 2008 20:18 UTC](https://rubytalk.org/t/what-gem-needs-to-be-installed-so-that-require-sqlite3-will-work/49385/2 "2008-09-30T20:18:16Z")

</div>

Alle Tuesday 30 September 2008, Kenneth McDonald ha scritto:

> I've installed sqlite3-ruby, but that wasn't enough; I'm still getting:
> 
> irb(main):001:0\> require 'sqlite3'  
> LoadError: no such file to load -- sqlite3  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from (irb):1:in `require'  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from (irb):1
> 
> Thanks,  
> Ken

If you installed sqlite3-ruby using rubygems, have you required 'rubygems'  
before requiring 'sqlite3' (or added rubygems to the RUBYOPT environment  
variable)?

Stefano

---

<div class="post-metadata">

**Author:** ![Kenneth\_McDonald](https://avatars.discourse-cdn.com/v4/letter/k/dc4da7/32.png) [@Kenneth\_McDonald](https://rubytalk.org/u/Kenneth_McDonald)\
**Post date:** [30 September 2008 20:28 UTC](https://rubytalk.org/t/what-gem-needs-to-be-installed-so-that-require-sqlite3-will-work/49385/3 "2008-09-30T20:28:12Z")

</div>

Yes, the require rubygems did it, thank you. As you can tell, I'm still pretty  
new to Ruby.

Thanks,  
Ken

> **···**
>
> On Sep 30, 2008, at 3:18 PM, Stefano Crocco wrote:
> 
> > Alle Tuesday 30 September 2008, Kenneth McDonald ha scritto:
> > 
> > > I've installed sqlite3-ruby, but that wasn't enough; I'm still getting:
> > > 
> > > irb(main):001:0\> require 'sqlite3'  
> > > LoadError: no such file to load -- sqlite3  
> > > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from (irb):1:in `require'  
> > > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from (irb):1
> > > 
> > > Thanks,  
> > > Ken
> > 
> > If you installed sqlite3-ruby using rubygems, have you required 'rubygems'  
> > before requiring 'sqlite3' (or added rubygems to the RUBYOPT environment  
> > variable)?
> > 
> > Stefano
