I am not sure there is a way to do this, but I do know that in the
script/console (which is an irb session with your rails environment),
you can do:
to reload everything, it grabs the changed files, I believe (at least in dev mode).
and you can specifically load one again by calling:
instead of require, as require won’t do it if it’s already there.
So, I don’t know if you can do it in the code as it’s running on a web
server in production mode. Wouldn’t it be better practice to just
restart the app?
Hope that helps.