Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Thor LoadError message should not output --dev twice

#6431

When running the app generator without Thor available, it prints out an error message telling you you should have Thor and you should append --dev to the command:

If you ran this command from a git checkout of Rails, please make sure thor is installed,
and run this command as `ruby source/bin/rails ticket_6427 --dev`

If you're already appending --dev, it'll tell you to to run the command with --dev --dev:

If you ran this command from a git checkout of Rails, please make sure thor is installed,
and run this command as `ruby source/bin/rails ticket_6427 --dev --dev`

This was because the error message simply appended "--dev" to anything. I've attached a patch that only adds it when you're not already doing it.

Reported by Jeff Kreeftmeijer · February 14th, 2011 @ 06:51 PM

State: resolved
Milestone: 3.x
Assigned to: Santiago Pastorino Santiago Pastorino
Importance: Low

Activity

  1. Jeff Kreeftmeijer
    Jeff Kreeftmeijer
    • Assigned user set to Jeff Kreeftmeijer

    I'll dive in once more and add tests for the Thor LoadError stuff. Hang on. :)

    February 16th, 2011 @ 09:56 AM

  2. Jeff Kreeftmeijer
    Jeff Kreeftmeijer
    • State changed from new to open
    • Assigned user changed from Jeff Kreeftmeijer to Santiago Pastorino

    After discussing with José, it turned out testing this would be difficult and result in a brittle test:

    (07:44:10 PM) José Valim: there is no need to test it
    (07:44:12 PM) José Valim: it would be hard 
    (07:44:15 PM) José Valim: mangling the load path
    (07:44:23 PM) Jeff Kreeftmeijer: probably. :)
    (07:44:24 PM) José Valim: it would be brittle
    

    Santiago, can you apply this one? :)

    February 27th, 2011 @ 06:55 PM

  3. Repository
    Repository
    • State changed from open to resolved

    (from [86ad8a6c877636b4df7966233dff7fea377b0790]) Make sure the Thor generator LoadError does not output --dev twice [#6431 Thor LoadError message should not output --dev twice state:resolved]

    Signed-off-by: Santiago Pastorino santiago@wyeworks.com
    https://github.com/rails/rails/commit/86ad8a6c877636b4df7966233dff7...

    February 27th, 2011 @ 08:54 PM