Middleman hiccup on Windows

I’ve been trying to help out on some parts of the Scalingo documentation which is based on middleman. But all this ruby dependency madness on windows including partially non available binaries is driving me nuts.

I should note that gem had been updated to 2.4.6, nokogiri precompiled Windows binaries installed (1.6.5-x86-mingw32) due to some other issues I faced. So your mileage may vary with the below especially as I can’t recall exactly what else I had to “fix” in order for this to work.

Let’s start with the initial issue when trying to run middleman build --clean after bundle:

d:/Ruby21/lib/ruby/gems/2.1.0/gems/ffi-1.9.3-x86-mingw32/lib/ffi.rb:14:in `require': cannot load such file -- ffi_c (LoadError)

We forego this by updating ffi to 1.9.8 with precompiled binaries and then pointing a requiring Gemfile.lock to that version:

gem install ffi:1.9.8

Lets go on with middleman build --clean:

d:/Ruby21/lib/ruby/2.1.0/pathname.rb:48:in `[]': no implicit conversion from nil to integer (TypeError)

There’s two open issues regarding this: 1, 2

So let’s resort to modifying the middleman-deploy dependency pointing to a “fixed” version not requiring ptools by modifying the Gemfile:

gem "middleman-deploy", :git => 'https://github.com/whitetrefoil/middleman-deploy.git'

And finally, middleman build --clean works! What a torture.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *