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
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement