Skip to main content

Questions tagged [ruby]

Ruby is a multi-platform open-source, dynamic object-oriented interpreted language. The [ruby] tag is for questions related to the Ruby language, including its syntax and its libraries. Ruby on Rails questions should be tagged with [ruby-on-rails].

0 votes
0 answers
8 views

Injecting dynamic values for a specific schema to validate against

I have the following yaml file that I would like to validate using dry-rb. --- environment: # required test: # should be dynamic service_credentials: "test_credentials" # required ...
Lorenzo B's user avatar
  • 33.4k
0 votes
0 answers
14 views

How to automatically derive foreign key column names with polymorphic associations?

In my Ruby on Rails 7 application I have a large Account model with various has_many associations (most of them are left out for brevity here): class Account < ApplicationRecord has_one :...
Tintin81's user avatar
  • 10.1k
0 votes
0 answers
7 views

xapian-full-1.2.3 not able to install succesffully

Application not starting after ubutu patch upgrade. /home/azureuser/app2/current fatal: not a git repository (or any of the parent directories): .git fatal: not a git repository (or any of the parent ...
user3715261's user avatar
0 votes
0 answers
12 views

Implement prometheus and garafana for a ruby on rails application

I am looking for a help to implement prometheus and garafana in my rails app. I have tried using prometheus-client and yabeda-prometheus gem. I have also tried with prometheus-exporter gem but all in ...
Muhammad Ans's user avatar
0 votes
0 answers
20 views

Native file open dialog in Windows Ruby

As far as I understand, there are no gems which help to open native file dialogs, so I am interested in writing one, specifically for Windows I'm stuck at the first step which is getting the CLSID for ...
Zachary's user avatar
  • 63
0 votes
0 answers
30 views

Ruby (3.3.4) and Rails (7.1) - rails s Zeitwerk - uninitialized constant Utils::ScriptsUtils::Utils (NameError)

I am trying to update my ruby app from ruby 2.6.6 to ruby 3.3.4 and Rail 5.1 to Rails 7.1 I know it is not a good practice to do so, but in my case (which is a bit complicated) I felt I didn't have ...
bseido's user avatar
  • 19
0 votes
0 answers
20 views

Installing Jekyll on my M3 Macbook won't "stick"

I think I have painted myself into a corner trying to override the default Ruby install so that I can install Jekyll. Here is a rough timeline: I follow this tutorial to the letter and it works, my ...
cmp's user avatar
  • 1
0 votes
1 answer
34 views

Ruby on Rails: how to efficiently save nested attributes (recursively)?

I'm using Rails 6.1.3.2 and trying to make saving of nested attributes more efficient. The database used is MySQL. Code basis BoardSet.rb class BoardSet < ApplicationRecord has_many :boards, ...
klues's user avatar
  • 929
-1 votes
1 answer
29 views

Exception: <internal:/usr/local/Cellar/ruby/3.3.4/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require'

Exception: <internal:/usr/local/Cellar/ruby/3.3.4/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require': cannot load such file -- xcodeproj (LoadError) from <internal:/usr/...
user8852538's user avatar
0 votes
1 answer
57 views

How do I make sure that I only load flights on search and not initial page load

Rails baby here! trying to work it out with Rails 7. I have a small toy app here that tries to search for flights then have users book a flight. I have managed to string together the app to a point of ...
Taku Mapfumo's user avatar
2 votes
1 answer
53 views

How can I get commands in Rails Migration file using regex?

I'm trying to get commands from a Rails migration file as an array based on a specific migration command, using regex. My code works well on most cases, but when there is a command with multiline code,...
dfop02's user avatar
  • 129
1 vote
1 answer
51 views

Rails: Form that sets up default values for an object?

Say I have an object that has some attributes with default values. I set up the default values for these attributes at a model level like so... after_initialize :set_defaults def set_defaults ...
cheetoriko's user avatar
0 votes
0 answers
23 views

Trouble Configuring SAML Authentication in Rails with Devise: Signature Verification Failure

I am currently integrating SAML authentication into a Ruby on Rails application using the Devise SAML Authenticatable gem, and I've encountered a significant challenge regarding the signature ...
Merouane Amqor's user avatar
0 votes
2 answers
39 views

How to use RuboCop Metrics/MethodLength AllowedPatterns/AllowedMethods

Running RuboCop results in the following error $ rubocop Running RuboCop... Offenses: C: Metrics/MethodLength: Method has too many lines. [25/10] (https://rubystyle.guide#short-methods) def ...
Mr.'s user avatar
  • 9,934
1 vote
1 answer
30 views

Rails Cookies not updating on other pages

Is there a way in Rails to delete/reset a particular cookie when the value has been changed on one page? So I have 10 tabs, if the cookie is changed on tab 1 it doesn't update on the rest of the tabs ...
Manav's user avatar
  • 659

15 30 50 per page
1
2 3 4 5
15280