aetheryna / google-scraper-ruby

0 stars 0 forks source link

[CH002] Setup Heroku deployment #28

Closed aetheryna closed 2 years ago

aetheryna commented 2 years ago

What happened 👀

Closes #13

Deploying to Heroku, it refused to deploy a build to its main branch from this branch so had to play around with a few of the files to make it work. Used a few of the Heroku environmental variables to handle Locale and Mailer issues as well. ✍🏾

Side note didn't have to upgrade the Ruby version as that will have more work required managing Gem versions, so opted for changing the Heroku Stack to version 20 instead of 22 😎 Left a comment on #13 regarding this

✅ Removed translations/translations from application.js as we are not using it 🗑️ ✅ Commented out the translations from .gitignoreDeployed this branch to Heroku (Will change it to Develop when branches are merged) 👷🏾 ✅ Added few Locale keys to Heroku AVAILABLE_LOCALES DEFAULT_LOCALE FALLBACK_LOCALES ✅ Added blank Mailer keys to Heroku to enable deployment MAILER_DEFAULT_HOST MAILER_DEFAULT_PORT

Insight 📝

Heroku did not deploy at the beginning of deploying this branch (using this one as a test for now as Develop isn't at latest). Used git push -f heroku chore/ch002-heroku-deployment:main to deploy the branch but was met with multiple problems.

  1. Translations not existing so had to remove it from application.js (Removed it from .gitignore so that it could find it as well) however it was removed completely as we won't be using it on this application 😅

    Screen Shot 2565-09-12 at 2 23 15 PM
  2. An issue with not setting the platforms to x86_64-linux which caused an error to show on Heroku as well

    Screen Shot 2565-09-12 at 2 26 37 PM
  3. Controller issue with directing to the Home page or any page at this matter

    Screen Shot 2565-09-12 at 2 27 40 PM

To fix this had to change a production setting on config/environment/production.rb > config.assets.compile

Proof Of Work 📹

https://google-scraper-ruby-staging.herokuapp.com/

Screen Shot 2565-09-13 at 3 06 50 PM Screen Shot 2565-09-13 at 3 10 43 PM
github-actions[bot] commented 2 years ago

Code coverage is now at 0.00% (0/44 lines)

Generated by :no_entry_sign: Danger