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

Showing posts with label gems. Show all posts
Showing posts with label gems. Show all posts

Friday, July 10, 2009

superclass mismatch for class ModelExampleGroup - Solved

If you have been pulling your dick hair out, like i was, i thought i'd post this here, while i'm still in a rage.


Error


When you are running cucumber features, you get the following shit:
cucumber features
superclass mismatch for class ModelExampleGroup (TypeError)...


At first, i commented out the remarkable line in environment.rb. I have no idea what this gem does, And i don't want to know. Hell, I only put it there because of a railscast i think, but this gem is fucking me up, so, again, i commented it out of the environment.rb file and everyone is happy. Good riddance.


FiX?


I just installed remarkable-rails instead. i guess the README in the github repo says how to do it. I've not gotten the error since.

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.