Ruby on Rails


4
Feb 12

three thousand db queries

Working on ShiftShout! I had my development environment performance take a nose dive. Page loads were taking an insanely slow 5-6 seconds. At Barton Labs, we had recently upgraded to Rails 3.2 and saw marked improvement of 30-40%. Thought I would upgrade ShiftShout from 3.1 to 3.2 and see what would happen. Ugh, performance got worse. WAY worse. 300% worse. Now page loads were averaging 15-20 seconds in 3.2. OK – I rolled back to 3.1 and dove into troubleshooting.
Continue reading →


1
Jan 12

I can’t growl any longer

I run rspec/guard/spork/growl during development. Overall, no. No overall about it, it is a great way to work. About a month back growl quit notifying and I found the following in terminal:

1
growlnotify[13496:307] could not find local GrowlApplicationBridgePathway, falling back to NSDNC

Grrr…
A few minutes on google didn’t provide any solid clues. I ended up going into system preferences, and while growl was noted as running, a stop and restart (simply from within the systems pref GUI) provided instant rectification (somehow that sounds a bit wrong).

Seems to occur every 2 or 3 weeks. Need to dig in when I get some time.

Anyway if you find yourself w/o growl satisfaction – a simple stop/start cycle might fix the problem for you.


28
Oct 11

You’ve got mail (in your development environment)

My buddy John Manuel and I were talking this morning and he mentions a new gem released by Ryan Bates called letter_opener. Perfect timing as I am just starting to work through the email messages in a new app. A few minutes later I’ve got it installed and gave it a run. All I can say is wow. A perfect little solution.


Continue reading →


25
Oct 11

Navicat releases essentials and it seems a great deal

Navicat has never been my favorite DB tool for various reasons, but I got out my wallet today for their new “essentials” version. Just released to the Mac app store last week, they have versions for SQLite, MySQL, PostgreSql, Sql Server (uh, right…) and Oracle (haven’t done that in 10 years) for about $10 each, and a “premium” version covering all DBs for $25. I bought the premium version.

Continue reading →


8
Aug 11

Pass the Activescaffold please

Curious this morning about Activescaffold. The demo site is down so I decided to dive in and give it a spin. How hard can it be? Turns out, not hard at all. And it looks great.

I started a new project using rvm with Ruby 1.9.2 and Rails 3.0.9. Added the active scaffold and jquery gems to my Gemfile and ran bundle.
Continue reading →


14
Jun 11

Rails view helpers get raw in 3

Having trouble outputting HTML from you views helper method? Rails 3 provides XSS protection by default. This new feature may slightly change the way you render HTML in your views.
Continue reading →


17
May 11

OK, ok, I’ll use SQLite for development, but only with a GUI

One of my earlier jobs was working in IT engineering at the HP Vancouver division. Oracle, Powerbuilder, the early days of Java, and yes, PL/SQL. Remember the 7 reasons I switched back to php after 2 years on rails post by Derek Sivers? I confess I agree with reason number 6 (I love SQL).

But, after 2+ years of rails development, I find myself spending little time in database-land during development. In fact, the last two exploratory projects I’ve started I forwent the  -d mysql option instead using the default SQLite. But still… sometimes its convenient to have a GUI view directly into the database. For MySQL, I use the very nice Sequel Pro. Today I went on the hunt for a SQLite GUI.
Continue reading →


9
Oct 10

did you type type?

If you are using Rail 3 in Oct 2010, you’re probably also running an earlier 2.x version of Rails. Most use Ruby Version Manager to manage the different versions on their machine.

The guys over at Pragmatic Studio have a comprehensive tut on installing Ruby 1.9 and Rails 3 on OS X. This tut, and many others provide the following line to check the RVM installation:

Continue reading →


2
Jun 10

The missing PUT and DELETE

If you’re just beginning rails, you may be reading the Ruby on Rails guides. Excellent stuff. But, maybe you found the section of RESTful routing confusing on how one is to actually use the HTTP verbs PUT and DELETE.
Continue reading →


30
May 10

There goes clickatell

Bye bye Clickatell, hello bulksms. I need to send SMS from a ruby on rails app.

As I understand, some adult content spammers flooded Clickatell’s network, while using the shared short code with… well, adult content spam. US carriers started to block content from the short code essentially ruining it for everyone. I suppose the spammers couldn’t give a rat’s ass for the trouble they caused. There is a special place in hell for these people.

I needed another SMS gateway and stumbled upon usa.bulksms.com. Pricing was about the same as clickatell. Their API is adequate for my needs and I much prefer their backend account management abilities over clickatells.

Continue reading →