PostgreSQL database connectivity from ActiveRecord?

A

Abraham Vionas

------=_NextPart_000_00F9_01C4D09B.F6211CD0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hi, I'm (still) working through the Rails Todo List tutorial, and now have
run up against what I think is an error being thrown by Rails because it
can't find/connect to my PostgreSQL DB. I have installed Postgres-pr-0.2.1
and verified that I can connect using it, but I have no idea - beyond the
configuration of the yaml file - of how to make sure that ActiveRecord can
connect to my DB fine. The error I get is below in case someone recognizes
it as being from something other than db connectivity.



TypeError in Todo#index


superclass mismatch for class ParseError

C:/cs/ruby/lib/ruby/gems/1.8/gems/postgres-pr-0.2.1/lib/postgres-pr/message.
rb:9

C:/cs/ruby/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in
`require__'

C:/cs/ruby/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in
`require'

C:/cs/ruby/lib/ruby/gems/1.8/gems/postgres-pr-0.2.1/lib/postgres-pr/connecti
on.rb:6

C:/cs/ruby/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in
`require__'

C:/cs/ruby/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in
`require'

C:/cs/ruby/lib/ruby/gems/1.8/gems/postgres-pr-0.2.1/lib/postgres.rb:7

C:/cs/ruby/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in
`require__'

C:/cs/ruby/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in
`require'

C:/cs/ruby/lib/ruby/gems/1.8/gems/activerecord-1.1.0/lib/active_record/conne
ction_adapters/abstract_adapter.rb:10:in `require_library_or_gem'

C:/cs/ruby/lib/ruby/gems/1.8/gems/activerecord-1.1.0/lib/active_record/conne
ction_adapters/postgresql_adapter.rb:20:in `postgresql_connection'

C:/cs/ruby/lib/ruby/gems/1.8/gems/activerecord-1.1.0/lib/active_record/conne
ction_adapters/abstract_adapter.rb:140:in `send'

C:/cs/ruby/lib/ruby/gems/1.8/gems/activerecord-1.1.0/lib/active_record/conne
ction_adapters/abstract_adapter.rb:140:in `connection='

C:/cs/ruby/lib/ruby/gems/1.8/gems/activerecord-1.1.0/lib/active_record/conne
ction_adapters/abstract_adapter.rb:104:in `retrieve_connection'

C:/cs/ruby/lib/ruby/gems/1.8/gems/activerecord-1.1.0/lib/active_record/base.
rb:172:in `connection'

C:/cs/ruby/lib/ruby/gems/1.8/gems/activerecord-1.1.0/lib/active_record/base.
rb:276:in `find_by_sql'

C:/cs/ruby/lib/ruby/gems/1.8/gems/activerecord-1.1.0/lib/active_record/base.
rb:270:in `find_all'

C:/cs/ruby/lib/ruby/gems/1.8/gems/actionpack-0.9.5/lib/action_controller/sca
ffolding.rb:103:in `list'

C:/cs/ruby/lib/ruby/gems/1.8/gems/actionpack-0.9.5/lib/action_controller/sca
ffolding.rb:96:in `index'

C:/cs/ruby/lib/ruby/gems/1.8/gems/actionpack-0.9.5/lib/action_controller/bas
e.rb:577:in `send'

C:/cs/ruby/lib/ruby/gems/1.8/gems/actionpack-0.9.5/lib/action_controller/bas
e.rb:577:in `perform_action_without_filters'

C:/cs/ruby/lib/ruby/gems/1.8/gems/actionpack-0.9.5/lib/action_controller/fil
ters.rb:236:in `perform_action_without_benchmark'

C:/cs/ruby/lib/ruby/gems/1.8/gems/actionpack-0.9.5/lib/action_controller/ben
chmarking.rb:30:in `perform_action_without_rescue'

C:/cs/ruby/lib/ruby/gems/1.8/gems/actionpack-0.9.5/lib/action_controller/ben
chmarking.rb:30:in `measure'

C:/cs/ruby/lib/ruby/gems/1.8/gems/actionpack-0.9.5/lib/action_controller/ben
chmarking.rb:30:in `perform_action_without_rescue'

C:/cs/ruby/lib/ruby/gems/1.8/gems/actionpack-0.9.5/lib/action_controller/res
cue.rb:68:in `perform_action'

C:/cs/ruby/lib/ruby/gems/1.8/gems/actionpack-0.9.5/lib/action_controller/bas
e.rb:254:in `process'

C:/cs/ruby/lib/ruby/gems/1.8/gems/actionpack-0.9.5/lib/action_controller/bas
e.rb:242:in `process'

C:/cs/ruby/lib/ruby/gems/1.8/gems/rails-0.8.5/lib/dispatcher.rb:35:in
`dispatch'

------=_NextPart_000_00F9_01C4D09B.F6211CD0--
 
M

Michael Neumann

Abraham said:
Hi, I'm (still) working through the Rails Todo List tutorial, and now have
run up against what I think is an error being thrown by Rails because it
can't find/connect to my PostgreSQL DB. I have installed Postgres-pr-0.2.1
and verified that I can connect using it, but I have no idea - beyond the
configuration of the yaml file - of how to make sure that ActiveRecord can
connect to my DB fine. The error I get is below in case someone recognizes
it as being from something other than db connectivity.



TypeError in Todo#index


superclass mismatch for class ParseError

updating to 0.2.2 fixes this.

Regards,

Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,059
Latest member
cryptoseoagencies

Latest Threads

Top