How to compare file_name versions?
I need help in below sceneriocurrent_file_version = "AvamarConsole-x86_64-19.9.0-78.rpm"downloaded_file_version =...
View ArticleHow to solve ActiveRecord::ValueTooLong error when using ActionMailbox?
I'm using ActionMailbox in my Rails 7 project to receive inbound emails. I followed the configuration and migration setup as outlined in this guide. The email reception is functioning correctly with...
View ArticleRuby + sidekiq - best solution for execute and handle big data
Imagine we have 10k entities-x. For each entity-x we should make async api call. Each api call returns 100 entities-y. Then in total we have 10k * 100 = 1_000_000 entities-y. For each entity-y we...
View ArticleInverse :belongs_to for successful :has_many yields nil
I'm developing a plugin to Foreman (v3.5.1) to add support of CNAME records to the network interface model (Nic::Base): ForemanCnames (WIP). I'll first show you the associations that I want, where the...
View ArticleRuby: What's the proper syntax for a boolean regex method?
What is the proper syntax for a method that checks a string for a pattern, and returns true or false if the regex matches?Basic idea:def has_regex?(string) pattern = /something/i return string =~...
View ArticleRuby. NoMethodError (undefined method `fetch' for nil:NilClass)
I want install redmine plugin ldap_sync, but when i test it, i have error:Completed 500 Internal Server Error in 28ms (ActiveRecord: 19.6ms)NoMethodError (undefined method `fetch' for nil:NilClass):so...
View ArticleUnable to install debase gem
I am trying to debug code in Rubymine. It looks like we need to install debase first. I tried to search in google but could not find any solution.$ ruby -vruby 3.0.0p0 (2020-12-25 revision 95aff21468)...
View ArticleApp Engine says "Your runtime version for ruby33 is past End of Support", but...
As written in google documentation here and hereI use the latest runtime of Ruby available in app engine.RuntimeEnvironmentRuntime IDEnd of supportDeprecatedDecommissionRuby 3.3Ubuntu...
View ArticleWhat is the purpose of setting Ruby block local variables when blocks have...
Learning about Ruby blocks here. What is the point of having block local variable in this example:When you can just do the below instead? The x in the block is already going to have its own scope,...
View Articlerails: NameError uninitialized constant
I'm new to Rails and I'm trying to create a custom logger. I've placed my custom logger class in app/custom_logger/custom_log.rb as follows:module CustomLogger class CustomLog def self.info puts...
View ArticleC, nginx module compilation multiple definition error
I need to compile this https://github.com/rryqszq4/ngx_ruby as dynamic module, but i received error:/usr/bin/ld:...
View ArticleNginx, error while loading shared libraries: libruby.so.2.3:
I built nginx with the module ngx_ruby https://github.com/rryqszq4/ngx_ruby . When I try nginx -V or start i'm recieving: error while loading shared libraries: libruby.so.2.3: cannot open shared object...
View ArticleHomebrew Portable Ruby Error macOS 10.14.6
Homebrew suddenly stopped working, when i run any brew command i get following output:==> Downloading...
View ArticleUnknown attribute "id" when importing csv to rails app
I'm importing a csv to my app and I'm getting a routing error "unknown attribute 'id' for TableName"I understand so far that this should be due to my csv having columns that don't match with my table,...
View ArticleCatch SIGINT during an early rubygems startup
Is there a way to catch SIGINT during an early rubygems startup?I have a bash script that creates many Ruby child processes, and when I hit Ctrl-C, those children almost always dump a backtrace that...
View ArticleChange the behavior of existing Ruby code without modifying the original code...
BackgroundI bumped into the same situation as the question Eclipse + Encoding + Gitlab and am trying to change the behavior of GitLab.I have looked around the source of GitLab and decided to start by...
View ArticleRetrive emoji URL discordrb (Ruby)
How would I retrive the url on an emoji on discord using discordrb such as: https://cdn.discordapp.com/emojis/1117212093725294593.png?I'm passing the emoji from user input like this:...
View Articlerender json returns different response passing literal value vs variable
I have this code in the controller: render json: item.item_tags.map do |item_tag| { things_count: item_tag.tag.things.count, other_count: item_tag.tag.other_association.count, tag: { id:...
View ArticleWhat is the proper syntax for a boolean regex method?
What is the proper syntax for a method that checks a string for a pattern, and returns true or false if the regex matches?Basic idea:def has_regex?(string) pattern = /something/i return string =~...
View ArticleSearch engine optimization queries in Google Analytics Query Explorer 2
I am trying to fetch the result of Search engine optimization queries in Google Analytics Query Explorer 2. But I am not able to get the desired results. I have tried the below queryAny suggestions how...
View Article