Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Middleman 3.0 requires manual server restart for any change in config.rb or middleman-blog #595

Closed
hershmire opened this issue Sep 13, 2012 · 32 comments

Comments

@hershmire
Copy link

I've been working on getting a few of my projects upgraded from Middleman 2.0 to Middleman 3.0 and have noticed that I now need to manually restart the middleman server whenever I make a change in config.rb.

I'm also noticing this issue when my project is using middleman blog 3.0 – whenever I make a change to any file within the middleman project, all my blog content disappears and I need to manually refresh the server. Any non-blog related content seems to remain cached and doesn't updated until a manual refresh of the server too.

I can't imagine this is the expected result since Middleman 2.0 auto updated with zero lag time. I noticed this post about middleman server speed issues on Windows and was curious if this issue is somewhat related.

I'm seeing the issue on both OSX 10.8.1 and 10.7.xx. I'm running ruby-1.9.3-p194 on both. As a side note, I even created a fresh Middleman-Blog site via middleman init MY_BLOG_PROJECT --template=blog to see if this also produced this issue and it did.

Any areas I should troubleshoot?

@tdreyno
Copy link
Member

tdreyno commented Sep 14, 2012

Fixed, just today, in 3.0.4

@hershmire
Copy link
Author

Thanks for the update! 3.0.4 seems to fix the config.rb restarting issue but any middleman-blog projects still aren't refreshing. Whenever a change in middleman is made (any file), on page refresh, all blog content is no longer available until a manual bundle exec middleman server restart is performed.

You should be able to see this issue on a test middleman blog repo that I've been messing around with https://github.com/hershmire/middleman-github-flavored-markdown.

@ghempton
Copy link

I have been seeing this as well

@ghempton
Copy link

This appears to only happen when a prefix option has been specified.

I am using the latest from git.

@bhollis
Copy link
Contributor

bhollis commented Sep 15, 2012

Are you only seeing this for blog content? Does your other stuff refresh? Which version of the blog gem are you using (3.1 is out now with bug fixes).

@mdesantis
Copy link

I have this issue too: after any change to the layout or to the style the blog content vanishes and layout and style contents (layout.html.slim and layout.css.scss in my case) are not refreshed.

This with middleman 3.0.4 and middleman-blog 3.1.0, on an Ubuntu 12.04 x64 .

It is really annoying :-/

EDIT

A temporary solution that works for me:

  1. install shotgun: gem install shotgun
  2. download the middleman rackup config template contents into the project root
  3. shotgun -p 4567

@bhollis
Copy link
Contributor

bhollis commented Sep 17, 2012

I can't seem to reproduce this using both middleman and middleman-blog from Git, on Mac OSX 10.8.1 and Ruby 1.9.3. My site has lots of files, blog content, and specifies prefix. I've tried changing articles, layouts, styles, etc - it all works. Changing config.rb reloads the site. Everything's A-OK.

@mdesantis
Copy link

Maybe the issue is related to the OS (fs-event, something like that)? Could you try with Ubuntu f.e. in virtual machine? I cannot try with a Mac, I haven't it.

I have this problem just with middleman-blog , middleman works flawlessy.

@renatocarvalho
Copy link

I'm having the same issue here too. Any update I do on any file I have to restart middleman :(

I'm using Mac OS X 10.8.2, ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin11.4.0], middleman (3.0.4), middleman-blog (3.1.0)

@nbohlen
Copy link

nbohlen commented Sep 21, 2012

The same Problem with me. I even have to restart everytime I change a template or a locale.yml file. Using Mac OS X 10.8.2, middleman (3.0.4), and ruby-1.9.2-p136 (now upgrading to 1.9.3)

@tdreyno
Copy link
Member

tdreyno commented Sep 21, 2012

If you don't restart, what happens? Just old content or does the preview server stop working?

@renatocarvalho
Copy link

Hey @tdreyno, thanks for replying.

For me, when I'm at the initial page of the blog, the content disappears:
http://cl.ly/JcWS

And when I'm inside an article I get "File not found":
http://cl.ly/Jd4o

Here's my blog repo if that can help somehow: https://github.com/startae/startae-blog

@nbohlen
Copy link

nbohlen commented Sep 21, 2012

Hey,
if I dont restart it shows just the old content. And the blog has the same bugs as Renato is telling.
Thanks for replying.

Am 21.09.2012 um 19:13 schrieb Renato Carvalho notifications@github.com:

