Implementing nCurses over telnet/ssh
I am currently attempting to implement a small telnet server which spawns a PTY on a connection from a client, and transmits the output of a small nCurses application to the client. I am working in...
View ArticleRails 6: Zeitwerk::NameError doesn't load class from module
I have a file which looks like this#app/services/account/authenticate/base.rbmodule Account module Authenticate AuthenticateError = Class.new(StandardError) class Base < ::Account::Base def...
View ArticleRansack search not returning expected results with enum field in Rails
I'm facing an issue with Ransack search in my Rails application when attempting to filter results based on an enum field. Despite implementing what appears to be a correct setup, the search doesn't...
View ArticleUnable to Load Gems from Lambda Layer in Lambda Function Using Single...
I'm facing an issue while attempting to load gems from a Lambda layer within a Lambda function, both defined in a single Dockerfile. Here's my current setup and the problem I'm encountering:Current...
View ArticleWkhtmltopdf Characters in single line partially cut between pages
I am working in a project using ruby on rails(3.1). My requirement is to produce pdf from the html content. So I use pdfkit gem.In some pages, characters in single line partially cut between pages....
View ArticleConnection issues with turbo streams and custom action cable channel
I'm trying to setup a turbo stream connection with a custom action cable channel from an erb view like this:View<%= turbo_stream_from "image_viewer_#{@image.id}", channel: "ImageViewerChannel",...
View ArticlePgHero gem error "No connection pool for 'PgHero::Connection::Database337600'...
I'm using RubyOnRails 6.1 with multiDB setup: primary and follower.CustomDatabaseResolver is configured to distribute load between databases.class CustomDatabaseResolver <...
View ArticleIntegrating Normalize.css with the rails asset pipeline
I followed the super simple direction on how to install the normalize-rails css reset gem outlined herehttps://github.com/markmcconachie/normalize-railsbut I keep getting error stating that"couldn't...
View ArticleI have problems with the routes the Ruby on rails [closed]
Rails.application.routes.draw do resources :categories root "pages#index" #before it worked with root "home#index" get 'home/index' get 'exercises/sleeping' #path 'exercises/sleeping' get...
View ArticleRuby: create a String from bytes
I would like to build a string from a byte value.I currently use:str = ""str[0] = byteThis seems to work fine but I find it ugly and not very scalable to strings longer than 1 character.Any idea?
View ArticleRails Select Drop Down for States?
I was wondering if maybe there was some already built in function for rails so that it would create a select drop down list with all the U.S. states so I wouldn't have to enter it manually. I searched...
View ArticleRuby ri for page?
On my machine, Ruby's ri data is in /usr/share/ri/3.0.0/system.Therein is:A directory for each found class/module (e.g., Array).A file page-*.ri for each found page (e.g., page-dig_methods_rdoc.ri).I...
View Articlebuilding ruby 3.3.0 rpm on amazonlinux2023 is linking to hard coded directories
I've been using the below ruby.spec to build RPMs on amazonlinux:2 for several versions of ruby now. Works great.I'm working on migrating to amazonlinux:2023 and while this still produces an RPM, when...
View ArticleIs there anything about my PATH that would cause Ruby not to work?
I followed (or thought I followed) ruby-lang.org's directions for installing the latest, non-system, version of Ruby on my Mac using rbenv. I cannot get my Ruby code files to run, though, and I get the...
View Articleis it possible to generate documentation for anonymous classes in rdoc
I would like to document a few methods in an anonymous class for rdoc.I know that alternative documetation tool exists, such as yard, but not sure the project owners are ready for change they inventory...
View ArticleCreating nested/reusable validators in Ruby with dry-validation
Let's say I want to set up a validation contract for addresses, but then I also want to set up a validator for users, and for coffee shops; both of which include an address, is it possible to re-use...
View ArticleHow to use headless chrome with capybara and selenium
Chrome version: 59.0.3071.104Using Cucumber, Capybara, Selenium to implement automation testing with Headless Chrome.features/support/env.rbrequire 'rubygems'require...
View Articlebundler: failed to load command: fastlane (/usr/local/bin/fastlane) in ubuntu...
I am using this command to install fastlane in GitHub Actions in Ubuntu image: - name: Bundle install run: | cd ./android curl -sSL https://rvm.io/mpapis.asc | gpg --import - curl -sSL...
View ArticleCors not blocking origins - Rails [duplicate]
I have on my cors.rbRails.application.config.middleware.insert_before 0, Rack::Cors do allow do origins 'localhost:4000' # later change to the domain of the frontend app resource '*', headers: :any,...
View ArticleWhats' the different brew and gem install?
Recently while running pod repo update, it ask meCocoaPods 1.15.0 is available.To update use: `gem install cocoapods`So I run sudo gem install cocoapods. It shows all goodSuccessfully installed...
View Article