Wagon Rails
Wagon Rails is the base Rails application used by Le Wagon's students during the 9-week FullStack bootcamp. It's the scripted version of lewagon/rails-kickoff where you would manually copy/paste commands to achieve the same result with just one command line.
Installation
First install the wagon_rails gem:
$ gem install wagon_rails
Then run:
$ cd ~/code/YOUR_GITHUB_NICKNAME
$ wagon_rails new YOUR_PROJECT_NAME
This will create a Rails app in YOUR_PROJECT_NAME
using the latest version of Rails,
create a GitHub repository and an application on Heroku.
Advanced usages
If you don't want to create a GitHub repo, use the --skip-github
flag, and
if you don't want to create an Heroku app, use the --skip-heroku
flag.
$ wagon_rails new YOUR_PROJECT_NAME --skip-github --skip-heroku
Dependencies
This gem suppose that you have Postgresql on your computer. Check out lewagon/setup
For the GitHub repo creation, it assumes you have the hub gem installed.
$ gem install hub
And for the Heroku app creation, it assumes that you have the heroku binary
and are logged in (heroku login
).
$ brew install heroku
$ heroku login
Gemfile
To see the latest and greatest gems, look at WagonRails' Gemfile, which will be appended to the default generated projectname/Gemfile.
It includes application gems like:
- Postgres for access to the Postgres database
- Figaro for environment variables and configuration management.
- Simple Form for form markup and style
- High Voltage for static pages
- Devise for user authentication
- Paperclip for file attachment and S3 upload.
- Bootstrap to jump start the design with a solid responsive grid and basic UI components.
- Font Awesome to get a nice iconography
And development gems like:
- Pry Rails for interactively exploring objects
- Pry ByeBug for interactively debugging behavior
- Better Errors for a great error page with remote debugging
-
Letter Opener for testing emails in
development
.
And production gems for a ready-to-deploy app on Heroku.
- Rails 12factor for injecting the required Rails configuration
- Puma for a blazing fast HTTP server in production (recommended by Heroku)
WagonRails, when the --skip-heroku
flag is not used, will
add a deploy
script to the bin
repository. Simply deploy with:
$ deploy # git push heroku + rake db:migrate + restart
Option
You can enable Pundit for user authorization, open
the Gemfile, uncomment the pundit
gem. Then:
$ bundle install
$ rails g pundit:install
Credits
WagonRails is a fork of thoughtbot/suspenders, which is maintained and funded by thoughtbot, inc.
Thank you guys for creating this gem in the first place!