I recently had an idea for a small web application, and seeing as I’ve not spent as much time as I’ve wanted to using Rails – I opted to build it the latest version of Rails. A decision that caused far more grief than I expected.

If you are using Dreamhost’s PS offering (a managed VPS for those that don’t know), the seemingly simple task of getting a Rails 3 application up and running is actually quite complex. The root cause of this is that Dreamhost’s OS image is based on Debian etch, which was released in April 2009 and has since been replaced; which means etch has become fairly outdated.

Here’s the process I used, and so far it seems to be working quite well:

Domain Setup:

When adding your domain to the Dreamhost panel, you’ll want to enable Passenger.

Once your application is uploaded to the server, you’ll be greeted with a particularly unhelpful error message (something like “uninitialized constant Bundler“) from Passenger (or perhaps just a 500 error page).

Server Updates:

This is where the work starts, and gets somewhat ugly. As a warning, it’s quite possible that you could damage your configuration doing this; though thankfully you can restore your server to a working state within a few minutes from the Dreamhost panel should something go wrong. You’ll also need to have an “admin user” for this task, as much of what needs to be done has to be done as root.

First step: Get your PS up to date; even after performing a restore on my server, there were a number of updates that are available to be installed. So let’s start off by getting those out of the way.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get -f install

Once you get past those three commands, the next step is to update SQLite to the latest version, as the version Dreamhost uses is quite old and won’t work with Rails 3.0 (well, to be accurate it won’t work with the latest version of sqlite3-ruby, which is the default database provider for Rails 3).

wget http://www.sqlite.org/sqlite-autoconf-3070400.tar.gz
tar zxvf sqlite-autoconf-3070400.tar.gz
cd sqlite-autoconf-3070400
sudo ./configure --bindir=/usr/bin --libdir=/usr/lib
sudo make
sudo make install

If you don’t update SQLite you’ll get an error like this:

sudo gem install sqlite3
Building native extensions.  This could take a while...
ERROR:  Error installing sqlite3:
	ERROR: Failed to build gem native extension.

/usr/bin/ruby1.8 extconf.rb
checking for sqlite3.h... yes
checking for sqlite3_libversion_number() in -lsqlite3... yes
checking for rb_proc_arity()... no
checking for sqlite3_initialize()... no
sqlite3-ruby only supports sqlite3 versions 3.6.16+, please upgrade!
*** extconf.rb failed ***

or if you install the updated version, but don’t force it to /usr/lib you’ll get an error like this:

sudo gem install sqlite3
Building native extensions.  This could take a while...
ERROR:  Error installing sqlite3:
	ERROR: Failed to build gem native extension.

/usr/bin/ruby1.8 extconf.rb
checking for sqlite3.h... yes
checking for sqlite3_libversion_number() in -lsqlite3... no
sqlite3 is missing. Try 'port install sqlite3 +universal' or 'yum
install sqlite3-devel'
*** extconf.rb failed *** 

Once that is taken care of SQLite, the rest is easy.

sudo gem update

At this point if you visit your new Rails site, it should be working!

Notes:

  1. I’ve not tested this extensively, and I’ve no idea if this breaks anything. All I can say for certain, if that all of my sites still work, but your mileage may vary. <Disclaimer />
  2. I was a fairly early Dreamhost PS adopter, and part way through this process I reset my server to get it back to a clean state. After resetting, I noticed some differences with the behavior of apt-get (404s on update and upgrade are gone), so for other early adopters it may be necessary to perform a reset to get your servers configuration in-sync with the latest official setup.
  3. I can’t say for a fact that this is completely necessary, though you’ll likely need to selectively update a few packages if you skip this step. Also, for me, gem was broken until I ran sudo apt-get -f install.
  4. Special thanks to Matt for helping me get this working; troubleshooting the SQLite install was more than a little time consuming.

While trying to renew a few domain names recently, I found that cancelling the Privacy service that GoDaddy offers (via Domains By Proxy) is much more difficult than I had expected. The $8.99/year service conceals your name, address, and phone number from the public WHOIS listing.

Being concerned about privacy as most people are (or at least should be) it seemed a reasonable option but when multiplied by quite a few domains, it gets rather expensive. So during this last round of renewals I decided to cancel the service; figuring it would be no harder than removing the item from the shopping cart. To my surprise, it wasn’t nearly so easy.

Turns out that you have to sign into the DomainsByProxy web site with a Customer ID and password to cancel the service; so I tried the obvious and used my GoDaddy ID and password, though no such luck. I searched my email archives and didn’t find a single email from DomainsByProxy, at this point I was pretty sure whatever email address they had on file wasn’t valid, which is bad news for me. While there is an option to recover your customer ID, if their records aren’t accurate then it’s of no real use.

