Attachment_fu S3 Railroad Tip
Here is another type for attachment_fu users.
This evening I wanted to try Railroad to generate one of my app diagram. I alreay wrote my own script generating a .dot file that I usually import in omnigraffle before exporting a pretty version for my clients. The thing is, my script is quite simple and only covers models while railroad also deals with controllers.
Wanting to check on railroad, after installing the gem I typed
<code> railroad -o models.dot -M </code>
and here is the ‘pretty’ error message I got.
No worries, Technoweenie didn’t mess up, it’s just that I use s3 for storage and his great plugin checks on the environment to load the proper credentials. Since railroad doesn’t care about the environment, RAILS_ENV isn’t set and my model diagram isn’t generated.
To fix this issue, simply type:
<code>$ railroad -o models.dot -M RAILS_ENV='development' </code>