Replace rails-assets.org gems with yarn/npm packages#1254
Merged
Conversation
Copilot
AI
changed the title
[WIP] Change installation method for JS/CSS dependencies
Replace rails-assets.org gems with yarn/npm packages
Mar 11, 2026
Co-authored-by: fbacall <503373+fbacall@users.noreply.github.com>
fbacall
force-pushed
the
copilot/change-js-css-dependency-installation
branch
from
March 11, 2026 18:19
5a0b43a to
9d40bde
Compare
fbacall
marked this pull request as ready for review
March 11, 2026 18:25
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates frontend dependencies away from the defunct rails-assets.org gem source to Yarn/NPM while keeping the Rails/Sprockets asset pipeline.
Changes:
- Remove
rails-assets-*gems and therails-assets.orgGemfile source; addpackage.json+yarn.lockfor the equivalent JS/CSS packages. - Configure Sprockets to load selected
node_modules/subdirectories and update JS/CSS manifests to match NPM distro filenames. - Update Docker/CI/docs to install Yarn dependencies and ignore
node_modules/.
Reviewed changes
Copilot reviewed 10 out of 13 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Adds Yarn v1 lockfile pinning JS dependency tree. |
| package.json | Defines NPM dependencies replacing rails-assets gems. |
| docs/production.md | Documents installing npm/yarn and running yarn install for production setup. |
| docs/install.md | Documents npm/yarn as prerequisites and Yarn install steps. |
| config/initializers/assets.rb | Adds node_modules subpaths to Sprockets asset load paths. |
| app/assets/stylesheets/application.scss | Updates datetimepicker import to bootstrap-datetimepicker. |
| app/assets/javascripts/application.js | Updates require names for datetimepicker and autocomplete packages. |
| Gemfile.lock | Removes rails-assets source and rails-assets gem dependencies. |
| Gemfile | Removes rails-assets.org source block and rails-assets gems. |
| Dockerfile | Installs npm/yarn and runs yarn install during image build. |
| .gitignore | Ignores node_modules/. |
| .github/workflows/test.yml | Adds yarn install step before running Rails tests. |
| .github/workflows/deployment-checks.yml | Adds yarn install step before assets:precompile. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of changes
source 'https://rails-assets.org'block and all 6rails-assets-*gems fromGemfile/Gemfile.lockpackage.jsonwith npm equivalents; generateyarn.lockviayarn installnode_modules/subdirectories toconfig.assets.pathsinconfig/initializers/assets.rb//= requirenames inapplication.jsand one@importinapplication.scssto match actual npm dist filenames (eonasdan-bootstrap-datetimepicker→bootstrap-datetimepicker,devbridge-autocomplete→jquery.autocomplete)node_modules/to.gitignoreMotivation and context
#1253
rails-assets.org is defunct — its gems cannot be installed in fresh environments, blocking deployment. This migrates those 6 frontend packages to yarn/npm while keeping the Sprockets asset pipeline intact.
The Sprockets integration works by registering specific dist subdirectories from
node_modules/as asset load paths:Existing
//= requireand@importdirectives continue to work; only two names changed to align with how the npm packages name their dist files.Screenshots
N/A
Checklist
to license it to the TeSS codebase under the
BSD license.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.