Git Product home page Git Product logo

try_pug's Introduction

hello_rails7_pg_redis

A template to create a rails 7 dev container.

  1. create a repo from this template.

  2. clone the repo to your local

  3. start a dev container for your local repo.

    I tried 1. vscode, 2. neovim + nvim-dev-container. both are ok.

  4. In your dev container

    1. (optional) service start cron if you need crontab to work.

    2. Generate your rails project in the dev container.

      # importmaps + propshaft (my prefer) 
      rails new . -a propshaft -d=postgresql
      
      # or, one of the following
      # importmaps + sprockets
      rails new . -d=postgresql
      
      # importmaps + sprockets + tailwind, https://techracho.bpsinc.jp/hachi8833/2022_02_17/115435
      rails new . --css tailwind -d=postgresql
      
      # importmaps + propshaft + tailwind
      rails new . --css tailwind -a propshaft -d=postgresql
      
      # (nodejs) esbuild + sprockets + tailwind
      rails new . --javascript esbuild --css tailwind -d=postgresql
      
      # (nodejs) esbuild + propshaft + bootstrap
      rails new . --javascript esbuild --css bootstrap -a propshaft -d=postgresql
    3. fix config/database.yml by adding the host, username and password to the development section.

      ...
      default: &default
         ...
         host: <%= ENV.fetch("DB_HOST") { "db" } %>
         username: <%= ENV.fetch("DB_USERNAME") { "postgres" } %>
         password: <%= ENV.fetch("DB_PASSWORD") { "password" } %>
      ...
      bundle exec rails db:create
    4. run your app in the container.

      ./bin/dev
  5. now, everything is ready.

try_pug's People

Contributors

wuminzhe avatar

Watchers

 avatar  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.