Bug in IRB

G

Glenn Potter

Running ruby version ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32]
with Rails 1.2.3, getting the following error trying to create one of my
app objects from the console:
Errno::ENOMEM: Not enough space
from c:/ruby/lib/ruby/1.8/irb.rb:298:in `write'
from c:/ruby/lib/ruby/1.8/irb.rb:298:in `printf'
from c:/ruby/lib/ruby/1.8/irb.rb:298:in `output_value'
from c:/ruby/lib/ruby/1.8/irb.rb:151:in `eval_input'
from c:/ruby/lib/ruby/1.8/irb.rb:259:in `signal_status'
from c:/ruby/lib/ruby/1.8/irb.rb:147:in `eval_input'
from c:/ruby/lib/ruby/1.8/irb/ruby-lex.rb:244:in
`each_top_level_statement'
from c:/ruby/lib/ruby/1.8/irb/ruby-lex.rb:230:in `loop'
from c:/ruby/lib/ruby/1.8/irb/ruby-lex.rb:230:in
`each_top_level_statement'
from c:/ruby/lib/ruby/1.8/irb/ruby-lex.rb:229:in `catch'
from c:/ruby/lib/ruby/1.8/irb/ruby-lex.rb:229:in
`each_top_level_statement'
from c:/ruby/lib/ruby/1.8/irb.rb:146:in `eval_input'
from c:/ruby/lib/ruby/1.8/irb.rb:70:in `start'
from c:/ruby/lib/ruby/1.8/irb.rb:69:in `catch'
from c:/ruby/lib/ruby/1.8/irb.rb:69:in `start'
from c:/ruby/bin/irb.bat:15
Maybe IRB bug!!

Has anyone seen this and knows what the problem is?
 
R

Robert Klemme

Running ruby version ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32]
with Rails 1.2.3, getting the following error trying to create one of my
app objects from the console:
Errno::ENOMEM: Not enough space
from c:/ruby/lib/ruby/1.8/irb.rb:298:in `write'
from c:/ruby/lib/ruby/1.8/irb.rb:298:in `printf'
from c:/ruby/lib/ruby/1.8/irb.rb:298:in `output_value'
from c:/ruby/lib/ruby/1.8/irb.rb:151:in `eval_input'
from c:/ruby/lib/ruby/1.8/irb.rb:259:in `signal_status'
from c:/ruby/lib/ruby/1.8/irb.rb:147:in `eval_input'
from c:/ruby/lib/ruby/1.8/irb/ruby-lex.rb:244:in
`each_top_level_statement'
from c:/ruby/lib/ruby/1.8/irb/ruby-lex.rb:230:in `loop'
from c:/ruby/lib/ruby/1.8/irb/ruby-lex.rb:230:in
`each_top_level_statement'
from c:/ruby/lib/ruby/1.8/irb/ruby-lex.rb:229:in `catch'
from c:/ruby/lib/ruby/1.8/irb/ruby-lex.rb:229:in
`each_top_level_statement'
from c:/ruby/lib/ruby/1.8/irb.rb:146:in `eval_input'
from c:/ruby/lib/ruby/1.8/irb.rb:70:in `start'
from c:/ruby/lib/ruby/1.8/irb.rb:69:in `catch'
from c:/ruby/lib/ruby/1.8/irb.rb:69:in `start'
from c:/ruby/bin/irb.bat:15
Maybe IRB bug!!

Has anyone seen this and knows what the problem is?

The error looks like you were trying to write to a filesystem which has
no space left. But from the stack trace it looks like the error would
occur during screen writing. I'd look at c:/ruby/lib/ruby/1.8/irb.rb
line 298 to determine what IRB was trying to do there.

Kind regards

robert
 
G

Glenn Potter

Robert said:
The error looks like you were trying to write to a filesystem which has
no space left. But from the stack trace it looks like the error would
occur during screen writing. I'd look at c:/ruby/lib/ruby/1.8/irb.rb
line 298 to determine what IRB was trying to do there.

Kind regards

robert

Thanks Robert, i looked at the irb code but couldn't see any problem. I
started hacking away at the code and replaced a <model>.find:)all,
:conditions => [where_clause, @station_ae_title, @start_time,
@end_time], :eek:rder => "pps_start")
statement with an equivalent .find_by_sql call and the error went away.
 
R

Robert Klemme

Thanks Robert, i looked at the irb code but couldn't see any problem. I
started hacking away at the code and replaced a <model>.find:)all,
:conditions => [where_clause, @station_ae_title, @start_time,
@end_time], :eek:rder => "pps_start")
statement with an equivalent .find_by_sql call and the error went away.

Sounds as if you replaced an in memory search by a DB search. Maybe
your dataset is so huge that the in memory search failed to allocate
more memory and bombed. Searching through large sets of data is usually
more efficient when done inside the DBMS.

Kind regards

robert
 

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

:IRB Bug 1
newbie: unpacking binary data 2
Ruby 1.9 named arguments 5
Using fetch_fields in MySQL for Windows 2
Problem on an example from ruby-lang.org 1
Bug in irb? 0
Strange bug in irb1.9 7
Maybe IRB Bug? 2

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top