client.c:178:24: error: call to undeclared function 'rb_tainted_str_new2';...
I was trying to install mysql2 gem on macOS Sonoma 14.2.1 and first got the error:> gem install mysql2...ld: library 'zstd' not found...Then:> gem install mysql2 -- --with-ldflags=-L(brew...
View ArticleHow to secure assets in vite rails?
I would like to secure some important assets in rails. How can I do that?I'm using vite to transpile typescript, vue components, etc. And vite_rails gem to integrate it with rails.The problem is that...
View ArticleWhy is hot reloading not working in Vite + Rails?
I created a rails app, and installed vite_rails gem. My javascript is in app/frontend folder.However, hot reloading when I save a JS file is not working. Even more, Vite takes 4 seconds to transform my...
View ArticleHow to write Rails scope for this SQL query
I have an issue to get rows from database by multiple conditions.I have a table Slot and SlotAlteration.The slot has a time_off_id field.SlotAlteration has two columns, slot_id and action. Action can...
View Article(macOS 14.4.1 on x86_64 using ruby-build 20240501) ruby 2.7.7
I have a macbook pro M3 chip and I'm trying to install Ruby 2.7.7 but keep running into this error:BUILD FAILED (macOS 14.4.1 on x86_64 using ruby-build 20240501)I've been at this for 3 days so any...
View ArticleProblem with ruby on rails. javascript HEL
I have a problem with a dropdown list.If the file looks like this, then everything works fine, but the delete function does not work (for example, if I want to delete an order or client).But if I add...
View ArticleCannot connect rails and mysql2
So I'm trying to perform a simple database dump from the command prompt for the first time and the rails command keeps aborting with an error. This is running Ruby 2.3.0 with rails 5.0.7 and mysql...
View ArticleHow can I update my method using an alternative update method in ruby on rails?
Is it possible to update from an action/method other than the update action/method? For example in my users controller I already have an update method for other parts of my users account.I need a...
View ArticleWhy is Open3.popen3 wrapping my command in `sh -c` on linux but not on macos?...
This codeOpen3.popen3('mydir/myscript')is being wrapped in sh -c on linux, but not on macos. Why?ruby 3.3
View ArticleIntegrating Opensearch with Ruby on Rails
Currently, my Rails application utilizes Elasticsearch with the elasticsearch-model and elasticsearch-rails gems for integration:require 'elasticsearch/model'class Article < ActiveRecord::Base...
View ArticleError while using Chromedriver in Ruby on Rails
I need to test a project with capybara, selenium webdriver and chromedriver-helper, but I always get the following error message.Selenium::WebDriver::Error::SessionNotCreatedError: session not created:...
View ArticleHow to get the current working directory's absolute path in Ruby?
I'm running Ruby on Windows though I don't know if that should make a difference. All I want to do is get the current working directory's absolute path. Is this possible from irb? Apparently from a...
View ArticleHow to Enable Logging in Rails Application with OpenSearch and Searchkick...
My Rails application currently utilizes Elasticsearch with the elasticsearch-model and elasticsearch-rails gems for integration. In the config/initializers/elasticsearch.rb file, I've configured it as...
View ArticleUnable to resolve Ruby error (missing psych)
Whenever I run something with Ruby on my server, I get the following error:/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/yaml.rb:56:in `<top (required)>':It seems your ruby installation is...
View ArticleHow to authorize a Ruby REST request to the GA4 API using a service account?
I am trying to get a count of views for a given page path from the GA4 API library. I have been able to do so using the Ruby GA4 API client gem google-analytics-data but I want to compare the results...
View Articleprawn - import image from URL
I can't seem to figure out how to import an image from an urlTo import the images from my localhost I use:image"./assets/images/img.png"When I replace the path with an URL it says `image' : URL not...
View ArticleWhat is the best way to keep database data encrypted with user passwords?
Let's say an application has really specific data which belongs to a user, and nobody is supposed to see it except the owner. I use MySQL database with DataMapper ORM mapper. The application is written...
View ArticleHow to optimize Ruby performance and transition to another language? [closed]
We have software that performs numerous simple geometric mathematical operations (always the same ones) for our projects. It takes two weeks to compute a single project. The software is written in...
View ArticleRansack needs Associations explicitly allowlisted as searchable
BackgroundMy code was running and working until I installed the gem 'ipaddress' but now my previous created models now all get the following errorRansack needs <MODEL_NAME> associations...
View Articledynamic_matchers.rb:22:in `method_missing': undefined method `before_action'...
I follows guide at https://github.com/heartcombo/devisebut catch erorrD:\2024_04_25_rails\vyblog>rails generate scaffold brand brand_name:string company_name:string start_year:integer...
View Article