This error is related to Logger class where the silence method was missing from the configuration. This error happens when you enable the logging like the following: config.logger = Logger.new(STDOUT) If you comment it out or remove this line,...
Snippet
Puma caught this error: undefined method 'silence' f...
Admin
Sep 14, 2023
17 comments
236
SAML SAML stands for Security Assertion Markup Language. It is an XML-based open-standard for transferring identity data between two parties: an identity provider (IdP) and a service provider (SP). Identity Provider — Performs authentication and...
Article
What is SAML and how does it work?
gem install mimemagic -v '0.3.10' --source 'https://rubygems.org/' Building native extensions. This could take a while... ERROR: Error installing mimemagic: ERROR: Failed to build gem native extension. Solution brew install shared-mime-info...
Snippet
Error installing mimemagic. Error: Failed to build g...
Admin
Jan 12, 2023
0 comments
933
Method #1 ObjectMapper objectMapper = new ObjectMapper(); String containerMatrixJSON = "{\"container_metrics\":{\"cpuRequest\":{\"results\":{\"general_info\":{\"sum\":4.4,\"mean\":1.1,\"units\":\"cores\"}}},\"cpuLimit\":{\"results\":{\"general_i...
Snippet
Java - Convert a JSON or Nested JSON into a Map
Admin
May 06, 2022
5 comments
809
You need to use `newline=""` when using a csv.writer() with Python 3.x, wb is used for Python 2.x versions. Using the sample JSON you've given, you would just need to iterate over the header fields and create a row from each entry in details. For...
Snippet
Convert JSON to CSV
Admin
Feb 25, 2022
10 comments
1.03K
2.1. ClassLoader.getResourceAsStream() Use the getResourceAsStream() method to get the InputStream when reading a file from inside a jar file. Always use this method on the ClassLoader instance. private InputStream getFileAsIOStream(final St...
Snippet
Read a file from the ‘resources’ folder
Feb 16, 2022
10 comments
364
What is A/B testing? A/B testing (also known as bucket testing or split-run testing) is a user experience research methodology. A/B tests consist of a randomized experiment with two variants, A and B. It includes application of statistical hypoth...
Article
A/B testing
> User.reflect_on_all_associations.map(&:name) > [:addresses, :cookies, :posts]
Snippet
Fetch names of associated ActiveRecord models in Rub...
Admin
Sep 27, 2021
4 comments
1.01K
Error on installing mailcatcher The command: gem install mailcatcher fails with error: - ERROR: Error installing mailcatcher: ERROR: Failed to build gem native extension make "DESTDIR=" compiling parser.c parser.rl:112:17: warnin...
Snippet
Error installing mailcatcher
Admin
Sep 27, 2021
18 comments
950
Error on installing mailcatcher The command: gem install mailcatcher fails with error: - ERROR: Error installing mailcatcher: ERROR: Failed to build gem native extension Solution gem install mailcatcher -- --with-cflags="-Wn...
Snippet
Error installing mailcatcher
Jul 04, 2021
3 comments
582
Problem Sometimes while running `bundle install` during setting up a new project, you might get the following error:   Installing pg 1.2.0 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current dir...
Snippet
Error installing `pg` gem
Apr 04, 2021
25 comments
438
Reverse interview This is a list of questions which may be interesting to a tech job applicant. The points are not ordered and many may not apply to a given position, or work type. It was started as my personal list of questions, which grew over ...
Tutorial
Reverse interview