Skip to content

Instantly share code, notes, and snippets.

@catm705
Forked from phlco/rails_app.md
Created March 30, 2014 18:57
Show Gist options
  • Save catm705/9877767 to your computer and use it in GitHub Desktop.
Save catm705/9877767 to your computer and use it in GitHub Desktop.

Moving your project up

When you work on a Rails project you want your .git repo to be in the root of your Rails App.

This is very important for hosting your app on Heroku.

Many of you have the following repo structure:

# A project folder, with a rails app inside of it.
|-your_project_folder
  |--.git
  |--README.md
  |--ERD.png
  |--rails_project_app # this should be the root of the repo
    |--app
      |--assets
      |--controllers

What you want is the following

# A rails app
|-your_project_folder
  |--.git
  |--README.md
  |--ERD.png
  |--app
    |--assets
    |--controllers
    |--etc...

In order to fix this, navigate to the root your Project folder and copy your Rails App into to the root.

$ cp -rf rails_project_app/* ../your_project_folder/

Once you've confirmed this is successful you can delete your old Rails ap

$ rm -rf rails_project_app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment