Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Fix rake rails:template to tell user to pass LOCATION variable.

  • Loading branch information...
1 parent eead13f commit edfcf47026e408276684237e9e3d49aa4cf3f755 @arunagw arunagw committed
Showing with 3 additions and 3 deletions.
  1. +3 −3 railties/lib/rails/tasks/framework.rake
6 railties/lib/rails/tasks/framework.rake
@@ -19,14 +19,14 @@ namespace :rails do
desc "Update both configs and public/javascripts from Rails (or use just update:javascripts or update:configs)"
task :update => [ "update:configs", "update:javascripts", "update:scripts", "update:application_controller" ]
- desc "Applies the template supplied by LOCATION=/path/to/template"
+ desc "Applies the template supplied by LOCATION=(/path/to/template) or URL"
task :template do
template = ENV["LOCATION"]
+ raise "No LOCATION value given. Please set LOCATION either as path to a file or a URL" if template.blank?
template = File.expand_path(template) if template !~ %r{\A[A-Za-z][A-Za-z0-9+\-\.]*://}
require 'rails/generators'
require 'rails/generators/rails/app/app_generator'
- generator = [ Rails.root ], {}, :destination_root => Rails.root
+ generator = [Rails.root], {}, :destination_root => Rails.root
generator.apply template, :verbose => false

0 comments on commit edfcf47

Please sign in to comment.
Something went wrong with that request. Please try again.