Quantcast
Channel: Software As She's Developed » Rails | Software As She's Developed
Browsing latest articles
Browse All 18 View Live

Image may be NSFW.
Clik here to view.

Firefighting an RSS Aggregator’s Performance

That’s a before-and-after shot of the database server’s CPU! I was watching it slowly creep up, planning to inspect it after some other work, before receiving mails from Linode that the virtual server...

View Article



Image may be NSFW.
Clik here to view.

Rails Cache Sweeper Gotchas

As you’ll see here, Rails cache sweepers are a tricky subject. Here are some general things I’ve learned. Sweepers are dual creatures. “Here’s the scoop: sweepers observe both your models and your...

View Article

Image may be NSFW.
Clik here to view.

Private resources with ElasticSearch and Tire

I’m adding private channels to Player FM and one consideration is search results. Tire’s activerecord does a great job at making updates transparent, but in this case some manual overriding is...

View Article

Image may be NSFW.
Clik here to view.

Monkey-patching a sample() method in Rails

It’s useful while debugging to choose a random sample. Thus you can include something like this in application.rb or an initializer. Now you can say Post.sample to get a single post or Post.sample(5)...

View Article

Image may be NSFW.
Clik here to view.

Testing HTTPS Locally

As I’m migrating the player over to HTTPS, one challenge is partial content, leading to an incomplete padlock and strikethrough domain warning like this: And the harsh but fair warning, upon...

View Article


Image may be NSFW.
Clik here to view.

Defer and Recur with Rails, Redis, and Resque

I’ve put off some scaling related issues about as long as possible, and am now proceeding to introduce a deferred-job stack. I’ll explain what I’ve learned so far, and with the caveat: this isn’t in...

View Article

Image may be NSFW.
Clik here to view.

Logging an error with Exceptional

Here’s a quick utility for people using Exceptional to track errors. It lets you force an exception to be logged and without having to rescue it. Example: exceptional “read_file”, “file not found” The...

View Article

Image may be NSFW.
Clik here to view.

Load-balancing Rails with Nginx

Well this was some fine undocumented black magic. I’ve got Player FM behind a load balancer now, using the following Nginx config. I’ll explain some more about the overall upgrade later. # App load...

View Article


Image may be NSFW.
Clik here to view.

How to use different favicons for development, staging, and production

It’s useful to have different favicons for each environment during development, as Pamela recently pointed out. Here’s how I do it. First, generate the images. Most graphics editor have some kind of...

View Article


Speeding up Rails tests with Spring

I found Rails tests were running slow, these things helped. Instrumenting application.rb First, I added some logging to application.rb ruby < view plain text > def logg(m)   puts "#{DateTime.now}...

View Article
Browsing latest articles
Browse All 18 View Live




Latest Images