I spent a good 45 minutes puzzled as to why byebug wasn’t working from within a gem I’m debugging. Even more confusing was that when I set byebug in the gem code along with some debugging code, and stepped into the gem, I saw my code edits along with the call to byebug… but the new code was never reached, it was as if it was being skipped right over. Odd.
Went for a cup of coffee and to ponder this….
Finally, I figured out that spring was preloading the app and keeping the gems loaded – even after I changed the gem code.
For now, I’m going to keep spring disabled by setting DISABLE_SPRING=1 in my .env file.
While debugging Autovist today, I wanted to see what methods the Tweet object supported (from the Twitter gem, which wraps the Twitter API) in order to figure out why the message was null. As you can see below, it doesn’t have a nice way of dumping out all values for inspection. 🙁
Continue reading “How to search for methods on a massive Ruby object”
Autovist was designed with the assumption of one customer paying with one credit card has one Twitter account. We’ve just been faced with a great problem to have: a customer loves the service so much that she wants a second Twitter account’s advocacy to be automated with Autovist. Yeah!
But how can I get this to work with the current design?
Continue reading “Stripe’s multiple quantities of a plan saved me a TON of time”
I thought my site had been hacked. Suddenly, all content was gone and my FTP credentials were being requested.
To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed.
Continue reading “When a plugin kills your WordPress site”
While performance tuning the database to solve Dashboard timeouts, we made a surprise discovery about how tweets and their embedded URLs are actually being used.
Continue reading “Keeping the Autovist Dashboard Fast… and a surprise discovery”
Google Analytics is a powerful tool when your site has thousands of visitors a day or more. But it isn’t so good at showing you the most popular links on your site; nor does it allow you to work directly with the data your site generates and sends to it.
The reason we wanted to do this is because the Vaccine Ingredient Calculator’s Ingredient Report has a huge amount of links for more information and it would be really helpful to know the order in which our VIC users find them to be useful. Depending upon vaccine choices, there could be up to 90 links!
Continue reading “Create custom URL-click tracker in less than 5 minutes”
ReferenceError: Can’t find variable: Set
Continue reading “Yikes! ReferenceError: Can’t find variable: Set”
Here are the slides for a presentation I did at the DC Ruby Users Group on November 10, 2016. The presentation is based upon a simplified version of an experimental Telegram Bot feature in Autovist …
Continue reading “Integrating Telegram Bots with Ruby on Rails”
After bringing the production database down to my local dev machine and restoring it in order to use the latest data to develop against, I could no longer load the Dashboard for my @VaxCalc account as it kept timing out. Autovist has posted more than 25,000 tweets for @VaxCalc tracking multiple broadcasts of each tweet, url clicks and RTs for each of the broadcasts. Was this large number of tweets killing performance somehow?
Continue reading “Adding index reduces query from 80 seconds to less than half a second”
It took just a day to begin protecting our customers (and anybody who clicks on a link shared by our customers) with the SafeBrowsing API. I’m very pleased with our experience with it. Google provides good setup documentation, so I won’t go into the setup details. Instead, I’ll delve into an overview of how it works and what I’ve learned so far.
Continue reading “Protecting customers & visitors with Google’s SafeBrowsing API”