All Questions
Tagged with ruby-on-rails-7 import-maps
63
questions
1
vote
2
answers
77
views
error trying to import module pinned in import map
I have a rails 7 app and I'm trying to add hotwire functionality. I am getting an error with pinning stimulus and importing it in application.js
importmap.rb
pin "application"
pin "@...
0
votes
0
answers
56
views
javascript_importmap_tags is creating a link to "application.js" with error
I am working on adding javascript handling to a rails 7 app. I want to use import maps to import external libraries for turbo and stimulus. The current issue I'm having trouble with is that ...
1
vote
1
answer
97
views
JS file is blocked due to bad MIME in production
In my Rails 7 project I have been using importmap for importing JS modules. here is the config:
# config/importmap
pin "application", preload: true
pin "@hotwired/turbo-rails", to:...
0
votes
0
answers
144
views
Toastr rails using importmaps in rails 7
I am having trouble displaying my toast messages in rails using importmaps default setup. This is my code.
This is my layout file
<!DOCTYPE html>
<html>
<head>
<title>...
-1
votes
1
answer
89
views
One Stimulus controller not loading after migrating Rails 7 app to importmaps
I am trying to move away from yarn, npm and webpacker to importmaps. I clearly did a lot of things right cause some of my JavaScript is loading. Some of my Stimulus controllers are not being ...
1
vote
1
answer
786
views
Javscript using importmaps not working looking for modules under assets
I am trying to convert my rails 7 application using sprockets to use import maps because I was having issues using turbo and hotwire. I am not using bootstrap or tailwind. We are using materialize.
...
0
votes
0
answers
29
views
importmap with anggularjs some time cause error `A controller with this name is not registered`
Importmap config:
pin "application", preload: true
pin "home", preload: true
application layout:
<body id="page-top" ng-app="userApp" ng-strict-di>
<...
1
vote
1
answer
263
views
Rails engine importmap Uncaught ReferenceError: tinymce is not defined
I am using importmap with a downloaded version of tinymce in a rails 7.1 engine. I am failing to get the editor to display and the browser console shows the following error
Uncaught ReferenceError:...
0
votes
1
answer
148
views
Maplibre and Rails 7 importmaps
in config/importmap.rb:
pin "maplibre-gl", to: "https://ga.jspm.io/npm:[email protected]/dist/maplibre-gl.js"
However, trying to use this library: import * as maplibregl from &...
1
vote
1
answer
911
views
importmap-rails + sprockets not finding stimulus-loading.js in fresh stimulus-rails installation
Mature app updating to Rails 7.0.7, Ruby 3.1.2, adding stimulus-rails using the installer, with importmap-rails, turbo-rails and sprockets-rails already installed. No custom Stimulus controllers yet, ...
1
vote
1
answer
783
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
1
answer
155
views
404 error when importing npm yaml package into Rails 7
I'm trying to import the yaml npm package into a Rails 7 app; but, I appear to be missing a step. When I attempt to load a page that imports this package, I get this 404:
Started GET "/_/...
2
votes
1
answer
505
views
Precompilation in rails 7
As in older versions of rails, in production, we used to precompile our assets first so that performance can be better while serving assets from public. But in rails 7, as default configuration says ...
1
vote
2
answers
1k
views
Error: Cannot find module 'tailwindcss/defaultTheme' issue with Rails 7.0.5 and Ruby 3.1.2 and Tailwindcss
I am having a heck of a time getting tailwindcss and flowbite to deploy on my Rails 7.0.5 server. Please let me know if you have any suggestions on how to fix. It works just fine in development mode, ...
2
votes
1
answer
454
views
assets/config/manifest.js vs. assets/javascripts/application.js
application.js also specifies other javascript files, and originally //=require_* statements in application.js were included in assets:precompile task. Now, the role of selecting files in assets:...