PostgreSQL, Ruby, and Rails: I Quit

EDIT: I got it to work, finally. I’m not sure what changed this time around, but here are some notes I made.

This was supposed to go out last Saturday, but my blog took precedence. Oh, that, and Fable 2. Shh.

If you’ve somehow found this post in search of an answer, I have nothing but a rant for you. If the post at Robby on Rails did not work… you’re out of luck, or you’ll have to keep going and finding a solution to the mess that I ran into while trying to use PostgreSQL as my database in Rails.

I must have read that post multiple times, trying to get this to work. I hope that there’s a fourth version of that post sometime in the future… I left a comment there:

I guess I’m waiting for the 4th version of this. I think the official gem now is “ruby-pg” at http://rubyforge.org/projects/ruby-pg.

Everything is perfectly installed, except for the PostgreSQL gem. I cannot get my first rake db:migrate to work properly. It keeps telling me to install the gem “activerecord-postgresql-adapter”, which I know doesn’t exist, and it’s just a general activerecord error. I’ve tried not only the “ruby-pg” gem, but also (the now older) “postgres” as well as the “pg” (I don’t know what this one is).

Are you still using the “postgres” gem? Are things working out?

I was looking forward to rocking out in PostgreSQL land this weekend, but spending hours and hours scouring the Internet… and nothing. I might think it’s because I’m running 8.3.4, the latest version. Anyone else having my problem?

And just underneath it, someone else seemed to be having the same problems (which kinda prompted me to write this in the first place).

I don’t even want to go and document the errors I’ve gotten… Yes, I know about the ARCHFLAG. I know about the –with-pgsql-include-dir and –with-pgsql-lib-dir. I tried binaries of each gem, and even compiling from source. Blah blah blah.

Let Me Show You, The Insanity… Or The Inanity…

I really wanted this post to be titled “PostgreSQL, Ruby, and Rails: WIN.” It just turned out that I couldn’t figure it all out. I felt pretty n00b after spending the better part of three days on this (two weekends, almost). Reading up on PostgreSQL, it just seemed much more open and fully featured. Being unable to actually get it working, I said, screw it, and went with MySQL (something that I’ve played around with before).

The last time I did this, it was before Rails 2.0. I remember it being fairly painless. But now, it seems like the most recent version of PostgreSQL (8.3.4) and the most recent version of Rails (2.1.1) doesn’t seem to work together all too well. I’m guessing it’s the gems, and so it might have to do with Ruby (1.8.7) also.

The PostgreSQL gems seemed to have undergone a couple of forks. I don’t have any problem with forking… but the naming of these gems are ridiculous. It doesn’t help that PostgreSQL is like the weirdest named SQL implementation out there (let me know if there’s something named weirder). Do you shorten PostgreSQL to pg? How about just postgres? Why not call it by the full name but lowercased, postgresql? Then you have to add the ruby portion: rb or ruby. While we’re at it, let’s also call the project name different from the actual gem name itself.

At least, this is how I see this insanity. It feels like there are at least four gems that do the same thing, regardless of them being out of date or not. (pg, postgres, postgres-pr, ruby-postgres…) I must have tried most of them, to no avail. In the end, it seems like “pg” is going to be the one to follow. I think. I’ll have to come back on this later whenever I feel like experimenting with PostgreSQL again.

From the actual PostgreSQL page on the Ruby on Rails Wiki (which is totally outdated at the time of this writing):

You can install a pure Ruby postgres driver called postgres-pr using Gems:

gem install postgres-pr Note that you still have to write adapter: postgresql and not adapter: postgres-pr in your database.yml.

A faster, native driver called “postgres” is also available. It can be installed with the command:

gem install postgres

What I Think Is The Right Gem

The wiki seems to be wrong, and I believe this to be correct (from the RubyForge page):

Ruby-pg provides the module “pg”, a Ruby interface to the PostgreSQL Relational Database Management System, which supersedes the old “postgres” module. This project also maintains fixes for the old “postgres” module.

Okay… so… “Ruby-pg” is the project name. They maintain two modules, “pg” and “postgres”, even though the packages themselves are called “ruby-pg” and “ruby-postgres”. ARGH.

