middleman-deploy breaks the building and the server operations (on windows)
Hi!
Just by adding the line gem "middleman-deploy" in the Gemfile, the "bundle exec middleman build" command breaks down and the middleman server gives the browser a "File not font" error.
Gemfile:
source 'http://rubygems.org' gem "middleman", "~>3.3.3" gem "middleman-livereload", "~> 3.1.0" gem "wdm", "~> 0.1.0", :platforms => [:mswin, :mingw] gem "tzinfo-data", platforms: [:mswin, :mingw] gem "slim" gem "jquery-middleman" gem "compass-rgbapng" gem "bootstrap-sass", require: false gem "middleman-favicon-maker" gem "middleman-smusher" gem "middleman-deploy"
The error at build is this:
C:\Sites\eg2016>bundle exec middleman build
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/pathname.rb:48:in []': no implicit conversion from nil to integer (TypeError) from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/pathname.rb:48:inchop_basename'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/pathname.rb:101:in cleanpath_aggressive' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/pathname.rb:89:incleanpath'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/pathname.rb:451:in relative_path_from' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/middleman-core-3.3.3/lib/middleman-core/cli/build.rb:193:inexecute!'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/middleman-core-3.3.3/lib/middleman-core/cli/build.rb:128:in invoke!' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor/actions.rb:94:inaction'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/middleman-core-3.3.3/lib/middleman-core/cli/build.rb:70:in build' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor/command.rb:27:inrun'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor/invocation.rb:126:in invoke_command' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor.rb:359:indispatch'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor/base.rb:440:in start' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/middleman-core-3.3.3/lib/middleman-core/cli.rb:72:inmethod_missing'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor/command.rb:29:in run' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor/command.rb:126:inrun'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor/invocation.rb:126:in invoke_command' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor.rb:359:indispatch'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor/base.rb:440:in start' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/middleman-core-3.3.3/lib/middleman-core/cli.rb:20:instart'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/middleman-core-3.3.3/bin/middleman:18:in <top (required)>' from C:/RailsInstaller/Ruby1.9.3/bin/middleman:23:inload'
from C:/RailsInstaller/Ruby1.9.3/bin/middleman:23:in `
C:\Sites\eg2016>
And the middleman server gives this page, although it starts without errors and does not show any error when the browsers asks for the page
File Not Found
/
Any solution to this ?
Unfortunately I don't right now. Its a little tricky to debug as I'm not on windows. It looks like its somewhere between middleman-deploy and middleman. Does this fail only when middleman-deploy is added to the Gemfile? Also does this only happen when running middleman build (eg middleman server still works?)
I'm also getting the same error.
Gemfile:
# If you have OpenSSL installed, we recommend updating
# the following line to use "https"
source "http://rubygems.org"
gem "middleman", "~> 3.3.3"
gem "middleman-blog", "~> 3.5.3"
gem "middleman-livereload", "~> 3.3.4"
gem "middleman-deploy", "~>0.2.4"
gem "middleman-syntax", "~> 2.0.0"
gem "builder"
gem "tzinfo-data"
gem "nokogiri"
gem "redcarpet", "~> 3.1.2"
gem "wdm", :platform => [:mswin, :mingw]
$ gem install bundler $ bundle install $ bundle exec middleman
No error occurred.
But open http://localhost:4567/
File Not Found
/
With middleman-gh-pages instead middleman-deploy ,
everything goes well.
Diff Gemfile.lock

Resolved by Remove ptools to prevent breaking the path related logics in middleman
http://localhost:4567/ It's working now
[karlfreeman/middleman-deploy#62]
Any update on this? It's driving me nuts running middleman server on a repo in a shared linux windows environment. Allthough I can confirm the "solution" from @KingwenChow works.
The above solution from @KingwenChow doesn't work for me. I thought it was a gem issue so cleared all my local gems then reinstalled sass, compass and bundler before re-running bundle install on my project.
Here's my gem file...
source "http://rubygems.org"
# Middleman modules
gem "middleman", "~> 3.3.3"
gem "middleman-blog", "~> 3.5.3"
gem "middleman-livereload", "~> 3.3.4"
gem "middleman-minify-html"
gem "middleman-smusher"
gem 'middleman-deploy', '~> 1.0'
gem "wdm", :platforms => [:mswin, :mingw]
gem "tzinfo-data", platforms: [:mswin, :mingw]
# For blog posts using markdown syntax
gem "kramdown"
# For feed.xml.builder
gem "builder"
If I remove middleman-deploy from my gemfile, delete my Gemfile.lock and run bundle install, running bundle exec middleman build works fine.
I'm on windows 7 fyi