title: How to add external assets file in rails 4 project?
body: <p>I have an external <code>css</code>, <code>javascript</code> and <code>Images</code> files in a separate project and wanted to include in my new <code>rails</code> project. Here is my structure of folders:</p>
  
  <pre><code>external-assets/js/ &lt;Files&gt;
  external-assets/js/plugin/&lt;Files&gt;
  external-assets/css/&lt;Files&gt;
  external-assets/css/plugins/&lt;Files&gt;
  external-assets/images/&lt;some Folders&gt;/&lt;Files&gt;
  external-assets/images/&lt;Files&gt;
  </code></pre>
  
  <p>So, I copied <code>external-assets/js</code> folder to <code>app/assets/javascript</code> and for <code>css</code> I copied <code>external-assets/css</code> to <code>app/assets/stylesheets</code>.</p>
  
  <p>and replace <code>&lt;link rel="icon" href="external-assets/css/plugins/bootstrap.min.css"&gt;</code> to <code>&lt;%= stylesheet_link_tag "/plugins/bootstrap.min.css" %&gt;</code> in my <code>html.erb</code> file. I followed the same thing for other <code>css</code> files and <code>js</code> files. When I start the server I got this error:</p>
  
  <pre><code>Asset filtered out and will not be served: add `Rails.application.config.assets.precompile += %w( style.css )` to `config/initializers/assets.rb` and restart your server
  </code></pre>
  
  <p>After searching on <code>SO post</code> like: <a href="https://stackoverflow.com/questions/22970573/asset-filtered-out-and-will-not-be-served-add-config-assets-precompile">Asset filtered out and will not be served: add `config.assets.precompile</a> and 
  <a href="https://stackoverflow.com/questions/23673036/asset-filtered-out-and-will-not-be-served">Asset filtered out and will not be served</a>. I need to mention my all <code>js</code> and <code>css</code> files to <code>config.assets.precompile</code>.</p>
  
  <h1>Questions</h1>
  
  <p>1) Do I really need to mention all of <code>js</code>, <code>css</code> and <code>images</code> file? I know the reason but I do have a lot of assets files.</p>
  
  <p>2) What about If I put them in <code>public</code> folder? Is it good approach? </p>
  
  <p>3) There is <code>stylesheet_link_tag</code> for css , <code>javascript_link_tag</code> for js. What about Images?</p>