Chronicling my experiences with ruby on rails, web application development/management.

Wednesday, February 18, 2009

PostgreSQL on Mac OS X from source, with gem!

This one was a bitch for me. I started with the one click installer from the postgresql website, not worth the time. maybe it worked, but sure as shit didn't appear to work for me.


Steps i took to get PostgreSQL and postgres gem on my macbook (Intel)


I'll source these links later, but basically I:

  1. downloaded the source code from Postgres's site.

  2. Used the following commands
    ./configure \
    > --with-includes=/usr/local/include \
    > --with-libraries=/usr/local/lib
    make
    sudo make install


  3. put it into my $PATH directory (so annoying when it's not there)
    PATH=$PATH:/usr/local/pgsql/bin
  4. FOR THE RUBY GEM I used the following code because i'm on a fricking intel mac thanks to acts_as_blog
    sudo env ARCHFLAGS='-arch i386' gem install postgres -- \
    --with-pgsql-lib-dir=/Library/PostgreSQL/lib \
    --with-pgsql-include-dir=/Library/PostgreSQL/include


Hopefully this saves someone some time and heartache!


There is far too much to detail here...


Acts_as_blog post has everything you need. it should work for you. if it doesn't you need to look at creating your db user through psql.

Friday, February 6, 2009

My list of items to finish before the big launch.

I just thought i'd post the items that i need to finish before i launch. As i cross each one off of the list, i'll report back on how i tackled each problem. Some answers may take a whole post.


The List


  • figure out up to 7 day activation period for Accounts. Not a free trial but You have up to 7 days to activate.

  • add site for sale area.
  • Completed Ranks. Moderator roles is a feature i'll add later.
    Add forum roles to forum and make extendible if needed.

  • add user google adsense code section.

  • When new plugins are added, I'll need to create an instantiator based on the menu items the user has selected. #how to handle old members based on a new plugin being added? How do other sites handle it?

  • add body[:url] to mailer based on the current url they are on.

  • look into using AASM which creates a state for the accounts based on the presence of profile_id and then the current status of the user, as taken from paypal. (Users can cancel a monthly subscription on paypal, i need to know who is doing what)

Some of this shit may not make sense to you, however you will be able to tweek it to your exact situation.