Skip to main content

Questions tagged [ruby-on-rails]

Ruby on Rails is an open source full-stack web application framework written in Ruby. It follows the popular MVC framework model and is known for its "convention over configuration" approach to application development.

ruby-on-rails
0 votes
0 answers
10 views

Model VS Active record in ROR

Can somebody please explain me the difference between model and active record in simple words ? Is active model and model same ? PS: Knowledge regarding these topics will be appreciated. I am newbie ...
Anuja Sharma's user avatar
0 votes
0 answers
11 views

Why can't I wrap Sidekiq.configure_server in Rails after_initialize?

After upgrade to Rails 6 the initializers/sidekiq.rb is causing deprecation warnings about class autoloading. As a workaround I thought I could wrap the contents of Sidekiq.configure_server in Rails....
jva's user avatar
  • 2,817
0 votes
0 answers
13 views

Ruby on Rails throws LoadError: Unable to autoload constant for one job, but not for the second

My code triggers two Sidekiq jobs called ExcelImportReconcileWorker with different arguments. The worker creates a new instance of a Parsers::ExcelImport class and runs a method in it. Every time ...
Mika's user avatar
  • 1,439
0 votes
0 answers
26 views

Rails: problem with "@hotwired/turbo-rails" and redirects

// app/javascript/application.js import "@hotwired/turbo-rails" import "controllers" import "trix" import "@rails/actiontext" import Rails from "@rails/ujs&...
Steven's user avatar
  • 13
0 votes
0 answers
11 views

Ruby/Rails Bunny RabbitMQ Must be one of [:method, :headers, :body, :heartbeat]

I get an error when trying to connect to RabbitMQ. Error backtrace: .../amq-protocol-2.3.2/lib/amq/protocol/frame.rb:67:in `decode_header' Error: Must be one of [:method, :headers, :body, :heartbeat] ...
Ammypka's user avatar
0 votes
0 answers
28 views

How to delete cookies in Rails 7.1?

I recently upgraded my Rails app from version 7.0.4.3 to version 7.1.3.4 and cookies.delete stopped working. I'm setting a cookie in JavaScript with: document.cookie = `last_guess=value; path=/`; ...
ptrlaszlo's user avatar
  • 337
1 vote
1 answer
29 views

Rails Custom Middleware not being recognized in GH CI

I'm using custom middle ware for the first time to normalize error handling. I have my middleware defined in app/middleware/error_handler.rb and using in my main application.rb ... require_relative &...
Int'l Man Of Coding Mystery's user avatar
0 votes
0 answers
29 views

Generate a PG dump when click a button

im creating a rails app (basically a monolith). currently, im creating a new feature, "when i click some button, it download a sql script with db backup". i understand that i can execute ...
Nicolás's user avatar
0 votes
0 answers
21 views

Docker, nginx, Rails, Puma. Static files are not served but should be

I tried to migrate from Passenger to Puma in a Rails 5.2 project. This is a Docker setup using nginx to redirect from http to https and forward the requests to the Rails container. I had this set up ...
MDickten's user avatar
  • 139
1 vote
0 answers
24 views

Rails 7.1 Error when reading active record model from redis cache

We have a problem during upgrade Rails from 7.0.8 to 7.1.3.2 with reading AR models from Redis cache. We have several places where we cache AR models with Redis: Rails.cache.fetch("key_name")...
S. Chekan's user avatar
0 votes
1 answer
33 views

Both controller level and Model level metadata simultaneously in the same column of record. how to store in PaperTrail: versions table

I'm encountering an issue with PaperTrail in my Rails application where I'm trying to store both controller-level and model-level metadata in the versions table, but only the controller-level metadata ...
Mohan Mali's user avatar
0 votes
0 answers
18 views

:en is not a valid locale when running "rails generate ims_lti:install"

I'm pretty inexperienced with both stackoverflow and Ruby. Please help me to help you to help me. I'm trying to implement ims-lti in an open source Rails application. When I run rails generate ims_lti:...
user3334278's user avatar
0 votes
0 answers
19 views

Storybook Configuration with Ruby on Rails [closed]

I'm trying to follow the view_component-storybook configuration. I've replicated everything on my windows machine and the static preview pages also work. But the storybook playground doesn't render ...
Vipul Shinde's user avatar
0 votes
2 answers
34 views

Is there an easier way to write this down and prevent duplicate code?

I am using middleman (Ruby on Rails) with HAML. I have code like this at the beginning of each page: - if pageversion == "test" - domain = data.testvars.domain - action_url = data....
ZundraDolo's user avatar
0 votes
0 answers
20 views

Minitest array check in indifferent order

assert_equal [ '2e', 'd4', '9d', '1a' ], ids is a statement to verify what array one is dealing with. But often, with fixtures, there is no necessarily set order. How can the test be written to ...
Jerome's user avatar
  • 5,987

15 30 50 per page
1
2 3 4 5
22549