I have encountered a similar issue to this, but I haven't been able to resolve it. I am currently working on my first application using rails and bootstrap. I've successfully created a navbar with a name and two buttons (you can view the screenshot here). However, I am facing difficulty adding a logo to the left of the "navbar." The image is not loading as expected when I run the code locally.
What I have attempted:
Initially, I tried directly referencing the path of the image in my code, but that didn't work.
Next, I added the path to my logo image in app/assets/images as logo.png and then used the following code:
<nav class="navbar navbar-light bg-light">
<a class="navbar-brand" href="http://localhost:3000/posts">
<%= image_tag 'logo.png' %>
Navbar
</a>
<form class="form-inline">
<button type="button" class="btn btn-light">Sign Up!</button>
<div style="padding-left: 10px;">
<button type="button" class="btn btn-dark">Login</button>
</div>
</form>
</nav>
If anyone could offer guidance or assistance, I would be extremely grateful!
Thank you in advance.