[Rails] Re: Problems using postgresql (postgres-pr) gem
Possible... Thanks for the suggestions. I'll have to try that out.
On Jan 15, 4:17 pm, Perry Smith <li...@ruby-forum.com> wrote:
> Is it possible that when you do "gem" you are using a different copy of
> Ruby than if you run your rails application?
>
> There is at least one requirement here:
>
> activerecord-2.3.5/lib/active_record/connection_adapters/postgresql_adapter.rb
>
> (replace 2.3.5 with your flavor of Rails)
>
> begin
> require_library_or_gem 'pg'
> rescue LoadError => e
> begin
> require_library_or_gem 'postgres'
> class PGresult
> alias_method :nfields, :num_fields unless
> self.method_defined?(:nfields)
> alias_method :ntuples, :num_tuples unless
> self.method_defined?(:ntuples)
> alias_method :ftype, :type unless self.method_defined?(:ftype)
> alias_method :cmd_tuples, :cmdtuples unless
> self.method_defined?(:cmd_tuples)
> end
> rescue LoadError
> raise e
> end
> end
>
> --
> Posted viahttp://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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home