![]() If you see something like this, it means another process/app is listening on that port: tcp4 0 0 *.35729 *.* LISTEN To check if this is the case, quit the guard process and then run: netstat -an | grep 35729 Perhaps some other process is listening on port 35729, resulting in the connection errors you are seeing in Chrome. Upgrade both to the latest version to be safe: bundle update guard-livereload rack-livereload Perhaps the version of guard-livereload (server) and rack-livereload (client) are incompatible. ![]() Possibility 1: incompatible LiveReload versions Here are some troubleshooting steps to take: I've checked to see whether there are other watchers on port 35729 and nothing obvious pops up.Īny pointers on how to get this working are appreciated! Thanks. I've tried this with e as well and still get the same error. Gem "guard-livereload", :require => falseĬ_after(ActionDispatch::Static, Rack::LiveReload) The changes I've made to my app that should enable this to work are: # Gemfile WebSocket connection to 'ws://localhost:35729/livereload' failed: Error in connection establishment: net::ERR_TUNNEL_CONNECTION_FAILED First the error (from Chrome): WebSocket connection to 'ws://localhost:35729/livereload' failed: Connection closed before receiving a handshake response Perhaps someone else can see what I'm missing. The browser-devtool’s console will list this.I'm having a bear of a time setting up live reload. Or the connection to the LiveReload-Server couldn’t be established. Maybe it’s just a resource, which couldn’t be loaded. If reloading doesn’t work, open your browser’s devtools (ah-another one).using an application-devel.properties and activate a Spring Profile “devel” (by using =default,devel). ![]() In a real world application you wouldn’t add those settings/properties in step 3 in your application.properties.Now change the Thymeleaf template by inserting something like “Hello Devtools”.(insert another point I forgot/did not know here).is repacked by the Spring Boot Maven Plugin or.is packed as a jar (and started by java -jar),.is packed as a war (and deployed on a Servlet Container),.The devtools will not work if your application: Which means: use the main-method in your Application.java. Start your application using the embedded Tomcat.Include the script in your Thymeleaf template:.Download the LiveReload script livereload.js and place it into.# this is not a property defined by Spring Boot (note the "foobar")į-js=true # SPRING BOOT // DEVTOOLS (DevToolsProperties) don't let this settings sneak into production! # disabling tls makes this example a little easier. # SPRING BOOT // EMBEDDED SERVER CONFIGURATION (ServerProperties) # somehow this isn't set by devtools, but needed to get changes delivered on some resources like css (without restarting the application) # SPRING BOOT // SPRING RESOURCES HANDLING (ResourceProperties) Configure the application and the embedded tomcat (application.properties):.If you are using Maven, now your pom.xml might look like (excerpt): ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |