1,028 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....
1 vote
1 answer
71 views
How to directly test ActionController::RoutingError for an invalid path in Ruby-on-Rails-7.1?
In Rails Controller tests of an invalid route, this used to work before Rails-7.1 (in Minitest): assert_raises(ActionController::RoutingError){ get "/non_existent" } In Rails-7.1 (or later),...
0 votes
1 answer
220 views
Grover Throwing Javascript Timeout Error in Rails App
I'm getting an error when rendering PDFs with Grover gem in a rails app: Grover::JavaScript::TimeoutError: Timed out after waiting 30000ms Couple key points: Using Grover gem on rails 7 app Fails in ...
0 votes
0 answers
100 views
How to purge attached ActiveStorage files when updating a record in Rails 7?
I'm using Rails 7 with ActiveStorage to handle file uploads on a Post model. Everything works fine for attaching files, but I'm struggling with removing/deleting an attachment when the record is ...
2 votes
1 answer
74 views
Ruby on Rails Enum ArgumentError
I was wondering if someone can see the obvious error I am making. I can't see it. My Rails 7.2 application relies on an enum for :likelihood and :consequence. Unfortunately, in testing, I am getting ...
0 votes
0 answers
67 views
After Rails update from 6 to 7, Devise flash messages are not available anymore (Turbolinks disabled)
My Rails app uses Devise (4.9.4) and CanCanCan (3.6.1). I just updated it to version Rails version 7. Since then, the flash messages do not appear anymore when registering as a new user. I have found ...
0 votes
1 answer
132 views
Rails counter cache for has_one :through on Rails 7 and 8
I am struggling to get a counter cache working on a has_one :through and running into some weird behaviour. I want to have a counter_cache on the Company model that caches the number of associated ...
0 votes
1 answer
52 views
Clearing Fragment Caching from Console
I am new to Rails, going through the caching mechanism and facing a few issues in Fragment caching and not being able to get the solution In development.rb config.action_controller.perform_caching = ...
0 votes
0 answers
66 views
Image variants are not processed in Rails 7.0.8 using mini_magick
I have recently upgraded from rails 5.2 to rails 7.0.8 and I am using mini_magick to create image variants. But somehow the image variants are not created. Gem used: 'image_processing', '~> 1.14' ...
1 vote
1 answer
81 views
actioncable connection lost immediately in production
Actioncable subscribe leads to this error in production: /home/[app]/.rbenv/versions/jruby-9.4.1.0/lib/ruby/gems/shared/gems/actioncable-6.1.6.1/lib/action_cable/connection/stream_event_loop.rb:74 ...
0 votes
0 answers
84 views
Arbitrary Class: Uninitialized Constant Error with string.classify.constantize Rails 7
I'm upgrading a rails app from 5.1 to 7.1.5.1. I have the app working well except for the following issue. When I try to run pdf_class = "my_arbitrary_class" pdf_class.classify.constantize ...
1 vote
0 answers
89 views
Waiting for user to activate email link then continuing with the original page in Rails7
Assume the user is going through steps from 1 to 5, in the last step an activation email is sent to user and then there's a message in step 5 telling the user with a loading icon: "waiting to ...
0 votes
0 answers
58 views
Changing the language of "The form contains 1 error" in Rails7
In rails7, I have a form, but I want the error messages to be displayed in another language, I can change the ones in the validations in the model e.g. user.rb, but the language of the message that ...
0 votes
0 answers
43 views
How to use omniauth-google-oauth2 with a domain and subdomain in rails7?
omniauth-google-oauth2 works fine on the main domain, I have this folder structure: controllers/auth/google_oauth2_controller.rb inside google_oauth2_controller I'm using module Auth: module Auth ...
1 vote
0 answers
51 views
Does changing routing url in rails using translated paths affect google search results?
After doing research, I've learned that having 'underscore' in your url path can affect google search results, from this google recommended URL structure: Google recommended URL structure I initially ...