Stream 11/7/2019 - Adding meta-tags to a Rails Server
Tags: todayilearned, devjournal, blog
Published: 2019-11-08 06:56:39

### Check Out the Stream @ [https://twitch.tv/talk2megooseman](https://twitch.tv/talk2megooseman)

Today's was quiet of roller coaster of a stream. I tried to start the stream with trying out the new docker desktop build that works for WSL2 but needed to upgrade my version of Ubuntu VM. So went on the journey to do the upgrade which was successful after much downloading and installing things. **BUT** sadly docker for WSL2 didn't work and I might need to do a computer restart to make it work (which I can't do during stream).

Afterward, dove into adding meta-tags to Stream Closed Captioner, which for the most part was fairly straight forward. But later discovered that I was missing some critical meta-tags for being compatible with Twitter so I needed to circle and add the missing tags.

# Today Objective

- [x]  What to call today's log
- [x]  Review last streams TODOs [](https://www.notion.so/46f8cccc-f9fe-4fd7-b08b-7902219b2b6d)
- [x]  Review Overrall tasks [](https://www.notion.so/5ef94a0f-5772-4570-81b9-1e2597db53cf)
- [x]  Add meta-tags to [stream-cc.gooseman.codes](http://stream-cc.gooseman.codes) so when were doing linking from social media it will generate a preview card
- [ ]  Bonus: Play with some React Hook ideas

# Notes

- Curious about metatags? I think this site is pretty good to drive home what metatags look like and how they are built [https://megatags.co/#generate-tags](https://megatags.co/#generate-tags)
    - Found a nice gem that will make it extremely easy to set meta-tag information across my views

        [kpumuk/meta-tags](https://github.com/kpumuk/meta-tags)

    - Went through and added to following base metatags for the website along with uploading new favicon
```yaml
            = display_meta_tags site: 'Stream Closed Captioner',
                                description: 'Easily add Closed Captioning to any Twitch stream by installing the extension and click "ON" in the dashboard.',
                                keywords: 'Closed Captioning, Twitch, Extension',
                                icon: '/favicon.ico',
                                image_src: "/favicon-96x96.png",
                                twitter: { card: "summary", site: "@talk2megooseman" },
                                og: { type: 'website' }
```

For the Showcase Page added the following overrides in the controller

```ruby
            def set_custom_metatags
                @page_title       = "Streamer Showcase"
                @page_description = "Love Stream Closed Captioner? Find streamers that are currently live and using the extension to discover your next favorite streamer!"
            end
```
- Discovered that Docker Desktop has a WSL2 tech preview build with first-class WSL2 support [https://docs.docker.com/docker-for-windows/wsl-tech-preview/](https://docs.docker.com/docker-for-windows/wsl-tech-preview/)
- Upgrading WSL2
    - In order to take advantage of using Docker with WSL2, I need to update Ubuntu for 16 to 18. The first hurdle was encountering a yarn error which was resolved here:

        [GPG error: https://dl.yarnpkg.com/debian stable InRelease NO_PUBKEY E074D16EB6FF4DE3 · Issue #4453 · yarnpkg/yarn](https://github.com/yarnpkg/yarn/issues/4453#issuecomment-329463752)

        - Next was running the following commands
```bash
            sudo apt dist-upgrade
            sudo apt update
            sudo do-release-upgrade
```
# Shoutouts and Thanks

- Kilmon007
    - Thanks for the 5 bits

# Future action items

- [ ]  Continue work converting React-Twitch-Video-Embed from a class-based component to a function-based one using React Hooks