rails Posts

Some more ruminating about Laravel

Expository info (skippable)

So, for nigh 6-7 years now I've been a Rails enthusiast. I bought the PragProg AWDWR book when it was covering Rails 2.x and had the beach and hammock on the cover, and then proceeded to take years to figure out everything the book was actually talking about from the bottom of the stack to the top. I find it very enjoyable to be able to get my ideas out (in code), and Rails is still one of the cushiest frameworks around in terms of ease of use. It's almost as...

A URL strategy

I've got this decoupled CMS brewing in my head, and wanted to jot down what I think would be a kind of cool method for generating URLs and URL redirects and making sure everything stays in sync without having to maintain a giant table of redirects (ala Drupal).

The basic scheme would look like this -- site.com/{item_type}/{item_id}/{item_slug}. The type parameter could probably be optional, but it's there for now. An example URL could be...

Getting up to speed with Rails 4 "russian doll" caching and Redis

Russian Doll caching

It's a well branded name for something that makes total sense after reading one blog post. The second half of this blog post will actually get you pretty much there.

If you're coming from a PHP/Drupal background like me, you might be surprised to find out that the database is not the bottleneck in Rails-land. Whereas on your typical Drupal page you might have anywhere from 50 to 1000 database queries being run, you'll be hard pressed to find a Rails app that comes...

Converting mp3s to ogg files in the background with Sidekiq and FFmpeg

I have a friend for whom I'm building a site right now, and I chose Rails to do so. I think I'll probably reach for Rails for most sites I build until I get bored of it, which isn't going to happen any time soon. I also learned a few things about different browser's implementations of HTML5 audio, which I'll get into first.

My buddy is in a band, and so part of the functionality of the site is a photo gallery, and another part is a music player. Whereas in the past I'd have just reached...

How (and why) to set up your Mac for Rails development - part 1

The short version -

https://github.com/JGrubb/laptop


The longer version -

Setting up your Macintosh for Rails development is actually sort of like Rail development itself - you have to at least kind of know about a lot of different things before you can really get anywhere. I'd say I'm new to Rails development even though I've been poking at it since 2.1. 2.1 is the first version I remember after I first bought a Mac and started trying to teach myself to "program". It's taken me...

Markdown in Rails 3 with RedCarpet

updated Jan 2014 for Rails 4, see bottom


I just got this blog up and running yesterday, a marathon of pain but ultimately successful. So today I wanted to add some Markdown action so I didn't have to drop into TextMate to add <p> tags to everything all the time.

RedCarpet seemed to be the gem that was recommended, but it's recently seen a complete API overhaul that has rendered useless the vast majority of the de facto documentation out there. So, viewers of the Markdown Railscast,...

Praise Jah!!

My first post on my new blog! I wrote this one all by myself, with the help of hundreds and hundreds of open source collaborators, Stack Overflow commenters, IRC, Google Groups, and sheer force of WILL!!!

This is my first running, production Ruby on Rails app. It took me about two days/6 hours to write, and about 4 days/30 hours to deploy. Deploy means "make work on the web so people can see it" and it was every bit the pain in the ass that I'd heard it was supposed to be. But by god, here...

Chapter 6b - the layman's introduction to database migrations in Ruby on Rails

This is not for programmers. This is for myself, because when I first started poking at Rails 6 months ago, I didn't have any idea why I needed to edit a migration file, much less what a migration was, except that it must have something to do with a database. I only knew that because of the command

$rake db:migrate

<

p that I was told to perform and the fact that it had the letters "db" in it.

<

p

So here's the deal. This morning I talked about version control and it's place in the...