# this method adds a new address record def saverubyslippersconfiguration require 'fileutils' newname = "rubyslippers.cnf" # grab the filename to create newdata =@a_rsconfigline1.to_s + "\n" + @a_rsconfigline2.to_s + "\n" + @a_rsconfigline3.to_s + "\n" + @a_rsconfigline4.to_s + "\n" + @a_rsconfigline5.to_s + "\n" + @a_rsconfigline6.to_s + "\n" + @a_rsconfigline7.to_s + "\n" + @a_rsconfigline8.to_s + "\n" + @a_rsconfigline9.to_s + "\n" begin # exception trapped block fileName = File.join( ConfigurationDir, newname ) fd = File.open(fileName,"w") fd.print(newdata) # save the record info to the file fd.close @newconfigurationresult=newdata # show the record info in the browser rescue SystemCallError, StandardError $stderr.print "system call error: " + $! end # exception rescue end