Sunday, March 30, 2008

Upgrading gems from 1.0.1 to 1.1.0

I followed Hivelogic tutorial to install the gems 1.0.1 on Leopard. So I had to use the following commands to upgrade:

sudo gem install rubygems-update
sudo update_rubygems

Note: sudo gem update --system did not work. It installed it in some other directory and gem env was showing version 1.0.1

Thursday, March 27, 2008

Error installing MySQL

sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql
Password:
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.

/usr/local/bin/ruby extconf.rb install mysql -- --with-mysql-dir=/usr/local/mysql
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... no
checking for mysql_query() in -lmysqlclient... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/bin/ruby
--with-mysql-config
--without-mysql-config
--with-mysql-dir
--with-mysql-include
--without-mysql-include=${mysql-dir}/include
--with-mysql-lib
--without-mysql-lib=${mysql-dir}/lib
--with-mysqlclientlib
--without-mysqlclientlib
--with-mlib
--without-mlib
--with-mysqlclientlib
--without-mysqlclientlib
--with-zlib
--without-zlib
--with-mysqlclientlib
--without-mysqlclientlib
--with-socketlib
--without-socketlib
--with-mysqlclientlib
--without-mysqlclientlib
--with-nsllib
--without-nsllib
--with-mysqlclientlib
--without-mysqlclientlib


Gem files will remain installed in /usr/local/lib/ruby/gems/1.8/gems/mysql-2.7 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.8/gems/mysql-2.7/gem_make.out

Fix: You forgot to run make

no acceptable C compiler found in $PATH

If you get this error:

configure --enable-shared --enable-pthread CFLAGS=-D_XOPEN_SOURCE=1
checking build system type... i686-apple-darwin9.0.0
checking host system type... i686-apple-darwin9.0.0
checking target system type... i686-apple-darwin9.0.0
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.

Install XCode to resolve the above issue.

ls command not found in Leopard

Followed the Hivelogic tutorial to install the Rails stack on Leopard. This message was due to the messed up PATH variable in ./bash_login. I deleted the line that was mentioned in the MySQL installation and there is only one line:

export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"

That fixed the problem. I had to install the Tinkertool to make the invisible files show up in the Finder so that it can be edited.

Monday, March 24, 2008

cvs login: warning: failed to open /User/user_name/.cvspass for reading: No such file or directory

This error message occured when using CVS to checkout lame.
cvs -d:pserver:anonymous@lame.cvs.sourceforge.net:/cvsroot/lame login

Just ignore it. Continue the checkout:

cvs -z3 -d:pserver:anonymous@lame.cvs.sourceforge.net:/cvsroot/lame co -P lame

Voila, it checks out the lame code with no problemo!

Monday, March 10, 2008

Installing Ruby 1.9 on Mac OS X with Ruby 1.8 Intact

Install ReadLine

cd /temp
curl -O http://ftp.gnu.org/gnu/readline/readline-5.2.tar.gz
tar xvzf readline-5.2.tar.gz
cd readline-5.2
./configure --prefix=/Users/balaparanj/
sudo make
sudo make install

Install Ruby 1.9

cd /temp
curl -O ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.0-0.tar.gz
tar xzvf ruby-1.9.0-0.tar.gz
cd ruby-1.9.0-0
autoconf
sudo ./configure --prefix=/Users/balaparanj/ruby19 --with-readline-dir=/Users/balaparanj/
sudo make
sudo make install

Monday, March 03, 2008

How to Speak - Lecture Tips from Patrick Winston

http://isites.harvard.edu/fs/html/icb.topic58703/winston1.html

Introduction

Success of your career depends on following factors:

1) Ability to speak
2) Ability to write
3) Quality of your ideas

My objective is to prove to you that with knowledge you can be a better speaker. Second objective ...

When I am thru, what I hope to accomplish is to ...

How to Start

1. Outline on the board (with checkboxes)
2. Start with a promise
Say something to the audience that indicates to them how they will be empowered by the talk, how they will be better people by the time you are finished.

The Big Four

1. Cycle (say the concept 3 times)
Repeating reduces the probability that the audience misses a certain point. It is a fact that people lose their attention and think about something else during the presentation.

2. Verbal Punctuation
Keep track of where you are by checking off the boxes on the outline.

3. Near miss
Two or more. Surround the concept with near misses that help to establish its boundaries and provides an effective way to zero-in on just what the concept is about.

4. Ask questions
Frequent easy questions. Wait for 5 seconds before demanding an answer.

5. Time and Place

10:30 or 11 in the morning. Hall must be well lit (with natural light if possible).
It must be full. There are three types of talk: seminar, lecture, theatre. Avoid theatre like ambiance.

6. Blackboard
Well suited because it matches the pace at which people can absorb material. Drawings, icons and lists can be made. Use it as a target to point your hand.

7. Projectors
Do not read slides
Do not stand far away from transparency
Do not use physical pointers
Do not hide slides, use color instead
Do not use paragraphs use bullet points

8. Props

9. Style
To develop your own style, look at other good speakers with a view towards finding points of style that you can adapt to your own skills and situation.
It's ok to be eccentric. It will be useful as a handle if it is entertaining. Use stories.

10. How to stop
Do not thank the audience. Tell a joke. Deliver on the promise. When you conclude, remind people of your promise and exhibit how the promise is fulfilled. Call for answers to questions. Salute the audience.

Ex: This concludes what I have to say, I wish to add only that being here the past few days has been wonderfully stimulating and provacative experience for me. And I look forward to the same kind of interactions frequently in the future.

You can also say: Your questions have been stimulating and provocative.

11. Questions
Are there any questions. You can ask questions to get started.