asset-pipeline

Rails 3.1 Asset Pipeline - turn off image asset fingerprinting on Heroku?

半城伤御伤魂 提交于 2019-12-23 15:33:38
问题 Because a jQuery plugin I use in my application has direct references to images, I'm trying to turn off asset fingerprinting. So I set config.assets.digest = false in my production.rb, but now none of my image references work at all. /assets/foo.png just returns a blank response. I really don't want to alter the jQuery plugin's code and add erb image helpers, but I'm not sure what else to do. And frankly, the asset fingerprinting for images seems to be much more trouble than it's worth. Does

Using twitter bootstrap with rails assets pipeline and less

假装没事ソ 提交于 2019-12-23 15:33:14
问题 How to integrate properly twitter-bootstrap-rails gem with the assets pipeline? I've followed installations steps and currently I have this application.css *= require_self *= require bootstrap_and_overrides And then in bootstrap_and_overrides.css.less I'm importing other controllers stylesheets in order to make them work with my variables defined in the overrides file and to be able to use bootstrap mixins within the controller specific stylesheets in <controller-name>.css.less files.

How to seed the path to an image?

£可爱£侵袭症+ 提交于 2019-12-23 10:14:43
问题 Organization and Image have a 1-to-1 relationship . Image has a column called filename , which stores the path to a file. I have such a file included in the asset pipeling: app/assets/other/image.jpg . How can I include the path to this file when seeding? I have tried in my seeds file: @organization = ... @organization.image.create!(filename: File.open('app/assets/other/image.jpg')) # I also tried: # @organization.image.create!(filename: 'app/assets/other/image.jpg') Both generate the error:

Including assets in subdirectories with config.assets.precompile in Rails

淺唱寂寞╮ 提交于 2019-12-23 10:10:03
问题 I've got a Rails 3.1.3 application running on Heroku, utilizing S3 for asset hosting via asset_sync . Included in my app/assets/css directory is a subdirectory with two files: main.css.scss and categories.css.scss . I have the following line in my production.rb : config.assets.precompile += [ 'admin/main.css.scss', 'admin/categories.css.scss', 'print.css', 'products.css.scss', 'services.css.scss' ] When I push to Heroku, all my assets are precompiled and uploaded with the exception of those

Capistrano deploy/assets on Rails 3.1 fails

南笙酒味 提交于 2019-12-23 10:08:36
问题 I added the this line load 'deploy/assets' to my Capfile to deploy assets with Rails 3.1. Capistrano gets to this line * executing "cd /home/deploy/armonia/stage/releases/20110928021521 && bundle exec rake RAILS_ENV=stage RAILS_GROUPS=assets assets:precompile" then fails with Could not find multi_json-1.0.3 in any of the sources which is weird because the gem is found when I run bundle show multi_json on my deployment server. What causes this? 回答1: Fixed this by updating to bundler to 1.0.18,

Asset Pipeline not finding JS file

天涯浪子 提交于 2019-12-23 07:00:13
问题 My Rails.application.config.assets.paths contains the directory for an asset I'd like (autocomplete): - /Users/kiranb/application/app/assets/images - /Users/kiranb/application/app/assets/javascripts - /Users/kiranb/application/app/assets/stylesheets - /Users/kiranb/application/vendor/assets/javascripts - /Users/kiranb/application/vendor/assets/stylesheets - /Users/kiranb/.rvm/gems/ruby-1.9.2-p290@application/gems/rails3-jquery-autocomplete-1.0.5/lib/assets/javascripts - /Users/kiranb/.rvm

Asset Pipeline not finding JS file

别等时光非礼了梦想. 提交于 2019-12-23 07:00:04
问题 My Rails.application.config.assets.paths contains the directory for an asset I'd like (autocomplete): - /Users/kiranb/application/app/assets/images - /Users/kiranb/application/app/assets/javascripts - /Users/kiranb/application/app/assets/stylesheets - /Users/kiranb/application/vendor/assets/javascripts - /Users/kiranb/application/vendor/assets/stylesheets - /Users/kiranb/.rvm/gems/ruby-1.9.2-p290@application/gems/rails3-jquery-autocomplete-1.0.5/lib/assets/javascripts - /Users/kiranb/.rvm

Why are js files in my rails asset pipeline not being compiled?

情到浓时终转凉″ 提交于 2019-12-23 06:48:17
问题 I am experiencing a problem similar to this question: Rails asset pipeline not including required files in application.js manifest However, that question was closed, so I am re-asking it, but with the specifics of my situation.) Environment: Ruby 2.0.0, Rails 3.2.8, OSX 10.7.5, Chrome 28.0.1500.95 The main problem I am experiencing Files placed in "/app/assets/javascripts" do not appear to be compiling to or appearing in "/public/assets" An Example If I place a file such as this test.js file

The asset “logo.png” is not present in the asset pipeline

杀马特。学长 韩版系。学妹 提交于 2019-12-23 06:47:39
问题 In Rails 5.1.3 I change logo file in app/assets/images Then error don't know what to fix. Any one know ? The asset "logo.png" is not present in the asset pipeline. Already try restart rails, rails clean, rails or rails assets:precompile Here my config/initializers/assets.rb # Be sure to restart your server when you modify this file. # Version of your assets, change this if you want to expire all your assets. Rails.application.config.assets.version = '1.0' # Add additional assets to the asset

Rails 3.2 CSS not being precompiled

谁都会走 提交于 2019-12-23 04:51:33
问题 I have a Rails app and its throwing error in the browser We're sorry, but something went wrong. . I went on to checks on the logs, and this is what i get: Compiled visitor.js (0ms) (pid 15667) Compiled application.js (3574ms) (pid 15667) Compiled visitor.css (73ms) (pid 15667) Compiled aboutvideos.css (1ms) (pid 15667) Compiled admin.css (1ms) (pid 15667) Compiled bootstrap_and_overrides.css (802ms) (pid 15667) Compiled jquery.fancybox.css (0ms) (pid 15667) Compiled scaffolds.css (8ms) (pid