This project is archived and is in readonly mode.

#1655 ✓resolved
Andrew

ask not working in TemplateRunner through rake rails:template

Reported by Andrew | December 28th, 2008 @ 05:08 PM | in 2.x

Added fix for ask - making sure gets is called on STDIN as it was breaking when running as rake task

Comments and changes to this ticket

  • Pratik

    Pratik December 29th, 2008 @ 01:15 PM

    • Assigned user set to “Pratik”
  • Pratik

    Pratik January 16th, 2009 @ 05:34 PM

    Hey Andrew,

    I tested it and it worked well for me. Not sure what I'm missing :-s

  • Pratik

    Pratik January 16th, 2009 @ 05:39 PM

    • State changed from “new” to “invalid”

    Putting in 'invalid' till we have steps to reproduce.

    Thanks!

  • Matt Lightner

    Matt Lightner February 16th, 2009 @ 09:45 AM

    +1

    I get the same error (template not found). Adding STDIN in front of gets (as is done in the attached patch) fixes the problem.

    
    root [/home/radiant/haha5]# rake rails:template LOCATION="~radiant/rails_app_templates/deluxe.rb"                           (in /home/radiant/haha5)
        applying  template: ~radiant/rails_app_templates/deluxe.rb
    rake aborted!
    The template [~radiant/rails_app_templates/deluxe.rb] could not be loaded. Error: No such file or directory - ~radiant/rails_app_templates/deluxe.rb
    

    When STDIN is added as the explicit receiver for the gets call in the ask() method, the question is asked as expected.

  • Trent Ogren

    Trent Ogren March 9th, 2009 @ 02:50 PM

    +1

    I get the same error when trying to apply templates to existing 2.3.1 projects. The templates work fine when generating an app. Andrew's patch fixed the problem for me.

  • Pratik

    Pratik March 9th, 2009 @ 02:59 PM

    • State changed from “invalid” to “open”

    Oops. My bad.

  • Repository

    Repository March 9th, 2009 @ 02:59 PM

    • State changed from “open” to “resolved”

    (from [1d88a111b596c046e67fd290de0a40161350332b]) Ensure TemplateRunner#ask? works with the rake task to apply a template [#1655 state:resolved]

    Signed-off-by: Pratik Naik pratiknaik@gmail.com http://github.com/rails/rails/co...

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

Referenced by

Pages