Thursday, November 20, 2008

Phusion Passenger Enterprise Ruby

If you're using Phusion Passenger (http://www.modrails.com),
and you want it to use Ruby Enterprise Edition, then edit your Apache
configuration file, and change the 'PassengerRuby' option:

PassengerRuby /opt/ruby-enterprise-1.8.6-20080810/bin/ruby

If you ever want to uninstall Ruby Enterprise Edition, simply remove this
directory:

/opt/ruby-enterprise-1.8.6-20080810

Tuesday, November 18, 2008

ssh keys setup - passwordless login from multiple machines

Append id_rsa.pub value in a new line (if there is already another entry) to the ~/.ssh/authorized_keys in the remote machine.

Thursday, November 06, 2008

no such file to load -- mysql (MissingSourceFile)

I followed the Hivelogic tutorial to install MySQL. I was getting that error message when I do:

sudo gem install mysql

To get this to work run:

sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-dir=/usr/local/mysql --with-mysql-lib=/usr/local/mysql/lib --with-mysql-include=/usr/local/mysql/include

[All in one line]

Tuesday, November 04, 2008

WARNING: RubyGems 1.2+ index not found for:

RubyGems will revert to legacy indexes degrading performance.

I was getting this error message while upgrading from Rails 2.1.1 to 2.1.2. Just add github as another gem source.

1. sudo gem sources -a http://gems.github.com

2. sudo gem install rails --version 2.1.2

Monday, November 03, 2008

Rails 2.1.1 Htmldoc 0.2.1 PDF generation

I was getting the error:

NoMethodError (undefined method `size' for false:FalseClass):
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/streaming.rb:123:in
`send_data'

Patch the file :
/usr/local/lib/ruby/gems/1.8/gems/htmldoc-0.2.1/lib/htmldoc.rb

with the following:

result.split("\n").each do |line|
+ line.strip!


Reference:

http://textmode.at/2008/5/14/ruby-htmldoc-gem-falseclass-error