Require sqlite?

Hi,

I wonder why I cannot require sqlite in my ruby app.

$ ruby app.rb
app.rb:3:in `require': no such file to load -- sqlite3 (LoadError) from
app.rb:3

But it's working in the console? that's weird!

require 'sqlite3'

=> true

What can be the problem?

Thanks :slight_smile:

ยทยทยท

--
Posted via http://www.ruby-forum.com/\.

I guess you have it installed as a gem. Try either:

require 'rubygems'
require 'sqlite3'

or the RUBYOPT environment set:

$ export RUBYOPT=-rubygems

ยทยทยท

On Oct 20, 9:07 am, Jamal Soueidan <ja...@soueidan.com> wrote:

I wonder why I cannot require sqlite in my ruby app.
What can be the problem?

Jamal Soueidan wrote:

Hi,

I wonder why I cannot require sqlite in my ruby app.

$ ruby app.rb
app.rb:3:in `require': no such file to load -- sqlite3 (LoadError) from
app.rb:3

But it's working in the console? that's weird!

require 'sqlite3'

=> true

What can be the problem?

Thanks :slight_smile:

I hope this can solve your problem...
http://sqlite-ruby.rubyforge.org/

Good day,
Bernie Loriaga

ยทยทยท

--
Posted via http://www.ruby-forum.com/\.

Lars Christensen wrote:

ยทยทยท

On Oct 20, 9:07๏ฟฝam, Jamal Soueidan <ja...@soueidan.com> wrote:

I wonder why I cannot require sqlite in my ruby app.
What can be the problem?

I guess you have it installed as a gem. Try either:

require 'rubygems'
require 'sqlite3'

or the RUBYOPT environment set:

$ export RUBYOPT=-rubygems

Thanks, that fixed my problem :slight_smile:
--
Posted via http://www.ruby-forum.com/\.