So That’s It

Time to start rolling. For now, I’ll go the MySQL route. There’s a larger community of people using it, as with tools and documentation and such… I’m just a little bit slightly wary of the licensing of the two.

Inching Towards Completion

  • Almost done with fixing the feeds. I don’t know what’s wrong with it right now. FEEDS WORK. HUZZAH.
  • Deleted ALL Twitter Posts. I’ll be advertising my twitter account more, however. I need to bring back the streaming tweets somewhere on the blog.
  • NearlyFreeSpeech issue with .htaccess. Not sure what it is, but WordPress seems to be unable to write it or something. Probably a strict permissions setting.

Tomorrow. More work tomorrow. One day, I’ll get to work on some projects… one day…

Unless Fable 2 stands in the way.

This Weekend: The Big Move

I’m moving a few things around this weekend on the Internets. For one thing, this blog will hopefully be on the new server by the end of Sunday.

This means some things might not look right. I probably won’t be posting too much, either.

Hooray for deadlines that come from actually doing things.

NearlyFreeSpeech.net Mini-review

logo

I’ve used NearlyFreeSpeech for less than a day now, and I already feel at home. It”s definitely not for beginners, for whom I would definitely suggest Dreamhost to start.

In terms of pricing, I”m enjoying this Amazon S3-esque pay-as-you-use scheme. Here”s the cost break down at this page. It actually comes out to be something much cheaper than what I”m used to paying with Dreamhost.

I”m digging the design. There”s a real lack of random ladies-with-headset images and other random fluff images. I love it. Except, the Support FAQ page needs a full expand link (which I somehow figured out myself… just pass a “?all” to the page: LINK).

Being a little sysadmin n00b myself, I had to learn a couple of things. And still, a few things are iffy, but I”m certain I”ll pick it up as I go. I have a working domain up and running. Just copy and paste and wait for DNS to propagate… but that”s for tomorrow.

One issue that concerned me was that my new MySQL process took a long while to start up. I wasn”t sure if it had broken, and so I was ready to contact support. After going to the gym to run and coming back, it started to work. I don”t know, maybe it was just me.

NearlyFreeSpeech feels a lot like Slicehost (which I will continue to pay for, so I can host my Rails projects), but with much less features. I”m not saying this as a bad thing: NFS seems like it does one thing very good: a service to host php/mysql websites. Indeed, I have to wait for a couple months to see how good the uptime is, but from what I”m reading, I haven”t heard too many negatives (and where those negatives existed, they were about the lack of features, which is a plus for me).

Note on MediaTemple

A quick mini-sidenote on MediaTemple: I definitely did not like the UI. It was really funky and hard to work with. The fact that I had to assign a domain name to my server to start out with was really strange. All other new domain names I would create would be associated with the first one (I know that there”s a view to fix this, but that”s not the default). I”m waiting for my 30-day guarantee refund. I would have liked to try them out though… but NFS is so much cheaper.

Note on GoDaddy

A second quick mini-sidenote on GoDaddy: No more. I actually moved one to NFS, just to try them out. Catalyst? I didn”t know that there were other registrars that were cheaper. I guess I stopped look around after I figured out how cheap it was at one point. And wow, I can”t believe I sat there and worked around that atrocious UI. And seriously, I contacted Wil Shipley why golden-braeburn.com (which is up now) was down. Ah, the power of Twitter.

Note on UI/Design Flaws

Oh, one huge sidenote: I really should justify what I don”t like about these UI”s or designs, but I feel like… why bother? They really should have fixed them… why spend the time to explain it. HIRE ME and I”ll tell you how to, heh. This is one of the reasons why I have yet to start my screencast yet.

Ugh, so little time. SO LITTLE TIME.

Bawls G33k B33r: A Review

Summary: It tastes just like root beer, but normally root beer lacks the awesomeness that is caffeine. If you actually like root beer (not Stewart’s, because that stuff’s disgusting, but more like IBC), this should be right up your alley.

A Box? Of What?

Little Bullets of Caffeine

Oh, iPhone. Blurry. It’s like little bullets of caffeine.

A Sample

