Skip to content

Rails project setup instructions #2

Description

@RosemaryGonzaga

Before tomorrow, I highly recommend that you take a few minutes to set up an empty Rails app skeleton for your clone. This way, I can double check your work tomorrow morning and you'll be able to hit the ground running with developing your app after the assessment.

Below are some instructions for doing this. The setup requires some specific configuration (using Rails version 5, using Postgres as the databse, and disabling turbolinks), so read through the entire instructions first to make sure you understand everything before running the setup commands.

Let me know if you run into issues or have questions.

Setting up an empty Rails app skeleton and pushing to Github:

  1. Create new Rails project (remember this cannot be nested inside of a directory that is a git repo):
    • rails _5.2.3_ new <placeholderForYourAppName> --database=postgresql --skip-turbolinks
      • remember to replace the <placeholderForYourAppName> with your actual clone's name (don't include the angle brackets!)
    • The above command ensures the following things, which are very important:
      • your Rails project will use version 5.2.3 (we definitely don't want a Rails 6 app)
      • Postgres will be used as the database (the default is sqlite3, which is too lightweight for your production app)
      • Turbolinks will be disabled for your project (Turbolinks won't play nice with your JS code and may cause weird bugs)
  2. cd into the newly created Rails project directory
  3. Run commands to follow the usual workflow for adding and commiting to your local repo.
    • Make sure to do this from the top level of your Rails project directory!
  4. Add your remote repo.
    • Also do this from the the top level of your Rails project directory
    • Your github repo should have setup instructions for "pushing an existing repository from the command line". You can copy the first command in that section, paste it into your terminal, and run it.
    • The command should look like this: git remote add origin <placeholderForYourAppRemoteRepoGitUrl>
      • if you don't see the setup instructions, you can type this command manually, making sure to replace the <placeholderForYourAppRemoteRepoUrl> with your actual remote repo's git url.
      • remember that you can copy your remote repo's git url by navigating to your project repositiory page on github, clicking on the green "Clone or download" button (which is just above the listing of your projet directories), and clicking on the clipboard icon to the right of the url that appears in the dropdown menu.
  5. Push to your remote repo: git push -u origin master

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions