Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
62 views

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 # ...
Tim's user avatar
  • 3
1 vote
2 answers
81 views

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 ...
Ricky883249's user avatar
0 votes
0 answers
49 views

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 ...
Pankaj Jain's user avatar
0 votes
0 answers
53 views

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': ...
Asher Namanya's user avatar
2 votes
2 answers
337 views

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:...
Arnold Roa's user avatar
  • 7,796
-2 votes
2 answers
68 views

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 ...
user1587804's user avatar
0 votes
2 answers
80 views

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....
Kurt Hoffmann's user avatar
-1 votes
0 answers
45 views

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: ...
Harshwardhan Patil's user avatar
0 votes
1 answer
44 views

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....
Sam's user avatar
  • 6,710
5 votes
1 answer
117 views

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 ...
bloovis's user avatar
  • 53
Advice
1 vote
1 replies
122 views

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 ...
iconoclast's user avatar
1 vote
2 answers
99 views

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(*...
user31692069's user avatar
1 vote
1 answer
73 views

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 ...
Necrom's user avatar
  • 11
1 vote
1 answer
111 views

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, ...
M. Salman's user avatar
1 vote
1 answer
93 views

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 ...
Chiara Ani's user avatar
  • 1,135
2 votes
3 answers
223 views

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 ...
Enoma Victor's user avatar
0 votes
2 answers
71 views

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 ...
Starscream512's user avatar
1 vote
1 answer
170 views

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, ...
user31692069's user avatar
1 vote
2 answers
574 views

I'm running a Rails 8 app with a Option model that configures active storage like so: has_one_attached :picture do |attachable| attachable.variant :small, resize_to_limit: [75, 75] end config/...
croceldon's user avatar
  • 4,637
0 votes
0 answers
45 views

I am trying to set up a virtual ruby environment on linux. The systems are managed by puppet. I have installed rbenv and ruby-build vis puppet and I can use rbenv install ... from the command line ...
Russell Fulton's user avatar
0 votes
1 answer
56 views

I am trying to use anyway_config for the first time in a plain Ruby program with RSpec tests. The docs do not give as much guidance as I would like. The end of this posting shows the pressing issue ...
Mike Slinn's user avatar
  • 8,488
0 votes
1 answer
81 views

I am trying write a method that interrogates the call stack to determine if it was called by a specific class. The caller in question would be dynamically generated (by ActiveRecord, as it happens), ...
Erik Ogan's user avatar
4 votes
1 answer
203 views

Context I've written an internal standalone gem that generates PDF with Gotenberg rendering an ERB HTML template dynamically. This permits to actually generate a PDF outside a controller context for ...
sheva's user avatar
  • 53
0 votes
1 answer
85 views

Context: I have a Cloudfoundry app running on Ruby 3.0. I'm using a forward proxy to access an external API and that proxy is going away soon so I have to switch to a new service. Problem: When I ...
Sylvain YVON's user avatar
0 votes
0 answers
84 views

I’m working on a Rails 8 app using the tailwindcss-rails gem. In my layout (application.html.erb), I commented out the line: <%#= stylesheet_link_tag "tailwind", "data-turbo-track&...
code-north's user avatar
0 votes
0 answers
39 views

I’m trying to run an old AngularJS project locally on Windows 11. The project uses: SCSS with Compass Pug templates Grunt tasks (grunt dev / grunt build) Node.js + Bower According to the README, I ...
yassel's user avatar
  • 1
0 votes
0 answers
84 views

I’m working on a Rails 8 API application where I have separated API routes from my admin panel: namespace :api do get 'test', to: 'clerk_test#index' end devise_for :admin_users, ActiveAdmin::Devise....
Mezbaul Islam Aunik's user avatar
-1 votes
0 answers
111 views

I have a web application in Ruby on Rails which uses the wicked_pdf gem to render a PDF. A week ago the PDF rendering failed and my test suite running didn't show because a test was missing. The ...
Julian's user avatar
  • 106
2 votes
0 answers
71 views

Need to do CPU profiling for Jruby application (jruby version : 1.7.20.1-8) which uses ruby version (1.9.3). I tried using default profiler but getting below error due to version compatibility issue ...
maulik trapasiya's user avatar
1 vote
1 answer
99 views

Just leaving it here cause I couldn't find a solution on web by myself and had to experiment for a long time to make it work. What I have: Ruby 3.2.4, Rails 7 and the GRPC gem of version 1.74.0 ...
zinovyev's user avatar
  • 2,211
2 votes
1 answer
69 views

I have a Thor class that has a getter method defined like this: # Playgrounds CLI skeleton class. # Commands are added from commands folder class CLI < Thor def self.exit_on_failure? true ...
BadIdeaException's user avatar
0 votes
2 answers
58 views

I have a rake task that require_relatives a ruby file and then calls a method defined in that file. That method fills a directory with new files, creating the directory if necessary. If I make my rake ...
Sparr's user avatar
  • 7,830
0 votes
0 answers
71 views

I am running some old ruby code and it misbehaves with the latest versions of some dependencies. I can change the dependency version in the Gemfile and then ask bundle to install the dependencies. The ...
Sparr's user avatar
  • 7,830
0 votes
0 answers
46 views

I use doxygen in most projects (C/C++, python), but doxygen does not support ruby (even though Gemini AI says it does). I tried rdoc. There were issues with it, so I looked for another tool. I'm now ...
JohnA's user avatar
  • 899
0 votes
1 answer
55 views

On one of my linux machines (Ubuntu 24.04) I get warning whenever I run a ruby program. The suggested solution gem pristine makes no difference. The machine has build tools installed. rful011@...
Russell Fulton's user avatar
-1 votes
1 answer
103 views

I'm having some trouble to decrypt ciphertext that was added to my logs using Rails 7.1.5.1 I recently added the Rails Encryption and made the upgrade to Rails 7 and now I need to decrypt logs that I ...
Caio Felipe Motta Ladeia's user avatar
2 votes
1 answer
121 views

I'm currently reading about Ruby's Data class: Ruby docs - Data class I understand how it has to be used and that it is intended for storing immutable data. But I'm not clear about the motivation ...
st88's user avatar
  • 353
0 votes
1 answer
61 views

I have a redmine (5.1.9) server running on apache (2.4). When processing email replies, it fails trying to post an HTTP request to itself. I believe this happens because the apache server itself ...
Gary Aitken's user avatar
0 votes
1 answer
60 views

Is it possible to retrieve more than the file and the start line of the call stack in Ruby? Consider the following model file: # sample.rb def sample(a = nil, b = nil, c = nil, &block) yield if ...
schmijos's user avatar
  • 8,843
2 votes
2 answers
154 views

I have inherited a Ruby codebase which tries to implement a singleton pattern by nesting a class within a module like so: module ModuleA class ClassA def methodA ... end end def ...
Jemenake's user avatar
  • 2,272
1 vote
1 answer
112 views

What's the difference between ... binding.break @vendors = Vendor.all ... and ... debugger @vendors = Vendor.all ? I can't notice any difference. They both seem to do the same. Is there any ...
st88's user avatar
  • 353
0 votes
0 answers
59 views

When I read the RAILS_ENV environment variable, it returns "development". irb(#VendorsController:0x0000000...):001 ENV["RAILS_ENV"] => "development" All good and well. ...
st88's user avatar
  • 353
21 votes
2 answers
2k views

If I run this very simple program: x = 1 y = 2 puts ( x - y ) puts ( x - y ) puts ( x - y ) I get this output (!): -1 -2 -1 However, I would expect this to print: -1 -1 -1 I.e., -1 ...
Marc Ihm's user avatar
  • 335
1 vote
1 answer
130 views

Currently upgrading an app from Rails 4 to Rails 5.2. I'm trying to determine how you handle the around_save callback, where you want to exit based on logic, before you execute the block. When using a ...
Derek's user avatar
  • 8,698
1 vote
2 answers
149 views

I have this fintech application (written in Ruby with some JS micro-services) which stores transactions in a database table, amounts are stored as integers in cents, eg $123.45 is stored as 12345, -...
Nick M's user avatar
  • 2,552
1 vote
1 answer
148 views

I'm well aware of Ruby's splats and double-splats in methods def method(*arg, **kwarg) : end method('foo', bar: 'baz') # arg = ['foo'], kwarg = { bar: 'baz' } but how would one do that processing ...
jjg's user avatar
  • 1,120
1 vote
1 answer
172 views

In my rails 8 app I followed the Bootstrap Getting Started instructions to pull in bootstrap version 5.3.7 via the link tag: I put the following in the head tag of application.html.erb: <link href=...
Neil's user avatar
  • 4,740
0 votes
0 answers
60 views

I have set-up rbenv which sets my local version properly. However when I use executables like ruby or gem, it still uses (macos) system defaults My rbenv local setup shows correctly [(adikshit@...
Ayusman's user avatar
  • 8,792
1 vote
1 answer
156 views

This code may be difficult to understand at first glance, but it was created solely to reproduce an unusual behavior and does not represent actual application code. Therefore, comments such as “the ...
megeton's user avatar
  • 23
0 votes
1 answer
188 views

I am given a "duck type" of a single method (a "functional interface") and I have a whole flock of adapters as methods and blocks. For example, the protocol defined by the library ...
Michael Deardeuff's user avatar

1
2 3 4 5
4586