I have a rake task that needs to insert a value into multiple databases.
I\'d like to pass this value into the rake task from the command line, or from another
Actually @Nick Desjardins answered perfect. But just for education: you can use dirty approach: using ENV argument
ENV
task :my_task do myvar = ENV['myvar'] puts "myvar: #{myvar}" end rake my_task myvar=10 #=> myvar: 10