Hi! Thanks for visiting my blog. If you've received any value from my content would you mind supporting my new startup by downloading our browser add-on? It's called PriceBlink and makes online shopping a breeze. You can watch it in action here and download it for Chrome, Firefox, IE, or Safari by going to PriceBlink.com. Thank you and I hope you enjoy!

GoDaddy’s Worthless on Rails

Jul 31

I really do hate using my blog to voice negative opinions about products and services, but in certain situations I feel comfortable doing so. I think it’s fair to educate consumers of lessons learned and pitfalls when choosing a particular product. In this case it’s GoDaddy’s Rails hosting. Plain and simple: IT SUCKS.

For the past month I’ve been nursing an Rails app that is running on GoDaddy’s servers. Just do a quick search in this blog for GoDaddy and you’ll see some of the problems I’ve run into. While I’ve fought my way through a lot of the problems to actually get my app running, it has not been a pleasant process. It’s been insanely frustrating to the point of wanting to through my powerbook out the window. My powerbook isn’t even the problem, but it’s not like I can grab hold of GoDaddy’s server and give it a nice kick.

I believe tonight was the final straw. I went through all the steps I’ve mentioned before and ran into a new error message:

[error] [client 68.88.196.202] Directory index forbidden by rule

You’ve got to be frickin’ kidding me. I’ve stumbled across way too many errors to be receiving this one. I did a good amount of investigation to find out other GoDaddy customers were having the same problem, yet there wasn’t a decent solution.

All of this aside I’ve been HIGHLY disappointed with the performance of my app on GoDaddy’s servers (even with FastCGI). I kid you not when a basic page that displays a few records from the database takes over 10 seconds to load. There are several posts on the web about GoDaddy’s horrific Rails performance. I don’t know why they’re even bothering with Rails when it doesn’t seem like they can efficiently manage it. Maybe it’s that they’re loading way to many customers on a single box, hence the cheap plans.

Right now I could really care less and will be looking to move my account ASAP. GoDaddy still rocks for domain registrations, but any Rails hosting is out of the question. I highly recommend looking elsewhere. GoDaddy should be paying me for the amount of time and help I’ve given to others on getting their apps up and running. Maybe I will send them an invoice.

At any rate, if you know of any killer Rails hosts then please post them here. We’ll be doing research over the next couple of weeks and I’m anxious to see what options are available.

Read More

Rails Tableless Models

Jul 31

Today I was thinking about how to manage file uploads (mainly images) and not having to maintain them in the database. I wanted to take the approach of storing a reference to the image in the database (/public/photos/my_image.jpg) and have the image live on the file system.

Initially my Photo model extended ActiveRecord and I had to create an empty table called photos with just an ID field. Then I started thinking how ridiculous it was to have an empty table just to get the ActiveRecord class to behave. Since I didn’t want to place my image uploading code in the controller I embarked on a quest to figure out how to utilize a tableless model.

I didn’t have to journey far and decided to do something simple: create my model without extending ActiveRecord. Something like this:

class Image
def upload
File.open(“#{image_path}.jpg”, “wb”) do |file|
file.puts photo.read
end
end
end

The thought of something so simple actually working completely suprised me. I know the power of models when it comes to database abstraction, but was glad to find out that they can be decoupled from the database.

Read More

Rails, RMagick, and Linux

Jul 29

Since I’ve been playing around with RMagick on OS X I decided to go through the motions of installing it on my Linux server.  This is necessary since my Rails apps are deployed to this server.  I found a good set of installation instructions on this page that I followed step by step.

Everything compiled and installed successfully until I got to Step 3.  No matter what I tried I received the following error message:

/home/dennis/programs/RMagick-1.13.0/./ext/RMagick/RMagick.so: libMagick.so.10: cannot open shared object file: No such file or directory – /home/dennis/programs/RMagick-1.13.0/./ext/RMagick/RMagick.so (LoadError)
from /home/dennis/programs/RMagick-1.13.0/./lib/RMagick.rb:11

I was certain that libMagick.so.10 existed /usr/local/lib, but wasn’t sure how to get RMagick to recognize it.  Luckily after an hour or so I decided to see what the README file had to say.  It turns out there’s a variable that can be exported to solve the path problem. Just run this command:

export LD_LIBRARY_PATH=/usr/local/lib

This solved my problem and I was able to successfully compile and install RMagick.  It’s amazing the amount of time and frustration saved when you actually read the directions.

Read More

Rails, RMagick, and OS X

Jul 27

There’s always seems to be some daunting hurdle when dealing with relatively new technologies. I stumbled across the hurdle this evening and it’s one that will either “make you or break you”. For me it was getting RMagick working with Rails on OS X. Luckily I stumbled across this INCREDIBLE article that explains almost everything you need to know.

I use the word almost because after compiling and installing the different sources I still ran into a problem installing RMagick. Since the article mentions configuring everything for /usr/local it turns out that this wasn’t in my path. So after you get through the article (and before you install the RMagick gem) be sure to add /usr/local/bin to your path and you should be able to install the RMagick gem with no trouble. The command looks like:

export PATH=”/usr/local/bin:$PATH”

I would say that for even a seasoned developer or *nix admin you’re looking at about an hour from start to finish. Building ImageMagick takes a good 10-15 minutes alone. Your results may vary, but I think you’ll lose sight of time once you successfully get everything up and running!

Read More

My Fortune – 7/26/06

Jul 26

I’ve decided to post my fortunes for the world to read. Jamie and I went to Pei Wei yesterday and I always get a fortune cookie to end on a good note. I’m not superstitious, but I do feel like fortune cookies are God’s way of talking to me in a dumbed-down message. Plus I have to eat the entire cookie before I read the message cause that gives the most bang for the buck. I think I should have settled for superstitious because this is sounding straight-up crazy! Anyway, this is what God had to say to me and I’m diggin’ it:

“You will soon gain something you have always desired.”

Now finally I will get that purple unicorn I’ve always wanted.

Read More