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 ArticleApplication 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 ArticleWhy 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 ArticleRBS 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 ArticleRails 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 ArticleRails 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 ArticleHow 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 ArticlePhusion 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 ArticleChirpy 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 ArticleLook 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 ArticleSketchup 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 ArticleRuby 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 Articlerails 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 ArticleParsing 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 ArticleProblems 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 ArticleDebugging 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 ArticleShould 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 Articlebundler 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 ArticleHow 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