Capistrano fail to deploy rails app due to incompatibility with OpenSSL 3.0
I have a rails application with Rails 7 and Ruby 3 support, which is working well in my development machine with Ubuntu 22.04, ruby 3.0.2p107 and Rails 7.0.2.3.Now I'm trying to set up Capistrano...
View ArticleRails Alpha2 country to Real country name
I am using country gem https://github.com/hexorx/countries and trying to get the the country name from alpha2 country names. but it comes as [object object]. here is my code. render :json =>...
View ArticlePossible to use a "database first" approach in ruby on rails?
Would it be possible to create a db schema in a GUI mysql administator and then create (or update) a model based on this schema?
View ArticleHow to get path from URL when filename contains question mark
I have a url like this:url = www.example.com/resources/am_i_a_file?.pdfwhere the filename contains a question mark (I know....)When I try the following:uri = URI::parse(url)path_raw = uri.pathI get:...
View ArticleCan't understand "unless" keyword in Ruby
I'm not a native English speaker. I know it sounds stupid nonetheless. I write in Python & C. But I can't quite understand how unless works.Is it healthy to think of it from a logical standpoint?...
View ArticleHow to make a manual job always exit with success on GitLab CI?
On my Gitlab CI I run the gem https://rubygems.org/gems/brakeman as a manual stage. When it finds any warning or error, on Gitlab CI in the end, after it's gone through all the code, it exits with...
View ArticleENOENT Error when trying to create Excel file in Ruby
EDIT 2: I've managed to resolve the directory issue and it creates the CSV file without issue, however when I try to export the file as a XLSX file using the save_to_xlsx method, the program still...
View ArticleHow to get the path of a file without normalisation in ruby?
My current directory path is /a/b/c/When I dofname = File.path("../test.rb")::File.absolute_path(fname) output is: /a/b/test.rb What I am expecting is the output something like this: /a/b/c/../test.rb...
View ArticleWhy is it best to store a telephone number as a string vs. integer?
As the question states, why is it considered best practice to store telephone numbers as strings rather than integers in the telephone_number column?Not sure I understand the rationale for this. Please...
View ArticleInclude Fulfilled Orders In ShopifyAPI::Order.All
As a part of my shopify application I would like to keep a local export of every single one of my orders. I have a ruby script that achieves most of what I need here, but it only fetches unfulfilled...
View ArticleRuby Serialising and deserialising json
I have this two function to serialise and deserialise game state. I got it working okay. But It feels very cluttered and messy. Is there a better approach of doing this?There is two different class...
View Articleruby selenium click on button with class name
I'm using ruby and selenium to test a web page, with the two buttons below<div class="AVdis"><span class="gwt-InlineHTML"/><a class="AVcur" name="attendEdit"; font-size:...
View ArticleWarning: PATH set to RVM ruby but GEM_HOME and/or GEM_PATH not set, see:...
I keep getting this error every time I open my terminal:Warning: PATH set to RVM ruby but GEM_HOME and/or GEM_PATH not set, see:https://github.com/wayneeseguin/rvm/issues/3212This started happening...
View ArticleHow to filter app bundle ids from list of string in ruby
I have a list of strings that are either urls, domains, and app bundle IDs I want a ruby code or either regular expression that can filter out app bundle IDs from the list of strings. Here is an...
View ArticleHow to find current stack size in bytes in Ruby
In Ruby, it appears you can set the size of the stack with the RUBY_THREAD_VM_STACK_SIZE environment variable.Is there a way to programmatically determine the current size of the stack? This would be a...
View Articlerunning a ruby script in notepad++
I've pasted the following code in notepad:puts ("enter a number")x = gets.to_iputs ("enter a second number")y = gets.to_iresult = x + yputs resultI've also created the following batch file:@echo...
View Articleactive storage url giving 404
I am currently using Active Storage to upload images. However, when I attempt to display the image on the Active Admin index, I receive a "No webpage was found for the web address page not found" error...
View ArticleGet ordered list of middleware in a generic rack application?
The functionality I am looking for is similar to the rake middleware command in Rails, except for a generic rack application.
View ArticleRuby with Rails app with Shopify keep deploying fine but on any controller...
I've made few updates to a Shopify app running on Ruby/Rails, updates were simply new release updated made and logic + code adjusted. Everything works when it comes to deployment of the app with new...
View ArticleTrouble with zxing Gem in Ruby 3.2.1 on Rails 7.1.1: Uninitialized Extensions
I'm currently developing a Rails 7.1.1 application using Ruby 3.2.1, and I've encountered an issue when trying to use the zxing gem for barcode reading functionalities. Despite following the...
View Article