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

While installing ruby in windows i am getting this error ERROR: Failed to...

This is whole error:C:\Users\prati>gem install railsUsing rubygems directory: C:/Users/prati/.local/share/gem/ruby/3.2.0Temporarily enhancing PATH for MSYS/MINGW...Installing required msys2...

View Article


`sources` in .gemrc file appears to not be working

I cloned a repo with a very simple Gemfile:# Gemfilegem "rspec"Running bundle install threw this error:$ bundle installYour Gemfile has no gem server sources. If you need gems that are not already on...

View Article


Psych will not install when using a bundle install

I am trying to update some gems in my rails app and I get the error below when a gem called psych 5.0.2.I have seen similar reports of this issue on some sites but nothing that helped me. Any help...

View Article

Grover.to_pdf: ReadableStream is not defined

I have a Rails app that is using the Grover Ruby gem, and it converts HTML to images perfectly well, but when I try to convert it to a PDF as shown below, I get an error saying the ReadableStream is...

View Article

Vscode extension color settings will overwrite settings.json color settings,...

I am using vscode and have some syntax highlight color customization in settings.json, which works great for other languages except Ruby. Because I installed ruby on rails extension, which has its own...

View Article


How to continue script execution after a command replaces itself with a new...

I have an executable ruby script as follows:example:#!/usr/bin/env rubyat_exit do # Replace the currently running Ruby process with a new instance of the parent shell exec(`ps -p #{Process.ppid} -o...

View Article

How to assert certain method is called with Ruby minitest framework?

I want to test whether a function invokes other functions properly with minitest Ruby, but I cannot find a proper assert to test from the doc.The source codeclass SomeClass def invoke_function(name)...

View Article

Comparison of ruby objects by id [closed]

I have a heap containing ids of ruby objects. Comparison should use the cost of the objects,which can change. Now the ids in the heap should be compared by the cost of the objects, i. e. id1 <=>...

View Article


Lambda request body parsing issue using AWS api gateway

I am facing an issue while receiving a request from Mailgun, which contains an email attribute in the request body. I have deployed an AWS lambda function along with an API gateway. When a request...

View Article


Not able to parse logs having spaces between key value pair in json

I have a log containing json object. The log gets parsed if json object has no spaces. If it has spaces between key value pair, it is not getting parsed.Configuration file usedinput {syslog {port =>...

View Article

Pretty file size in Ruby?

I'm trying to make a method that converts an integer that represents bytes to a string with a 'prettied up' format.Here's my half-working attempt:class Integer def to_filesize {'B' => 1024,'KB'...

View Article

Why is hot reloading not working in Vite + Rails?

I created a rails app, and installed vite_rails gem. My typescript is in app/frontend folder.However, hot reloading when I save a TS file is not working.I also tried by installing...

View Article

TZInfo::DataSources::ZoneinfoDirectoryNotFound

today I used ruby+jekyll to compile a static web page file. This web page was forked from academicpages. After installing ruby, gem and a series of dependency packages, I used bundle exec jekyll build...

View Article


How to properly call an object method in ruby C api?

I am writing a wrapper around this html parsing library for fuzzing. Here is my current implementation of the wrapper:// Main fuzzerstatic VALUE mHtmlTokenizer = Qnil;int main(int argc, char** argv) {...

View Article

Rails 5.2 Polymorphic Association with polymorphic conditional

MODELS:class Car < ApplicationRecord belongs_to :user has_one :listing, as: :listable has_one :firm, as: :firmable has_one :seller, as: :sellableendclass Truck < ApplicationRecord belongs_to...

View Article


Simple ruby request using httparty with input parameters

I am learning ruby and attempting a simple ruby request on command line to scrape a website. There are 2 input elements with ids = "tb_radius_miles" and "locationSearchTextBox"I am trying to make a...

View Article

Issue of User Duplication in Rails Application

I'm using'rails', '~> 5.2.4', '>= 5.2.4.1'ruby '2.7.1'and gem 'pg', '>= 0.18', '< 2.0'I'm encountering an issue in my Rails application where some users are being duplicated in the...

View Article


Django API Request being rejected at Heroku level

I have two apps on heroku, one is a rails app, the other is django api. from the Django API i would like to send back some updates to the Rails app. I a doing the following:def...

View Article

Ruby YAML serialization and deserialization

I'm having a problem with OOP Hangman project in the de-serialization part. It throws the following error whenever I try to de-serialize the saved game file.The game is serialized correctly, how do I...

View Article

Image may be NSFW.
Clik here to view.

Error while doing bundle install with jruby

Currently, I am using JRuby 9.2.20.1 (2.5.8) and I am getting the error below:2024-03-19T16:27:22.302+05:30 [main] WARN FilenoUtil : Native subprocess control requires open access to the JDK IO...

View Article
Browsing all 4610 articles
Browse latest View live


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