Closed ilyadoroshin closed 9 years ago
Thanks for reporting this issue!
It looks like it was conflict between the gem's usage of EventMachine and Thin's usage of EventMachine.
Here's the commit to resolve that conflict: https://github.com/rmosolgo/react-rails-hot-loader/commit/7a655fe85a1ea41c09f0d103eae140ce34cacd5d
Could you pull the latest version (0.3.0) and let me know if it works for you?
@rmosolgo :+1:
:confetti_ball:
Awesome, thanks!
Unfortunately, it doesn't work. For some reason, when updating your component, EM tries to run server again, but it's already running. Thus, everything falls with error:
gems/ruby-2.1.6/gems/eventmachine-1.0.8/lib/eventmachine.rb:534:in `start_tcp_server': no acceptor (port is in use or requires root privileges) (RuntimeError)
from /Users/idoroshin/.rvm/gems/ruby-2.1.6/gems/eventmachine-1.0.8/lib/eventmachine.rb:534:in `start_server'
from /Users/idoroshin/.rvm/gems/ruby-2.1.6/gems/em-websocket-0.5.1/lib/em-websocket/websocket.rb:46:in `run'
Oh interesting, I actually get that same error with Passenger, but I've ignored it because it doesn't actually break anything.
Guess it's time to fix it :P
@rmosolgo yup ^_^
Ok, moved error handling so that it would support my use of EM.next_tick
: https://github.com/rmosolgo/react-rails-hot-loader/commit/12707c46575bf44badad4d8af4bd4e5d3d5d2f98#diff-9a8c3a912dd5b26d70f1088b2c07da50R60
Can you try it from master
?
@rmosolgo looks, like it works! :sunglasses: thank you!
I am facing this same error. When I change some js file and save it, the update reflects in the UI but the server stops abruptly. Error: gems/eventmachine-1.2.1/lib/eventmachine.rb:530:in `start_tcp_server': no acceptor (port is in use or requires root privileges) (RuntimeError)
When using thin server rails s just exits with no error explanation.