Middleman-livereload : Windows 7 64-bit and Ruby2.0 Issues

I feel dumb for asking, but…
###What does Livereload do?

I feel like it should auto-refresh my browser when I change a local file. Is that right?

After installing with the method described here — GITHUB —, it doesn’t do that. Haha.

  • I am running on Windows 7 x64

  • ruby -v = 2.0.0p195

  • middleman-livereload (3.1.0) is in my gem list

  • I edited my Gemfile and then ran bundle install

  • I added activate :livereload to the configure :build do section at the bottom of the project’s config.rb

Take the activate :livereload out of the build section and you should be fine. The build section is specific to the middleman build command, meaning that everything inside configure :build do is executed only when you call middleman build.

Thanks for the reply. I have now updated to Middleman 3.1.0 (hoping that would help). I can see where to put the activate: livereload based on the new v3.1.0 template.
However, I still have issues (slightly different but still related to Livereload). As stated above I am running W7 x64 and Ruby 2.0.0p195.

Based off of these two sources…it appears that there are some issues when trying to run livereload do to it’s use of eventMachine…

eventmachine #408

Google Group

I have not been able to install eventmachine on my PC.

Is livereload dependent on eventmachine? If the livereload gem is installed on my PC then I get an error when doing “things” like: middleman init...

So, I uninstalled the livereload gem and I can init projects and run the server, no errors. Which is great. Things are ok.

However, in this configuration, there is an issue with a middleman-blog project. I can init one and the server will start but with errors (in the cmd prompt) concerning: already initialized constant for Padrino Helpers.

Then when trying to view the blog-templated project in a browser an error (in the browser) concerning

undefined method html_safe for 2012:Fixnum

Does anyone think that the lack of a livereload gem would cause this Padrino Helpers error?

Can I use livereload on a W7x64 machine running Ruby2.0?

Last time I tried to use ruby 2.0 in a windows environment I found a lot of the gems were not ready and caused middleman to get very confused (granted things might have changed by now). In the end I switched back to ruby 1.9.3 (current version p429) and have found it to be much more stable. Middleman-livereload works perfectly in our current setup.

In your Gemfile add:

# WDM is required dependency for livereload for Window Machines
gem "wdm", :platform => [:mswin, :mingw]
gem "middleman-livereload"

In your config.rb add (outside the build loop):

activate :livereload, :host => "127.0.0.1"

I switched down to 1.9.3 and eventmachine was able to install. In config.rb I tried to leave off the

:host => "127.0.0.1"

and it did NOT work. But when I added it, it worked. Blog works, everything works, thank you skezo.