Skip to main content
Filter by
Sorted by
Tagged with
-1 votes
1 answer
90 views

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....
Tim's user avatar
  • 3
1 vote
1 answer
73 views

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),...
Masa Sakano's user avatar
  • 2,309
0 votes
1 answer
228 views

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 ...
karns's user avatar
  • 5,937
0 votes
0 answers
100 views

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 ...
Elliot's user avatar
  • 57
2 votes
1 answer
74 views

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 ...
Joe Bloggos's user avatar
0 votes
0 answers
67 views

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 ...
Joshua Muheim's user avatar
0 votes
1 answer
133 views

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 ...
NGobin's user avatar
  • 505
0 votes
1 answer
52 views

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 = ...
GoJo's user avatar
  • 3
0 votes
0 answers
66 views

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' ...
chandanjha's user avatar
1 vote
1 answer
81 views

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 ...
Theores's user avatar
  • 75
0 votes
0 answers
84 views

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 ...
Eric Reynolds's user avatar
1 vote
0 answers
89 views

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 ...
John Sall's user avatar
  • 1,173
0 votes
0 answers
58 views

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 ...
John Sall's user avatar
  • 1,173
0 votes
0 answers
43 views

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 ...
John Sall's user avatar
  • 1,173
1 vote
0 answers
51 views

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 ...
John Sall's user avatar
  • 1,173
0 votes
1 answer
26 views

When I write this code to show image filename for the alt : <img class="card-img-top" alt="<%= store.main_image.filename %>" draggable="false" src="<%= ...
John Sall's user avatar
  • 1,173
-1 votes
1 answer
85 views

Should i always use plural model name when using .where query with has_one relationship? My models class User < ApplicationRecord has_one :role end class Role < ApplicationRecord belongs_to ...
52zxc's user avatar
  • 1
1 vote
1 answer
597 views

When I was on rails 6, when loading a record from the database in the rails console, I would see: MyFancyModel.last => #<MyFancyModel:0x0000000abc123 id: 123, name: 'my name', some_column: '...
patrick's user avatar
  • 9,814
0 votes
1 answer
49 views

I want to migrate a Rails project away from Webpacker. It uses different JS-parts: VueJS 2.6, StimulusJS, plain old Javascript with some JQuery. Having used Importmaps in some projects i wonder if ...
Piezo Pea's user avatar
  • 132
-1 votes
1 answer
157 views

I got my application to weird state - when I create record (in application or in console), it is created in database, object reports to be persisted, but the object has no id (id: nil). In summary: ...
janpeterka's user avatar
0 votes
0 answers
90 views

Polymorphic associations do not support computing the class. I am using rails 7.0.8.4, gem 'ransack' and ruby "3.1.6" Following code generate an error @q = Audited::Audit.ransack(params[:q])...
Jigar Bhatt's user avatar
  • 4,710
0 votes
1 answer
435 views

serialize :reddoorz_property_ids, type: Object DEPRECATION WARNING: Passing the class as positional argument is deprecated and will be removed in Rails 7.2. Please pass the class as a keyword argument:...
Krapi Rastogi's user avatar
2 votes
1 answer
139 views

I've upgraded a Rails app to Rails 7.2 and some of my tests are hanging. We have some cases more or less like this that freeze when the nested transaction starts: context 'error', :transactionless do ...
Carlos Martinez's user avatar
1 vote
1 answer
178 views

I have a view that I'm rendering like this: action_controller.render_to_string( layout: 'document', template: 'administrator/users/export', encoding: 'UTF-8', formats: [:pdf], ...
Carlos Martinez's user avatar
0 votes
0 answers
302 views

Rails version: 7.2.2 Ruby: 3.2.0 I'm deploying an almost-blank app to Dokku. I'm including Tailwind and my asset pipeline is nothing but Sprockets with importmap. There's no CI involved, no tests are ...
Sebastialonso's user avatar
0 votes
2 answers
336 views

using Rails 7.2.1.1 and Ruby 3.3.5. Gemfile has gem "image_processing", "~> 1.13.0". Basically I have a form that allows the company logo to be uploaded, and needs to accept ...
NGobin's user avatar
  • 505
0 votes
3 answers
114 views

Using Rails 7 I am using a Single Table Inheritance (STI) to store some very simple associations. The source object uses has_many associations with the STI models. Following some advice in question ...
ReggieB's user avatar
  • 8,277
1 vote
0 answers
24 views

How do I check from the client-side if there is at least one checkbox being ticked here? = form_with model: @form, url: generate_matches_tournament_path(@tournament), method: :post, local: true do |f| ...
Nguyên Vũ Trịnh Lê's user avatar
1 vote
0 answers
49 views

Upgrading chart.js from version 2.9.4 to 4.4.4. Locally(Machine is MAC OS), rails app is generating charts with upgraded version. When deploying to AWS EC2, Jenkins build is failing with this error ...
Mansi Shah's user avatar
0 votes
1 answer
104 views

