Once Rails has been fixed to allow https URIs to be supplied for rails templates you can add this function to your bash profile, zshrc or what ever:
Looks like 3.0.4: rails.lighthouseapp.com/projects/8994/tickets/5926-bug-patch-allow-https-uris-to-be-supplied-for-rails-templates
function railsapp { template=$1 appname=$2 shift 2 rails $appname -m https://github.com/darrenterhune/rails_templates/raw/master/$template.rb $@ }
For now you will have to clone or download these templates to get them to work.
You can then use this “railsapp” command instead of the traditional “rails” one by passing the template then the app as arguments:
After Rails has been fixed:
railsapp base appname railsapp cssgrid appname
Before Rails has been fixed:
You first need to clone this repository or download these templates, then you can run:
rails appname -m /Users/path/to/base.rb rails appname -m /Users/path/to/cssgrid.rb rails appname -m /Users/path/to/boilerplate.rb rails appname -m /Users/path/to/jquery.rb
base.rb
1. Creates README.rdoc (with default info for our system - change to your liking) 2. Removes public/index.html 3. Removes prototype javascript cause we like jquery better 4. Sets up basic app/views/layouts/application.html.erb file 5. Creates config/initializers/load_config.rb to load up the app config.yml file 6. Asks a bunch of app specific questions like what gems, plugins, configurations you would like 7. Capifies your app for deployment with dreamhost if wanted 8. Sets up git and commits initial commits 9. Sets up restul-authentication if you want
cssgrid.rb cssgrid.net by @andytlr
1. Does everything base.rb does above if wanted otherwise just installs cssgrid 2. Downloads http://cssgrid.net extracts, moves files and cleans up archive and files 3. Asks some questions and sets up the default app/views/layouts/application.html.erb file
If you use cssgrid.rb you must attribute the author: @andytlr cssgrid.net
boilerplate.rb html5boilerplate.com/ @paul_irish
1. Does everthing base.rb does above if wanted otherwise just installs boilerplate 2. Clones https://github.com/paulirish/html5-boilerplate, moves files and cleans up repos and files 3. Asks some questions and sets up the default app/views/layouts/application.html.erb file
jquery.rb
1. Removes prototype but asks first! 2. Fetches latest jQuery and installs it 3. Commits the changes if you have git and are tracking your app
These people have either a) helped b) I’m using their badass html/css template code:
Andy Taylor, Ryan Bates, Paul Irish
Copyright © 2010 Darren Terhune
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.