Created
March 8, 2017 15:51
-
-
Save geek-id/76969520bbdbb58aed8c6cb0d2e2e41d to your computer and use it in GitHub Desktop.
Rails command basic
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### 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