say I\'ve got my rails app on github and am deploying the github repo on heroku.
I\'ve got a situation where I have a simple text file with bunch of words (it is in my g
Since you're talking about a Rails app on Heroku, how about using rails runner
:
heroku run bundle exec rails runner ./path/to/script.rb -a
Have a look at the RailsGuides for rails runner for more details.
Alternatively, turn that script into a rake task if runner is not your cup of tea (eg, for recurring tasks).