This is a Ruby on Rails blog that connects to a Railway Postgres database.
- Ruby
- Rails
- Postgres
- Create a Railway project with the Postgres plugin
- Connect to your Railway project with
railway init
- Install Ruby requirements
bundle install
- Install yarn bin/rails yarn:install
- Migrate the database
railway run rake db:migrate
- Run Rails
railway run bin/rails migrate
This app was generated with the rails new
command and following the getting
getting started guide.
Read more about Rails on their official website
bundle install yarn install docker-compose -f .devcontainer/docker-compose.yml up -d export DATABASE_URL=postgresql://postgres:postgres@localhost:5432/postgres bin/rails db:migrate bin/rails server
export RAILS_ENV=test && bin/rails db:prepare bin/rails test
Launch devcontainer
docker-compose -f .devcontainer/docker-compose.yml down
Testing - https://edgeapi.rubyonrails.org/classes/ActionDispatch/SystemTestCase.html
https://render.com/docs/deploy-rails#update-your-app-for-render
https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server https://scottbartell.com/2020/01/22/automating-rails-database-migrations-on-heroku/