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].

ruby
2 votes
0 answers
10 views

Ruby setter-methods: Is the equal-character (=) a convention or functionality?

Taken this class as a example: class House def initialize(color, size) @color = color @size = size end def color @color end # Is the = part of the syntax or a convention? def ...
cluster1's user avatar
  • 5,374
0 votes
0 answers
11 views

Trying to install Nanoc (with Ruby) on Fedora Linux, but getting an error I can't decipher

I try to install Nanoc on Fedora Linux. I've successfully installed Ruby using dnf install ruby Checked it with ruby -v and made sure rubygems is installed. Also checked version to verify ...
zektiv's user avatar
  • 1
0 votes
0 answers
8 views

Issue with rails hotwire trix textarea resize

im trying to create a textarea resize grippie more or less like the SO for a trix textarea with rais stimulus so i set this controller below the issue is when i pull down the textarea the textarea ...
jjplack's user avatar
  • 113
0 votes
0 answers
20 views

Ruby with Postgresql raising NumericValueOutOfRange

I'm trying to do the following query using ruby and pqsql, but when trying a range with more than 1.000 registers I'm receiving an error. . . . user.left_outer_joins(:coverage_radius).where(id: i)....
Leonardo Furtado's user avatar
0 votes
1 answer
50 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
1 answer
29 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
5 votes
5 answers
95 views

Capturing all matches of a string value from an array of regex patterns, while prioritizing closest matches

Let's say I have an array of names, along with a regex union of them: match_array = [/Dan/i, /Danny/i, /Daniel/i] match_values = Regexp.union(match_array) I'm using a regex union because the actual ...
lumos's user avatar
  • 211
0 votes
0 answers
38 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
25 views

Ruby debugging will not work in VSCode for any of the debuggers

I am trying to debug a ruby program and cant get the debugger to work for ANY of the debuggers. I have tried rdbg, pry-byebug, byebug and LSP. Every time I try to run the bebugger it says DEBUGGER : ...
Sean's user avatar
  • 1
0 votes
1 answer
34 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
22 views

unknow keyword: :expires_in when deploy Ruby 3.2.2 application to AWS Elastic Beanstalk

When I try to deploy Ruby 3.2.2 application to AWS Elastic Beanstalk (Platform Ruby 3.2 running on 64bit Amazon Linux 2023), I get below error: [29074] unknown keyword: :expires_in [29074] /var/app/...
lei lei's user avatar
  • 1,821
0 votes
0 answers
20 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
1 answer
42 views

How do I remember where user left in rails

In rails how do I remember which page user left at with user login. When same user comes back he lands on the same page. I am new to rails not sure how I can approach this problem. Is there any gem to ...
Manav's user avatar
  • 649
0 votes
0 answers
23 views

Why Tailwind CSS doesn't works with public/*.html files in my Ruby on Rails project

I'm using Tailwind CSS for my Ruby on Rails project, the CSS works fine with all the layouts in views but it doesn't works with public/*.html files in my project. I have a 404.html page and a 500.html ...
Ansari Junaid's user avatar
0 votes
0 answers
43 views

Rails: problem with handle redirect with turbo_stream in apps

In the application, when creating a feature, it was necessary to add hotwired/turbo-rails. // app/javascript/application.js import "@hotwired/turbo-rails" import "controllers" ...
Steven's user avatar
  • 13

15 30 50 per page