dmbf29 / predictor-api

match prediction app / back-end API built on Rails
1 stars 4 forks source link

Fix/seed deprecation and version issues #125

Open yannklein opened 1 week ago

yannklein commented 1 week ago

Changes in this PR

This PR contains multiple fix I figured while installing and seeding the app.

1. fix deprecated faker safe_email method

.safe_email is deprecated since last year, I changed it to .email.

2. fix deprecated watir browser option syntax

The error I got: ArgumentError: {:args=>["--headless", "--no-sandbox", "--disable-dev-shm-usage", "--disable-gpu", "--remote-debugging-port=9230"]} are unrecognized arguments for Browser constructor The syntax of WATIR seem to have changed according to this article.

3. fix deprecated skip_callback syntax ⚠️ help needed

This is a band-aid not a fix. I got a refresh_materialized_views not found error that I shutdown with a raise: false following that gh issue. I did that to move on in the seeding, we might want to keep that error raised actually. Now, the original problem is unknown to me... @trouni you might know better?

4. add project installation details in readme

Added some details about running sidekiq and what the .env should look like for future new comers.

5. remove fix cloudinary version to accomodate to new v2 cloudinary lib

I removed the fixed cloudinary version as it was not accepting my .env CLOUDINARY_URL. I think people starting their projects from today might stumble upon the same problem. I believe this gh issue talks about that same problem.

dmbf29 commented 1 week ago
  1. fix deprecated faker safe_email method

👌

  1. fix deprecated watir browser option syntax

I suppose we can change it but we're not currently scraping at the moment.

  1. fix deprecated skip_callback syntax ⚠️ help needed

I'm not super sure about this. I only had issues with the materialized views when i didnt have a sidekiq running. But that wouldn't throw a refresh_materialized_views not found I imagine. Little reluctant to change that until we know more.

  1. add project installation details in readme

⚠️ There are some keys that SHOULDN'T be there 😅 . There was a PR open already for this #124

  1. remove fix cloudinary version to accomodate to new v2 cloudinary lib

I'm a little reluctant to change the version of Cloudinary while it's working. I did have the same issue but I ran spring stop to fix.

yannklein commented 1 week ago

@dmbf29 I removed the keys from that branch's history 👌 (hence the forced push above ⬆️ )

yannklein commented 1 week ago

fix deprecated skip_callback syntax ⚠️ help needed

I'm not super sure about this. I only had issues with the materialized views when i didnt have a sidekiq running. But that wouldn't throw a refresh_materialized_views not found I imagine. Little reluctant to change that until we know more. I will revert that one, but to be noted that I can't seed without it. Here is the exact error message.

image

add project installation details in readme

⚠️ There are some keys that SHOULDN'T be there 😅 . There was a PR open already for this https://github.com/dmbf29/predictor-api/pull/124

Noted, I removed the keys from the history and I will revert that commit.

remove fix cloudinary version to accomodate to new v2 cloudinary lib

I'm a little reluctant to change the version of Cloudinary while it's working. I did have the same issue but I ran spring stop to fix.

You are correct, a spring stop have solved the problem, I revert that one too.