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

Questions tagged [ruby]

Ruby is a multi-platform open-source, dynamic object-oriented interpreted language. The [ruby] tag is for questions related to the Ruby language, including its syntax and its libraries. Ruby on Rails questions should be tagged with [ruby-on-rails].

ruby
0 votes
0 answers
13 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
-1 votes
0 answers
39 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
0 votes
0 answers
16 views

Issue with Psych::DisallowedClass Exception when using reify in PaperTrail with Sinatra

I am working on a Ruby project using Sinatra version 3.0.6 and Ruby version 3.0.0. I am using the PaperTrail gem (version 15.1.0) to track changes in my models for auditing and version control ...
xmarston's user avatar
  • 863
0 votes
0 answers
39 views

Ruby case examples, consistently only shows one action under when [closed]

I've waded through multitudes of Ruby case questions, here and on the web. They all have one thing in common, they only show one statement following the when. Of the form, case whatever, simple, ...
D M's user avatar
  • 1
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
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
167 views

Can I download a old version of google chrome stable? [closed]

I use the below config file in the .ebextensions to preinstall the Google Chrome stable when deploying our Ruby application to AWS EB. commands: 01-install: command: rpm -q google-chrome-...
lei lei's user avatar
  • 1,829