How to Create Clean Seed Files in RoR?

Brief video on setting up clean seed files for your RoR project.

Seed file can be difficult to work with, especially as dataset grows with your application. Several strategies that I have found useful:

  1. Use comments and print statements as a guide
  2. Store  attributes in a hash, then pass them into new records
  3. Build out incrementally so that you can check errors
  4. Remember to link up records using user_id, etc.

Editing Locked PDF Files with GIMP

gimp

 

Editing locked PDF files can be a mess; however, GIMP can be a good option for making small edits by converting the file to image, then back into PDF after revision.

Google Docs and the Preview app on Mac are good tools for opening/converting files; however, if they are unable to open/convert the files then Acrobat may be required to do so.

That said, here are the general steps:

  1. Open the file – if it is password protected, then consider options of unlocking the file here.
  2. Convert into image – Convert the file into image, PNG format worked well in my experience.
  3. Open GIMP – Download available here.
  4. Edit image using GIMP – Cut/paste selection is especially useful and tutorials are located here.
  5. Save image file into XCF format – GIMP editable format is XCF, so save into this format until image is ready for export.
  6. Export XCF back into image – Once complete, then convert XCF file back into image format (PNG or otherwise).
  7. Export/print as PDF – Convert the image back into PDF, using tools such as Google Drive, the Preview app, etc.

Some gotchas along the way:

  1. Unlocked PDF files – Sites available online are not always reliable and often charge for doing so.
  2. Image formatting – Good for minor changes and side-steps the securing of PDF features.
  3. File conversion – Converting between PDF/image may cause some issues, so be sure to experiment with combinations of applications that work with your files.
  4. Acrobat, when all else fails – Acrobat can accomplish all of the above, so use it when all else fails then GIMP for image editing.

In conclusion, GIMP has been a great resource in my experience by offering just the right level of image editing functionality to make minor edits to locked PDF files without spending hours converting/unlocking them.

East Bay Rails Presentation Video – Parts 1-5

My East Bay Rails presentation last week covered “Delivering Weather Data in Rails”, and I reviewed how weather data can be presented in a web application in the context of environmental compliance.

There are 5 short video clips and an introduction (posted above) from the presentation – the remaining videos are posted here:

https://www.youtube.com/channel/UCngCqoW8QlEIwEjLHlSWiRg