fontawesome + rails 4.0.1 not working <p>I am using fontawesome 3.2.1 and bootstrap 3.0.0 in my rails 4.0.1 project. All my assets are located in vendor/assets. </p> <p>the problem is that my fontawesome is working in development mode when when i compile my assets(production env) and run the server in production env, its not able to load fontawesome. the errors are as</p> <pre><code>Started GET "/assets/fontawesome-webfont.svg" for 127.0.0.1 at 2014-01-08 11:48:55 +0530 ActionController::RoutingError (No route matches [GET] "/assets/fontawesome-webfont.svg"): actionpack (4.0.1) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call' actionpack (4.0.1) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call' </code></pre> <p>the assets are as</p> <pre><code>$ls vendor/assets/ =&gt; fonts images javascripts stylesheets $ls vendor/assets/* =&gt; vendor/assets/fonts: FontAwesome.otf fontawesome-webfont.ttf glyphicons-halflings- regular.svg fontawesome-webfont.eot fontawesome-webfont.woff glyphicons-halflings- regular.ttf fontawesome-webfont.svg glyphicons-halflings-regular.eot glyphicons-halflings-regular.woff vendor/assets/images: bg_direction_nav.png bxslider search-icon.jpg vendor/assets/javascripts: bootstrap bxslider fancybox others revolution_slider vendor/assets/stylesheets: bootstrap bxslider fancybox font_awesome others revolution_slider $ls vendor/assets/stylesheets/bootstrap/ =&gt; bootstrap.min.css $ls vendor/assets/stylesheets/font_awesome/ =&gt; font-awesome.css </code></pre> <p>my application.css is as</p> <pre><code>$cat app/assets/stylesheets/application.css /* * This is a manifest file that'll be compiled into application.css, which will include all the files * listed below. * * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. * * You're free to add application-wide styles to this file and they'll appear at the top of the * compiled file, but it's generally better to create a new file per style scope. * *= require bootstrap/bootstrap.min.css *= require others/theme.css *= require others/bootstrap-reset.css *= require font_awesome/font-awesome.css *= require bxslider/jquery.bxslider.css *= require fancybox/jquery.fancybox.css *= require revolution_slider/rs-style.css *= require revolution_slider/settings.css *= require others/flexslider.css *= require others/style.css *= require others/style-responsive.css *= require_self */ </code></pre> <p>fontawesome are loaded in font-awesome.css as</p> <pre><code>@font-face { font-family: 'FontAwesome'; src: url('/assets/fontawesome-webfont.eot?v=3.2.1'); src: url('/assets/fontawesome-webfont.eot?#iefix&amp;v=3.2.1') format('embedded-opentype'), url('/assets/fontawesome-webfont.woff?v=3.2.1') format('woff'), url('/assets/fontawesome-webfont.ttf?v=3.2.1') format('truetype'), url('/assets/fontawesome-webfont.svg#fontawesomeregular?v=3.2.1') format('svg'); font-weight: normal; font-style: normal; } </code></pre> <p>glyphicons are loaded in bootstrap.min.css as</p> <pre><code>@font-face{ font-family:'Glyphicons Halflings'; src:url('/assets/glyphicons-halflings-regular.eot'); src:url('/assets/glyphicons-halflings-regular.eot?#iefix') format('embedded-Opentype'), url('/assets/glyphicons-halflings-regular.woff') format('woff'),url('/assets/glyphicons-halflings-regular.ttf') format('truetype'),url('/assets/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg')} </code></pre> <p>i did try couple of solution like prepending 'font' or 'assets' to 'url' but none worked. </p> <p>--UPDATE</p> <p>contents of config/application.rb</p> <pre><code>config.assets.enabled = true config.assets.version = '1.0' config.assets.paths += ["#{config.root}/vendor/assets/fonts", "#config.root}/app/assets/images/**", "#{config.root}/vendor/assets/images"] config.assets.precompile += %w(*.png *.jpg *.jpeg *.gif *.eot *.svg *.ttf *.otf *.woff vendor/assets/stylesheets/**/* vendor/assets/fonts/*) ["#{config.root}/vendor/assets/javascripts", "#config.root}/vendor/assets/stylesheets"].each do |d| config.assets.precompile += Dir.glob("#{d}/*").map{|f| "#{f.gsub(d + '/', '')}/**/*" if File.directory?(f)}.compact </code></pre>