Quantcast
Channel: Active questions tagged ruby - Stack Overflow
Browsing all 4616 articles
Browse latest View live

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 Article


Can 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 Article


Why 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 Article

How 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 Article

How 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 Article


Extension 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 Article

Edit 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 Article

Cannot 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 Article


Outputting 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 Article


Splitting 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 Article

Creating 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 Article

linking 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 Article

Ruby: 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 Article


In 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 Article

Strange 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 Article


How 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 Article

Stuck 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 Article


Image may be NSFW.
Clik here to view.

Change 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 Article

Uninitialized 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 Article

Image may be NSFW.
Clik here to view.

Events 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
Browsing all 4616 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>