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

More detailed installation instructions? #28

Closed
marckohlbrugge opened this issue Aug 20, 2022 · 5 comments · Fixed by #29
Closed

More detailed installation instructions? #28

marckohlbrugge opened this issue Aug 20, 2022 · 5 comments · Fixed by #29

Comments

@marckohlbrugge
Copy link

marckohlbrugge commented Aug 20, 2022

Love the idea of this gem! ❤️

I followed the README and my browser console says [Hotwire::Livereload] Websocket connected. But when I change any file, nothing gets reloaded.

Whatever it is, it's probably user error. But I followed the README and don't see anything in the Rails logs or browser console.

Any additional installation instructions (perhaps related to ActionCable) would be appreciated 🙌

@marckohlbrugge
Copy link
Author

Some additional info:

Redis shows 1661027312.812270 [1 [::1]:54908] "subscribe" "hotwire-reload" on page load so it seems like ActionCable is correctly connected to Redis. Changing any files does not trigger any other Redis events.

@kirillplatonov
Copy link
Owner

Hey Marc,

It sounds like ActionCable and Redis are correctly connected and there are some issues with detecting file changes. When file changed you should see the following messages in Rails logs:

[ActionCable] Broadcasting to hotwire-reload: {:changed=>["/Users/kirill/Code/demo-app/app/views/posts/index.html.erb"], :force_reload=>false}
Hotwire::Livereload::ReloadChannel transmitting {"changed"=>["/Users/kirill/Code/demo-app/app/views/posts/index.html.erb"], "force_reload"=>false} (via streamed from hotwire-reload)
  1. What is the path for the file you trying to change?
  2. Could you please share a custom configuration for Hotwire Livereload (if any)?
  3. Just in case, make sure there's no file tmp/livereload-disabled.txt cause it's blocking livereload.

@marckohlbrugge
Copy link
Author

I've narrowed it down to Rails::Server not being defined for my app. I use overmind with puma and rails server doesn't seem to run. I never noticed it before, as I don't use it.

Either way, it seems like the issue might be due to my specific installation rather than the gem.

@marckohlbrugge
Copy link
Author

@kirillplatonov The new version works for me now. Thank you for the fix! 💖

@kirillplatonov
Copy link
Owner

Glad it's working now ✌️

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

Successfully merging a pull request may close this issue.

2 participants