Vi är två bröder som båda studerat till civilingenjörer med ett stort intresse för teknik, mjukvara och entreprenörskap.


  • Published on

    Rails Dual-boot + Dependabot = 💔?

    There are two concepts which greatly affected how I work with Rails development during the last couple of years, specifically with dependency management and preparing for upgrading to the next Rails version.

    The first one is Dependabot which opens pull-requests to update one dependency at a time. This way of working felt natural at once and allowed me to be on top of dependency updates instead of being scared of it 👻.

    The second one is dual-booting my Rails applications using separate lock-files, I was introduced to this concept by fastruby.io and their blog post Getting Ready for Rails 6.0: How to Dual Boot.

    Unfortunately the two do not work well together out of the box 💔.

  • Published on

    Error when converting PDF to image on Github Actions

    MiniMagick::Error: `convert /tmp/shrine20201009-22018-5itpj9.pdf[0] -auto-orient /tmp/image_processing20201009-22018-1uk39lv.png` failed with error:
    convert-im6.q16: not authorized `/tmp/shrine20201009-22018-5itpj9.pdf' @ error/constitute.c/ReadImage/412.
    convert-im6.q16: no images defined `/tmp/image_processing20201009-22018-1uk39lv.png' @ error/convert.c/ConvertImageCommand/3258.
        app/uploaders/document_uploader.rb:13:in `block in <class:DocumentUploader>'
        test/jobs/documents/documents_upload_job_test.rb:8:in `block in <class:UploadJobTest>'

    In my Ruby on Rails application, this error is raised when using MiniMagick to convert a PDF into an image. MiniMagick uses ImageMagick which uses Ghostscript for anything related to postscript files - for example PDFs.

    Due to a security vulnerability in Ghostscript < 9.24, ImageMagick changed the default policy to not allow conversions using Ghostscript. Even if Ghostscript has fixed the vulnerability, the ImageMagick policy has not been changed.

  • Published on

    Rails - Minitest results output in TAP-format for Heroku CI

    Originally posted on my DEV.to page.

    When using Heroku CI for automatic testing, the default output is just pass or fail without any parsing of how many tests passed or what errors where found.

    This can be improved if you output the results in the Test Anything Protocol-format (TAP-format) according to Heroku.

    This format is not built into the test frameworks used in Ruby on Rails. Therefore I had to write my own test reporter.