Skip to main content
Filter by
Sorted by
Tagged with
-1 votes
0 answers
35 views

Rails 7 Deployment to Production locally. Missing stimulus controllers [closed]

Everything is working while in development environment and then I tried deploying this in prod env locally to test things out and got an error. Error log Use Ctrl-C to stop I, \[2024-09-12T15:21:22....
user24720087's user avatar
0 votes
0 answers
20 views

Download pdf in Japanese shows garbled text on production for rails application using Wickedpdf gem, working perfectly fine locally

Here is the issue in the screenshot I have tried multiple things: I have tried to download the Japanese fonts locally on the production server Added this in the pdf layout: <!DOCTYPE html>...
Safi Ullah's user avatar
0 votes
0 answers
31 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
61 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
47 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
90 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,033
0 votes
0 answers
41 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
45 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
72 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
1 vote
2 answers
271 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
131 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
363 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,418
0 votes
0 answers
51 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,418
1 vote
1 answer
37 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,033
0 votes
1 answer
171 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
38 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
2 votes
1 answer
386 views

Rails 5.1.7: Sprockets::Rails::Helper::AssetNotFound

we have a rails 5.1.7 application and all is working fine in the dev environment. but in staging environment or when running server using rails s -e staging, we see this error "Sprockets::Rails::...
opensource-developer's user avatar
1 vote
0 answers
191 views

Importmaps in rails 7

I am new to rails 7 and dont know where to put my custom js files. Now I know the importmaps are used to get third part javascript libraries via cdn's and we include in our application.js file. But ...
Muhammad Ans's user avatar
0 votes
1 answer
403 views

Rails 7 - React application not loading assets from subdirectory

I recently migrated a React-Rails application from rails 6 to 7. Since Webpacker was discontinued, I tried configuring Webpack on the javascript side. The rails application is configured to load from ...
indrapranesh's user avatar
7 votes
2 answers
2k views

Rails 7/StimulusJS relative import: working on dev, but not production

I'm using Rails again after a few years away (last used Rails 4). I have multiple stimulus controllers that reference a file called metric_defaults.js. That file just contains a flat set of ...
PlankTon's user avatar
  • 12.6k
1 vote
1 answer
48 views

Rails asset not precompiled

A page is returning the error AssetNotPrecompiledon a page in a Rails 6.0.3 application. The layout attempts to initialise css variables in a first file, then load the bulk of css classes and finally ...
Jerome's user avatar
  • 6,033
1 vote
1 answer
1k views

Import file as Javascript string

I have a long string that, due to its complex generation process, needs to go to a static file. I'd like to import it as a string variable, akin to: // res.txt The quick brown fox... // code.js ...
SRobertJames's user avatar
  • 9,009
0 votes
0 answers
46 views

Rails 7 asset pipeline missing bits?

In development, the application behaves as expected. However when deploying to production, the log complains about: ActionView::Template::Error (The asset "dfull" is not present in the ...
Jerome's user avatar
  • 6,033
2 votes
1 answer
1k views

Custom JS files in app/assets/javascripts/ break the Stimulus assets pipeline (Rails 7)

I'm trying to add custom JavaScript in a Ruby on Rails 7 project, so: I created the file app/assets/javascripts/application.js containing my custom code. In app/assets/config/manifest.js I added (...
Backo's user avatar
  • 18.8k
0 votes
0 answers
199 views

Addressables not working in smaller Unity build

I'm working on a Unity project where I have implemented the Addressables system. However, I'm facing an issue where sometimes, when I get a player build with a smaller size than the average build, ...
Batuhan Karavelioğulları's user avatar
1 vote
0 answers
101 views

Ruby on Rails 7.0 SyntaxError: Invalid character when attempting to load assets

When I attempt to use a tag to import a file from assets, whether it be through image_tag, stylesheet_link_tag or javascript_include_tag, I get "SyntaxError: Invalid character", which points ...
Aldo's user avatar
  • 41
0 votes
1 answer
262 views

why won't javascript won't work (Rails 7 with esbuild)

I'm pretty new to Rails (version 7.0.4.2 with ruby 3.2.0, on an Intel-based Macbook Pro running Monterey 12.6). Here's a minimal example causing me problems: I start a new project by doing rails new ...
Aky's user avatar
  • 1,817
1 vote
0 answers
118 views

Rails 7 with importmap and Stimulus not working on IOS

I'm facing a situation that I'm stuck for some time now. I have an application that I recently updagraded from Rails 6 to Rails 7. Now I want to use Stimulus to replace some VueJS that I have. What I ...
Fernando's user avatar
  • 325
1 vote
0 answers
168 views

Rails 7 SassC Error: Bootstrap not found or unreadable while uploading on Heroku

I am upgrading my app from Rails 6.1 to Rails 7. While testing it on development env., it works fine. But I encouter an issue while uploading it on heroku. Heroku raise this error while precompiling ...
cefsdp's user avatar
  • 25
0 votes
0 answers
34 views

Successfully compiled resources are not displayed in the production environment?

After compiling assets in production, old assets are displayed instead of new assets. Moreover, the compilation was successful and the file with the new assets is present on the server. I tried ...
baim's user avatar
  • 36
0 votes
2 answers
109 views

Understanding Rails config.assets - when assets are not enabled

Hopefully this is a really simple question for someone… If… rails.config.assets.enabled = false …does that mean that rails will ignore any other configuration settings for config.assets? For example, ...
gilesdotcodes's user avatar
2 votes
1 answer
2k views

Access bevy asset right after loading via AssetServer

Is it possible to access a bevy asset right after it was loaded from the AssetServer? I've read actual loading happens in the background but couldn't find in either official documentation or the bevy ...
mpellie's user avatar
  • 23
3 votes
1 answer
386 views

Rails app doesn't load updates to Javascript files until I run rails assets:precompile

I have an old Rails app that I'm trying to upgrade to Rails 7. Somewhere in the upgrade process I broke the asset pipeline. When I make updates to a javascript file, the changes aren't visible unless ...
Fred Willmore's user avatar
1 vote
0 answers
148 views

Rails JS assets not present in production (Heroku)

Building a Rails 7 app, which works fine in development. When uploading to Heroku, JS doesn't work and no JS is in the asset folder and I get the following errors. CSS works fine: 2022-12-31T09:21:44....
Manuel's user avatar
  • 11
0 votes
1 answer
370 views

Use grails-asset-pipeline to compile bootstrap 5 from source

I'm trying to figure out how to compile the latest bootstrap (v5.0.2) from source so I can more easily customize the theme using SASS variables for a grail (v5.2.3) app using the grails asset-pipeline....
Bioman's user avatar
  • 31
3 votes
1 answer
2k views

Rails in production is not finding my assets in the public directory

I have a really weird bug, a few hours after i start rails in production it stops being able to locate my assets. The weirdest thing is that i can "fix" by starting in development and then ...
Melfric's user avatar
  • 31
0 votes
0 answers
623 views

CircleCI + Rails 7 + Yarn + assets:precompile - `yarn: not found`

I am using Circle CI to run RSpec tests on a Rails project. I'm new to CircleCI, so I'm piecing together a build script from examples. My tests are failing because application.css is not in the asset ...
John's user avatar
  • 9,418
2 votes
1 answer
657 views

Rails 7 sharing stimulus controller functions

I'm trying to share stimulus controller functions with other controllers but the files are not being found because of the asset pipeline digest. Parent (app/javascript/controllers/a_shared_controller....
Chris A.'s user avatar
  • 193
0 votes
1 answer
2k views

ActionView::Template::Error ( The asset "application.css" is not present in the asset pipeline. ) in Rails 7

After shifting from webpacker to importmaps in Rails 7. I keep getting this error no matter what I do to resolve it. Following is the output of the error. I, [2022-12-02T11:33:16.828698 #2401] INFO --...
Hamza Awan's user avatar
1 vote
1 answer
791 views

Sprockets::DoubleLinkError: Multiple files with the same output path cannot be linked ("application.js") in Rails 7

Sprockets::DoubleLinkError: Multiple files with the same output path cannot be linked ("application.js") in Rails 7. After compiling assets: Here is my manifest.json: Directory structure:
Abdullah Chatha's user avatar
1 vote
0 answers
213 views

how to refer to a rails image asset in JSX and Rails 7 (esbuild)

Can't figure out how to get an asset path in JSX that is processed byjsbundling-rails/esbuild: <img src={`zone_icons/${zone}.png` }/> I've seen that in the source code of cssbundling-rails ...
pixelearth's user avatar
  • 14.4k
2 votes
1 answer
2k views

Stimulus controllers not getting loaded

I am updated a Rails 6 app to Rails 7 and using importmaps and Leaflet. I am following How do I use Leaflet in Rails 7?. I successfully build a new app and it works fine, but upgrading my old app does ...
Greg's user avatar
  • 2,569
0 votes
1 answer
85 views

Rails Asset Pipeline CSS different on remote than in development

I'm having a small issue where my compiled CSS on my deployed app is ever so slightly different to the compiled CSS locally in Development. Thankfully it's causing one minor problem. I'm using ...
rctneil's user avatar
  • 7,170
0 votes
1 answer
430 views

Rails 7 sprockets-rails, not regenerating application.css

Edit: Is ./app/assets/builds/application.css a product of yarn? Because if it is then I need to rethink this question. I'm looking into it. In upgrading from Rails 6 to 7 and going with gem "...
Greg's user avatar
  • 2,569
1 vote
0 answers
79 views

Adding FullCalendar to React on Rails project causes DoubleLinkError in application.css

I have a React project served using Ruby on Rails 7. It's set up using this tutorial (source code available here); I'm at the part where you add React Router so you can add a second page to the app. I ...
DawnPaladin's user avatar
  • 1,533
3 votes
0 answers
555 views

In Rails 7 with esbuild build, how do I run a script of esbuild fails?

I have this script that runs when running Rails 7 with esbuild build, this is inside package.json in the scripts attribute, it's ran from the Rails procfile: esbuild app/javascript/*.* --bundle --...
CafeHey's user avatar
  • 5,800
1 vote
1 answer
134 views

"allow the origin of the assets in your Rails config file" ? (Heroku to Railway - no styling, images not loading)

along with many others it would seem, I have attempted to shift my hobby apps from Heroku to Railway. I haven’t had tremendous success as both of the apps I’ve transferred (which work fine locally and ...
Dan SimBed's user avatar
0 votes
1 answer
368 views

When I run migration, config.assets is not working in rails 7

I recently upgraded my application from rails 6.1 to rails 7.0.3 and I am facing some issues after that. Following lines are defined in my development.rb file: config.assets.debug = true config.assets....
Dev V's user avatar
  • 125
1 vote
0 answers
125 views

Upgraded to Rails 6.1 and DartSass - now no JS assets are found

I recently upgraded to Dartsass: gem "dartsass-rails", "~> 0.4.0". Now my Javascript assets are broken... Specifically: application-2780ff1b190fd971bdc5.js:1 Failed to load ...
tfantina's user avatar
  • 794

1
2 3 4 5
72