Rails Application Template

  • in
  • rails, ruby

Base template for creating Ruby-on-Rails applications

Current version: 0.1.2

How to use

  1. Download or clone the template
  2. Set your ruby version and gemset
    $ rvm use 2.3.0@myapp --create
  3. Install rails gem for the gemset
    $ gem install rails -v 'your_rails_version'
  4. Simply use the template when you are creating your application
    $ rails new myapp -m /path/to/template/bootstrap.rb
  5. Have fun with your application


Template uses config.yml file for installing and configuring rails gems and other stuff. The list of statements that will help you to customize your own template are given below.

  1. The configuration file consists of several blocks like. They divide the application generation process into some logic parts.
    rvm: ...
    testing: ...
    documentation: ...
    deploy: ...
  2. The main part of each block is gems. So if you want more gems to be added to your project just add a new block with any name, which suits your aim with appropriate gems block or add your gems to any existing block.
         faker: true
           group: test, development
           version: ~> 4.8
           group: test, development

    You can use just true value for a gem. In this case the gem will be added to Gemfile like

    gem 'faker'

    You can also pass version and/or group params and they will be used in Gemfile either

    gem 'factory_girl_rails', '~> 4.8', group: [:test, :development]
  3. Each block can run his own runner from runners folder if one exists. There you can put any code you want to execute, i.e.
    create_file '.ruby-version', RUBY_VERSION
    create_file '.ruby-gemset', app_name
    file '.rvmrc', "rvm use #{RUBY_VERSION}@#{app_name}"
  4. If you need to make some actions after gem is added, i.e. run rails generate rspec:install you can put callback to the runner that will be executed after gem is added. By convention callback name depends on gem name and should look like this
    "#{your_gem_name.gsub('-', '_')}_callback"

    So, for rspec-rails the full configuration will look like that

    # config.yml
          group: test, development
    # runners/testing.rb
    def rspec_rails_callback


Contact us

If you have any questions, suggestions or just need a help with web or mobile development, please email us at web@agilie.com. You can ask us anything from basic to complex questions.

We will continue publishing new open-source projects. Stay with us, more updates will follow!


More details at our Github.


Related Post


Animated Toggle Menu

Hi, guys! We’re happy to share our new free open-source Animated Toggle Menu that can be helpful for creating websites. It’s lightweight...


Web Time Tracker

Plugin named Timetracker is a time counter that works in both increase and decrease directions. It can be embedded in websites and used as a...


jQuery GTM In-Viewport Manager Plugin

A manager of in-viewport events for GTM (Google Tag Manager). We are happy to share with you our new jQuery GTM In-Viewport Manager Plugin a...