Input/output error


My application was running fine. All of sudden I started to get an
input/output error in one of the templates. However, error goes away
once I restart the mongrel server but after some time again same error
appears. I am pasting the trace below. Please help me getting rid of
this error forever.

ActionView::TemplateError (Input/output error) on line #46 of
43: <tr>
44: <td>Platform Applicable: &nbsp;&nbsp;</td>
45: <td>
46: <%= select 'plat','id',Platform.find(:all,:order => 'start
DESC').collect{|p| [,]},{:selected =>
Platform.find(params[:p]).id} %>
47: </td>
48: <td rowspan=2>
49: <%#= link_to_function "ADD","Folders.copy_select();" %>


Thanks in advance,

Hi guys please help me out of this error.


That's an OLD version of Rails!

Not sure what's going on but it appears that id is being sent to
whatever the @plat instance variable is referring to, and that is
somehow doing a write.

What does the controller code look like

Hi Rick,

Thanks for reply. Could use of the old version cause this problem?
Actually I wanted to use the latest version of Rails but that was not
compatible with the ruby installed in my system and I could not figure
out which Ruby version was compatible with latest Rails at that time

I my code the instance variable @plat refers to platforms, similarly the
variable @rel refers to release. So actually I have folders in my
application that is applicable for some releases and platforms. After
selecting these platforms and releases a Javascript is called which
stores the combination of release and platforms and stored in another
dropdown menu with name platrel with platform name nd release name
separated by a hyphen ("-") so in controller you will only see the
variable platrel. I am pasting the controller code below.

Contrller code:

params[:platrel]['id'].each {|x|
        pr = ""
        pr = x.split("\-")
        platid = Platform.find(:first,:conditions => ['name =
        relid = Release.find(:first,:conditions => ['release_name =
        @newAvail = Ownership.find(:first, :conditions => ['folder_id =
? and platform_id = ? and release_id = ? and stop IS NULL and deleted
IS NULL', params[:f],platid,relid])
        if @newAvail.blank?
        @ownerships =
          :folder_id => params[:f],
          :platform_id => platid,
          :release_id => relid,
          :primary_owner => @fold_owner.primary_owner,
          :secondary_owner => @fold_owner.secondary_owner,
          :created =>,
          :start => )

        if (pr[0].to_s != "Any")
                        anyid = Platform.find(:first,:conditions =>
['name = "Any"']).id
                        @anyAvail = Ownership.find(:first, :conditions
=> ['folder_id = ? and platform_id = ? and release_id = ? and stop IS
NULL and deleted IS NULL', params[:f],anyid,relid])
                        if @anyAvail.blank?
                        @any_ownerships =
                                :folder_id => params[:f],
                                :platform_id => anyid,
                                :release_id => relid,
                                :primary_owner =>
                                :secondary_owner =>
                                :created =>,
                                :start => )

        @newAvail.stop = 'NULL'
        @newAvail.deleted = 'NULL'


Rick, Can you also please tell me possible causes of Input/Output
errors. Sometimes I found that if I leave a space between a function
name and the brackets for arguments (e.g. find (:all)). It gives this
error. and sometimes if I use stdout, stderr functions in controller or
view files it gives this error.


Based on the walkback, whatever object the @plat instance variable is
assigned to is causing the error when sent the id message, hopefully
your own debugging skills will enable you to use that clue to figure
it out.

The code seems to be way too complicated for me to help you much more remotely.

Thnaks Rick...Can you please tell me what are all possible causes of
input/output errors?