I wanted my seeds.rb file to have two paths based on some user input. For the sake of simplicity in this question I've stripped it down to just these two lines:
print "> "
res = gets.chomp
When I run rake db:seed, the following exception is raised:
▶ rake db:seed
> rake aborted!
Errno::ENOENT: No such file or directory @ rb_sysopen - db:seed
/home/me/work/my_app/db/seeds.rb:5:in `gets'
/home/me/work/my_app/db/seeds.rb:5:in `gets'
/home/me/work/my_app/db/seeds.rb:5:in `<top (required)>'
Anyone know why this is happening, i.e. why gets.chomp in this context is causing the program to try to open a file named db:seed?