Script tag not injected with Sinatra (link to minimal reproducible example)
Closed this issue · 1 comments
I'm a newbie to Sinatra and this plugin, and I'm having a lot of trouble getting this to work for a very simple app.
I've created a new repo demonstrating how I'm using it and how it's failing, here: https://github.com/smoll/sinatra-livereload-example
In fact, I don't see the <script>
tag being injected into the markup at all:
Any ideas what I'm doing wrong?
Realized what the problem was. Documenting it here in case someone else is dumb like me...
The problem was that I don't ever generate proper markup for the index page, i.e. html, head, body tags. When I created a layout.erb
with the appropriate markup, this plugin injected the script into the head tag as expected.
Sorry for the confusion on my part, excellent plugin!