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

Not able to install ruby 3.2.2 in Mac Sequoia 15.0.1. M2 chip

I am trying to install ruby-3.2.2 on mac using RVM as a package manager, but I am getting errors related to openssl@1.1. Not only for ruby-3.2.2, for older versions also I am getting same error.Error...

View Article


How to calculate the current week in the month in Ruby

My goal is to find the date of a particular day in a given week of that month. Say for example, I want to know the date on May 2nd week's Friday.I can get the following via Time and Date classes.Week...

View Article


Expect method not to be called by default

Let's say there's a method report defined on ErrorReporter module.In my RSpec test suite I'd like to somehow globally stub this method so that test fails if it's not explicitly expected to receive this...

View Article

The livereload does not work and there is no automatic refresh when changing...

I want to live reload website usign jukyll. I am using windows 11; I have ruby 3.3.5. I am working on the following repository: https://github.com/academicpages/academicpages.github.io. When I build...

View Article

What does f.object do in the Rails form builder?

I am learning Rails 5.0 from a tutorial, and in that tutorial it uses f.object, which I am unfamiliar with. The f.object is being passed into ERb, into a method that handles error processing.I know...

View Article


Ruby Net::OpenTimeout: execution expired

I'm consistently getting this error on several hosts on my machine, e.g.:require 'open-uri'open('https://google.com').readNet::OpenTimeout: execution expired from...

View Article

ruby net/http opening connection very slow

When I'm working with net/http in development it is extremely slow. I've installed net-http-spy gem to get some info about each request and I've found out that "opening connection" part takes the most...

View Article

How do I upgrade Rails?

I am new to Ruby and Rails, as well as all this command line melarky. So please bear with me.I have installed, RubyGems, Homebrew, RVM, Rails etc, by following various tutorials.I think I have all of...

View Article


Making a non blocking HTTP request in a Rails app

Is anyone aware of a way to make outgoing non blocking HTTP requests from within Rails? I will need the response body eventually and am trying to avoid bringing up new frameworks to keep things...

View Article


How to change default timezone for Active Record in Rails?

In my application.rb I came across the following comment# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.# Run "rake -D time" for a list of tasks for...

View Article

Unable to copy credentials to clipboard in Rails app - JavaScript clipboard...

Problem:I’m building a Ruby on Rails application that manages user credentials and allows users to share them securely. However, I'm running into an issue where I am unable to copy the credentials to...

View Article

Is there a good maintained ruby gem to create docx with custom mailmerge...

Is there any usable ruby gem which allows me to create docx templates with custom mail merge fields like: «=title» or «=record.name»... ?

View Article

I want to generate a .docx file with custom mail merge fields in Ruby...

I want to generate a .docx file with custom mail merge fields in Ruby.Currently there is no available ruby gem for creation of docx files which has support to insert mail-merge fields.

View Article


Could Not Find Required Gems for Rails Project - bundle install Missing...

I’m trying to set up a Rails project, but I keep encountering issues with missing gems, even after running bundle install. The specific error message I’m seeing is:Could not find propshaft-1.1.0,...

View Article

ruby (rails) Net::HTTPResponse undefined method closed?

Ruby-on-Rails, Net::HTTPResponseNoMethodError:undefined method `closed?' for nil:NilClassHello, I have faced an issue:I use the RSpec framework and I need to mock a response within a method which I...

View Article


What does the "Rake::Task["db:reset"].invoke" command do?

I'm trying to find the script called by this Ruby/Rake command to find out exactly what is does ?Rake::Task["db:reset"].invokeI trying to find the script defining this command :$ find /opt/gitlab/...

View Article

How to add rate limiter in ruby on rails?

In my ruby on rails application I am facing certain performance issues. In certain forms more than 2500 request came from a same IP address at a time.So I used...

View Article


Throttling requests to a Ruby on Rails API

Trying to Google around for an a Rails plugin that will allow for throttling the amount of requests a particular resource gets consumed. Django's Piston has some open source code for this. Is there...

View Article

Image may be NSFW.
Clik here to view.

Invalid Login Attempt to NetSuite in Ruby Script but got response in Postman

I tried a ruby script code to fetch the status of the sales order but it is giving me a inValid login attempt (401)in the netsuite.The Postman give me right output (response code = 200) that i need in...

View Article

Why ruby StringIO does not give different encodings

Why in the following code I get different encodings ?require 'stringio'a = StringIO.new('toto')a.read(2).encoding# => #<Encoding:ASCII-8BIT>a.read.encoding# =>...

View Article
Browsing all 4628 articles
Browse latest View live


Latest Images

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