Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>First, you should probably move the Bootstrap source files to their appropriate locations in the assets folder in your Rails app - that is, CSS files in the <code>stylesheets</code> folder, JS in <code>javascripts</code>, and images in <code>images</code>.</p> <p>As mentioned already, you'll need to change paths to images in Bootstrap's CSS. However, you'll need to make use of Rails' asset path helpers if you plan on using your app in production.</p> <p>For example, <code>background-image: url('../images/glyphicons-halflings.png');</code> is absolutely incorrect when using the asset pipeline. This will work fine in development, but as soon as you pre-compile assets for a production environment things won't work - Rails appends fingerprints to asset file names for caching purposes, which makes the URL above incorrect.</p> <p>The correct way to code paths in your assets is outlined in the <a href="http://guides.rubyonrails.org/v3.1.0/asset_pipeline.html#coding-links-to-assets" rel="nofollow">Rails Guide for the Asset Pipeline</a>. If you're using CSS only, you should add the <code>.erb</code> extension to your filename (to get <code>bootstrap.css.erb</code>) and do something like this:</p> <pre><code>background-image: url(&lt;%= asset_path 'glyphicons-halflings.png' %&gt;); </code></pre> <p>If you are using SASS/SCSS, you can also use the built-in <code>asset-path</code> or <code>image-path</code> helpers. Again, this is mentioned in the guide I linked to above.</p> <p>In the end, you probably should be using a gem, as this work will already be done for you. But, if you must, this should work well enough. Of course, if you ever want to update Bootstrap, you'll have to do this again.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload