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

Debugging Ruby code on MS Visual Studio Code on Windows 10 or greater

I'm using a Windows 10 computer with MS Visual Studio Code and I'm trying to debug simple ruby code using the available extensions. There used to be Ruby Lang support and debug by Peng Lv but it is...

View Article


Application specs are slow when upgrading to ruby 3.2.2 and 3.3.0 from 3.1.4

I am in the process of upgrading ruby version from v3.1.4 to v3.2.2The specs take 18-19 minutes on v3.1.4, but they run for about 45-47 minutes v3.2.2This is one of the logs i see in test.log when...

View Article


Why doesn't this has_many :through collection_check_boxes form input not...

I have a has_many :through association setup in a Rails 7 app.I'm using the ActsAsBookable gem to handle bookings for events. An Event has_many EventExtras that can be added from the booking, and a...

View Article

RBS optional block handling

I'm trying to add RBS information to a ruby gem and am wondering if there is a way to make this work. Take this code:def some_method(&block) if block foo = block.call endendand this signature:def...

View Article

Rails routing: Giving default values for path helpers

Is there some way to provide a default value to the url/path helpers?I have an optional scope wrapping around all of my routes:#config/routes.rbFoo::Application.routes.draw do scope "(:current_brand)",...

View Article


Rails 6.1.4 - Ruby 3.0.1 - ActiveStorage and WebP image format

There is no good info about how to setup Rails for serving WebP images with ActiveStorage.Can someone explain how to do it?I try:application.rbconfig.active_storage.web_image_content_types =...

View Article

How to Resolve Foreign Key Constraint Failure on Record Deletion in Rails 5...

I'm working on a Ruby on Rails application where I need to merge duplicate records in a database, transferring all associated records from one entity to another before deleting the duplicate. The...

View Article

Phusion Passenger Server Free vs. Enterprise Version and Thread Local Variables

Is it expected that the current thread will be the same across concurrent requests to "free" passenger?I've got a bug in that thread local ruby variables are not independent to concurrent requests....

View Article


Chirpy theme with jekyll picture is not uploading

use the chirpy theme, and i have this problem i opened a new folder named ‘images’, and on my markdown editor I see the picture perfectly, but on my site, i see it like thisenter image description...

View Article


Look up all descendants of a class in Ruby

I can easily ascend the class hierarchy in Ruby:String.ancestors # [String, Enumerable, Comparable, Object, Kernel]Enumerable.ancestors # [Enumerable]Comparable.ancestors # [Comparable]Object.ancestors...

View Article

Image may be NSFW.
Clik here to view.

Sketchup HTML:DialogFill fill Tags from selected csv file

Using Sketchup HTML:Dialog I am trying to fill in some input tags from a csv file.I don't get an error, the code does not seem to get past reader.onload = function(event)Has anybody had the same issue...

View Article

Ruby on Rails 7: Validate collection_check_boxes array

In Rails, I have a model called Post with a field called columns. The user can select which columns are to be displayed. I do this using the following line of code in my form:<%=...

View Article

"no such file to load -- net/https" - Heroku, Ruby, Ubuntu 10.04

I've seen this problem posted in other blogs and stackoverflow threads, but no one seems to have the answer. I'm trying to run heroku and getting this...

View Article


rails 2.3.5 - bug makes ActiveRecord::Base.configurations false. How do I...

I've been updating my user test server and now suddenly I got an error every time I invoke rake with anything database-related.Sample error:rake db:drop RAILS_ENV='production' --tracerake...

View Article

Parsing from CSV in Ruby

I'm trying to get rows from a CSV file without headers.require "csv"filepath = "data/beatles.csv"csv_options = { col_sep: ',', quote_char: '"', headers: :first_row }CSV.foreach(filepath, csv_options)...

View Article


Problems Installing Rails on Mac M3 Chip

I am trying to install rails on my mac. I already have rvm and ruby. I ran this command:sudo gem install railsI got the following output:familyrutscher@Familys-MacBook-Pro ~ % rails -vRails is not...

View Article

Debugging a Ruby program on a MS Visual Studio Code editor on Windows 10 or...

I'm using a Windows 10 computer with MS Visual Studio Code and I'm trying to debug simple ruby code using the available extensions. There used to be Ruby Lang support and debug by Peng Lv but it is...

View Article


Should I overwrite rack with rackup?

I am trying to update to the latest version of Rails and getting the follow error:➜ ~ gem update railsUpdating installed gemsUpdating railsrackup's executable "rackup" conflicts with rackOverwrite the...

View Article

bundler install specific group

bundler supports grouping dependencies. given a a Gemfile like# Gemfile# global gemsgem "foo"group :production do # production gemsendgroup :development do # development gemsendwhat is the best...

View Article

How to Install Parse SDK on ios Swift Projects

Im working in on a Swift project and i tried following these instructions to install Parse Swift and couldn't get past the first step.I tried$ sudo gem install cocoapodsI kept getting this error:ERROR:...

View Article
Browsing all 4648 articles
Browse latest View live


Latest Images

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