Coder Social home page Coder Social logo

rails-template's Introduction

dao42/rails-template

dao42/rails-template has supported the newest rails 6.1.x project setup

Maybe the best & newest & fastest rails template for senior rails developer.

It maybe the best starting for your new rails project.

An example built with rails-template: https://github.com/dao42/rails-template-example

Core Idea

dao42/rails-template apply lots of good components for you to make development damn quick.

  1. dao42/rails-template keep the newest easily because it's a real Rails Application Template.
  2. dao42/rails-template love the newest standard components of Rails 6, using webpacker and remove assets pipeline.
  3. dao42/rails-template is out-of-box for your development based on bootstrap4.
  4. dao42/rails-template is out-of-box for your deployment based on mina.

How to use

Install dependencies:

  • postgresql

    $ brew install postgresql

    Ensure you have already initialized a user with username: postgres and password: postgres( e.g. using $ createuser -d postgres command creating one )

  • rails 6

    Using rbenv, update ruby up to 2.7 or higher, and install rails 6.1.x

    $ ruby -v ( output should be 2.7.x or 3.x )
    
    $ gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.com/` (optional, Chinese developer recommend)
    
    $ gem install rails
    
    $ rails -v ( output should be rails 6.1.x )
  • yarn

    Install npm, yarn for webpacker( see install document: https://yarnpkg.com/en/docs/install)

    $ yarn --version( output should be 1.6.x or higher )
    
    $ npm config set registry https://registry.npm.taobao.org (optional, Chinese developer recommend)

Then,

  1. Add gems.ruby-china.com to your bundle mirrors (optional, Chinese developer recommended)

    $ bundle config mirror.https://rubygems.org https://gems.ruby-china.com

  2. Create your own rails app applying rails-template

    $ rails new myapp -m https://raw.githubusercontent.com/dao42/rails-template/master/composer.rb

    Important!! replace myapp to your real project name, we will generate lots of example files by this name.

  3. Done! Trying to start it.

    $ rails s

What we do

rails-template apply lots of good components for you to make development damn quick.

  1. ActionCable and Turbolinks features are opened by default.

  2. Bootstrap4 and font-awesome are integrated to make your products UI easily, it aslo has some example pages for you to quickly start.

  3. active_storage and local file mode are opened by default.

  4. mina and its plugins are out-of-box for your deployment.

  5. slim, simple_form, kaminari, high_voltage are installed.

  6. adminlte 3 is ready for your administrator dashboard.

  7. rspec, factory_bot_rails, database_cleaner are ready for your testing automation.

  8. Zero-down phase-restart mode is out-of-box with mina-ng-puma.

  9. monit, nginx example, https ssl example, logrotate, backup example is ready for you.

Other gems integrated in rails-template are worth learning seriously.

Integrated mainly technology stack and gems

Starting with webpacker document

Deployment document

Roadmap

  • Add AdminLTE as admin dashboard

Projects that using dao42/rails-template

Welcome to pull request here to update this if you choose dao42/rails-template for your new rails app.

LICENSE

MIT

rails-template's People

Contributors

benjaminx avatar dragoncz avatar ifsc01 avatar lanzhiheng avatar windy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rails-template's Issues

The generator will hang

generatemethod will hang if don't stop spring.
before using generate, we should add run "spring stop"
etc:

  run "spring stop"
  generate "clearance:install"

Options misses the property 'exposes'

Got following error after fresh start:

Failed to compile.

./node_modules/jquery/dist/jquery.js (./node_modules/expose-loader/dist/cjs.js!./node_modules/jquery/dist/jquery.js)
Module build failed (from ./node_modules/expose-loader/dist/cjs.js):
ValidationError: Invalid options object. Expose Loader has been initialized using an options object that does not match the API schema.
 - options misses the property 'exposes'. Should be:
   non-empty string | object { globalName, moduleLocalName?, override? } | [non-empty string | object { globalName, moduleLocalName?, override? }, ...] (should not have fewer than 1 item)
    at validate (.../node_modules/schema-utils/dist/validate.js:96:11)
    at Object.loader (.../node_modules/expose-loader/dist/index.js:24:28)

Any idea on how to fix?

`open_http': 503 Connection timed out (OpenURI::HTTPError)

remove config/application.yml.example
/Users/rina.liu/.rbenv/versions/2.3.1/lib/ruby/2.3.0/open-uri.rb:359:in open_http': 503 Connection timed out (OpenURI::HTTPError) from /Users/rina.liu/.rbenv/versions/2.3.1/lib/ruby/2.3.0/open-uri.rb:737:in buffer_open'
from /Users/rina.liu/.rbenv/versions/2.3.1/lib/ruby/2.3.0/open-uri.rb:212:in block in open_loop' from /Users/rina.liu/.rbenv/versions/2.3.1/lib/ruby/2.3.0/open-uri.rb:210:in catch'
from /Users/rina.liu/.rbenv/versions/2.3.1/lib/ruby/2.3.0/open-uri.rb:210:in open_loop' from /Users/rina.liu/.rbenv/versions/2.3.1/lib/ruby/2.3.0/open-uri.rb:151:in open_uri'
from /Users/rina.liu/.rbenv/versions/2.3.1/lib/ruby/2.3.0/open-uri.rb:717:in open' from /Users/rina.liu/.rbenv/versions/2.3.1/lib/ruby/2.3.0/open-uri.rb:35:in open'
from /Users/rina.liu/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/actions/file_manipulation.rb:82:in get' from https://raw.github.com/80percent/rails-template/master/composer.rb:16:in get_remote'
from https://raw.github.com/80percent/rails-template/master/composer.rb:39:in apply' from /Users/rina.liu/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/actions.rb:224:in instance_eval'
from /Users/rina.liu/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/actions.rb:224:in apply' from /Users/rina.liu/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/generators/app_base.rb:158:in apply_rails_template'
from (eval):1:in apply_rails_template' from /Users/rina.liu/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/command.rb:27:in run'
from /Users/rina.liu/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/invocation.rb:126:in invoke_command' from /Users/rina.liu/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/invocation.rb:133:in block in invoke_all'
from /Users/rina.liu/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/invocation.rb:133:in each' from /Users/rina.liu/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/invocation.rb:133:in map'
from /Users/rina.liu/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/invocation.rb:133:in invoke_all' from /Users/rina.liu/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/group.rb:232:in dispatch'
from /Users/rina.liu/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/base.rb:444:in start' from /Users/rina.liu/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/commands/application.rb:17:in <top (required)>'
from /Users/rina.liu/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in require' from /Users/rina.liu/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in require'
from /Users/rina.liu/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/cli.rb:14:in <top (required)>' from /Users/rina.liu/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in require'
from /Users/rina.liu/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in require' from /Users/rina.liu/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/exe/rails:9:in <top (required)>'
from /Users/rina.liu/.rbenv/versions/2.3.1/bin/rails:23:in load' from /Users/rina.liu/.rbenv/versions/2.3.1/bin/rails:23:in

'

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.