But there is hope.

It took a fair bit of reading and testing, but I finally found a method to get to your account IDs, and it’s fairly simple:

  1. Go to the Private Registration Page on GoDaddy’s site (make sure you’re logged in to your GoDaddy account)
  2. Type in some random characters into the search box
  3. On the results page, click “Continue to Registration”
  4. Click “No Thanks” on the ad page
  5. Scroll down to the section labeled “3. Select Your Domains By Proxy® Account

You should now see your customer IDs for the DomainsByProxy web site. The web site only shows the first four account IDs, if you have more than that you can contact DomainsByProxy and have them merge the account IDs you know. Just continue the process until you have all of your accounts merged into one.

Unless you’ve changed your password on the DomainsByProxy web site, your GoDaddy password should work. From there, you can update your information – or like me, cancel the service completely. Now you are free to renew the domain without paying the extra annual fee or transfer to another registrar.

Tagged with:
 

So here we go again – my 4th hosting company since I started this blog. Maybe I’ll have better luck this time? For those interested, here’s the rundown of which hosts I’ve used, and what I’m doing today.

Radical Vision – Lasted 4 years

Radical Vision was once a great host, though as time went on I had more than a few issues with them. I tried to give them a chance (several chances, actually). During the first year or so, they were great about updating software and keeping things on the cutting edge – by the end, they were using a known vulnerable version of PHP and behind updates on pretty much every major piece of software in use.

After broken promises and many unanswered support tickets, I decided to close my account, that’s when the worst came. It took me two months of emails, support tickets, phone calls, and even contacting the company that owned the data center they were located in before I was able to close my account.

As I was fighting to close my account they were bought out by another company, I hope things have gotten better since the buy-out.

HostingRails – Lasted 1 year

After being with a host that was so far behind, HostingRails was a breath of fresh air – everything was cutting edge, latest version of everything. Support was great, servers were nice & fast, really good host.

I was quite happy with them – with one exception: server load. Normally I would expect to see high loads on servers that are oversold, but I don’t think this was the case as the normal load was quite low. The spikes on the other hand, were anything but low – by the time I switched, it wasn’t uncommon to see load jumping to 20+ and on a few occasions the load exceeded 50!

It may have just been a matter of me being unlucky in having another person on the sever that was abusing the system, but either way it was getting old. I’d like to do business with them again, though next time I’ll go VPS instead of shared.

Servage – Lasted 6 months

Servage provides budget hosting with a nice set of features, quick support, and a fairly impressive control panel. If you are looking for a low-cost hosting company with a few nice extras – Servage does quite well. Though soon after switching I ran into a familiar issue – server load. While it seems that their web servers are quite fast – the database servers are often bogged down.

After getting yet another database connection error, I decided it was time to look for another option.

DreamHost – Current

I’ve heard many good things about DreamHost – including from a few start-ups running their projects from the normal shared hosting package. If it’s good enough for them, should be more than enough for me.

These people have just completely wowed me so far – the best control panel I’ve used, the most features I’ve seen from a shared host (especially in this price range), extremely fast servers. The best for me, is the SSH access – as it seems fewer and fewer shared hosts are allowing this type of access.

For now, if you are looking for good, low cost Linux hosting – DreamHost gets my vote.

Tagged with:
 

Over the last couple days my various web sites have seen far more downtime than normal. My hosting provide, Radical Vision has apparently been having issues with the MySQL server that powers not only this blog, but even their support system.

Yep, you heard me right, the support system that you have to use to contact them about any issues relies on MySQL, the very same instance that everybody else uses. The same one that was down for several hours today. What’s the point of a support system if you can’t report issues?

Yesterday’s outage was blamed on a bad script being ran by another user, as for today, I’ve yet to hear a word.

When I opened my account with RadicalV almost three years ago, you could simply email a support address and expect a response within a couple minutes. Then, “to provide better support” they disabled this simple support system and replaced it with a web page. Now, this is easy to use, and I’m sure that it makes their lives easier, but what about the life of the customers on days like today?

Now, I still firmly believe that RadicalV is the best hosting service I’ve used, and I’m still impressed with the support. Where many hosting services respond to support questions within a day, RadicalV typically responds within an hour or two. I guess like all good companies, they grow up and change focus. The days of the 5 minute support response are over.

It’s too bad, and if the downtime continues as it for the last month or two, perhaps my $35 a month will go to someone else.

Tagged with: