[Feature proposal] Add no-template option #8545

wants to merge 1 commit into


None yet

7 participants

banyan commented Dec 18, 2012

I guess not so many people are using Application Template feature, but I like it.
I use with .railsrc which specifies the template path.

However, sometimes I would like to create bare rails with the command rails new foo,
but I can't overwrite or negate the template path, so rename .railsrc is pretty messy.

So this PR allows not to use template with the command rails new foo -M,
What do you guys think of it?


kyanny commented Dec 18, 2012


linyows commented Dec 18, 2012



I'm neither 👍 or 👎. Seems fine.


--no-template or --skip-template already works today (Thor adds such to each option). I don't see a need to give it an alias. Isn't this enough?

banyan commented Dec 18, 2012


I don't see a need to give it an alias. Isn't this enough?

Yes, I'm fine if it works.
Are you sure that --no-template or --skip-template works?
It seems there's no feature in thor or rails.

$ echo "-T --skip-bundle -m https://raw.github.com/banyan/my-rails-template/master/template.rb" > ~/.railsrc
$ rails new foo --no-template # or --skip-template

Yes, it works. See [https://github.com/wycats/thor/blob/master/lib/thor/parser/arguments.rb#L139-142].

But in this case the ~/.railsrc arguments are added after the arguments you passed to the rails new command. So the -m option will take precedence over --no-template.

I personally think this should be inverted and the arguments passed to commands should have precedence over the ~/.railsrc content.

@josevalim @wycats WDYT?

wycats commented Dec 24, 2012

@rafaelfranca explicit options should DEFINITELY take precedence over options in .railsrc

@wycats wycats closed this Dec 24, 2012
@rafaelfranca rafaelfranca reopened this Dec 24, 2012
banyan commented Dec 24, 2012


I see and it works fine! Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment