You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Modernize config files to Rails 7
* Update demo app's binstubs
* Get a new-enough node version
* Ruby 3
* Git ignore new yarn version stuff
* Update Gemfile to be more like Rails 7
* yarn install
* Asset for jsbundling, cssbundling
* Assets pipeline notes for docs
* Rubocop fixes
* Oops. Use defaults of Rails version under test
* Need to explicitly include sprockets-rails 7.0+
* Gemfile as Sprockets says it should be
The app doesn't appear to find the source map, or perhaps it isn't being generated. In the Rails log you will see messages similar to:
185
+
You'll see errors in the browser console about duplicate ids. This is expected, since the demo app has many forms with the same fields in them. Something we can fix in the future, perhaps.
188
186
189
-
```bash
190
-
ActionController::RoutingError (No route matches [GET] "/assets/application.js-c6c0edbd68f05cffd0e2495198bfbc4bf42be8a11b76eecbfade30a8036b6b87.map")
187
+
To use other supported versions of Rails, you will need to create a `Gemfile` for the Rails version. Then, change the `export BUNDLE_GEMFILE...` line to your gem file. Finally, figure out how to include the assets.
188
+
189
+
If you need to run the Rails server separately, for example, to debug the server, you _must_ run it like this:
190
+
191
+
```sh
192
+
bundle exec rails s -b 0.0.0.0
191
193
```
192
194
193
-
But this doesn't seem to affect how the app runs.
195
+
If you run just `rails` or even `bin/rails`, the `sprockets-rails` gem won't load and you'll either get error messages, or the assets won't be available to the demo app. At the moment it's a mystery why. PRs to fix this are welcome.
194
196
195
-
To use other supported versions of Rails, you will need to create a `Gemfile` for the Rails version. Then, change the `export BUNDLE_GEMFILE...` line to your gem file. Finally, figure out how to include the assets.
197
+
Please try to keep the checked-in `.ruby-version` set to the oldest supported version of Ruby. You're welcome and encouraged to try the demo app with other Ruby versions. Just don't check in the `.ruby-version` to GitHub.
198
+
199
+
For the record, the demo app is set up as if the Rails app had been created with:
This means it's using `esbuild` to pre-process the JavaScript and (S)CSS, and that it's using [`jsbunding-rails`](https://github.com/rails/jsbundling-rails) and [`cssbundling-rails`](https://github.com/rails/cssbundling-rails) to put the assets in `app/assets/builds`, before the Sprockets assets pipeline serves them in development, or pre-compiles them in production.
# Reduces boot times through caching; required in config/boot.rb
46
38
gem"bootsnap",require: false
47
39
48
-
gem"bootstrap_form","~> 5.0"
40
+
gem"bootstrap_form",path: ".."
49
41
50
42
# Needed for our demo app but not the gem itself
51
43
gem"htmlbeautifier"
52
44
53
45
# Use Sass to process CSS
54
-
gem"sassc-rails"
46
+
# gem "sassc-rails"
55
47
56
48
# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images]
57
49
# gem "image_processing", "~> 1.2"
58
50
59
51
group:development,:testdo
60
52
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
0 commit comments