# Wagon Rails Wagon Rails is the base Rails application used by [Le Wagon](http://www.lewagon.org/en)'s students during the 9-week FullStack bootcamp. It's the scripted version of [lewagon/rails-kickoff](http://github.com/lewagon/rails-kickoff) where you would manually copy/paste commands to achieve the same result as justone. ## Installation First install the wagon_rails gem: ```bash $ gem install wagon_rails ``` Then run: ```bash $ 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. ```bash $ wagon_rails bew YOUR_PROJECT_NAME --skip-github --skip-heroku ``` ## Dependencies This gem suppose that you have **Postgresql** on your computer. Check out [lewagon/setup](https://github.com/lewagon/setup) For the GitHub repo creation, it assumes you have the [hub](https://github.com/github/hub) gem installed. ```bash $ gem install hub ``` And for the Heroku app creation, it assumes that you have the `heroku binary` and are logged in (`heroku login`). ```bash $ brew install heroku $ heroku login ``` ## Gemfile To see the latest and greatest gems, look at WagonRails' [Gemfile](templates/Gemfile.erb), which will be appended to the default generated projectname/Gemfile. It includes application gems like: - [Postgres](https://github.com/ged/ruby-pg) for access to the Postgres database - [Figaro](https://github.com/laserlemon/figaro) for environment variables and configuration management. - [Simple Form](https://github.com/plataformatec/simple_form) for form markup and style - [High Voltage](https://github.com/thoughtbot/high_voltage) for static pages - [Devise](https://github.com/plataformatec/devise) for user authentication - [Pundit](https://github.com/elabs/pundit) for user authorization - [Paperclip](https://github.com/thoughtbot/paperclip) for file attachment and S3 upload. - [Bootstrap](https://github.com/twbs/bootstrap-sass) to jump start the design with a solid responsive grid and basic UI components. - [Font Awesome](https://github.com/FortAwesome/font-awesome-sass) to get a nice iconography And development gems like: - [Pry Rails](https://github.com/rweng/pry-rails) for interactively exploring objects - [Pry ByeBug](https://github.com/deivid-rodriguez/pry-byebug) for interactively debugging behavior - [Better Errors](https://github.com/charliesome/better_errors) for a great error page with remote debugging - [Letter Opener](https://github.com/ryanb/letter_opener) for testing emails in `development`. And production gems for a ready-to-deploy app on Heroku. - [Rails 12factor](https://github.com/heroku/rails_12factor/) for injecting the required Rails configuration - [Puma](https://github.com/puma/puma) for a blazing fast HTTP server in production ([recommended by Heroku](https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server)) 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 ``` ## Credits WagonRails is a fork of [thoughtbot/suspenders](https://github.com/thoughtbot/suspenders), which is maintained and funded by [thoughtbot, inc](http://thoughtbot.com/community). Thank you guys for creating this gem in the first place!