Search code examples
rubyruby-on-rails-3.2rubymine

How to get back my routes.rb(accidentally deleted) file in rails?


I accidentally deleted my routes.rb file. Lots of code were there. Is there any way to get back routes.rb file?


Solution

  • I think we need some more information. Specifically:

    • How did you delete the file?
    • Approximately how many lines of real code did you lose?
    • Are you using any form of version control (Git? Mercurial?)
    • Do you have any other forms of backup for your files?

    If you're not backing up your information, this is going to happen and it's going to be terrible. I strongly advise you to start using Git (and Github) if you aren't already, to prevent this from happening in the future.