Category "ruby"

Parse quoted-printable encoding content from .mht file

I am trying to get all the images from .mht file by using Nokogiri gem. But since the .mht file has quoted-printable encoding, all the images that I received, h

Rails couldn't infer whether you are using multiple databases from your database.yml in rails - 6 using nginx

While deploying code using capistrano gem - Rails couldn't infer whether you are using multiple databases from your database.yml and can't generate the tasks fo

Rails Devise - changing minimum password length for a particular user model

Is it possible to have a different devise config for a specific model? I want to have the minimum password length for all user models set to 8 characters, But f

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

How to extract all words of a camel cased string with a regular expression?

Assume I have a string that consists of multiple words. These words aren't separated by spaces, but every word starts with a capital letter. This type of naming

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 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

Export ipa file fails

Using Xcode v11.3 I try to export my .IPA file and get this error. An error occurred during export. The data couldn’t be read because of it isn&rsqu

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

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

How to use Simple Form and Direct Upload ActiveStorage

I'm having a trouble when I try to use Simple Form gem for upload video. I'm using ActiveStorage and local storage for this. My form looks like this: = simple_

Error with ruby version on termux when I try to install metasploit

I was installing metasploit with termux and it said: termux output ~ $ ls <br> metasploit-framework storage wiki-termux<br> ~ $ cd metasploit-fram

Flutter Debug: Warning: CocoaPods not installed. Skipping pod install

my problem is this: I want to connect my app to Firebase. I followed all the steps and did everything according to the instructions. When I tried to debug the a

How to have a factory in multiple files

I have a model that is used by multiple libs, each of these libs is using it with different approaches. For the moment I made a factory file, which contains mul

Rest-Client gem RoR, Getting SSL wrong version error

I want to build a cli ruby app which sends requests to Rails API server. I wanted to use rest-client gem to do that. Every time i use RestClient.post I get

Custom RSpec argument matcher spec output

I am trying to get a good output for a custom matcher I wrote: RSpec::Matchers.define :scope_limited_to do |expected| match do |actual| @actual = actual.l

#scan suddenly returns an empty array

I am creating a scraper for articles from www.dev.to, which should read in the title, author and body of the article. I am using #scan to get rid of white space

How do I troubleshoot "wrong number of arguments" in solidus affirm

Struggling to get solidus_affirm working and hoping anyone might have some ideas. I always have trouble with "wrong number of arguments" errors like this. Can g

Difficulty in create regex [duplicate]

40 I'm having trouble checking in React Js if a value is is any of the following combinations no spaces in starting Ramaining accept anything(