Tuesday, February 9, 2010

openssl 1.0 + ruby-1.9.1-p378 patch (for Fedora 12)

Okay, so if you're using Fedora 12 and trying to install 1.9.1, you may be having some problems.

This is because Fedora 12 is using an openssl 1.0 beta, which requires a few changes in Ruby. (all versions)

Unfortunately the patches I've seen were for 1.8.6, as this is such a new issue.

If you're using rvm you can use openssl-0.9.8k like this:

rvm install openssl
rvm install 1.9.1 -C --with-openssl-dir=$HOME/.rvm/usr

P0W! Done.

Otherwise, you can get my updated patch at http://gist.github.com/299682
This patch is not guaranteed to work. It worked for me but YMMV and if it eats your cat don't blame me.

Sunday, February 7, 2010

Rails 3 environment settings using Passenger + Apache

I had some trouble getting Passenger to run my rails 3 app in development mode today, it wanted to use production even with RailsEnv development. Turns out that while it was ignoring that, it was respecting RackEnv development. Yay! I didn't investigate further, I'm happy using RackEnv.

Sunday, July 29, 2007

Basic generic products db


Here is a basic design for a generic product database using STI. This allows different kinds of things to be gropuped by class and inherited normally, and makes it easy to have different associations/association rules on similiar things. Something like a cart, is an order by another name, and just has to be re-typed into something like CompletedOrder when completed.

Saturday, April 28, 2007

A handy hash method

I am testing posting code :)


class Hash
def except(*arr)
hsh = self.dup
arr.each do |k|
hsh.delete(k)
end
hsh
end
end

Welcome to gRoR!

We will be discussing Ruby programming using the RubyOnRails web framework and other tools. I don't know yet if blogger will work well for this or not. Let me know if you have any issues.