Skip to main content

Questions tagged [asset-pipeline]

The asset pipeline provides a framework to concatenate and minify or compress JavaScript and CSS assets. It also adds the ability to write these assets in other languages and pre-processors such as CoffeeScript, Sass and ERB.

0 votes
0 answers
25 views

Rails 6 Heroku asset compilation

We're running a Rails 6.1 app on Heroku using Sprockets. For the longest time we've had config.assets.compile = true on our staging and production environments, but Heroku complains and suggests that ...
Tony Beninate's user avatar
1 vote
1 answer
39 views

How to include all my JS files using Asset Pipeline?

I am building a website with Ruby on Rails, and I encountered a problem with including my javascript files into project. I have a script named init.js in app/javascript directory, and I want it to be ...
  mozhayka's user avatar
1 vote
1 answer
26 views

Sprockets::Rails::Helper::AssetNotPrecompiledError in MyEngine::Frontend#new

Asset hero_banner.jpg was not declared to be precompiled in production. Declare links to your assets in app/assets/config/manifest.js. //= link hero_banner.jpg Rails.application.config.assets.paths &...
Krapi Rastogi's user avatar
0 votes
1 answer
67 views

Rails 7 asset pipeline and font variables

A habit is to define a set of root variables to establish consistency across an application, i.e. :root { --main-font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; --...
Jerome's user avatar
  • 6,011
0 votes
0 answers
36 views

font-awesome-pro-sass gem's fa-regular-400 and fa-solid-900 files are larger in size ( ~400kb)

I am using font-awesome-pro-sass gem ( v6.5.1 ) with my rails application following the docs. Noticed that the font files that are being fetched by the browser are large, and are taking considerable ...
Vishwam Chepuri's user avatar
0 votes
1 answer
39 views

How to set Normal Texture Scale Value as a Vector ([1, -1])

I'm using the gltf-json crate for this job. I want to be able to change the normal texture scale to [1, -1] to an asset that comes with [1, 1], however, the scale field is of type f32. pub struct ...
Sergio's user avatar
  • 11
1 vote
0 answers
57 views

How to prevent asset compilation for certain assets folders in Rails 7 engine that uses sprockets-rails with the asset pipeline

I am self hosting Tinymce in a Rails 7 engine that uses sprockets_rails I have downloaded the tinymce code from the tinymce website and added to an app/assets/tinymce folder in the engine I have the ...
jamesc's user avatar
  • 12.8k
0 votes
2 answers
196 views

Sprockets::FileNotFound: couldn't find file 'jquery-1.7' with type 'application/javascript' (Sprockets::FileNotFound)

I have upgraded an exsisting rails version 6.1 to 7.1.3 where i have used sprocket-rails gem to work out the exsisting asset piple. after running the command bundle exec rake assets:precompile, i am ...
Rabeya Khatun Muna's user avatar
1 vote
1 answer
103 views

Ruby on Rails - pass a `path` parameter to with asset host

I'm trying to get rails to load assets from a different domain with an additional path. For instance rails is hosted on rails-app.domain.com/ assets are hosted on rails-assets.domain.com/prefix/some/...
twoLeftFeet's user avatar
1 vote
1 answer
269 views

Sprockets 4 not loading javascript assets from Rails 7 engine

TL;DR. Sprockets 4 isn't loading javascript assets properly from a Rails 7 engine. Project Overview I am working on a Rails project, which is comprised of a parent-app and engine-app. Both have ...
John's user avatar
  • 9,388
0 votes
0 answers
46 views

HOWTO link_directory directive to link CSS AND SCSS files with Sprockets 4

I'm working on a Ruby on Rails 7 project using Sprockets 4, and it has both .scss and .css files in app/assets/stylesheets/. The documentation for the link_directory directive says this: ...
John's user avatar
  • 9,388
1 vote
1 answer
34 views

Production environment not referencing fingerprinted asssets

An asset is called in a view as <%= image_tag('union_15') %> In development mode the HTML generated is correct and renders as expected: <img src="/assets/union_15-...
Jerome's user avatar
  • 6,011
0 votes
1 answer
126 views

How to load an Active Storage image into a canvas with a Stimulus controller?

I would like to load the images that users submit into the Stimulus controller so that I can use it within my Three JS (3D JavaScript Library) code. How can I achieve this? I’ve already tried so many ...
Inês Lucas's user avatar
0 votes
0 answers
34 views

Trying to load Angular from Rails - "cannot use import statement outside a module"

I'm on a team that maintains a rather creaky old web application. The backend is in Rails; the frontend is based on Rails but in practice is mostly AngularJS. The project I'm trying to do now is to ...
Luke Bretscher's user avatar
0 votes
0 answers
12 views

Assets links inside css are messed up in heroku staging app but not in review apps that use the same config

I have a rails app deployed to heroku that is deployed to a subdirectory in the following way. In config.ru, we have map '/diagnostics' do run Rails.application end And in config/application.rb ...
Ravi Bhusal's user avatar

15 30 50 per page
1
2 3 4 5
238