asset-pipeline

Shopify app - how to include assets using an app-proxy with ruby on rails

六月ゝ 毕业季﹏ 提交于 2020-01-25 07:23:05
问题 I'm building a shopify app-proxy using ruby on rails. i’m using the shopify_app gem. in my controller actions i have the following set: render layout: false, content_type: ‘application/liquid’ ,so that the app is embedded within the shop’s layout/theme.liquid. my question is how do i then pull assets into the app? I’ve tried including them manually into the template files using: <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %> <%= javascript_include

Capistrano deploy: “Did not recognize your adapter specification” during assets:precompile

邮差的信 提交于 2020-01-21 14:36:28
问题 I'm getting this error and I think it's coming from this line of code in the multi_json gem but I'm not sleuthy enough to know why it's being triggered?!? Everything works fine in development and test but the deploy:assets:update_asset_mtimes task fails on cap deploy:migrations Any tips as to why this might be happening? multi_json has rev'd since last deploy so may try rolling back to previous version but would like to know why it's failing... Gory details: $ cap deploy:migrations ... * 2013

Capistrano deploy: “Did not recognize your adapter specification” during assets:precompile

怎甘沉沦 提交于 2020-01-21 14:36:08
问题 I'm getting this error and I think it's coming from this line of code in the multi_json gem but I'm not sleuthy enough to know why it's being triggered?!? Everything works fine in development and test but the deploy:assets:update_asset_mtimes task fails on cap deploy:migrations Any tips as to why this might be happening? multi_json has rev'd since last deploy so may try rolling back to previous version but would like to know why it's failing... Gory details: $ cap deploy:migrations ... * 2013

Rendering a partial in assets

百般思念 提交于 2020-01-21 03:15:28
问题 I'm using Ruby on Rails 3.1 and I'm wondering how I could render a partial in a javascript asset. What I'm aiming at: # in /app/assets/javascript/cart.js.coffee.erb $('a.add_sth').click -> $('.random_container').append('<%= render partial: 'way/to/partial' %>') This causes a NoMethodError: undefined method `render' for #<#<Class:0x007fc54584c6e8>:0x007fc5474cd470> If I write <%= 2+3 %> instead it works fine, btw. I think the problem is that the asset pipeline is independent from the default

Custom fonts in rails 5 app and Heroku

删除回忆录丶 提交于 2020-01-16 16:26:21
问题 can you please instruct me on how to add custom fonts to my rails 5 application? i've added my custom fonts files to fonts folder in app/assets. i went on to use the @fontface and font-url in .scss , but my fonts wont take effect after before and[enter image description here pushing to heroku. enter image description here 回答1: I suggest you go modify your application.html and add the fonts there. I don't know what you are trying to do but adding a simple <link href="fonts.googleapis.com/css

Custom fonts in rails 5 app and Heroku

醉酒当歌 提交于 2020-01-16 16:26:00
问题 can you please instruct me on how to add custom fonts to my rails 5 application? i've added my custom fonts files to fonts folder in app/assets. i went on to use the @fontface and font-url in .scss , but my fonts wont take effect after before and[enter image description here pushing to heroku. enter image description here 回答1: I suggest you go modify your application.html and add the fonts there. I don't know what you are trying to do but adding a simple <link href="fonts.googleapis.com/css

jQuery is included twice in Rails application on Heroku

限于喜欢 提交于 2020-01-15 11:42:30
问题 My question is similar to some other questions here which still didn't provide an answer for my situation I am including jQuery gem in my app in Gemfile: gem 'jquery-rails' And in application.js: //= require jquery //= require jquery-ui //= require jquery_ujs ... //= require_tree . My development.rb has # Do not compress assets config.assets.compress = false # Expands the lines which load the assets config.assets.debug = true My assets are not precompiled, there is no public/assets.

jQuery is included twice in Rails application on Heroku

家住魔仙堡 提交于 2020-01-15 11:42:15
问题 My question is similar to some other questions here which still didn't provide an answer for my situation I am including jQuery gem in my app in Gemfile: gem 'jquery-rails' And in application.js: //= require jquery //= require jquery-ui //= require jquery_ujs ... //= require_tree . My development.rb has # Do not compress assets config.assets.compress = false # Expands the lines which load the assets config.assets.debug = true My assets are not precompiled, there is no public/assets.

Rails app not loading assets on elastic beanstalk aws

狂风中的少年 提交于 2020-01-14 14:46:10
问题 For context, I essentially followed this guide to get my rails app set up: https://medium.com/@jatescher/how-to-set-up-a-rails-4-2-app-on-aws-with-elastic-beanstalk-and-postgresql-3f9f29c046e2 My app is now running on AWS: http://ems-heroes-dev.elasticbeanstalk.com/ 64bit Amazon Linux 2015.03 v2.0.1 running Ruby 2.2 (Puma) However, I can't get any of my assets to load. Here is my config/environments/production.rb: EmsHeroes::Application.configure do config.cache_classes = true config.eager

Static image assets in rails app not displaying on Heroku production

你离开我真会死。 提交于 2020-01-14 13:39:09
问题 I tried pre-compiling my images before deployment using the command: $ RAILS_ENV=production bin/rake assets:precompile I am using image_tag 's in my templates that work in development. Update: config.serve_static_files is said to default to true in dev, but then is turned off in production because the assets should be provided via your web server. I currently am just using the free tier on heroku and am still running webrick, so I have this set to true, but no luck. Update 2: When I set