Ruby error with postgres


#1

Im getting the following error while using postgres from ruby. Im new
to ruby any help would be appreciated.

c:/ruby/lib/ruby/1.8/readbytes.rb:21:in read': Invalid argument (Errno::EINVAL) from c:/ruby/lib/ruby/1.8/readbytes.rb:21:inreadbytes’
from c:/ruby/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/
message.rb:32:in read' from c:/ruby/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/ connection.rb:30:ininitialize’
from c:/ruby/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/
connection.rb:29:in loop' from c:/ruby/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/ connection.rb:29:ininitialize’
from c:/ruby/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/
postgres-compat.rb:23:in new' from c:/ruby/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/ postgres-compat.rb:23:ininitialize’
from c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/
active_record/connection_adapters/postgresql_adapter.rb:24:in
connect' from c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/ active_record/connection_adapters/postgresql_adapter.rb:24:inpostgresql_connection’
from c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/
active_record/connection_adapters/abstract/connection_specification.rb:
262:in send' from c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/ active_record/connection_adapters/abstract/connection_specification.rb: 262:inconnection_without_query_cache=’
from c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/
active_record/query_cache.rb:54:in connection=' from c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/ active_record/connection_adapters/abstract/connection_specification.rb: 230:inretrieve_connection’
from c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/
active_record/connection_adapters/abstract/connection_specification.rb:
78:in connection' from c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/ active_record/base.rb:427:infind_by_sql’


#2

That’s because Rails can’t read from the connection. Try restarting
postgresql.

On 7/17/07, removed_email_address@domain.invalid removed_email_address@domain.invalid wrote:

connection.rb:30:in initialize'connect’
active_record/query_cache.rb:54:in `connection=’


Dan S.
www.peoplehub.com.au
www.dansketcher.com