Ruby on Rails

PHOTO EMBED

Mon May 08 2023 15:38:02 GMT+0000 (Coordinated Universal Time)

Saved by @chelobotix

gem install rails
rails new Project --database=postgresql -T
rails new api --api --database=postgresql -T
rails new -j webpack hello-rails-react --database=postgresql -T


rails server


//You have to go into your config/database.yml, and change the following configurations.
default: &default
  adapter: postgresql
  encoding: unicode
  user: postgres
  password: password
  pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>

development:
  <<: *default
  database: hellorails_development
  user: postgres
  password: password

 
test:
  <<: *default
  database: hellorails_test
  user: postgres
  password: password

production:
  <<: *default
  database: hellorails_production
  username: hellorails
  password: <%= ENV["HELLORAILS_DATABASE_PASSWORD"] %>
content_copyCOPY