Peter Vandenabeele wrote in post #969175:
> Michael Satterwhite wrote in post #969123:
>> Philip Hallstrom wrote in post #969122:
>>>>
>>>> ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::PGconn
>>> Try the 'pg' gem.
>>
>> I just installed it. Same result.
>>
>> I'm not sure my gem is installing correctly, though - or if there is
>> something else needed. Note the following:
>>
>>    irb(main):001:0> require 'pg'
>>    => true
>>    irb(main):002:0> cn = PGconn.open(:dbname => 'movies')
>>    NameError: uninitialized constant PGconn
>>      from (irb):2
>
> Actually ... are you using ruby 1.8.x ?
>
> Is that line
>
>   irb(main):001> require 'pg'
>
> really your first line in the irb session ?
>
> Should you not do
>
>   require 'rubygems'
>
> first ?  (IIRC, required in 1.8.x but no longer in 1.9.x)

I have the environment variable

   RUBYOPT=rubygems

set. This causes 1.8.x to automatically set rubygems as in 1.9.x.

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

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to