What is wrong with my ruby install, or is it me?

Hello,

I am trying to put together my first ruby app, little database
and a command line client. I want to use sqllite for the db and
have 3.3.6 installed on a 32bit redhat 5 box along with ruby 1.8.5.
After looking around it looked like the best way to do this was with
rubygem which I installed, 0.9.4, along with the gem of sqlite3-ruby,
1.2.1, and I can not get the require to work:

[xxx@yyy tmp]$ cat tst.rb
#!/usr/bin/ruby

require 'sqlite3'

gives me:
[xxx@yyy tmp]$ ruby tst.rb
tst.rb:3:in `require': no such file to load -- sqlite3 (LoadError)
        from tst.rb:3

in /usr/lib/ruby/gems/1.8/gems/ I have the following gems installed:
flexmock-0.6.4
sources-0.0.1
sqlite3-ruby-1.2.1

what am I doing wrong?

Thanks,

marc

···

--
ms4720@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org

marc spitzer wrote:

Hello,

I am trying to put together my first ruby app, little database
and a command line client. I want to use sqllite for the db and
have 3.3.6 installed on a 32bit redhat 5 box along with ruby 1.8.5.
After looking around it looked like the best way to do this was with
rubygem which I installed, 0.9.4, along with the gem of sqlite3-ruby,
1.2.1, and I can not get the require to work:

[xxx@yyy tmp]$ cat tst.rb
#!/usr/bin/ruby

require 'sqlite3'

gives me:
[xxx@yyy tmp]$ ruby tst.rb
tst.rb:3:in `require': no such file to load -- sqlite3 (LoadError)
        from tst.rb:3

in /usr/lib/ruby/gems/1.8/gems/ I have the following gems installed:
flexmock-0.6.4
sources-0.0.1
sqlite3-ruby-1.2.1

what am I doing wrong?

Thanks,

marc

You forgot to require 'rubygems' first.

Regards
Stefan

···

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

Hi,

You probably need this:

#!/usr/bin/ruby
require 'rubygems'
require 'sqlite3'

Best regards,
R.

···

2007/9/1, marc spitzer <ms4720@sdf.lonestar.org>:

Hello,

I am trying to put together my first ruby app, little database
and a command line client. I want to use sqllite for the db and
have 3.3.6 installed on a 32bit redhat 5 box along with ruby 1.8.5.
After looking around it looked like the best way to do this was with
rubygem which I installed, 0.9.4, along with the gem of sqlite3-ruby,
1.2.1, and I can not get the require to work:

[xxx@yyy tmp]$ cat tst.rb
#!/usr/bin/ruby

require 'sqlite3'

gives me:
[xxx@yyy tmp]$ ruby tst.rb
tst.rb:3:in `require': no such file to load -- sqlite3 (LoadError)
        from tst.rb:3

in /usr/lib/ruby/gems/1.8/gems/ I have the following gems installed:
flexmock-0.6.4
sources-0.0.1
sqlite3-ruby-1.2.1

what am I doing wrong?

Thanks,

marc
--
ms4720@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org

marc spitzer wrote:

Hello,

[snip]

what am I doing wrong?

Thanks,

marc

You forgot to require 'rubygems' first.

yup

thanks

marc

···

On 2007-09-01, Stefan Rusterholz <apeiros@gmx.net> wrote:

--
ms4720@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org

What is wrong with my ruby install, or is it me?

in both cases.....its you.

···

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

Without your sage advice I would have never figured *that* out.

thanks,

marc

···

On 2007-09-01, Michael Linfield <globyy3000@hotmail.com> wrote:

What is wrong with my ruby install, or is it me?

in both cases.....its you.

--
ms4720@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org