Forum: Ruby DBI problem

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
19eb75164135659a8fae98101b1c250e?d=identicon&s=25 Arun Kumar (arun_nss)
on 2009-03-12 13:36
Attachment: test.rb (511 Bytes)
I've a problem with the database connectivity. Whenever i'm trying to
load the test.rb file i receive an error like this

/usr/local/lib/site_ruby/1.8/dbi.rb:48:in `require': no such file to
load -- deprecated (LoadError)

It appears when the require 'dbi' is given. Can anybody please help?
A402df36168b81b31c17adcbb5ae8cf4?d=identicon&s=25 Pistos Christou (pistos)
on 2009-03-12 14:06
Arun Kumar wrote:
> I've a problem with the database connectivity. Whenever i'm trying to
> load the test.rb file i receive an error like this
>
> /usr/local/lib/site_ruby/1.8/dbi.rb:48:in `require': no such file to
> load -- deprecated (LoadError)
>
> It appears when the require 'dbi' is given. Can anybody please help?

Try installing the 'deprecated' gem.

gem install deprecated
E16e84e861c1815ce11ba7bd851c857d?d=identicon&s=25 lasitha (Guest)
on 2009-03-12 14:21
(Received via mailing list)
On Thu, Mar 12, 2009 at 6:04 PM, Arun Kumar
<arunkumar@innovaturelabs.com> wrote:
>
> /usr/local/lib/site_ruby/1.8/dbi.rb:48:in `require': no such file to
> load -- deprecated (LoadError)

I'm guessing you need the 'deprecated' gem.

Not sure why it's failing on require instead of earlier when the
deprecated gem was loaded...

Oh, line 35 of dbi.rb:
begin
    require "rubygems"
    gem "deprecated"
rescue LoadError
end

??

Anyway, so you just need:
[sudo] gem install deprecated


solidarity,
lasitha
19eb75164135659a8fae98101b1c250e?d=identicon&s=25 Arun Kumar (arun_nss)
on 2009-03-13 06:20
Pistos Christou wrote:
> Arun Kumar wrote:
>> I've a problem with the database connectivity. Whenever i'm trying to
>> load the test.rb file i receive an error like this
>>
>> /usr/local/lib/site_ruby/1.8/dbi.rb:48:in `require': no such file to
>> load -- deprecated (LoadError)
>>
>> It appears when the require 'dbi' is given. Can anybody please help?
>
> Try installing the 'deprecated' gem.
>
> gem install deprecated

Thanks Pistos. Now I got it.
This topic is locked and can not be replied to.