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.
Rails command basic
#### 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment