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.
Arun K. (Guest)
on 2009-03-12 14:36
Attachment: test.rb (0 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?
Pistos C. (Guest)
on 2009-03-12 15:06
Arun K. 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
lasitha (Guest)
on 2009-03-12 15:21
(Received via mailing list)
On Thu, Mar 12, 2009 at 6:04 PM, Arun K.
<removed_email_address@domain.invalid> 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
Arun K. (Guest)
on 2009-03-13 07:20
Pistos C. wrote:
> Arun K. 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.