Model not found in custom script...

Do you know how I can load or have available the resources/environment that myrails app uses into this script?

It should happen automatically. Can you post the error message and stack trace?