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

livereload port not passing through correctly to rack-livereload? #64

Open
jacquescrocker opened this issue Jun 30, 2014 · 1 comment
Open

Comments

@jacquescrocker
Copy link

I'm developing a project with multiple client apps (each using middleman) and I noticed that livereload was conflicting with each other. When I set :port option on each one, it was still not working.

here's how i'm setting it:

activate :livereload, port: 35740

the result was this in my <head> tag:

<script type="text/javascript">
  RACK_LIVERELOAD_PORT = 35729;
</script>
<script type="text/javascript" src="/__rack/livereload.js?host=0.0.0.0&amp;port=35740"></script>

Notice how the RACK_LIVERELOAD_PORT window variable isn't changing (but the script port is).

After some digging, this commit fixed things for me:

jacquescrocker@4125b4a

I really don't understand the difference on rack-livereload between :port and live_reload_port but I know if I don't set both, it doesn't work.

Digging around the rack-livereload project:

it's using options[:port] here: https://github.com/johnbintz/rack-livereload/blob/master/lib/rack/livereload/body_processor.rb#L105

and it's using options[:live_reload_port] here: https://github.com/johnbintz/rack-livereload/blob/master/lib/rack/livereload/body_processor.rb#L13

and also here: https://github.com/johnbintz/rack-livereload/blob/master/skel/livereload.html.erb#L12

Hope this helps someone

@sandstrom
Copy link
Contributor

sandstrom commented Jul 28, 2017

I'm doing some issue-gardening 🌿🌷🌾 and came across this issue.

Sorry that this has lingered for quite a while!

Thanks for your thorough digging into this! Do you have any suggestions for a remedy? Happy to review a PR!

(this repo is maintained by a few people contributing their free time, unfortunately we can't solve every issue on our own, so help from others is needed for some of the more exotic issues that crops up)

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

2 participants