Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7410879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:18:03+00:00 2026-05-29T06:18:03+00:00

I am very new to Ruby and Rails. I use rails 3.0.9 and ruby

  • 0

I am very new to Ruby and Rails.

I use rails 3.0.9 and ruby 1.9.2

I used the dhtmlxGrid shown on this page: http://www.dhtmlx.com/blog/?p=426

I randomly get the following Error after adding and deleting a few Entries in the grid:
“ERROR Errno:ECONNRESET: An existing connection was closed by the remotehost

C:/Railsinstaller/Ruby1.9.2/lib/ruby1.9.1/webrick/httpserver.rb:56 in 'eof?'

C:/Railsinstaller/Ruby1.9.2/lib/ruby1.9.1/webrick/httpserver.rb:56 in 'run'

C:/Railsinstaller/Ruby1.9.2/lib/ruby1.9.1/webrick/server.rb:183 in 'block in start_thread'

The server doesn’t crash immediately. Instead it crashes randomly after some completed GET requests. Then I get an error from Windows that my Ruby Interpreter(CUI) 1.9.2p290 crashed.

How can I avoid this instability?

My Model looks like this:

class Timestep < ActiveRecord::Base

has_many :prodcaps, :dependent => :destroy
has_many :demands, :dependent => :destroy
has_many :maxaddcaps, :dependent => :destroy
has_many :addcapcosts, :dependent => :destroy
validates :stepnumber,     :presence   => true
attr_accessible :stepnumber

end

The timesteps controller looks like this:

class TimestepsController < ApplicationController
 def view
 end
 def data
     @timesteps = Timestep.all()
 end
 def dbaction
     #called for all db actions
     stepnumber = params["c0"]

     @mode = params["!nativeeditor_status"]

     @id = params["gr_id"]
     case @mode
         when "inserted"
             timestep = Timestep.new
             timestep.stepnumber = stepnumber
             timestep.save!

             @tid = timestep.id

         when "deleted"
             timestep=Timestep.find(@id)
             timestep.destroy

             @tid = @id

         when "updated"
             timestep=Timestep.find(@id)
             timestep.stepnumber = stepnumber
             timestep.save!

             @tid = @id

     end
 end
end

The timesteps view is this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
    <%= render 'shared/grid_head' %>
 </head>
 <body>
     <div id="grid_here" style="width:600px; height:400px;">
     </div>
      <script type="text/javascript" charset="utf-8">
         var grid = new dhtmlXGridObject("grid_here");
         grid.setImagePath("/javascripts/codebase/imgs/");
         grid.setHeader("Zeitpunkt");
         grid.setColSorting("str");
         grid.setInitWidths("*");
         grid.setSkin("dhx_skyblue");
         grid.init();
         grid.load("/timesteps/data.xml");

         dp = new dataProcessor("/timesteps/dbaction.xml");
         dp.init(grid);
     </script>
     <input type="button" value="Add" onclick="grid.addRow(grid.uid(),'<%=Timestep.last.stepnumber+1%>'); javascript:timedRefresh(500)"> 
     <input type="button" value="Delete" onclick="grid.deleteSelectedRows(); javascript:timedRefresh(500)">
 </body>
</html>

with the shared header being:

<script src="/javascripts/codebase/dhtmlxcommon.js" type="text/javascript" charset="utf-8"></script>
<script src="/javascripts/codebase/dhtmlxgrid.js" type="text/javascript" charset="utf-8"></script>
<script src="/javascripts/codebase/dhtmlxgridcell.js" type="text/javascript" charset="utf-8"></script>
<script src="/javascripts/codebase/dhtmlxdataprocessor.js" type="text/javascript" charset="utf-8"></script>
<link rel="stylesheet" href="/javascripts/codebase/dhtmlxgrid.css" type="text/css" media="screen" charset="utf-8">
<link rel="stylesheet" href="/javascripts/codebase/skins/dhtmlxgrid_dhx_skyblue.css" type="text/css" media="screen" charset="utf-8">
<script type="text/javascript" charset="utf-8">
        <%#Definiere Funktion zur Aktualisierung der Seite%>
        <%#Übernommen von http://www.quackit.com/javascript/javascript_refresh_page.cfm %>
        function timedRefresh(timeoutPeriod) {
        setTimeout("location.reload(true);",timeoutPeriod);
        }
</script>

and finally the data.xml.builder looks like this:

xml.instruct! :xml, :version=>"1.0"

 xml.tag!("rows") do
   Timestep.all.each do |timestep|
     xml.tag!("row",{ "id" => timestep.id }) do
         xml.tag!("cell", timestep.stepnumber)
     end
   end
 end
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T06:18:04+00:00Added an answer on May 29, 2026 at 6:18 am

    This error does not occur anymore after deploying the app to heroku.
    It seems to me, that this is just a problem of webrick.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have built a very simple blog application using Ruby on Rails. New to
I'm very new to Ruby on Rails so please go easy! I've uploaded the
I am very new to ruby on rails. I've installed a complicated ruby on
i am very new to Ruby on rails . while running script/console , i
Hey, I'm very new to Ruby and Rails. I was wondering if I was
I'm fairly new in the Ruby + Rails scene. Although I have a very
To begin, I am very new to Ruby on Rails. So I want to
I'm very new to Ruby on Rails, and even newer to Haml, i started
I'm very new to Ruby on Rails, and have been getting the following error
I'm very new to Rails (and Ruby), and am having trouble installing and using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.