Forums | Admin

Discussion Forums: open-discussion

Start New Thread Start New Thread

 

By: Dayne Broderson
RE: cannot read beyond the end of buffer [ reply ]  
2006-03-16 00:42
Sorry for the confusion here.

The 'fix' appears to be a patch to ruby itself. Is there a planned fix for the library (have it do a platform check) or is the solution on 64bit machines for people to edit the postgres-pr library until ruby-1.8.5 is out?

I'm just wondering if this is problem on 64bit machines considered 'closed' by postgres-pr dev's or not.

Many thanks for the information on how to fix this problem Eric.

By: Eric Soderberg
RE: cannot read beyond the end of buffer [ reply ]  
2006-02-26 16:14
This is the result of:

http://rubyforge.org/tracker/index.php?func=detail&aid=1933&group_id=234&atid=967

Which is fixed by:

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/180119

By: Jo Vermeulen
cannot read beyond the end of buffer [ reply ]  
2005-12-14 14:22
Hello,

I am having a problem when using postgres-pr within a Rails application. When trying to fetch a result from the database, I get this error:

Buffer::EOF in People#domain

cannot read beyond the end of buffer

Here's the stack trace:

/usr/local/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/buffer.rb:47:in `read'
/usr/local/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/message.rb:284:in `parse'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/base.rb:1053:in `collect'
/usr/local/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/message.rb:279:in `parse'
/usr/local/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/message.rb:67:in `parse'
/usr/local/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/message.rb:277:in `parse'
/usr/local/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/message.rb:48:in `create'
/usr/local/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/message.rb:43:in `read'
/usr/local/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/connection.rb:92:in `query'
/usr/local/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/connection.rb:91:in `query'
/usr/local/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/postgres-compat.rb:33:in `query'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/postgresql_adapter.rb:63:in `active?'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:103:in `retrieve_connection'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:20:in `connection'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/base.rb:931:in `add_limit!'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/base.rb:924:in `construct_finder_sql'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/base.rb:395:in `find'
#{RAILS_ROOT}/app/models/domain.rb:9:in `public_domains'
#{RAILS_ROOT}/app/controllers/people_controller.rb:6:in `initialize'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/routing.rb:464:in `recognize!'
/usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/dispatcher.rb:38:in `dispatch'
/usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:141:in `process_request'
/usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:53:in `process!'
/usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.6.1/./fcgi.rb:600:in `each_cgi'
/usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.6.1/./fcgi.rb:597:in `each_cgi'
/usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:52:in `process!'
/usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:22:in `process!'

Any ideas what may be causing this? This is when I run Rails on the server itself (through Apache). When I connect to the Postgres database with my Powerbook, and run a local Webrick server, there is no problem at all.

I would appreciate your help.

Thanks!

Best regards,

-- Jo Vermeulen