Jump to content

The ultimate community for Ruby on Rails developers.


Photo

<img> showing as broken links in RubyMine 6

ruby on rails rubymine6 img bootstrap3

  • Please log in to reply
4 replies to this topic

#1 Railz4Ruby2022

Railz4Ruby2022

    Dispatcher

  • Members
  • 36 posts

Posted 17 August 2014 - 07:47 PM

I'm unable to move forward with my project due to this bug. I can't embed the log into the bootstrap 3 navbar nor use images within my normal static html. PLEASE HELP.

 

Screenshot (170).jpg



#2 Ohm

Ohm

    Driver

  • Moderators
  • 469 posts
  • LocationCopenhagen

Posted 17 August 2014 - 08:12 PM

What have you tried? What's the code used to generate this view? What's the generated source?


Blog: http://ohm.sh | Twitter: @madsohm | Work: Lokalebasen.dk


#3 Railz4Ruby2022

Railz4Ruby2022

    Dispatcher

  • Members
  • 36 posts

Posted 17 August 2014 - 08:23 PM

 <div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
    <div class="container">
      <div class="navbar-header">
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
        <a class="navbar-brand brand" style="float: left; margin-top: 10px;" href="#"> <img src="rflogo.png"/></a>
    </div>
      <div class="navbar-collapse collapse">
        <ul class="nav navbar-nav" style="padding-left: 11px; padding-top: 7px; font-size: 14px; margin-top: 3px;">
          <li class="<%=is_active('home')%>"><%= link_to "Home", "index" %></li>
          <li class="<%=is_active('services')%>"><%= link_to "Services", "services" %></li>
          <li class="<%=is_active('contact')%>"><%= link_to "Contact Us", "contact" %></li>
        </ul>
      </div>
    </div>
  </div>

 

All photos are in the images folder. I'm using the latest RubyMine 6.3



#4 Ohm

Ohm

    Driver

  • Moderators
  • 469 posts
  • LocationCopenhagen

Posted 17 August 2014 - 08:25 PM   Best Answer

And here is your problem:

<img src="rflogo.png"/>

You really shouldn't be addressing the images like this, but rather use the image_tag helper.

 

Instead do this:

<%= image_tag 'rflogo.png' %>

Blog: http://ohm.sh | Twitter: @madsohm | Work: Lokalebasen.dk


#5 Railz4Ruby2022

Railz4Ruby2022

    Dispatcher

  • Members
  • 36 posts

Posted 17 August 2014 - 08:33 PM

Thank you!. It's working.







Also tagged with one or more of these keywords: ruby on rails, rubymine6, img, bootstrap3

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users