Category "ruby"

Rspec and SQL: Index 0 is out of range

I am trying to run my code and I get the following error: Failure/Error: Bookmark.new(id: res[0]['id'], title: res[0]['title'], url: res[0]['url']) IndexError:

How do I return string from fastlane to jenkins groovy variable?

Have a lane in fastlane as lane :ipa_path do |options| “<ipa path>.ipa” end How to store string returned by ipa_path lane in groovy script v

How to set path correctly from RBENV shims on Mac M1 with zsh

I'm having trouble setting up the rbenv paths I follow the instructions as specified here: rbenv installation page I run the command on a zsh terminal: rbenv in

twistlock scan on an image showscompliance issue

I am trying to do a twistlock scan on an image and I can see a compliance error stating Private keys stored in image I have not hardcoded any keys in the image.

how to get specific value cell index using rubyXL gem

I have a static header in my excel template and I want to find each column cell index using cell value. Example: Row1: cell1, cell2, cell3 I want to find the ce

How to make data:{confirm..} work in rails 6 | button_to

my confirm popup not working in rails 6. I added gem 'jquery-rails' to GEMFILE and run bundle install. I also added //= require jquery //= require jquery_ujs t

What do I write to Slack's Socket-Mode websocket endpoint to send a chat message using Ruby?

I am trying to write a simple Slack chatbot for my team using Ruby. It's a bit rough because Slack doesn't have official support for Ruby. Nevertheless, I've be

Could not find 'minitest' (>= 5.1) among 39 total gem(s)

Situation: I am trying to setup Cocoapods. I'm on OSX 12.2. I have installed Ruby with Homebrew. When I run gem list minitest (5.15.0) is listed. Running pod se

Rails helper doesn't have access to base class method

I've got helper which I'm including inside Create service class. This Create service inherits from Base class and I'm including ::Imports::HashFieldsBuilder to

Rails/Heroku, switching between databases multiple times yields "can't create Thread: Resource temporarily unavailable" error

Setup: Ruby 2.5.9, Rails 5.2.2, Heroku-18, Postgres Issue: I'm running a task on my Heroku staging database which compares data from two different databases (bo

"Neither readline nor libedit was found" on Raspbian 11 (bullseye)

I am trying to compile Ruby and I am getting the following: root@raspberrypi:~/ruby-3.1.2# make -j4 ... linking ruby make[2]: Leaving directory '/root/ruby-3.1.

Associate Active Record tables through non-primary, non-unique column in Rails

I have a table "films" whose schema looks like this: create_table "films", force: :cascade do |t| t.integer "tmdb_id", null: false t.string "language_is

Associate Active Record tables through non-primary, non-unique column in Rails

I have a table "films" whose schema looks like this: create_table "films", force: :cascade do |t| t.integer "tmdb_id", null: false t.string "language_is

BUILD FAILED (Ubuntu 20.04 using ruby-build 20210119)

I'm using rbenv and in Ec2 instance I'm trying to install a ruby different version but when I execute rbenv install 2.7.2 following errors occur. Downloading

Allowing ruby buildpack on Heroku to use Yarn cache

I'm running a Ruby on Rails + Webpacker app on Heroku with Yarn v2 and hitting some issue with dependency caching. It seems that Yarn dependencies are reinstall

How to disable Pry autocomplete?

I would like to disable autocomplete in Pry. How to do it? I'm using it in Rails console(from Emacs/inf-ruby) and it is very slow and annoying in my legacy app.

Active storage problem - replacing pictures

I'm using:ruby 2.6rails 6.1.4devisedevise_token_authactive-storage usingl locally disk service I'm creating api in which I can storage and upload pictures. I ca

POST api request in two models in Ruby on rails

I would like users to be able to create a booking, and give it a partner (BookingPartner) in the same request, similar to this "booking": { "address": "

Upgrade Ruby 2.6 to 2.7 - WebMock no longer recognizes RegEx patterns on stub requests

I am upgrading a Rails 6.1.4 application from Ruby 2.6.10 to Ruby 2.7.6. With Ruby 2.7.6, WebMock no longer matches the Regular Expressions that worked perfect

Hide default value in form Ruby

I have a form and when I set a value, the value is displayed in the field, how to not display the value but keep the existing values when submitting the form: H