asset-pipeline

Font awesome icons not showing using font-awesome-rails gem

陌路散爱 提交于 2019-12-10 18:03:51
问题 I can't seem to find an answer that works for me. The icon shows up as a box:  I'm using: font-awesome-rails (4.6.2.0) rails (4.2.3) I imported font-awesome-rails in my application.scss file using: @import "font-awesome"; and here is what I wrote for the view: <i class="quote-left fa fa-quote-left"></i> I've tried including it before and after bootstrap. I also tried manually adding the font folder to the pipeline in application.rb config.assets.paths << Rails.root.join("app", "assets",

Rails 4.1.6 Asset pipeline not loading assets and javascript in production

允我心安 提交于 2019-12-10 17:29:53
问题 I have a ruby on rails web server that I am trying to deploy in production. I am having trouble getting the assets to load in production: .css, .js, and images (seems to work fine in development, due to ). Here is my production.rb Rails.application.configure do # Code is not reloaded between requests. config.cache_classes = true # Eager load code on boot. This eager loads most of Rails and # your application in memory, allowing both threaded web servers # and those relying on copy on write to

Asset Precompile on the development machine before capistrano deployment

心已入冬 提交于 2019-12-10 17:18:06
问题 I want the asset precompile to happen on my dev machine beofore the code is packed (tar ball'ed) by capistrano and have the precompiled assets already included in the final deployment package. When I try the inbuilt capistrano recipe thats in load 'deploy/assets' it runs rake RAILS_GROUPS=assets assets:precompile on the server. The reason I am looking for this because at the moment the precompile is taking too long on my EC2 micro-instance (and also at times just hangs), It would great if

Best practices for debugging the Rails asset pipeline

不羁岁月 提交于 2019-12-10 16:23:52
问题 I'm working with a Rails 3 app, bootstrap-sass , and the asset pipeline, and I'm looking for some ideas on how to debug asset pipelines woes. When working in development, and compiling on the fly (i.e. including from lots of compiled css files), my app looks exactly how I expect it to. However when I use the asset pipeline to to compile assets into a single file, to test how it will behave in production, I think validation errors in the concatenated file application.css are causing browsers

Copy of environments/development asset path cannot find jquery-ui-rails in gems directories

房东的猫 提交于 2019-12-10 13:13:46
问题 I copied config/environments/development.rb to config/environments/ci.rb. When I run with RAILS_ENV=development, the asset search path includes my gem vendor directories, in particular for jquery-ui-rails. However, when I run with RAILS_ENV=ci it does not. From the console, Rails.application.config.assets.paths evaluates to the following with development irb(main):002:0> Rails.application.config.assets.paths => ["/var/www/ci/conflux/app/assets/images", "/var/www/ci/conflux/app/assets

Rails asset pipeline: how to create custom manifest file

丶灬走出姿态 提交于 2019-12-10 12:35:51
问题 I am trying to make a custom manifest javascript file seperate from application.js. I've take the code from application.js and pasted it into a new file I've called "other_manifest.js" and placed in the assets/javascrips directory. Here is the code: // This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets

jQuery Datepicker doesn't work on Heroku/Rails 3.1

旧城冷巷雨未停 提交于 2019-12-10 11:31:50
问题 Hello everybody out there, I'm very frustrated with the jQuery Datepicker and Rails 3.1. It runs perfectly in my develoment environment, but it doesn't work in the production environment on Heroku/Cedar. It simply doesn't pop-up when I select my date field. So here's what I did so far: I put the jquery files into \apps\assets\javascript : jquery-1.7.1.min.js jquery-ui-1.8.17.custom.min.js jquery.ui.datepicker-de.js and I added them among other files to my production.rb : # Precompile

Conditional javascript require in the asset pipeline

。_饼干妹妹 提交于 2019-12-10 10:57:34
问题 I'm struggling with the asset pipeline. I'm loading dojo from Google CDN putting this in my template: = javascript_include_tag 'http://ajax.googleapis.com/ajax/libs/dojo/1.6.1/dojo/dojo.xd.js', :'data-dojo-config' => %Q(dojoBlankHtmlUrl:'/blank.html', baseUrl: 'assets/', modulePaths: {custom: 'javascripts/modules'}) I just want a fallback to a local version if running locally or if the CDN is down. I thought of doing this: script typeof(dojo) === "undefined" && document.write(unescape('

How do I reference a static HTML rsource using the Grails Asset plugin?

眉间皱痕 提交于 2019-12-10 09:32:35
问题 I am using Grails 2.4.1 and the Grails Asset Pipeline Plugin version 1.9.7. I have a javascript file (it defines an AngularJS directive) which needs to reference a static HTML file (which will be used as the template for the AngularJS Directive). How do i reference the HTML file within the asset directory? Project Structure: grails-app assets javascripts directives hierarchyviewer.js hierarchyviewer.html Project Structure when using the Angular Template Asset pipeline grails plugin grails-app

Why does rake assets:precompile in development cause problems but not in my production environement

亡梦爱人 提交于 2019-12-10 09:25:15
问题 I have upgraded my app on heroku to a cedar stack so that the asset pipeline works. I have followed the instructions given in heroku's docs by choosing to compile assets locally. This has created a directory public/assets. Everything in production works perfectly(css, js, with no problems). Going back to my development environment seems to cause the js to not function properly. In environments/production.rb config.serve_static_assets = false config.assets.compress = true config.assets.compile