How to parse rake arguments with OptionParser

前端 未结 4 512
情书的邮戳
情书的邮戳 2021-01-18 00:05

Reffering that answer I was trying to use OptionParser to parse rake arguments. I simplified example from there and I had to add two ARGV.shi

4条回答
  •  终归单人心
    2021-01-18 00:46

    You have to put a '=' between -u and foo:

    $ rake user:create -- -u=foo

    Instead of:

    $ rake user:create -- -u foo

提交回复
热议问题