Ruby Version Manager
I'm new to Ruby and currently using Windows 10. I'm facing difficulty installing RVM. Since I work on different projects with varying Ruby versions, I want to use RVM to manage them easily. Currently,...
View ArticleWithin RubyMine, selection of Ruby interpreter doesnt work - Windows 10
After selecting ruby.exe in the screen below, it loads for a while and then it fails and nothing happens.Ruby installation was done succesfully I think because after doing ruby -v in cmd it gives...
View ArticleTo fetch real time Indian stock market [closed]
My name is Ayush. I am working on my own trading algorithm so i need real time Indian stock market data. Can anyone have solution for that because i try all of things but it not worked. Can anyone have...
View ArticleRubyMine cant select Ruby SDK
Selection of SDKApply button does nothingAfter clicking on the apply button in the second image, nothing happens. Ok doesnt work either. Does anyone know how to fix this problem?in cmd: ruby -v results...
View ArticleCan we connect active storage in Ruby On Rails with Azure using Managed...
I have gone through this article:- https://hix.dev/tutorials/ruby-on-rails/active-storage#azure-rails-configurationConfiguration on rails sideazure: service: AzureStorage storage_account_name: <%=...
View ArticleAndroid app and webpage with the same Ruby on rails backend
I'm trying to do a Ruby on rails webpage that can be seen in an android app with react native.I know I can use the --api flag, but would it be a problem if I also want to access the website in a web...
View Articlehow to solver n + 1 problem with nested on rails 6
I have 4 models. I have gem bullet installed. When I enter a proposal that has a lot of equipment, I get the N+1 problem alert. It asks me to put includes(:equipment) in the proposal item. I do, but...
View ArticleTreat a model attribute as a symbol
My model has a string field (a short) and it stores it in db which is fine. But I want it always to return a symbol instead of string and, also, I'd like to assign a symbol to this string attribute....
View ArticleUnable to resolve dependency: user requested 'did_you_mean (= 1.2.0)'...
I just got a job and my first task is to create a documentation of our current code. I would really appreciate it if someone could help me.I'm got this error setting up the code for the documentation....
View ArticleConvert POM pages from cheezy page-object to site-prism gem
I want to be able to easily convert page classes/methods and methods from the cheezy page-object gem for Ruby to the site-prism gem. Doing this manually will take more time, so I wanted to know if...
View ArticleMongoid Capped Collection
I'm trying to create a capped collection with Mongoid. I have a definition as follows:class Customer include Mongoid::Document store_in(collection: 'customers') field: n, type: String, as: :name field:...
View ArticleGet the next item in a .each loop without ending the current item's iteration
I have a collection that I'm cycling through with an .each loop. Is there a way to get the next value without breaking the current iteration for a particular item in the collection?collection = [foo,...
View ArticlePreventing ActiveRecord migration from making huge changes in db/structure.sql
When running this ActiveRecord migration on the test (not production) database, large changes in db/structure.sql appear. This is reproducible. The changes are:A small number of the expected changes...
View ArticleRvm error: Error running '__rvm_make -j2'
Error running '__rvm_make -j2',please read /usr/share/rvm/log/1657548775_ruby-2.5.5/make.logThere has been an error while running make. Halting the installation.
View ArticleArgumentError in CertificatesController#import wrong number of arguments...
Extracted source (around line #7):5678910return redirect_to request.referer, notice: 'Only CSV files allowed' unless params[:file].content_type == 'text/csv'CsvImportService.new(file:...
View Articleruby 3.3.0 installation failing with asdf
when I try to install ruby 3.3.0 version on mac with asdf manager it fails.psych: Could not be configured. It will not be installed, BUILD FAILED (macOS 14.2.1 on arm64 using ruby-build...
View ArticleRuby: Check if string contains substring and nothing else
Users can upload a CSV file to my service. The CSV needs to have two column names and nothing else. One column needs to be "email" and the other "credit" and nothing else can be in those column names,...
View ArticleCurrent year in Ruby on Rails
How can I get current year in Ruby on Rails?I tried a variety of things, includingDate.current.yearTime.now.yearThe problem is they return the previous year in cases where year changes after launching...
View ArticleFile referencing using relative paths on Ruby
I just completed a CTF machine, but my brain has a hard time figuring out why this worked, so I thought to ask because I won't be able to sleep until I know! My question is regarding the use of the...
View ArticleActive Storage - How to regenerate image variants
How to do you manually reganerate a variant with active storage? Example class: class Doc has_many_attached :uploads do |attachable| attachable.variant :pdf_thumb, resize_to_limit: [400, nil] end endI...
View Article