asset-pipeline

Why is assets:precompile so slow on Heroku?

那年仲夏 提交于 2019-12-10 08:29:16
问题 My deployment set up is to have Heroku precompile assets. I want them precompiled so I can send them to a CDN (via asset_sync) and I want that done on Heroku so I don't have any compiled assets in my repo. I set that up using Heroku's guide and that had been working great. I added turbo-sprockets-rails3 for a speed boost. It had all been working fine and then stopped; I can't figure out why. Now when I deploy (without public/assets ) the assets:precompile Rake task times out on Heroku. To see

Heroku doesnt precompile assets for rails4

半腔热情 提交于 2019-12-10 02:58:36
问题 The documentation here says that heroku with pre-compile assets during deployement in Rails4. However , I dont see the precompile assets message. Using thin (1.6.1) Using twitter-bootstrap-rails (2.2.8) Using uglifier (2.3.1) Using will_paginate (3.0.4) Your bundle is complete! It was installed into ./vendor/bundle Bundle completed (1.37s) Cleaning up the bundler cache. -----> Writing config/database.yml to read from DATABASE_URL Detected manifest file, assuming assets were compiled locally -

Why does Rake task enhancement differ between my local environment and when deploying to Heroku Cedar?

為{幸葍}努か 提交于 2019-12-10 02:21:09
问题 I have this in lib/tasks/foo.rake : Rake::Task["assets:precompile"].enhance do print ">>>>>>>> hello from precompile" end Rake::Task["assets:precompile:nondigest"].enhance do print ">>>>>>>> hello from precompile:nondigest" end When I run rake assets:precompile locally, both messages are printed. When I push to heroku, only the nondigest message is printed. However, according to the buildpack, the push is executing the exact same command as I am locally. Why does the enhancement to the base

JS files double-included in rails app

放肆的年华 提交于 2019-12-10 01:57:07
问题 I've got several rails 3.1 apps, and I'm having this problem in all of them. I have a bunch of js files that get included in my application.js file. Here's my application.js: //= require jquery //= require jquery-ui //= require jquery_ujs //= require_self //= require_tree . The problem is that when, development.rb, I have config.assets.debug set to true, all of my javascript files get double-included in the header. Actually, they are not explicitly double-included, but rather they are

Heroku ActionView::Template::Error eof (undefined) in /app/app/assets/javascripts/application.js

那年仲夏 提交于 2019-12-09 20:09:39
问题 I deployed my app to Heroku. I am having this error in the log : ActionView::Template::Error (Unexpected token: eof (undefined) (in /app/app/assets/javascripts/application.js)): : 3: <head> : 4: <title>wkkin</title> : 5: <%= stylesheet_link_tag "application" %> : GET xxx.herokuapp.com/users/2/edit dyno=web.1 queue=0 wait=0ms service=1 292ms status=500 bytes=728 : 6: <%= javascript_include_tag "application" %> : 7: <%= csrf_meta_tags %> : 8: </head> : 9: <body> : app/views/layouts/application

Rails 3.1 asset urls in SCSS files do not seem to be referencing the assets correctly

好久不见. 提交于 2019-12-09 19:40:39
问题 I just upgraded from Rails 3.0 to Rails 3.1. I have a foo.css.scss file that references an image ( /app/assets/images/foo.png ) as follows: .foo { background-image: image-url('foo.png'); } The problem is that my foo.png file is not loaded and I see 404 errors in my logs. The actual css entry that is generated is: background-image: url(/images/foo.png); which is wrong (?) because the image can be found at /assets/foo.png and not at /images/foo.png . Note that I am still working on development

Rails 3 - Asset Pipeline — What does it mean to me?

家住魔仙堡 提交于 2019-12-09 15:59:08
问题 I am struggling to find any real documentation on the new Rails 3 asset pipeline. I know there is a video, but I do not wish to watch an hour video in this format. I watched about 10 minutes and gained no knowledge. So, what do I need to know about Rails 3 asset pipelines? What does this mean to my previous projects, and what does it mean to my future projects? 回答1: It means you will now be able to write css and javascript in separate files using sass and coffeescript if you want and they

Heroku *.js isn't precompiled error

那年仲夏 提交于 2019-12-09 15:10:31
问题 I'm using Rails on Heroku Cedar stack and it's not throwing any issues while compiling the assets but then I get a 500 internal server error: 2012-06-25T23:22:59+00:00 app[web.1]: ActionView::Template::Error (bootstrap-datepicker.js isn't precompiled): Any idea what might be causing this? This is the javascript file I'm including (except I downloaded it locally) https://github.com/eternicode/bootstrap-datepicker/blob/master/js/bootstrap-datepicker.js I'm including it in my application.html

rails 3.1 assets are not available

旧街凉风 提交于 2019-12-09 14:10:28
问题 I started playing around with rails 3.1.rc4 but the first problem I'm having is that the assets are not available. I created a brand new project and in the index page the rails image gives 404. Actually any assets are available. I checked # application.rb # Enable the asset pipeline config.assets.enabled = true And I tried config.assets.paths << "#{Rails.root}/app/assets/images" and also from the shell $ rake rails:update $ rake assets:clean $ rake assets:precompile had no luck, so I

Is there a way to asset pipeline assets to s3 when pushing to heroku?

橙三吉。 提交于 2019-12-09 13:41:58
问题 Is there an easy way to you this with the asset pipeline and deploying to heroku / s3? I would like my local rails app to use image/css/js locally as per normal. And when you pre-compile, is there an easy way for the production app to serve it's assets from s3 (while dev assets are local). And also when you pre-compile / deploy to heroku, the newly compiled assets are sent up to s3 automatically? This is so the developer (me :D ) does not have to keep manually updating s3 with the new