Skip to content

Instantly share code, notes, and snippets.

@geek-id
Created March 8, 2017 15:51
Show Gist options
  • Save geek-id/76969520bbdbb58aed8c6cb0d2e2e41d to your computer and use it in GitHub Desktop.
Save geek-id/76969520bbdbb58aed8c6cb0d2e2e41d to your computer and use it in GitHub Desktop.

Revisions

  1. geek-id created this gist Mar 8, 2017.
    22 changes: 22 additions & 0 deletions Rails Note
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    #### If you want to use SQLite (not recommended)
    rails new myapp

    #### If you want to use MySQL
    rails new myapp -d mysql

    #### If you want to use Postgres
    # Note that this will expect a postgres user with the same username
    # as your app, you may need to edit config/database.yml to match the
    # user you created earlier
    rails new myapp -d postgresql

    # Move into the application directory
    cd myapp

    # If you setup MySQL or Postgres with a username/password, modify the
    # config/database.yml file to contain the username/password that you specified

    # Create the database
    rake db:create

    rails server