Questions tagged [ruby-2.5]

For issues relating to development in Ruby, version 2.5. If your question applies to Ruby in general, use the tag [ruby].

47 questions
2
votes
1 answer

Fastlane + Google Drive API - File not found for Google Sheet

I created an OAuth key which should enable me to view and fetch content from a Google sheet (i.e. CLI access to a sheet which gives read/write to all kabaminc.com people) by following the google-drive-ruby library docs, but I get a File Not Found…
Wanda B.
  • 161
  • 2
  • 11
2
votes
1 answer

splat operator on hash for keyword arguments in ruby method definition

I have a class like this: class AwesomeService attr_reader :a, :b def initialize(a: 30, b: 40) @a = a @b = b end end I am trying to do something like this: class AwesomeService DEFAULTS = { a: 30, b: 40 } attr_reader…
rubyprince
  • 17,559
  • 11
  • 64
  • 104
2
votes
1 answer

Eventmachine 1.2.7 build fails with Ruby 2.5.1 on Amazon Linux AMI - "rhel fedora"

Facing an issue while installing eventmachine gem on Amazon linux ami, works fine on ruby-2.3.6, breaks with ruby-2.5.1 Steps: gem install eventmachine Note: gcc version 7.2.1 20170915 (Red Hat 7.2.1-2) (GCC) Error logs: Building native…
shivam_v
  • 71
  • 11
2
votes
0 answers

Rails 5.2 credentials throwing error

I am using Rails 5.2.0 and Ruby 2.5.1p57. I have introduced Rails ActiveStorage to my Rails application. I am able to upload/download file to/from S3 if I use AWS key-secret directly. When I am running below command EDITOR="subl --wait" rails…
Nishant Upadhyay
  • 639
  • 7
  • 20
1
vote
0 answers

BUG Segmentation fault at 0x0000000000000000 in mysql2 in ruby on rails

I am using ruby 2.5.8p224 (2020-03-31 revision 67882) [x86_64-linux] ) Rails 5.0.7.2 while execute the rails c command it throws below error - ` `home/user/.rvm/gems/ruby-2.5.8/gems/mysql2-0.5.3/lib/mysql2/client.rb:90: [BUG] Segmentation fault at…
1
vote
0 answers

Is it possible to fix OpenTimeout Exception?

We have 2 REST Api applications written in Rails and .Net Framework 4.8. From the front-end we call rails api. For some services we call .Net REST API from Rails API project. .Net API project is deployed to test server. Odd thing here is, I can get…
1
vote
0 answers

from unknown error: archive error: (unknown error: could not write file to temp dir), entry error: (unknown error: leftover data after zip entry)

I am running parallel scenarios on remote using selenoid but after some time and after some scenarios got passed, they fail because of following error while file upload. unknown error: unable to unzip 'file' from unknown error: archive error:…
1
vote
1 answer

Include different module into same class based on use case

If there are 2 modules - module Abc and module Bcd and one class - class Efg. Now we want to include module Abc into class Efg in once instance and need to include module Bcd into class Efg in another instance but not both modules at same time. Is…
farith
  • 23
  • 6
1
vote
1 answer

Ruby : Invocation does not exist

Im working with the aws sdk and want to use the get_command_invocation method. This is what I have in accordance with the docs: resp = client.send_command( instance_ids: [instance_id], document_name: 'AWS-RunShellScript', …
letsc
  • 2,515
  • 5
  • 35
  • 54
1
vote
1 answer

Ruby 2.5 deprecation message

Ruby 2.5 deprecated the Data class and we have three classes in Rails that are named after Data::. This gave us deprecation warnings every time this runs. What's the best way to handle such deprecation? Should we rename our class or is there a…
wwang
  • 59
  • 3
1
vote
1 answer

Execution expired error with facebook login, using omniauth-facebook

Users are not able lo login from Facebook since July 3rd. I'm using omniauth-facebook. I tested login successfully from localhost (pointing to another FB test app). But in production the app shows this error: Started GET "/auth/facebook" for…
1
vote
1 answer

Converting a nested OpenStruct to JSON

It seems to be pretty easy to create nested OpenStruct objects using JSON.parse: JSON.parse( '{"a":{"b":0}}', object_class:OpenStruct ) #> Is there a simpler method of converting it back to json, without creating a…
Mike
  • 1,279
  • 7
  • 18
1
vote
1 answer

how to resolve native gem dependencies for AWS Lambda function?

I am using serverless framework with 'aws-ruby' template. In my Gemfile i have pg and nokogiri gem. When I run 'bundle install --deployment', it actually creates a vendor folder in my current working directory and also build the dependency based on…
Chitra
  • 1,294
  • 2
  • 13
  • 28
1
vote
0 answers

Can't gem install with containerized and built-from-source ruby 2.5.1

I can't seem to get gem working within a Docker container that's got a ruby 2.5.1 built from source. This is my Dockerfile: FROM ubuntu:16.04 RUN apt-get update RUN apt-get install -y openssl RUN apt-get install -y zlib1g-dev #Install ruby RUN…
bsam
  • 880
  • 1
  • 8
  • 18
1
vote
1 answer

hidden_field_tag fails to pass boolean

I am passing a hidden field for a form to distinguish between views the request came from: <%= hidden_field_tag("advanced", true)%> Apparently true gets passed as a string. I tried different syntaxes like: <%= hidden_field_tag "advanced", true…