Overwritten script!!!
-
I accidentally overwritten a file *.rb with a *.html (generated by the script) that is loaded at this time in SU. Is there a way to recover it?
-
How can something.html overwrite something.rb? The file names differs.
-
It seems like he wrote the HTML file using the ".rb" extension, instead of the ".html" extension.
This could happen by using__FILE__
, instead of:
File.join( File.dirname(__FILE__), File.basename(__FILE__,".rb"), ".html" )
?
-
It might help (in the future,) to use an editor with an auto-backup feature.
-
did you type it directly into 'Ruby Console' and is the session still open?
if so, you can use the 'up arrow' to go back to it, otherwise it's a learning experience...
EDIT: should have read the post in detail first, but I'll leave this up for others...
if your on linux what editor did you write it in, most have history...
john
Advertisement