229,271 questions
0
votes
0
answers
65
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
# ...
1
vote
2
answers
82
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
51
views
CocoaPods install error: “version of CocoaPods used to generate the lockfile (1.16.2) is higher than the current executable (1.15.2)” in react native
I'm working on a React Native iOS project using React Native 0.81.4, and I'm getting a CocoaPods–related error when running:
Installing Ruby Gems
Installing CocoaPods dependencies with New ...
0
votes
0
answers
54
views
Getting Rails 6 error after upgrading from 5.2 to 6.0.6 [duplicate]
Here is the error:
bundle exec rails app:update:bin
/home/ubuntu/.rvm/gems/ruby-3.1.2/gems/activesupport-6.0.6.1/lib/active_support/logger_thread_safe_level.rb:16:in `module:LoggerThreadSafeLevel': ...
2
votes
2
answers
355
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:...
-2
votes
2
answers
68
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
81
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
46
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
45
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
117
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
122
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
99
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(*...
1
vote
1
answer
73
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
111
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
93
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 ...