229,275 questions
-2 votes
0 answers
62 views
The Rails console is trying to connect to PostgreSQL via Docker and is giving an error [closed]
I'm trying to access PostgreSQL from within my backend application using Docker, but I'm getting the following error: User.last #=> There is an issue connecting to your database with your username/...
-2 votes
2 answers
55 views
Deploy zip to AWS application
I have been asked to look at an old Ruby application that is currently deployed to AWS via CodeShip on successful build. CodeShip is obviously gong out of service end of Jan 26 and I need to deploy ...
0 votes
2 answers
76 views
error installing rails - alternate installation path possible
I want to install Rails on Windows using the procedure described in the official Ruby guide. When I enter gem install rails I get the error message: Permission denied @ rb_sysopen - /var/lib/gems/3....
-1 votes
0 answers
39 views
binding.pry debugger not working on Windows 11
I'm running into issues with binding.pry on Windows 11. When I insert it into my Ruby script, the program reaches that line but either skips over it or pauses without accepting any input. đź§Ş Problem: ...
0 votes
1 answer
37 views
Rails logs show `DEBUGGER: Debugger can attach via UNIX domain socket` but VS Code rdbg says "Can not find attachable Ruby process."
I have two Rails apps that I want to debug with the VS Code rdbg Ruby Debugger extension. For each of them, I have a launch.json that looks like this (abbreviated): { "version": "0.2....
5 votes
1 answer
113 views
Symbol#to_s, Array#last, Time.now undefined or no-ops when evaluated using Ruby 3.x C API
For several years I've been using the Ruby C API to add the ability to use Ruby code in my C text editor (a variant of MicroEMACS). This has been working well in Linux Mint 21 (essentially the same ...
Advice
1 vote
1 replies
120 views
Is it possible to embed a Ruby interpreter in a Flutter app?
I see that it is supposed to be possible to embed a Python interpreter in a Flutter app, so can I assume it should therefore also be possible to do this with a Ruby interpreter? (I would be happy ...
1 vote
2 answers
98 views
Why does adding an subsequent if-else block cause another previous if-else block to return nil?
I am a beginner in Ruby and I am having trouble with if else statement. As you know, Ruby will return the last calculated code if the return keyword is not specified. Here is the issue. def aMethod(*...
0 votes
0 answers
45 views
Can't annotate method returning the singleton class
I need to annotate a method but, for unclear reasons, Sorbet seems not to be able to correctly perform the type analysis. The code is the following: module MyModule class Object < BasicObject ...
1 vote
1 answer
64 views
Unable to set up Ahoy with JS in Rails app
I set up Ahoy to work with my Rails app and ahoy.track each time a user loads a page. It's working neatly but I'd also like to track some more client-side actions such as a button clicks, moving ...
1 vote
1 answer
96 views
undefined method 'arity' for an instance of Hash when upgrading rails 8.0.3 => 8.1.0
After upgrading from Rails 8.0.3 to Rails 8.1.0, my application crashes with an undefined method 'arity' for an instance of Hash error. The issue appears to be related to the acts-as-taggable-on gem, ...
1 vote
1 answer
89 views
How to use automatically generated service worker example in Rails 8? [closed]
I realised that Rails 8 generated automatically a service worker file for a new app. It seems to be useful for web push notifications, and I would like to use push notifications but I do not know how ...
2 votes
3 answers
209 views
Rails App crashes when https request is made after upgrading to macos Tahoe 2025
I recently upgraded to macos tahoe now my rails app crashes with a segmentation error bug whenever i make an HTTPS request. It should be noted that i do not experience any issue when i make http ...
0 votes
2 answers
64 views
How to create a Capistrano hook but only within the context of another task?
In Capistrano 2 the deploy:cold task looks like this: namespace :deploy do task :cold do update migrate start end task :migrate do ... end end I would like to create a ...
1 vote
1 answer
161 views
Why does IRB display arrays differently depending on their length?
I am currently experimenting with arrays in irb. If my array has 22 elements, it will display properly as shown below: (Screenshot) #Ruby Version 3.4.7 x = 1..22 #=> 1..22 x.to_a #=> [1, 2, 3, ...