As of Rails 3.0.3 using application templates remotely over HTTPS is broken. This is caused by the internal templates code only handling URLs without HTTPS, everything else is treated as a local resource. The fix for this issue has been commited to the Rails master branch on November 27th 2010 and will probably be included in the next minor release. Until then you sadly have to clone template-bucket repository to your local machine in order to use it :'(
Awesome Rails 3 project template, full of rainbows, ponies and unicorns... and awesomeness. These templates are knowingly a bit opinionated, but feel free to leave feedback about what you would like to do differently.
- [RVM] (http://rvm.beginrescueend.com/)
- Ruby 1.9.2 (installed via RVM) -
rvm install 1.9.2
- Rails 3 (installed in ruby-1.9.2 in RVM) -
rvm use 1.9.2; gem install rails
The templates work both locally and remotely referenced. You can clone the repo and reference to it from your filesystem, or use the urls directly from github.
The most basic usage would be
rails new appname -m http://github.com/perfectline/template-bucket/raw/master/full.rb.
All of the subtemplates can also be used separately, so you can mix and match them according to your own taste.
Removes all lines from Gemfile prefixed with # (commented lines).
Also adds the config generators block to
Cleans up the
database.yml file, reusing basic declarations.
Also adds the
generator.orm :active_record statement to
Installs gems needed by cucumber either with Webrat or Capybara, runs the cucumber generator and replaces the default cucumber.yml
Installs gems needed to use RSpec with Rails, replaces .rspec configuration, runs the RSpec generator, removes
test/ folder, adds
generator.test_framework :rspec, :view => false to
Optionally prompts for installing Shoulda and FactoryGirl.
When Mocha is chosen, adds mocking warnigs to
spec_helper.rb and configures RSpec with
When FactoryGirl is chosen, sets the
config.fixture_replacement :factory_girl with appropriate director in
Fixture replacement directory depends on the test framework used - with RSpec its
spec/factories, with Test::Unit its
Removes the default Prototype library with its helpers, replaces it with jQuery 1.4.2, downloads the Rails jQuery integration and adds the jQuery.metadata plugin.
Additionally replaces the
rails3-generators gem, optionally prompts for Jammit and Haml installation.
When using Jammit, it also creates the default
Using Haml adds the
generator.template_engine :haml directive to
reset.css file under
public/stylesheets which contains basic CSS reset directives.
In addition creates the default application layout, proper XHTML Strict file.
When using HAML, the template will be in HAML as expected.
Optionally installs all gems via bundle and creates the development database.
Optionally adds capistrano support for the project, bootstrapping the application.
This will get future enhanchements.
Replaces the default .gitignore, initializes a new repository, adds all files and does an initial commit.
If chosen, it will also add a new remote to the repo.
If the user has a
~/.template-bucket/repositories file, containing a list of repository locations (one location per line), the file will be used to prompt with predefined repository locations. You can use a placeholder
<app> in your dotfile, which will be replaced with the current application name.
If no dotfile is found, the template will prompt for a full repository location, including the project name.
Mongoid/Mongomapper support, Resque support, pre-configured Capistrano recipes.
What else am I missing?
Copyright 2010 by PerfectLine LLC (http://www.perfectline.co.uk) and is released under the MIT license.