Why did my routes.rb file just dissapear?


I was trying to figure out how to set an admin for my Heroku website. After entering some faulty things in my routes.rb file I deleted the lines that I put in there and closed the file. After trying to change different files and preview my site I got a beginners welcome to ruby on rails page!!! I cant figure out what happened and how to get my whole routes file back:-( Does anybody know how to fix the random delete?



I is suggested that you use some sort of version control such as Git so that things like this can be resolved quickly.

You can create a new routes.rb file yourself and rewrite the routes again.


Thanks, I remembered most of it so it wasn’t much of a problem. And I also did it on notes and saved it so I have it if something else weird happened.
I wonder the same thing about your first question. I was writing and deleting a lot of code at the time but I am definitely sure that I did not erase that whole file. So I was extremely mad about that when I opened that file to alter it more. I decided to ask around so I logged in here and I wrote this question. Took a break from coding and after an hour I suddenly remembered how to fix it!