I started to miss these in bottle form. Amazon sells them as cans (Regular Bawls and Sugar Free, both which I’ve tried), but I still like them as bottles.

I also like the 10 fl oz serving size. 16 oz is a little bit too much for my taste.

Goodbye Dreamhost.com, Soon?

It’s been a fun ride. I love your company’s willingness to be open, with your dreamhoststatus.com page and your awesome blog. However, I can’t take the recent flurry of downtimes, which are just causing me quite a bit of pain.

I’ve been using a service called Montastic to track down time. In the past two months, my site has been down not once, not twice, but eight times (and even, two and three times on the same day).

This is from my gmail account. I get emails from Montastic when the server goes down. And when I do get the email, I go check instantly.

Downtime.

Some of these were hiccups, with it possibly being Montastic’s fault. Though, often they were huge downtimes that really hit my traffic during peak hours. By the way, my web server name was erebus, and I can’t even find postings about it in the past two months on the dreamhost status page.

I can’t really trust Dreamhost like I did back in the days when my web presence wasn’t very important to me. I think it’s still a great starter web host, hiding a lot of the menial tasks of setting up a web server… it’s just that I feel as though I need to move up to something a little bit more… expensive?

I’m thinking Media Temple. I might just go all out and start using Slicehost as my main blog and dev server. I might throw in some Amazon S3 for making my site even faster. Anyone have any ideas?

Edit: Looks like I may possibly be sticking with Dreamhost. I went and played around with MediaTemple for a night, and I didn’t like what I saw. The UI isn’t very clean, as much as Dreamhost was. Maybe I should talk to Dreamhost directly to get a response on these down times…

Goal For This Week: Rebranding

Heh. 10/10 came and went. And yet, I’ve never felt better. It’s this strange feeling of being okay with my non-completeness of the things I set out to do a month ago. I actually inadvertently (or, in another view, completely willingly, since I found project development to be less exciting) ended up taking a week off. I won’t be able to finish that post, though, since it’s getting fairly long. It’s one of those post that just keep going on and on about life in general.

But, looking towards this week, I’ve decided to rebrand my online identity a little bit. With the recently acquired joshk.im, I now have some room to play with.

Here’s a happy diagram.

Rebranding

Oh, so many things to occupy my time with, all so very productive.

And here comes another week!

The Lack Of Hair

It’s definitely a weird feeling.

It feels cold because of the draftiness up on the top of my dome, and yet, when the sun is shining, I feel a lot warmer.

I keep throwing my head to the left, thinking that I still have hair to control in this manner. I try to go into a cough over the shoulder just to seem like I’m not completely losing it.

When I get an itch, I scratch my head as hard as if I still had a deep layer of hair separating me from the target and the rest of the world. And it hurts when I do this.

I’m having a hard time getting this sucker to be actually smooth. There’s quite a stubble all over the place, which is making my beanie wearing experience… a very annoying one.

In response to Nathan, sleeping on the pillow yesterday night was pretty different.

I haven’t had too many surprise reactions to the baldness yet. I had someone start to giggle as they saw me, which I thought was hilarious. Some stand in amazement of the astonishing difference in the density of hair.

I’m liking it though. One less thing to worry about (except for the shaving part… must get rid of the stubs). Definitely don’t have to use shampoo or conditioner. Finally have an excuse to wear a beanie or a hat everywhere (hooray for accessorizing… and actually, not really an excuse, but the ability to wear a head covering without first taming the beast that used to be my hair).

And, I look awesome. I really do need to start telling people that I’m going to be a monk. In the Temple… of Awesome.

That ends my initial thoughts on my hairlessness.


If you’ve been following me on Twitter, you would have seen some tweets that were used in the making of this post. I feel like that’s exactly one of the many ways I should be using Twitter: a place to just start forming ideas, not only by just my tweets, but also from talking with others on Twitter.

I Feel A Little Drafty Up In Hea

It feels a little cold. Oh, I know why.

Photo 15

Yeah. I know. And I didn’t even really line up the lamp behind me to create the shining brilliance that is now the top of my head.

The details on the Flickr.

This was all done during my lunch break… one insane lunch break.