Forum: Ruby on Rails Ruby error with postgres

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.
(Guest)
on 2007-07-17 22:40
(Received via mailing list)
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:in `readbytes'
  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:in `initialize'
  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:in `initialize'
  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:in `initialize'
  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:in
`postgresql_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:in `connection_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:in `retrieve_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:in `find_by_sql'
Dan S. (Guest)
on 2007-07-18 12:25
(Received via mailing list)
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
This topic is locked and can not be replied to.