I am upgrading a Rails app from Rails 3.2 to Rails 7 (don't ask!!). There is a tableless model that was using this gist, but it's no longer working. It looks like the suggestions here no longer work ...
H.Kh's user avatar
  • 1
1 vote
1 answer
118 views

I upgraded our rails application from version 6.0 directly to 7.0. After commenting out the new framework defaults everything seemed to work smoothly but after setting the load_defaults to 7.0 I got ...
Vakmeth's user avatar
  • 11
1 vote
2 answers
213 views

Context: Rails 7.1, only using the DB interaction layers, no web framework, no servers, etc... I'm sure this is going to ruffle a few feathers, but I keep running into ActiveRecord::...
yenadar's user avatar
  • 25
0 votes
1 answer
42 views

class User < ApplicationRecord has_many :description_hoge_projects, -> { where(description: "hoge") }, class_name: "Project" end users = User.preload(:...
Topotan's user avatar
  • 91
-1 votes
2 answers
80 views

I have a rails-api-only application and want to upload a Logo. Using Rails 7, Ruby 3.1.2 Gem "image_processing", "~> 1.2" Able to upload Logo and retrieve the original logo ...
Gourav's user avatar
  • 576
0 votes
1 answer
49 views

I have the following classes: class Order has_many :line_items end class LineItem belongs_to :order has_many :line_item_production_items has_many :production_items, through: :...
Zyren's user avatar
  • 663
3 votes
1 answer
2k views

After upgrading from Rails 6 to 7, I'm getting this error when trying to test out a mailer that was working just fine before. NoMethodError (undefined method `preview_path=' for ActionMailer::Base:...
brokenbells's user avatar
0 votes
1 answer
242 views

I am working on a rails 7 app that is using importmaps for all JS related stuff. For reference, I am giving the code below. importmap.rb # Pin npm packages by running ./bin/importmap pin "...
Muhammad Ans's user avatar
1 vote
1 answer
96 views

I have a Rails 7 app using Ruby 3.2.2 up on Heroku. It uses SendGrid to send thank you emails when someone signs up for the newsletter of fills out the contact form. I have the SendGrid account ...
Developer3027's user avatar
0 votes
1 answer
54 views

I have the following models, with matching tables and FKs. class Organization < ActiveRecord end class Identifier < ActiveRecord belongs_to :owner, class_name: "Organization" ...
UsAndRufus's user avatar
-1 votes
2 answers
113 views

I made a Rails install 7.2.1, installed Devise basic. I set in my applications controller: def after_sign_in_path_for(current_user) # Assuming 'Dashboard' is a model and you have a show action ...
Havic's user avatar
  • 113
0 votes
0 answers
59 views

I have a methode to overide a field in category model : def foo _foo = read_attribute(:foo) _foo = competition.foo if _foo.nil? _foo end in controller, the update function : category.update(...
Matrix's user avatar
  • 3,395
0 votes
1 answer
88 views

Here is my error: No route matches [GET] "/users/sign_out" and this is all routes : Prefix Verb URI Pattern ...
Samy Bellili's user avatar
1 vote
1 answer
71 views

If I'm using the server's local storage for storing images, can I access those local images later when I switch to Amazon S3 plan?
John Sall's user avatar
  • 1,173
0 votes
1 answer
52 views

My whole team is using docker so we have similar versions, some people are on Linux and some on Mac. When I call rails db:schema:dump I see few discrepancies in the resulting diff: The 1st kind is ...
Greg's user avatar
  • 6,791
0 votes
0 answers
53 views

I am using a single model for acts_as_list, not sure if it is mandatory to add an associated model. class TestModel < ApplicationRecord # need to skip adding a value to position for a specific ...
Tanay Sharma's user avatar
  • 1,172
0 votes
1 answer
87 views

Upgrading a project from Rails 5.2, made it to 7.1.4 and it's producing an odd issue serializing jsonb. Given the lack of information I've found, this appears to be an unusual issue. The error ...
Kinitawowi's user avatar
1 vote
1 answer
456 views

I'm using the simple_calendar gem and it's working great. I'm having trouble getting it to import the stylesheet by doing application.css *= require simple_calendar or application.tailwind.css @...
vince's user avatar
  • 2,978
0 votes
2 answers
240 views

TL;DR: the components updated with Turbo Streams in my Rails app always use the default locale instead of the currently set locale. I have a Rails application with multiple engines. I'm implementing ...
pabvald's user avatar
  • 11
0 votes
1 answer
41 views

I am including a concern in a controller: # app/controllers/api/v2/base_controller.rb class API::V2::BaseController < ActionController::Base include UserApiAccessRecorder end # app/controllers/...
tomwang1013's user avatar
  • 1,445
0 votes
0 answers
45 views

I have a simple situation where we need to have unique SKUs for items for sale. A location has many products and a product has many variants. The SKUs for each variant has to be unique for a location. ...
vince's user avatar
  • 2,978

1
2 3 4 5
21