Code Monkey home page Code Monkey logo

rails-blog's Introduction

Rails Blog Example

This is a Ruby on Rails blog that connects to a Railway Postgres database.

Deploy on Railway

โœจ Features

  • Ruby
  • Rails
  • Postgres

๐Ÿ’โ€โ™€๏ธ How to use with Railway

  • 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

๐Ÿ“ Notes

This app was generated with the rails new command and following the getting getting started guide. Read more about Rails on their official website

Local dev no vscode

Basic development

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

Running tests

export RAILS_ENV=test && bin/rails db:prepare bin/rails test

With VS Code/Codespaces

Launch devcontainer

Tear down

docker-compose -f .devcontainer/docker-compose.yml down

Testing - https://edgeapi.rubyonrails.org/classes/ActionDispatch/SystemTestCase.html

Render

https://render.com/docs/deploy-rails#update-your-app-for-render

Heroku

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/

rails-blog's People

Contributors

chrispat avatar

Stargazers

Jeremy Epling avatar

Watchers

Jeremy Epling avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.