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

The problem is that Kernel#gets (which is what you’re calling if you just use gets by itself) assumes you’re pulling from a file named by the arguments passed to Rake. That means gets tries to return the content of a file called [rake-task-here], which almost certainly doesn’t exist.

Try STDIN.gets.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)