How do I use “gets” on a rake task?

前端 未结 2 1808
栀梦
栀梦 2021-02-01 11:53

I get an error whenever I try to use the function gets within a rake task. Is there a way to make it work?

The error says, \"no such file or directory - (rake task name)

2条回答
  •  误落风尘
    2021-02-01 12:14

    I don't think that you should be using gets in a rake task, if you need to get input from the command line you probably should pass it in as a parameter, but if you post some code that is not working then I am sure you will get a better answer.

提交回复
热议问题