27 questions
-1
votes
1
answer
90
views
How to make jsbundling-rails and yarn work together?
Issue:
jsbundling-rails can not use yarn build on production server.
Cause:
Inability of to access nvm packages through ssh.
After login on server: which yarn > /home/[user]/.nvm/versions/node/v25....
0
votes
0
answers
63
views
jsbundling-rails with webpack does not compile correctly
I recently migrated from webpacker to jsbundling-rails with webpack using this file as a reference link, but I have a problem and it is that in the path app/assets/builds/application.js where the ...
0
votes
0
answers
86
views
Serving JavaScript files with Rails 7 and esbuild
I am using Rails 7 with esbuild, jsbundling-rails, and importmap-rails. I am using the following command to start the esbuild watcher:
esbuild app/javascript/*.* --bundle --sourcemap --format=esm \
-...
0
votes
0
answers
201
views
Rails Deployment failing due to jsbundling-rails not recognizing yarn: Command install failed, ensure yarn is installed
I am trying to deploy a Ruby on Rails app on an ubuntu VM. I have installed yarn both for the app's user and for root. yarn -v returns a version successfully. However, when trying to deploy using ...
0
votes
0
answers
49
views
Where in javascript:install:[bundler] are the tools installed to terminal?
Question regarding jsbundling-rails gem, asked on github and posting here also for more visibility.
I've tried intalling a couple different bundlers now for a new app, essentially getting the same ...
2
votes
1
answer
325
views
Error ActionView::Template::Error (The asset "application.js" is not present in the asset pipeline
I have a Rails app where I have setup a Javascript entrypoint with a React component also adding Tailwind using jsbundling-rails, esbuild and cssbundling-rails.
In development mode, the first time I ...
0
votes
1
answer
412
views
Issue with nodemon in Rails esbuild application
I’m encountering an issue with nodemon in my Rails esbuild application. The esbuild setup for a new rails app uses nodemon by default to watch for changes in the .scss files and trigger the CSS build ...
2
votes
2
answers
2k
views
Trying to make Angular dependency injection work
My Angular dependencies aren't working and I don't know why. All the resources I've seen indicate that this should work:
import { Component } from '@angular/core';
import { ActivatedRoute } from '@...
1
vote
1
answer
1k
views
Upgrade Rails 6.1 > 7.0, add turbo-rails and importmap, gems do not install
I'm trying to upgrade a working legacy app to Rails 7, from Rails 6.1. I want to use Hotwire, so I added gem turbo-rails.
Ruby 3.1.2
zeitwerk
no webpacker
sprockets-rails
no modern JS yet
app passes ...
1
vote
2
answers
1k
views
Enable Bootstrap Tooltips in Rails 7
I am switching my Rails 7 application (which currently uses Sprockets) to using the new jsbundling+esbuild approach. I cannot get Bootstrap's tooltip functionality to work, even though I think I am ...
1
vote
1
answer
313
views
Forced to run assets:precompile two times to get the webpack builds copied to public directory
after long list of issues with rails/webpack there is a last one that hard to understand to fix properly.
I use:
rails with jsbundling-rails and sprockets-rails
webpack
yarn (switched from npm ...
1
vote
1
answer
307
views
javascript_include_tag behavior after remove sprocket in rails 7
I started a fresh rails 7 application using jsbundling-rails (with esbuild) and cssbundling-rails (with bootstrap).
The pipeline works well to build assets. After testing that, I removed sprockets gem ...
1
vote
1
answer
780
views
Image imported from Javascript file does not have fingerprint from asset precompile (Rails 6, esbuild, and jsbundling)
I am trying to import an image from JS in production. I have rails 6 with esbuild and jsbundling, and it works fine in development environment, but in production, images being imported from JS has no ...
0
votes
1
answer
1k
views
Bundling directory structures in esbuild for a Rails 7 application
How do I import Javascript with directories?
I've set up jsbundling-rails using the esbuild bundler for a Rails 7 project that was previously using sprockets to handle all assets. It appears that I'...
1
vote
0
answers
281
views
How to debug Rails Stimulus with Webpack
Rails 7, jsbundling-rails, webpack
A page using Stimulus gives a JavaScript error which in Chrome points to a compiles JavaScript. For me it would be more useful to have it point to the original ...
5
votes
1
answer
5k
views
bin/dev: 8: exec: foreman: not found
Hello I am currently following a tutorial in order to connect react to my rails app that uses https://github.com/rails/jsbundling-rails and went with esbuild, however when I run bin/dev in my terminal ...
3
votes
1
answer
677
views
How can I resolve "Error: Can't find stylesheet to import." for the uswds source styles (Ver 3.3.0)?
I'm using Rails 6.1.7 with jsbundling-rails and cssbundling-rails. I'm bundling with Webpack and Dart sass for js and css respectively. I've tried to follow the docs, and added the sass load paths as ...
0
votes
1
answer
373
views
Upgrade Bootstrap in Rails 7 app with esbuild
Gemfile
ruby '3.1.2'
gem 'rails', '~> 7.0'
gem 'pg' , '~> 1.4.3'
gem "jsbundling-rails"
gem "sprockets-rails"
gem "turbo-rails"
➜ yarn upgrade bootstrap
Results ...
3
votes
0
answers
659
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 --...
0
votes
0
answers
567
views
Setup rails 7 and React as one App using jsbundling-rails on windows
Following there github page
All have done earlier
rails new hello-world -j esbuild
bundle add jsbundling-rails
When I run rails javascript:install:esbuild
I got the following errors below
Under ...
3
votes
0
answers
115
views
Setting up a Rails app with a react front end
I'm trying to set up a Rails app with a react front end, as indicated in this post:
https://www.digitalocean.com/community/tutorials/how-to-set-up-a-ruby-on-rails-project-with-a-react-frontend
However,...
1
vote
1
answer
251
views
Getting going with jsbundling-rails
Trying to grok how to work with js files in Rails 7 using the jsbundling-rails gem and ES modules...
In short, I want to code up functions and have them available in the page.
Here's a simple example. ...
3
votes
1
answer
2k
views
No route matches [GET] "/assets/application.js & No route matches [GET] "/assets/application.css
I am moving away from Webpack to Esbuild, using jsbundling-rails and cssbundling-rails.
Rails version is 6.1.5
Everything seems to be working fine, but in my logs I get:
ActionController::RoutingError ...
5
votes
1
answer
4k
views
How to import JS files with esbuild & jsbundling-rails
I'm moving a Rails 6 app from webpack & webpacker to esbuild & jsbundling-rails
I can't find any documentation on the correct way to import custom js files in application.js, if not using ...
4
votes
1
answer
933
views
Reduce Javascript size in Rails app and improve performance score. Maybe issue with ESBuild?
Not specifically a Rails question, but a question within a Rails app.
In my app I am using the jsbundling-rails gem configured with esbuild.
This gem adds a build line to my package.json file. It ...
4
votes
0
answers
1k
views
Using webpack with js_bundling and rails 7
I'm currently building an application using new rails 7 and js_bundling gem with webpack (not webpacker). But I'm having trouble making the javascript work.
I am currently packing all my sources into ...
1
vote
0
answers
337
views
CSS assets paths in 3rd party libraries when using jsbundling-rails
I'm in the process of updating my Rails app to version 7. As part of this, I've removed Webpacker and am trying to move my whole assets solution to the new jsbundling-rails and cssbundling-rails gems....