I\'ve set everything up that I need on my Mac (Ruby, Rails, Homebrew, Git, etc), and I\'ve even written a small program. Now, how do I execute it in Terminal? I wrote the pr
In case someone is trying to run a script in a RAILS environment, rails provide a runner to execute scripts in rails context via
rails runner my_script.rb
More details here: https://guides.rubyonrails.org/command_line.html#rails-runner