This assumes that you already have Docker installed and configured. It isn’t the most secure way, but if you just want your desired Postgres version up quickly so you can do some local development on your Rails app, this is quick!
I wanted to implement a super simple OTP system to help some of our team members log in more easily (without having to remember a password). I didn’t want to use the legacy system because it was overly complex or include yet another gem.
I’m surprised this isn’t a more common topic… or maybe I did some very poor Google searches! I was trying to use my Rails backend to generate a PDF and render it in a new tab from my Vue app(without downloading).
In my Rails API controller:
I was using PrawnPDF to create a rendered PDF string, but you can get the same result with something like WickedPDF too.
In VueJS (or any other front-end JS with axios):
(if you want to open the file in a new tab)
If you want to download the file instead, replace link.target = '_blank' with link.download = ‘file.pdf' .
This will be a quick overview post, perhaps I’ll add more to it when I have time. Basically I was concerned because Google’s Cloud SQL offers backups, but these are tied to the instance and are deleted when the instance is deleted. …
Slides from the talk (Things I learned reading and writing production code)
As promised, here are the slides from my talk at the meetup.
P.S. For those who weren’t there: Daniel Goh, my instructor from Alpha Camp, was helping to organize this iteration of the Ruby Meetup in Singapore, and he asked me to give a talk. It’s my first tech talk ever!
Now that I’m done with Alpha Camp (and I’m back from holidays), I finally have time to sit down and write something! So let’s see… I’ll need to work on my Github page to get it somewhat accessible (start with Readmes)… will keep you guys updated on that!