asset-sync

Rails 4.0.3 generating incorrect asset paths with asset_sync

爷,独闯天下 提交于 2019-12-30 06:28:05
问题 I have used the asset_sync gem many times before with great success, but using it in a Rails 4.0.3 project seems to have caused a problem. The assets are uploaded, hashed and gzipped to the target directory (I just went with the default 'assets'), but when running the application in staging/production environment the paths are incorrect. They take on the form: S3_DOMAIN.com/stylesheets/application.css Instead of: S3_DOMAIN.com/assets/application-HASH.css Has anyone else experienced this

Rails Image assets in AngularJS Directive and template

我的梦境 提交于 2019-12-08 07:58:21
问题 I have Rails 4 Application with AngularJS using these gems: gem 'angularjs-rails' gem 'angular-rails-templates' gem 'asset_sync' It works great with a template like this: <img ng-controller='LikePostController' ng-dblclick='like(post);' ng-src='{{post.photo.standard}}' class='lazy post_photo pt_animate_heart' id='post_{{post.id}}_image' /> The Image render correctly. However in my other js petto.directive('ptAnimateHeart', ['Helper', function(Helper){ linkFunc = function(scope, element,

Rails 4 static assets in public/ or app/assets/

你说的曾经没有我的故事 提交于 2019-12-04 07:55:31
问题 Sorry if this is a lengthy buildup to a simple question, but I wanted to get my thoughts clear. I've used Rails 4 on a couple projects now and I've been using image_tag('/assets/image.png') to get around the changes to how asset path helpers work in Rails 4. That is until today when I decided to learn more about the changes and found this first change note in sprockets-rails. I've also noted that the ASSET_PUBLIC_DIRECTORIES in /actionview/lib/action_view/helpers/asset_url_helper.rb#L170 in

Rails 4 static assets in public/ or app/assets/

守給你的承諾、 提交于 2019-12-02 18:14:23
Sorry if this is a lengthy buildup to a simple question, but I wanted to get my thoughts clear. I've used Rails 4 on a couple projects now and I've been using image_tag('/assets/image.png') to get around the changes to how asset path helpers work in Rails 4. That is until today when I decided to learn more about the changes and found this first change note in sprockets-rails . I've also noted that the ASSET_PUBLIC_DIRECTORIES in /actionview/lib/action_view/helpers/asset_url_helper.rb#L170 in Rails helpers only point to public folders. It became pretty obvious to me that if you are accessing

Rails 4.0.3 generating incorrect asset paths with asset_sync

眉间皱痕 提交于 2019-11-30 20:10:07
I have used the asset_sync gem many times before with great success, but using it in a Rails 4.0.3 project seems to have caused a problem. The assets are uploaded, hashed and gzipped to the target directory (I just went with the default 'assets'), but when running the application in staging/production environment the paths are incorrect. They take on the form: S3_DOMAIN.com/stylesheets/application.css Instead of: S3_DOMAIN.com/assets/application-HASH.css Has anyone else experienced this problem? The only way I have found to reverse this behaviour is to set config.assets.compile to true, but