Trouble starting Middleman, windows 7 64bit

Hello all, first post and all…
I’m new to Middleman and Ruby, and am working on a small project. My issue is that I often have problems starting the server, finding it takes a many repeated commands before it starts successfully. I start using:

bundle exec middleman server

or

middleman server

The log begins, but always drops back to the command prompt:

λ bundle exec middleman server
== The Middleman is loading
== LiveReload is waiting for a browser to connect

If anyone has experienced this before or can offer advice, it would be greatly appreciated.

Many thanks.

I would consider uninstalling the 64-bit version of ruby and installing the 32-bit from the rubyinstaller or even railsinstaller.org.

I remember I had all kinds of strange issues with 64-bit ruby on windows 7.

Can’t guarantee this will resolve it but I am successfully running middleman on 32-bit ruby on windows 7.

Hello @simonwyse,

You may not want to hear this, but I would advise not to run Middleman on Windows.

I did that for a long time. And it was brittle. Middleman itself runs pretty well on Windows, but Middleman depends on a lot of other Ruby components. And the Ruby community in general doesn’t care for Windows. Some component deep down in the dependency tree would regularly be broken on Windows, and it was terribly frustrating.

What I do now is that I edit some content from Windows, and use Git to push it to a central repo. Then I use either my Mac or the web editor at C9.io to pull the latest version, and build the site. C9.io is particularly nice, it’s a full text editing environment in the browser, backed by a Linux virtual machine, so Ruby tools like Middleman run well there.

HTH,

Jesper Mortensen

Thanks for the replies. probably should have mentioned I’m using ruby 1.9.3p392 (quite old I imagine), and Middleman 3.3.12.

@Jesper, thanks I will checkout c9.io, though it may well be too much for the target audience of my project. I’m developing a simple solution for a local education establishment, who are running Win7, with a view to enable them to make updates via changing data files, rather than “code”.

I have come across this, which seems to list symptoms similar to mine, no real solution there yet though: https://github.com/middleman/middleman/issues/1367. Will keep watch.

Thanks again.
Simon

@simonwyse

AFAIK, there is no solution to the problem of other dependencies not being properly tested on Windows that I mentioned. Therefore I still don’t recommend using Middleman on Windows.

But if you want to have a go at it, you could try

  • uninstall your current Ruby.
  • install the latest 32bit Ruby 2.2.2 from rubyinstaller.org,
  • install the latest Middleman 3.4
  • remove the LiveReload plugin from your gemfile. (Admittedly, I’m just saying this last item on a hunch – but the livereload plugin needs to interact with the server, and is currently without a maintainer.)

The Ruby interpreter (Ruby MRI) has changed a lot – and in some ways stabilized – between 1.9.x and 2.2.x. Maybe being on the most current versions will help you.

If the above doesn’t get you going, maybe Hugo (Go language, compiled native Windows client available) or Hexo (runs on Node.js) will work for you.