The Passionate Craftsman

Ruby, PHP, MySql, Software engineering and more.

Friday, 24 September 2010

Install pg gem with PostgreSql 9.0 on Leopard

Download the installer from: http://www.enterprisedb.com/products/pgdownload.do#osx.
Install PostgreSQL, insert your password and you will have pgAdmin and other tools in your Applications directory.

If you will try to install the pg gem now you will get a compile error. You need to define the architecture of PostgreSQL and its bin directory:

sudo -s
export ARCHFLAGS='-arch x86_64'
export PATH=/Library/PostgreSQL/9.0/bin:${PATH}
gem install pg

This is the output I get:

bash-3.2# gem install pg
Building native extensions. This could take a while...
Successfully installed pg-0.9.0
1 gem installed
Installing ri documentation for pg-0.9.0...
Installing RDoc documentation for pg-0.9.0...
bash-3.2#

Labels: ,

auto_complete plugin on Rails 3 not working

If you are migrating your Rails app and auto_complete is not working, the reason is auto_complete does not remove the default escaping in Rails 3. A guy has fixed this problem. You just need to put his version in the place of the old plugin:

rails plugin install --force http://github.com/marklazz/auto_complete.git

Thanks marklazz

Labels:

Thursday, 9 September 2010

Is vi an UFO?

In a thread of Rails Talk I found a discussion about a good text editor, nothing new, but I want to cite this guy, he is very funny:
the problem with vim is that people always say is so powerful but when i try
to use it is like im looking at the sky waiting to see a UFO to pass by but
nothing happens

Labels: