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

How to specify enclosure in Ruby RSS library?

I am trying to use the Ruby RSS library to build an RSS feed for a podcast. I am supplying values for an enclosure, but the enclosure is not being added to the feed and fails silently.What do I need to...

View Article


How to write a switch statement in Ruby

How do I write a switch statement in Ruby?

View Article


Segementation fault error with gem Pycall

I have a rails project using pycall and pandas.I use these gems in a dedicated service. It works on production (heroku) and in a local rails console, I can run some data calculations.But in a local...

View Article

Converting an empty string to nil in place?

I'm looking for a way to convert an empty string to nil in place using Ruby. If I end up with a string that is empty spaces I can do" ".strip!This will give me the empty string "".What I would like to...

View Article

Setting Rails config.cache_classes=false causes env['warden'].user to fail

I'm running into an issue where setting config.cache_classes=false in my development.rb causes the following method find_verified_user to not get executed.module ApplicationCable class Connection <...

View Article


Testwise chose a specific story or test case to run

Does testwise allow to run specific test case? Let's say I have a CSV that has story or test case called test hyperlink and then read in the csv and run only that test case.Thanks for the help.

View Article

Fail_install_gem_ruby_windows10(x64) - jekyll

I hope you are well, I have a problem wanting to lift my service in Jekyll.It happens that I am working jekyll with GitHub pages and the site has already been generated with its files in the local...

View Article

Ruby in VSCode, Couldn't find a workspace [closed]

I've started to learn how to use Ruby on VSCode, but I've never used VSCode before, I find it struggle to setup thingsEverytime I try to debug my code, there always will be an error "Couldn't find a...

View Article


`npm run dev` (vite --host), `bin/vite dev` or `bundle exec vite dev` on Vite...

I making a Rails monolith with Vue.js and vite_rails gem. Also, I use Docker containers. I made a container for Rails, and another one for Vite. Otherwise, Vite doesn't work as expected; I think it...

View Article


File not found error when loading a file from a website in Ruby

I'm trying to call resources (images, for example.) from my website to avoid constant updates. Thus far, I've tried just using this: @sprite.bitmap =...

View Article

Erasing incorrectly encoded byte sequences on reading

I am reading files into Ruby strings, and these strings are later processed further (for instance, using the CSV module). The external encoding of the files is a parameter, and supposedly, the files to...

View Article

How to install specific bundler version

I'm new to Ruby. I installed Ruby 2.7.2 and I'd like to install a specific bundler version. When I run:gem cleanup gem cleanup bundler gem list bundler bundle install 2.2.5I'm getting this...

View Article

How to consume all yielded elements into an array?

I have a Ruby object that has a each method. Now, I would like to fetch the yielded elements into an array. I'm doing this:array = []x.each do |i| array << iendIs it possible to do this in one...

View Article


Ransack query is returning wrong quantity of objects

I have this ransack query:SchoolTeacher.ransack(school_classrooms_id_eq: 1134).result.countit should filter objects of SchoolTeacher where classroom_id os 1134.SchoolTeacher belongs_to School.School...

View Article

how to sort array in ruby if i have nil object inside array?

how to sort array if i have array like this in ruby?example :my_array = ["12 months", "13 months", nil, nil, "12"]i want get result like this : my_array = ["12", "12 months", "13 months", nil, nil]when...

View Article


(macOS 14.4.1 on x86_64 using ruby-build 20240501) ruby 2.7.7

I have a macbook pro M3 chip and I'm trying to install Ruby 2.7.7 but keep running into this error:BUILD FAILED (macOS 14.4.1 on x86_64 using ruby-build 20240501)I've been at this for 3 days so any...

View Article

Rails with Devise user confirmation link not confirming accounts

This hasn't been a problem in the past, but for some reason when I click the link in Devise confirmation emails for my Rails app, it goes to the site but doesn't confirm the account. My app is hosted...

View Article


make ruby default to 3.1.2 on macOS

I am working on macOS.brew upgrade rubyWarning: ruby 3.1.2 already installedbut doingruby -v would get meruby 2.6.3p62 (2019-04-16 revision 67580) [universal.arm64e-darwin20]I triedwhereis rubyand it...

View Article

gem install psych error

I'm trying to bundle install a rails project but I'm stuck...when I try to run gem install psych all I get is this:Building native extensions. This could take a while...ERROR: Error installing psych:...

View Article

Invalid yield, SyntaxError in Ruby

I am absolutely NOT a developer, but I am trying to get this abandoned app to workThis is the code in a file called layout.erb which is HTML<div class="container"><%= yield...

View Article
Browsing all 4612 articles
Browse latest View live


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