Tools to quickly set up Ruby on Rails projects
Ruby
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
assets
.gitignore
LICENSE
README.md
development_keys.rb.sample
eighteen-two.rb
fifteen-five.rb
fifteen-one.rb
fifteen-three.rb
fourteen-eight.rb
fourteen-ten.rb
fourteen-twelve.rb
seventeen-twelve.rb
sixteen-eight.rb
sixteen-four.rb

README.md

Railyard

This repository contains tools to quickly set up new Ruby on Rails projects. Most importantly it includes templates to setup a new Rails project with support for:

  • Responsive design based on Twitter Bootstrap
  • Oauth2 login support (Facebook, Twitter, Linkedin, Google and Office 365)

The choice of authentication services is arbitrary to allow for any combination of local, Facebook, Twitter, Linkedin, Google or Office 365 accounts.

Dependencies

This project depends on the following:

  • Rails
  • Command line support for wget

The template is known to work on OS X 10.10 and should work on any Linux system. Most likely it does not work on Windows due to the use of typical OS X / Linux commands.

Usage

The quickest way to use the template is to access the template via HTTP:

rails new SITENAME -m https://github.com/spotwise/railyard/raw/master/eighteen-two.rb

Replace SITENAME with the name of the project to be created. The Rails system will create a new Ruby on Rails site in the local directory and run the template directly from the web.

Once the site has been created, then change to the site directory and run

rails s

Then open your browser and access http://localhost:3000 and you should be met with the site homepage. The template by default creates two test users, test1@example.com and test2@example.com, both with the password 'test'. Also by default, the template enables the use of Facebook, Twitter, Linkedin, Google and Office 365 although none of these will work until you have added your own API keys.

The above command will create a Rails project with a few example models. Although this will work as an example it is probably not be what you want. To be able to customise the project the template file should be downloaded and then modified according to your needs. The template file is sprinkled with the text TODO where modifications should be added.

The template uses a number of default settings that need to be modified. At the minimum the data model should be modified before running the template to create the database schema necessary for the intended application and not leave remnants of the example models.

Other settings that may be modified later include:

  • API keys for Facebook, Twitter, Linkedin, Google and Office 365
  • Colours for navigation bar and links
  • Images on the home page
  • Footer message
  • Site logo

Once the template has been modified to your satisfaction then run the above command but change the URI to the path to the modified file.

For a more extensive description of how to setup a Rails site using this template, please refer to http://www.spotwise.com/2015/01/04/create-a-web-site-in-53-seconds/.

History

Note: Updates to both the Ruby language, the Rails framework and the used gems may cause issues with previous versions of the template. Always try to use the latest template version first.

  • 2014-08-08 Initial version
  • 2014-10-03 Support for Bootstrap 3
  • 2014-12-20 Added support for Google+
  • 2015-01-23 Improved handling of multiple authentication providers
  • 2015-02-27 New theme with support for full width hero image
  • 2015-05-28 Various layout fixes
  • 2016-04-03 Updated to work with Rails 4.2.6
  • 2016-08-21 Added support for Office 365 authentication
  • 2018-03-02 Rewritten to use Rails 5.x and Bootstrap 4.x