This project is archived and is in readonly mode.

#2528 ✓resolved
Stephen Celis

rails:template Rake task does not expand file paths

Reported by Stephen Celis | April 20th, 2009 @ 05:23 PM | in 2.x

Inconsistency:

rails -m ~/template.rb newapp works. rake rails:template LOCATION=~/template.rb does not.

AppGenerator uses OptionParser, which automatically expands file paths, before sending them on to TemplateRunner.

The "rails:template" Rake task, however, instantiates a TemplateRunner directly, passing it an ENV variable.

While the tilde will expand with rails -m, it will not expand for the Rake task, and instead will error out.

I've attached a patch that will expand file paths in the Rake task (not unlike what OptionParser does), scoping out URIs with the same regex open-uri uses.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Attachments

Pages