2,094 questions
0 votes
0 answers
29 views
Mechanize not getting a site
while using Mechanize gem in rails and fetching the site https://www.reuters.com/ its giving -> Failed to fetch page: 401 => Net::HTTPUnauthorized for https://www.reuters.com/ -- WWW-...
1 vote
0 answers
57 views
Server restart is required when the page reloads due to the caching
We use the MemCachier addon in production for the Rails caching. Recently, we upgraded the Rails version from 5 to 6.1, and from that time onwards, we got one error in the local machine. For example, ...
2 votes
1 answer
72 views
Multi DB Access In Rails 6 + Heroku
There is a Rails 5 application that runs in Heroku; it has two DBs, a Primary and a Follower (read-only), the follower is the replica of the Primary. In some application areas, we use followers to get ...
0 votes
1 answer
53 views
How to add associations for polymorphic join table
I have a polymorphic join table that I want to create using the following migration. create_table :sourceables do |t| t.string :object_type, null: false t.bigint :object_id, null: ...
0 votes
0 answers
117 views
Problem with ActiveRecord-Session_store gem when starting up Rails 6 app
I'm upgrading a Rails app from v5 to v6.1.7 (ruby:2.7.7), but I have a problem with active_record_store for sessions at start up when running locally in Docker. I've installed the 'activerecord-...
0 votes
0 answers
51 views
HABTM relationship / validates associated: valid? is true even though I don't think it is
I made the following join table to be used in a HABTM relationship between tasks and itself: create_table :tasks_tasks, id: false do |t| t.belongs_to( :dropoff_task, null: false, ...
0 votes
1 answer
188 views
Docker Compose, Rails 6, and Webpack Development Server for Development Environment
I am attempting to use webpack-dev-server with my Rails 6 application, and using the configuration below, I am getting some odd behavior. When I change an asset file, the webpack container does run, ...
0 votes
1 answer
55 views
How does react process redirects?
I'm new to working with react and I think i have spent considerable time in researching about my issue/problem but no luck. I have a react FE and a rails BE. The FE is just a login page with a couple ...
1 vote
0 answers
49 views
Rails globalize error undefined method `translates' for Post:Class
I am using rails 6.1.4 and added transalations table to post via this migration class TransalatePosts < ActiveRecord::Migration[6.1] def change def self.up Post.create_translation_table!...
0 votes
0 answers
99 views
Rails 5 -> 6 upgrade, deprecation warning from zeitwerk:check
Anyone game to dredge up memories of your Rails 5 -> 6 upgrade? I’m running bin/rails zeitwerk:check and while it is, at the end, telling me All is good! I do get a pretty big deprecation warning: ...
0 votes
1 answer
137 views
Rails lockbox and blind index, unable to access encrypted field
I have lockbox v1.3.3 / blind index v2.3.2 gems installed (have to use this version, can't upgrade at the moment). I am using rails 6.0.3.2 and ruby 2.6.9. I followed these steps: https://ankane.org/...
1 vote
2 answers
276 views
override belongs_to association in subclass
class Post < ActiveRecord::Base belongs_to :user end class ExtraPost < Post belongs_to :user, optional: true end Rails 6.1 When creating an instance of the ExtraPost class, an error occurs ...
0 votes
1 answer
109 views
invitation_accepted? returns FALSE in after_invitation_accepted CALLBACK
I use devise_invitable (2.0.6) invitation_accepted? returns FALSE in after_invitation_accepted CALLBACK but when I pause here and check in rails console it gives me true for invitation_accepted? user....
0 votes
1 answer
632 views
Unknown Syntax Error: Invalid option name ("--production=false") in Heroku deploy of rails app
I have a rails project (rails 6.1 & ruby 3.1.2) which I have deployed to heroku in the past, but now I'm encountering a problem with Heroku. I get the following error: Counting objects: 80, done. ...
1 vote
0 answers
94 views
Rails 6 - <%= link_to %> Is Not Opening Modal to Confirm Deletion and Just Deleting, How to Ensure Confirmation Before Deletion?
I'm currently facing a problem in my project. I'm on Rails 6.0.4.8 and Ruby 2.6.8. The issue I'm running into is that I would like a user to be able to delete a notes record by clicking on an icon but ...