Bug in IRB

Discussion in 'Ruby' started by Glenn Potter, Aug 26, 2008.

  1. Glenn Potter

    Glenn Potter Guest

    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?
    --
    Posted via http://www.ruby-forum.com/.
    Glenn Potter, Aug 26, 2008
    #1
    1. Advertising

  2. On 26.08.2008 04:50, Glenn Potter wrote:
    > 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
    Robert Klemme, Aug 26, 2008
    #2
    1. Advertising

  3. Glenn Potter

    Glenn Potter Guest

    Robert Klemme wrote:
    > On 26.08.2008 04:50, Glenn Potter wrote:
    >> from c:/ruby/lib/ruby/1.8/irb/ruby-lex.rb:244:in
    >> 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


    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.
    --
    Posted via http://www.ruby-forum.com/.
    Glenn Potter, Aug 26, 2008
    #3
  4. On 26.08.2008 14:58, Glenn Potter wrote:

    > 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
    Robert Klemme, Aug 26, 2008
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Harry Ohlsen

    irb.bat "bug"?

    Harry Ohlsen, Aug 28, 2003, in forum: Ruby
    Replies:
    0
    Views:
    94
    Harry Ohlsen
    Aug 28, 2003
  2. Roland Schmitt

    Bug in irb?

    Roland Schmitt, Dec 17, 2003, in forum: Ruby
    Replies:
    0
    Views:
    80
    Roland Schmitt
    Dec 17, 2003
  3. Sam Stephenson
    Replies:
    1
    Views:
    225
    Andrew Walrond
    Jun 18, 2005
  4. Replies:
    1
    Views:
    156
    Florian GroƟ
    Oct 26, 2005
  5. anne001
    Replies:
    1
    Views:
    268
    anne001
    Jun 27, 2006
Loading...

Share This Page