[Nitro] Better diagnostics for gen

Bryan Soto bryan.a.soto at gmail.com
Tue Apr 25 15:26:26 EDT 2006

Welcome Gabriele,

On 4/25/06, gabriele renzi <surrender_it at yahoo.it> wrote:
> Maybe there could be a more explanative message, i.e.
> begin
>    path="gen/#{generator}/gen.rb"
>    require path
> rescue LoadError =>e
>    if e.message[/#{path}$/]
>     reason=  %{\tno such generator "#{generator}"}
>    else
>      reason= %{\tunmet dependency loading "#{path}":\n\t#{e.message}}
>    end
>    puts "Cannot load the specified generator!"
>    puts reason
>    exit 1
> end

That does seem nicer. The load error messages from gems can be rather
unhelpful. Is this what you used to debug your friends problem? Just
want to know how much of a beating to give it for testing purposes. :)

> I think spitting out the available generators is not meaningful as of
> now, but if Brian's suggestion of model/scaffold generators is going to
> be applied I think it would be nice to also show the list in the first
> case.

That's a nice idea too. If/when we get any more generators.



"Never tell people how to do things. Tell them what to do and they
will surprise you with their ingenuity." —General George S. Patton

More information about the Nitro-general mailing list