Dragon Arrow written by Tatsuya Nakaji, all rights reserved animated-dragon-image-0164

Rails5.2 postgresqlを使う

Mar 04, 2019

Rails5.2 postgresqlを使う

1.DB作成

$ pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start 
$ createdb AppName_production
$ createdb AppName_development
$ createdb AppName_test
$ createuser user


2.アプリ作成

$ rails new AppName --database=postgresql


Finished!!


$ rails db
  or
$ psql -d hoge_development

で確認!