338,327
questions
0
votes
0
answers
7
views
Rails multidomain project, it shows only Welcome page, other routes show routing error
I have a project with multiple subdomains for companies. When I access the project in production, it first shows the welcome page of the project, which has a login button that I can use to log in. ...
0
votes
0
answers
19
views
ROR + Trying to create Composite Primary Keys for Partitioning using ID column & created_at column and got lots of error while fetching the record
Trying to create Composite Primary Keys for Partitioning using ID column & created_at column and got lots of errors while fetching the record
Model: Receipt
class Receipt < ApplicationRecord
...
0
votes
0
answers
17
views
ROR + While running server start command or rubocop command getting Ignoring because its extensions are not built
❯ rubocop or rails s
Ignoring racc-1.6.0 because its extensions are not built. Try: gem pristine racc --version 1.6.0
Ignoring racc-1.6.0 because its extensions are not built. Try: gem pristine racc --...
0
votes
1
answer
16
views
Rails method fo cumulative sum of older items
A class Event has methods
def event_revenues
event_sales.sum(&:sales_price)
end
def event_costs
event_sales.sum(&:sales_cost)
end
def event_contributions
event_revenues - ...
0
votes
0
answers
22
views
Access generically to computed property of an activated record
I am working on a Ruby on Rails application, rails version 4.2.1. And I am not familiar with subtleties of Ruby on Rails.
In some generic component of my application there is some code like that:
...
0
votes
0
answers
33
views
Issue Connecting Next.js Frontend to Ruby on Rails Backend via WebSockets on Kubernetes
I'm working on connecting my Next.js frontend to a Ruby on Rails backend using WebSockets. Both apps are deployed on Kubernetes.
My frontend is accessible at test.com.
I have my WebSocket server ...
1
vote
0
answers
13
views
g_csrf_token not being passed in Safari v18
This doesn't seem to happen on Chrome, Firefox, or previous versions of Safari.
I have a sign in with Google button using the Javascript API with ux_mode: 'redirect', and do not have one tap enabled.
...
-1
votes
0
answers
25
views
Loop in view not showing all elements with matching condition (Rails)
One of my views returns rentals where it's status attribute is available, but it's inconsistent in a way that there's missing rentals on the view, even though they have the same available status
...
0
votes
0
answers
26
views
Ruby on Rails redirecting with OPTION instead of GET
my code is redirecting with a options requisition instead of a get, what could cause that?
the redirecting comes from here:
def destroy
sign_out
redirect_to "#{YAML.load_file("#{...
0
votes
0
answers
7
views
Why doesn't this ActionCable broadcast work in test?
I'm trying to improve the tests for my ActionCable system but I'm having a hard time. In test, it seems like my stream_from("something") { ... } handlers aren't actually called. I was trying ...
0
votes
1
answer
21
views
How to select Articles that contain a specific string in the title or description or is tagged with a tag that contains the same string in Rails
I am working on a Rails application.
ruby: ruby-3.2.2
rails: 7.1.0
Postgresql: 16
As the title suggests, I am looking to retrieve from the database a series of articles through a search API.
To ...
0
votes
0
answers
25
views
cors problem when retrieving info from rails secrets in production.rb
In my Rails API I have this code in cors.rb
Rails.application.config.middleware.insert_before 0, Rack::Cors do
allow do
origins 'example.com', 'api_dot_example.com'
resource '*',
...
0
votes
0
answers
23
views
Rails cors issue with JS files and URL rewrite
In my root domain (example.com), I entered a rewrite rule using Render UI so that users visiting example.com/library will see the application hosted on library.example.com.
Now, when visiting example....
0
votes
0
answers
32
views
rails : how desabled override accessor when update
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(...
0
votes
0
answers
11
views
ruby - ovirt-engine-sdk-ruby - Error during SSO authentication, access_denied: Cannot authenticate user
Ruby ovirt-engine-sdk is not working after mac update.
Current mac version: Sonama - Version 14.6.1
Getting following Error when i try to connect ovirt engine:
create_access_token': Error during SSO ...