Category "ruby-on-rails"

ssh-agent forwarding into docker-compose environment is not working

I have been having serious troubles to get ssh-agent forwarded into the docker container (with my docker-compose installation). I have Mac running Catalina, wit

Any workaround for solidus_braintree gem support on solidus 3.1.5(latest version) other than solidus_paypal_braintree gem integration?

I am trying to upgrade solidus_core to 3.1.5 (lates version till date) causing issue with solidus_braintree as this gem is deprecated on arrival of solidus_payp

Install libmysqlclient-dev along with npm in dockers

I have an error when trying to install the libmysqlclient-dev package together with npm for some reason when installing libmysqlclient-dev it removes npm Step 1

Sending and Receiving cXML PunchOutRequest in rails

I'm trying to integrate with ariba with my rails application.ariba uses cXML to punchout the data i needed. I found the gem https://github.com/officeluv/cxml-ru

Devise, OmniAuth with Facebook, 'Not found. Authentication passthru'

I'm trying to use Omniauth with Facebook for a project but whenever I try to log in with Facebook I get a blank page with just "Not found. Authentication passth

How do I use class_name to link two specific columns

I have a model called Company, this model is used for both companies and clients, I know this is not the best approach for companies/clients but the software I'

Refactor rails query (where field is json hash)

I am using audited gem and I have the following rails query and I want to make it by using IN, at least without OR condition. audited_changes contain a hash wit

Rails: turbo-frame with src requested interpreted as format.html

I've noticed this strange behavior of turbo frames loading lazily via src attribute setting: nav = turbo_frame_tag 'primary_menu', src: primary_menu_path :

How to dynamically inject permission checking logic for RAILS_API method

The current project adopts the front-end and back-end separation architecture, the front-end is realized by VUE, and the back-end adopts RAILS. Now we need to s

Deploy via capistrano fail: "sudo: /bin/systemctl: command not found"

Now I'm transferring my environment following the below. Environment PreviousVersion NewVersion Rails 5.1.2 7.0.0 Ruby 2.4.1 3.0.0 capistrano 3.10.1 3.16.0 cap

Can't continue deploying after for while via capistrano

My environment is following the below. Environment Version Rails 7.0.0 Ruby 3.0.0 capistrano 3.16.0 Production environment Amazon EC2 Linux After for while fr

No route matches [GET] "/assets/application.js & No route matches [GET] "/assets/application.css

I am moving away from Webpack to Esbuild, using jsbundling-rails and cssbundling-rails. Rails version is 6.1.5 Everything seems to be working fine, but in my lo

openid-connect client in ruby with example code

I want to read data from an API which requires authorization with openid-connect. My client should be written in ruby, so I can use it in a task to import data

ActiveStorage::IntegrityError (Must supply api_key)

I have been building a Rails app with image uploads for user avatars and until now there were no problems. The app is hosted on Heroku and the service I am usin

Force yarn.lock to generate?

I have a rails app, I deleted yarn.lock (due to some complicated errors), but I would like to regenerate it. I tried yarn install -std:c++latest and yarn instal

Rails 7 - link_to with method :delete still performs GET request

I am trying to get this link to work, performing a DELETE request: <%= link_to "Sign Out", destroy_user_session_path, method: :delete %> However when I c

ActiveRecord Get Max Value Without Loading

I need to get the last record with a certain value, but without loading it. I have to do something like: Thing.where(cool: true).where(created_at: Thing.where(c

Does Unicorn Release Workers during I/O Wait

I have a rails 6 application using Unicorn. One of my endpoints handles image uploads to s3. For test purposes I have made a stack with a single web server runn

`result_exit_status': undefined method `-' for nil:NilClass (NoMethodError)

I am trying to add the Code Climate Test Reporter to a New Rails app that we are currently building. I have setup circleci on other projects so I modified the c

Rails upload a file - temporary file path needs file extension

I have an app that generates a PDF from react-pdf/renderer. Then the PDF is saved to ActiveStorage (utilizing Amazon S3). Some of the PDFs are too large though,