305 questions from the last 365 days
0
votes
1
answer
34
views
Ruby irb: Autocomplete-usage leads to crash
I start typing on the console and a list with the feasible options appears. Then I use the tabulator-key for going through the options.
Immediately irb crashed and exits. I'm on the console again.
...
0
votes
0
answers
129
views
gem 'ruby-vips' on Windows: non-compatible forward slashes in the vips-module path
After upgrading Rails from 8.0 to 8.1 and running rails s on Windows, I get VIPS warnings, for example:
unable to load "C:\Ruby34-x64\msys64\ucrt64/lib/vips-modules-8.17\vips-heif.dll"
...
-2
votes
0
answers
64
views
How to properly set up a formatter for Vagrantfiles in VS Code?
Problem:
I am using VS Code to edit Vagrantfile (Ruby syntax). By default, VS Code does not format these files correctly. When I install recommended Ruby extension like Ruby LSP, nothing happens when ...
9
votes
1
answer
490
views
Ruby on Rails Redis connection_pool wrong number of arguments (given 1, expected 0)
I recently encountered an issue deploying a Ruby on Rails app to production (on Render) whereby the app would not build and rake tasks would not run. The application would build and launch fine in ...
0
votes
1
answer
69
views
Message body is blank when retrieving emails with Ruby GMail API
I have some code which calls Google's Ruby API to get messages from GMail using list_user_messages.
I know from docs that the returned messages only contain an id and thread_id and therefore I have ...
-2
votes
0
answers
111
views
Tab trap on modal
I was trying to fix a bug in the framework I use where when I went to 'share' a comment, a modal would pop up with some options, the problem was that I couldn't tab through the modal.
I managed to fix ...
0
votes
0
answers
42
views
How to define the content of a Resource?
I'm trying to build a POC MCP server using the MCP Ruby SDK.
I have created a couple of tools, and now I need to add the first resource to give access to my posts, but I'm having a hard time figuring ...
Best practices
0
votes
2
replies
93
views
What's the best setup to use Ruby on Windows?
I'm new to Ruby and I'd like to know the best way to program in Ruby on a Windows computer.
I already have a setup, but it's not working very well: I have VS Code with the Ruby LSP extension, and in ...
5
votes
2
answers
2k
views
Ruby SSL_connect certificate verify failed: unable to get certificate CRL on macOS
m getting an SSL error when making an HTTPS request in a Rails controller (Ruby 3.1.6):
OpenSSL::SSL::SSLError in PurchaseAttemptsController#create
SSL_connect returned=1 errno=0 peeraddr=3.175.45.47:...
-3
votes
0
answers
52
views
Redmine / Mysql 8 (in docker) TLS/SSL error: self-signed certificate in certificate chain [duplicate]
I setup a new redmine installation with mysql 8 - but I get SSL / TLS certificate errors.
I have no clue whats going wrong in this basic setup - normally I use postgres ...
Here is my compose file:
...
83
votes
13
answers
68k
views
uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger (NameError)
rails 6.1.7.10
ruby 2.6.6.
Just did a bundle update to 6.1.7.10 from 6.1.7.8
Now running the application I receive the following error:
/home/cb/.gem/ruby/2.6.6/gems/activesupport-6.1.7.10/lib/...
1
vote
2
answers
138
views
Replace a long case statement involving regex with a hash
I'm parsing a number of text files of different formats. Some are csv, some are xml and some even txt. I have a case statement that checks if a certain string is contained in the first 100 bytes of a ...
0
votes
0
answers
111
views
How to implement a callback using PyCall?
I would like to access a Python package in Ruby using PyCall.
The non-blocking function in the Python code below activates a callback.
Could you help me implement the callback?
#!/usr/bin/env python
# ...
5
votes
1
answer
127
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 ...
1
vote
2
answers
107
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(*...