bootstrap nav can't right align ul

I’m trying to right align a

    in my navbar but it doesn’t right align, it’s left aligned <% blog_logo=@blog.pictures.where('designation=?', 'blog_logo').first %>

    <%= @blog.title %>

    <ul class = "nav navbar-nav navbar-right">
            <% if user_signed_in? %>
                  <li class="nav-item dropdown">
                      <a href = "#" class = "dropdown-toggle" data-toggle = "dropdown">
                          <%= current_user.name %>
                      </a>
                    <div class="dropdown-menu" aria-labelledby="navbarDropdown">
                          <%= link_to (t 'main_site'), "http://www.#{request.domain}" %>
                          <%= link_to (t 'sign_out'), destroy_user_session_path, method: :delete %>
                    </div>
                   </li>
                  <li class="nav-item">
                  </li>
            <% else %>
                  <li class="nav-item">
                    <%= link_to (t 'sign_in'), new_user_session_path %>
                  </li>
            <% end %>
            <% if admin_signed_in? %>
                     <li><%= link_to current_admin.name, administration_path,  class: "nav-item" %>
            <% end %>
    </ul>