FCM Gem, setting icon
I have been trying to set an icon for the payload of the FCM ruby gem. All the resources say to put the icon in your androids res/drawable, but this is a ruby gem - so I am unsure how to set it up. Any...
View ArticleIOError: closed stream for SFTP Download in Ruby on Rails
here is my codedef get_usage host = Rails.application.secrets.sonet_sftp_host account = Rails.application.secrets.sonet_sftp_account result_repo = "/home/jpmb_mobile/commreport/volume"...
View ArticleHow to list local-variables in Ruby?
def method a = 3 b = 4 some_method_that_gives # [a, b] end
View ArticleProblems undestanding Mongoid Criteria
here is a simplified version of my models:class Ticket include Mongoid::Document belongs_to :origin, autosave: true scope :by_tenant, ->(tenant_name) { where("origin.owner": tenant_name) }endclass...
View ArticleHow to create records via FactoryBot with microservice app
I'm new to microservices, always worked with monoliths. I have an application with microservice architecture. The database is located in the part of app in a gem and is accessed...
View ArticleShorter error message for rails exception
I am rescuing an error likeundefined local variable or method 'something' for...
View ArticleUnable to install any Ruby with RVM on MacOS 10.14.2 Mojave: Error running...
After upgrading MacOS to 10.14.2 Mojave, I'm not able to install any Ruby Version with RVM anymore. It always gives an error like this:$rvm install 2.5.3ruby-2.5.3 - #removing src/ruby-2.5.3..Searching...
View ArticleRuby koan: why I the test case result different with irb result?
I follow ruby koan https://github.com/edgecase/ruby_koans/blob/master/src/about_symbols.rb#L26-L29My irbirb(main):006> symbols_as_strings.include?("test_method_names_become_symbols")=>...
View ArticlePrinting Color using Ruby
Using Replit as my IDE, I'm trying to create a program that outputs color palettes (either in the console, or textfile, or something). How can I output something that shows the color of a specific rgb...
View ArticleActiveRecord::RecordNotFound: Couldn't find Sidekiq::Sequence::Record with 'id'
I'm using the Sidekiq-sequence Gem to run sidekiq jobs in a sequence instead of all at once.I'm getting this warning in my Sidekiq retry queue and not real sure what to do about them and if they are...
View ArticleRuby on rails stripe API error: invalid byte sequence in UTF-8...
I'm new to Ruby on Rails I've tried to integrate the Stripe API client, but when I tried to run some of the commands of the gem, it shows me:invalid byte sequence in UTF-8...
View ArticleURLs in email being modified/mangled somehow
I'm sending (plain text) emails containing urls to a web site. They look like:https://www.example.com/account/confirm/?place_id=ChIJA5Vy7Qfp2UcRpbHr9bNg4Tw(The place_id parameter is a Place ID from the...
View ArticleHow to extend an object in Ruby? [duplicate]
Say, I have an object that replies to .hello method. Now, I want to create another object that will reply to both hello (and all other methods of the original object) and bye methods. Something like...
View ArticleHow to view the HTTP response to an ActiveResource request
I am trying to debug an ActiveResource call that is not working.How can I view the HTTP response to the request ActiveResource is making?
View ArticleRspec run all tests except a specific folder
The project I'm working on has a fairly large test suite. I am currently writing test that passes when I run it alone but when I run the entire test suite $rspec I get some really funky behavior that...
View ArticleFill or complete a hash in ruby with all sibling keys
I have a rails API where I'm able to query vehicles and count and group by different attributes. I would like to fill the response with zero values when a group by is used.Here is a simple example:data...
View ArticleHow can I incrementally increase a displayed array element using a rails button?
I have two arrays @necklines and @skirts, made up of all Neckline models, and Skirt models respectively.I am attempting to show one neckline and one skirt at a time, and having two buttons to either...
View ArticleSpecifying Content Type in rspec
I'm trying to build an rspec test that sends JSON (or XML) via POST. However, I can't seem to actually get it working: json = {.... data ....}.to_json post...
View ArticleTypeError singleton can't be dumped
I am working on a Rails 4 project and using readthis_store gem to do my caching. I do have the following code thoughI have user model with a method block_reasonclass User < ActiveRecord::Base def...
View ArticleHeroku: How to push seeds.rb to existing rails app?
I store all my app's data in seeds.rb locally. However, after I pushing everything to Heroku, the app works well, but without any data. I do not want to re-input the mass data again, so does anyone...
View Article