Resolving middleman gem issues

Hi there, I’ve hit a frustrating issue last night and was hoping to get some help or pointers towards fixing this. I’ve got a very minimal gemfile, but adding a few new gems started this issue.

I’ve since removed the gems that I thought caused the issue, but I’m still hitting the same problems. Is there a methodology for fixing versions of gems at their last known working state? I suspect I’ve updated to the point that they no longer work.


gem 'middleman', '~> 4.2'
gem 'middleman-autoprefixer', '~> 3.0'
gem 'tzinfo-data', platforms: [:mswin, :mingw, :jruby, :x64_mingw]
gem 'wdm', '~> 0.1', platforms: [:mswin, :mingw, :x64_mingw]
gem 'slim'
gem "middleman-blog", "~> 4.0"
gem 'middleman-simple-thumbnailer'
gem 'fastimage'
gem 'middleman-livereload' 
gem 'parallel'
gem "middleman-imageoptim"
gem 'image_optim_pack'
gem 'nokogiri'
gem 'mini_magick'
gem 'zlib'

As far as I know, ActionView is not a dependency of Middleman, so it won’t be available unless you manually load the gem. But probably you don’t even need it. Middleman provides many things out of the box and its views are very similar to Rails, but have a few tiny differences. Best to check the docs, when something doesn’t work exactly like in Rails.

For the gems there are always two files:

  • the Gemfile where you specify which gems you want
  • the Gemfile.lock where you can see, which gems you actually get. This contains the exact versions and it contains indirect dependencies. So you also see gems here, that you didn’t explicitly include yourself.

You edit the Gemfile and then run bundle and your gems get installed and the Gemfile.lock gets generated. It is highly advisable to use a version control system like git in general, but it is especially helpful for having a history of your Gemfile.lock.