Activity
Hey Sai,
Your browser has a maximum size of storage for cookies, so Rails protects you from sending too much data to the browser.
You should probably look at what you're storing in the cookies and change it to save to the database and store the database record ID in the cookie instead.
Before the screencast, I setup a Rails app with my template and added a Transaction model ahead of time so I could focus on the geocoding parts I believe.
You can check out the commits in the repo to see how I set that up: https://github.com/gorails-...
And sometime soon, I will probably be releasing that Rails template that I've been using to start new apps!
Posted in Sortable Drag and Drop Discussion
Yeah! Popper is nice to have instead. Screencast was using an old version of my Rails template which has been updated already, just hadn't done a git pull recently on that machine. Should update that in the repo.
Yeah, it's encouraged for production, because production will boot faster. The extra RAM usage is going to come from the cache it because that's how it boots faster. It's trading RAM for speed.
Certain memory constrained environments, like Heroku typically is, may not be a great place to do this if you're struggling to keep your app's memory usage down. Otherwise, you should basically use this all the time.
All the routes are handled by Rails in these videos. Vue is just pointing to the Rails routes to submit things to the server.
Not as difficult as you might think. The HTML5 geocoding API will get you an IP address quickly, so you can send that over as a different param and pass that into the .near() method. This will be a great screencast. :D
Posted in Exception/error reporting from live.
Just an FYI, you don't have the use the Heroku addon. You can go straight to bugsnag and set it up yourself if you want. The addons are just there to make it slightly easier to setup.
Sure can, do you have any topics you're curious about?
Posted in How can I integrate Amazon Native Ads
I don't think that gzip has anything to do with it since it's all controlled by Amazon.
Are you able to paste that Javascript into another site somewhere and see if it runs? I tried to inject the snippet on to a page and didn't see anything at all show up. I'm wondering if it's something to do with your Amazon snippet.
I covered how you can do this with the Apartment gem as well as from scratch in these episodes: https://gorails.com/series/multitenancy-crash-course
Posted in Exception/error reporting from live.
Another tip: You can also run an errbit server which is an open source version of Airbrake and use the airbrake gem to talk to it which is kind of nifty.
I wonder if that got triggered along with the JS for Stripe. May need to update my screencasts to mention that if I didn't cover that properly.
Can't we just have nice things that work out of the box?? 😜
Did you have local: true
on the form_with
?
Posted in How can I integrate Amazon Native Ads
Well, that's sorta good. We know it's running and it's hitting the URL so both of those tags are running.
Do you have a link to a page that you can share with this on it? I was going to poke around and see what's going on. I haven't ever used their ad widgets before myself so I'm not sure what to expect.
Posted in How can I integrate Amazon Native Ads
Hey Alex,
I haven't actually played with this myself, but you may need some adjustments to make this work with Turbolinks, although you also might not.
Generally if you're putting script
tags in the body
, Turbolinks will make sure they get executed on the second pageview. You can put a console.log
inside the tag that sets all the variables there and see if it prints out when you navigate around.
Since this stuff looks like you're putting it inside the body
tag, you should be fine but you may have to make some adjustments.
Can you try putting a console.log
in that first script tag and make sure that one prints out each time?
Posted in Let's Encrypt Error on Hatch
One thing you can try is to run these two commands on your server:
sudo apt-get clean
sudo apt-get update
Posted in Let's Encrypt Error on Hatch
Sometimes the repositories get out of sync or have errors like this. If you give it a bit of time, these usually get cleared up in an hour or so.
It's just something DigitalOcean does to reduce the bandwidth your server's use, so they keep a clone of the repositories in their datacenter. Their repositories just have a temporary issue there.
Sounds like you're missing the routes for Shrine. Make sure this is in your routes file. https://github.com/gorails-...
Adding an attachment in your mailers is just as simple as doing:
attachments['file-name.jpg'] = @model.upload
The right side should just a be a File-like object that Rails then assign to the filename in the email.
Hey Muneeb,
Check out this post and the comment on solutions for that. https://stackoverflow.com/a/15101745/277994