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 -M

and here is the ‘pretty’ error message I got.

railroad error msg

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 -M RAILS_ENV='development'
By Matt Aimonetti