I want to run a Ruby file in the context of a Rails environment. rails runner almost does what I want to do, but I\'d like to just give it the file name and arguments. I\'m
The simplest way is with rails runner because you don't need to modify your script.
rails runner
http://guides.rubyonrails.org/command_line.html#rails-runner
Just say rails runner script.rb
rails runner script.rb