Skip to content

Instantly share code, notes, and snippets.

View Luiyit's full-sized avatar
🏠
Working from home

Luiyit Hernandez Luiyit

🏠
Working from home
View GitHub Profile
@Luiyit
Luiyit / curl-ssl-issue-fix.md
Last active August 1, 2023 21:57
How to fix "SSL certificate problem" using curl on Windows

How to fix SSL certificate problem using curl on Windows

Confirm the issue

You can confir the issue checking the curl error $error = curl_error($curl) SHould say somathing like: SSL certificate problem: unable to get local issuer certificate

1. Download the lasted cacert.pem

you can download the file here

@Luiyit
Luiyit / system_test_with_capybara.md
Last active August 12, 2023 01:06
System test with Capybara | Ruby 7 on WSL2

How to fix the error Webdrivers::BrowserNotFound on WSL2

Last update: 11/08/2023.

The error looks like something like this: Failed to determine Chrome binary location. (Webdrivers::BrowserNotFound) Under WSL, we are running the Linux version of Ruby, which won't be able to communicate via WebDriver with the Windows Chrome executable. So, we need to change the default browser driver used by Capybara.

  1. Open the file application_system_test_case.rb inside your rails project, remove the configuration for driven_by and make sure to copy and pase the new driver configuration.
@Luiyit
Luiyit / Local MongoDB + Docker + Prisma.md
Last active November 27, 2023 20:20
Configurate MongoDB with Prisma client

Mongo DB + Prisma

MongoDB is a NoSQL database and Prisma is an ORM for NodeJS. Here are the steps to create a MongoDB database and set up Prisma to use it.

Install MongoDB locally (If you need replica set use docker)

This option works, but you will need to use Docker because prisma needs something called Replica Set.So, the easy way to have it is using docker or creating the database on MongoDB Atlas.

I recommend just to use MongoDB inside a docker container and then connect to it from Prisma.