Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [ruby-on-rails]

Ruby on Rails is an open source full-stack web application framework written in Ruby. It follows the popular MVC framework model and is known for its "convention over configuration" approach to application development.

0 votes
0 answers
16 views

How to use a class to add and remove values to / from cookies in Ruby on Rails?

The users of my Rails app tend to have multiple accounts to login. Cookies are used to store the names of those accounts in each user's browser as comma separated values. This makes it easier for my ...
Tintin81's user avatar
  • 10.1k
0 votes
0 answers
12 views

How do I get my M1 Macbook pro to trust Netskope cert?

My company recently installed Netskope on our machines. Now any HTTP request I make from apps I am running locally fail with the below error whether Netskope is enabled or disabled. SSL_connect ...
NoTroutAboutIt's user avatar
0 votes
1 answer
22 views

Unable to match custom method REST routes to ruby on rails

I am new to ruby-on-rails and having a hard time trying to get routes to match for my API service. I designed my custom routes for resources following the Google AIP-136. For example, for the ...
Saurav Das's user avatar
-5 votes
0 answers
22 views

Deploying Ruby on Rails to HTML [closed]

I have thinking about deploying ruby rails to html. Then connect it to apache Cordova then how can I deploy the project to html I tried some deploying ruby gem libs and some of them didn't work for ...
Ermias Endalkachew's user avatar
0 votes
0 answers
34 views

TinyTDS Login failed when TSQL connects -

I have a RoR API only app: gem 'rails', '~> 7.0.8' gem 'activerecord-sqlserver-adapter', '7.0.7' gem 'composite_primary_keys', '14.0.9' gem 'tiny_tds', '2.1.7' The ubuntu server connects just fine ...
madav's user avatar
  • 3,066
0 votes
0 answers
22 views

Rails Form no submitting attributes from associated models

I've come back to rails after ignoring it for a few years and seem to have forgotten some things! I have three models: customer product order When submitting an order, there are two fields to select ...
Simon Cooper's user avatar
  • 1,594
-1 votes
0 answers
40 views

Why is the data in a Rails view displaying as 0.0 or 42.0 instead of $42.00?

Question Title: Why is the data in a Rails view displaying as 0.0 or 42.0 instead of $42.00? Summary: How can I get this field to display e.g. $42.00 instead of 0.0 or 42.0? In addition to the ...
Jennifer James's user avatar
1 vote
1 answer
49 views

Ruby module is not an ancestor after prepend

I'm developing a plugin to the Rails (6.1.7) project Foreman (v3.5.1; based on the Foreman Plugin Template) and face the issue that one of my modules (DnsInterfaceExtensions) ought to be prepended to ...
Xavier Mol's user avatar
0 votes
0 answers
18 views

Rails 7 with turbo - some requests on Chrome/FF doesn't work correctly

It happens only on Chrome/Firefox - on Safari everything works fine. I noticed that some requests (eg. file upload) don't work correctly after moving to turbo (from turbolinks). Request: patch https://...
Magda Sz.'s user avatar
  • 161
0 votes
1 answer
38 views

Mime type spoofing detection

I am working on a content type spoof detector for a web application. My issue can be answered by any developer with experience on this subject. My input is a object, which expose its filename, ...
Mathieu EUSTACHY's user avatar
0 votes
0 answers
37 views

How can I fix Postgres errors in Minitest?

I am using Minitest and Postgres to test my Rails website. When I added a "Like" model, I started getting Postgresql deadlock errors Minitest::UnexpectedError: ActiveRecord::Deadlocked: PG::...
tolia k's user avatar
0 votes
0 answers
20 views

rack-attack: Rack attack throttling not working

I am trying to limit the api calls using rack attack. I have followed the setup process but throtteling is not working. steps I followed: installed rack-attack gem created rack_attack.rb initializer ...
George Maharjan's user avatar
0 votes
0 answers
19 views

N+1 issue when listing attachement and variants(has_many_attached)

N+1 query issue is coming at the time of fetching variant. Model: # Yoyaku Shouhin model class YoyakuShouhin < ApplicationRecord has_many_attached :shouhin_images do |attachable| attachable....
Aniruddha Mirajkar's user avatar
-1 votes
0 answers
9 views

Library is unable to encode image files to the Webp files

Currently, I'm using webp-ffi gem to convert PNG/JPG files to webP files for better performance, it was working fine but suddenly, the library stopped working and it is raising the below exception ...
Vishal's user avatar
  • 816
0 votes
1 answer
57 views

Is it valid practice to intentionally omit association definition with Rails ActiveRecord? [closed]

While been working on Ruby on Rails application, I was suggested to omit ActiveRecord association intensionally by my coworker for it's defines unnecessary methods. Example, class Person < ...
monnet362's user avatar

15 30 50 per page