Open Banking Santander Brasil - Token
I need get token to use api to Open Banking in Santander Brasil.I configured postman to test as described bellow and work ok, but when a I try to do the same in a Ruby program, it is not work. I always...
View ArticleCan we use selenium with No headless mode in production environment?
Is it true that we can use selenium only with headless mode in production environment?I would like to manipulate browser and see tennis court avalilablity.It is because it is troublesoume to input what...
View ArticleWhy won't this code allow me to hide a pdf file "inside" of a png file using...
I'm trying to hide a file called "hello_world.pdf" inside of an image file "kitten.png". The code I'm using is:original_image_file = File.read("kitten.png")hidden_file =...
View ArticleHow to parse configuration file
I have a long configuration file with a non RFC format which looks similar to ndjson but it is not. I can't figure out what format name this is and have been looking at the parslet library yet I can't...
View ArticleHow do I dynamically add my Ngrok tunnel to config.hosts in Rails 6?
I'm trying to whitelist my ngrok tunnel hostname in config.hosts but it changes every time I start Ngrok. Is there a way to get the public url of my Ngrok tunnel so that I don't have to use hosts.clear?
View ArticleExtension in sketchup to make groove with selected line
I am writing a extension to create groove/ridges in sketchup with user selected line.https://forums.sketchup.com/t/groove-or-ridge-maker-from-selected-line-lines-extension/298902?u=complexartI do not...
View ArticleEdit YAML Frontmatter in markdown file
Is there some way in ruby to edit the YAML Frontmatter at the top of a markdown file, like those used in Jekyll and Middleman?Something like:def update_yaml #magic that changes A: 1 to A: 2 in...
View ArticleCannot install sorbet-static with bundler >= 2.4 on M1
Bundle fails to resolve dependencies of sorbet when using bundler 2.4 or later on macos. It works fine in docker with all bundler versions.Works fine with bundler 2.3:Use MRI ruby, for example: asdf...
View ArticleOutputting method result to erb
I'm working on an application that creates random sentences. I have it working as a console application, and want to make a Sinatra app which lets me display the sentences on the browser.I have a...
View ArticleSplitting a string to an array using regex in Ruby
I'm trying to write a function in Ruby which can take in a string and then split it based on certain criteria. This will be used to simulate grammar and generate random sentences. The strings exist as...
View ArticleCreating a map from an array of arrays in Ruby
I'm trying to write a function in Ruby which can take in a in an array of arrays, and convert it into a hash. This will be used to simulate grammar and generate random sentences. The resulting map will...
View Articlelinking clang lib allways undefined symbol
I have created an some classes I want to use with swig in order to generate ruby binding.Everything is ok when I generate the code or compile the ruby module. But when a script load this module, there...
View ArticleRuby: How to list methods declared in the main scope
In vanilla ruby, if I create methods in the default main scope:def asdf puts "asdf"enddef qwer puts "qwer"endHow do I list these functions?I have tried the following with no...
View ArticleIn the `maintenance_tasks` gem, how do we set `limit`?
When collection returns an ActiveRecord::Relation, how do we set limit for each "batch"? job-iteration's Best Practices says it defaults to 100. 100 is way too small for expensive queries and/or large...
View ArticleStrange timeout with ruby net/http
I am trying to download this file with ruby:https://evs.nci.nih.gov/ftp1/CDISC/ReadMe.txtHere is a sample program, showing the issue (the comment shows what I get):require 'uri'require...
View ArticleHow to move an element of an array to the beginning of the array
I want to move the element at index 2 to the start of the array [1, 2, 3, 4], the resulting array should look like [3, 1, 2, 4].My solution was to do the following[3] + ([1, 2, 3, 4] - [3])Is there a...
View ArticleStuck on "checking if fork works with pthread..." when installing ruby 2.5.7...
I am now follow the following tutorial (https://www.digitalocean.com/community/tutorials/how-to-install-ruby-on-rails-with-rbenv-on-ubuntu-22-04) to install ruby 2.5.7 by rbenv. When I user the...
View ArticleChange Ceedling output of failures for eclipse to jump directly to it
I managed to start ceedling as a c-build project and the complete log is written to console window.I also create an error parser, which for most of the warning/errors it works.But for the summary list...
View ArticleUninitialized constant Devise::SessionsController after upgrade
I have a rails 5.2 application that was built on ruby 2.7.1, devise 4.7.2, and activeadmin 2.9.0. I want to update it to the current versions. When I update ruby to 3.2.1, rails to 7.0, devise to...
View ArticleEvents not showing in Test Events in Meta Analytics using Conversation API...
I’m working on a Ruby on Rails app and integrating Meta’s Conversation API. Here’s what I’ve done so far:Generated an access token.Created the event body.Validated the event body using the Meta Payload...
View Article