Hey @tdreyno, thanks for replying.

For me, when I'm at the initial page of the blog, the content disappears:
http://cl.ly/JcWS

And when I'm inside an article I get "File not found":
http://cl.ly/Jd4o

Here's my blog repo if that can help somehow: https://github.com/startae/startae-blog


Reply to this email directly or view it on GitHub.

@bhollis
Copy link
Contributor

bhollis commented Sep 27, 2012

Is this still the case with the latest middleman and middleman-blog gems?

@renatocarvalho
Copy link

w00t!!! It's working great so far :)

@ghempton
Copy link

works for me as well!

On Thu, Sep 27, 2012 at 11:03 AM, Renato Carvalho
notifications@github.comwrote:

w00t!!! It's working great so far :)


Reply to this email directly or view it on GitHubhttps://github.com//issues/595#issuecomment-8946509.

Gordon L. Hempton
http://codebrief.com
360.460.8098

@bhollis
Copy link
Contributor

bhollis commented Sep 28, 2012

Then if you don't mind, I'm going to close this out.

@bhollis bhollis closed this as completed Sep 28, 2012
@renatocarvalho
Copy link

Sure! Thanks!

@mdesantis
Copy link

Everything fine here too :-)

@bhollis
Copy link
Contributor

bhollis commented Oct 3, 2012

That error means you already have something using middleman's port. I fixed
it in master already.

-Ben

Sent from my phone

On Oct 2, 2012, at 3:36 PM, Maurizio De Santis notifications@github.com
wrote:

Everything fine here too :-)


Reply to this email directly or view it on
GitHubhttps://github.com//issues/595#issuecomment-9089775.

@snitko
Copy link

snitko commented Dec 15, 2014

Bug is still present for me in middleman, v 3.3.7

@tdreyno
Copy link
Member

tdreyno commented Dec 17, 2014

@snitko What platform?

@snitko
Copy link

snitko commented Dec 18, 2014

Macosx 9.8.4

@tdreyno
Copy link
Member

tdreyno commented Dec 18, 2014

Uh, wat?

@snitko
Copy link

snitko commented Dec 19, 2014

Uhm, sorry, I meant 10.8.4, obviously.

Did you mean the ruby version too? I'm using ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin13.0] on MacOSX 10.8.4

@tdreyno
Copy link
Member

tdreyno commented Dec 19, 2014

@benjaminwood
Copy link

I'm also experiencing this bug (v3.3.7). Adding the --force-polling option when I run the middle man server solves it, but live reload still doesn't work. I also like to run middleman with pow, but I'm unsure if there is a way to apply the force-polling option via my rack file.

In any case, it seems like there is still something edgecase here that is effecting a few of us. Can anybody else with the same problem chime in?

@tdreyno - I'll investigate your link further and report back here.

@benjaminwood
Copy link

No luck with the suggestions relating to the FSEvents bug found here: http://feedback.livereload.com/knowledgebase/articles/86239-os-x-fsevents-bug-may-prevent-monitoring-of-certai

I'm running:

  • OS X 10.10.0
  • Ruby 2.0.0p247

Also, JS (Coffee) and CSS (SCSS) changes don't require a server restart. These changes are reflected right away. Changes to any html file require a restart.

@tdreyno
Copy link
Member

tdreyno commented Dec 30, 2014

@benjaminwood Pow support is coming in v4, but not yet ready.

I'm sorry to say, I don't use livereload so that code is basically supported by community PRs. If anyone has more expertise in the protocol, we'd love help.

@benjaminwood
Copy link

Thanks for your help @tdreyno! I'm looking forward to v4.

I'm not too concerned about livereload not working (I don't often use it anyway). When running the server with the --force-polling option I've noticed that pages can take quite a while to load (depending on the size of the project). I think this is expected behavior when using that flag, so I don't see this as a long term solution. I'll keep poking around and will report back here if I discover anything.

@jmar910
Copy link

jmar910 commented Jan 16, 2015

I'm experiencing this same issue @benjaminwood . Seeing the same thing where CSS and JS files are updated, but the template files are not updating and require a server restart. I am not using live reload, just refreshing the page manually.

OS X 10.10.1
Ruby 2.0.0-p598

@jmar910
Copy link

jmar910 commented Jan 16, 2015

to add, the --force-polling flag works for me to correct the issue. As @benjaminwood mentioned, this isn't a long term solution, but will use it in the meantime. Hope this helps identify the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants