Unnsse-
Please try one more thing before you give up. Set up a sylink =20
from /usr/bin/ruby to /usr/local/bin/ruby and then put /use/local/=20=
bin and /usr/local/sbin in your $PATH in front of /usr/bin and /=20
usr/sbin.
Here is the blog entry where the shell script I had you run =20
initiated:
http://tech.rufy.com/entry/46 . I know many people who =20=
went this route to fix Tiger's ruby setup. If this does not work =20=
for you then you can always install ruby from source. If that is =20
what you need to do then you can rename Tiger's ruby binary to =20
ruby.tiger or something and install from source. I am pasting =20
installation instructions for the whole ruby/rails/lighttpd/fcgi/=20
gems/mysql bindings stack.
I am really sorry that my instructions seemed to have messed =20
things up. I feel horrible. Please try these other suggestions =20
and let me know when you get it fixed. If you encounter more =20
problems I feel obligated and I would gladly install everything =20
for you if you create a temporary ssh account for me that you can =20=
erase when the install is done.
I hope it works for you:
-Ezra
Here are instructions for a source install:
These instructions work on OSX, most linux distros and FreeBSD
You can skip ruby if you already have a good copy. But if you =20
only have the
stock ruby that comes with OSX I would compile it from source and =20=
rename the
stock OSX ruby and irb to ruby.bak and irb.bak so you don't end =20
up using
them on accident.
__________________________________________________ ______________
Get Ruby1.8.2
curl -O
http://rubyforge.org/frs/download.php/2338/ruby-1.8.2.tar.gz
tar xvzf ruby-*
cd ruby-1.8.2
./configure
make
make test
sudo make install
__________________________________________________ ______________
Get Ruby gems
curl -O
http://rubyforge.org/frs/download.php/3700/=20
rubygems-0.8.10.tgz
tar xvzf rubygems*
cd rubygems*
sudo ruby setup.rb
__________________________________________________ ______________
Get Rails and a few other gems
sudo gem install rails RedCloth search_generator =20
salted_login_generator production_log_analyzer
answer yes to all dependencies
__________________________________________________ ______________
Get mysql-ruby C bindings (the pure ruby ones suck)
This command works great on osx as well using the mysql 4.1.x =20
installer from mysql.com
or the serverlogistics.com mysql as well.
curl -O
http://www.tmtm.org/en/mysql/ruby/mysql-ruby-2.7.tar.gz
tar zxvf mysql-ruby-*
cd mysql-ruby-*
ruby extconf.rb --with-mysql-config
make
sudo make install
__________________________________________________ ______________
download fastcgi developers kit
curl -O
http://fastcgi.com/dist/fcgi.tar.gz
tar xvzf fcgi-2.4.0.tar.gz
cd fcgi*
./configure
make
sudo make install
__________________________________________________ ______________
Get the new non memory leaking ruby-fastcgi bindings
curl -O
http://sugi.nemui.org/pub/ruby/fcgi/ruby-fcgi-0.8.6.tar.gz
tar xzvf ruby-fcgi*
ruby install.rb config --without-ext
ruby install.rb setup
sudo ruby install.rb install
__________________________________________________ ______________
We need the correct pcre .so=92s for lighttpd to work correctly
curl -O ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/=20
pcre-5.0.tar.gz
tar xzvf pcre-5.0.tar.gz
cd pcre-*
./configure
make
sudo make install
__________________________________________________ ______________
Get lighttpd
You can install lighttpd 1.4.4 if you want. I'm still using =20
1.3.16 until
the 1.4 branch settles down.
curl -O
http://www.lighttpd.net/download/lighttpd-1.3.16.tar.gz
tar xzvf lighttpd-1.3.13.tar.gz
cd lighttpd-*
./configure
make
sudo make install
__________________________________________________ ______________
Compile php as a fast-cgi binary The main thing here is the =20
following configure options. You can add whatever else you like =20
to your php binary but these are needed for fast-cgi support.
$ ./configure \
--enable-fastcgi \
--enable-discard-path \
--enable-force-cgi-redirect \
__________________________________________________ ______________
Lighttpd Launcher Script
Here is a link for a sweet enhancement. Put this script in your =20
RAILS_ROOT/script folder and put the lighttpd.conf file in =20
RAILS_ROOT/config. Now you can launch your rails app by cd=92ing =20
into your RAILS_ROOT for your app and typing:
$ruby script/lighty -p 7500 -e development (or whatever port & =20
env you want to use)
Now you can hit
http://localhost:7500/ and you will get your app =20
running on lighttpd no muss no fuss. Very sweet for development. =20
Here is the link:
http://www.bigbold.com/snippets/posts/show/=20
303 . Name the first ruby script lighty and name the config file =20
lighttpd.conf. Now every time you start your app this way is =20
creates a new lighttpd.conf in /tmp and starts lighttpd up with =20
that file. This way you can give it command line options as to =20
what port to bind to and others. I=92m using this for development =20=
and it is sweet!
On Oct 13, 2005, at 3:11 PM, Unnsse Khan wrote:
Ezra,
Your suggestion not only did not help me with fixing the IRB tab =20=
completion (its still broken), but it broke a bunch of other =20
things.... :'(
When I try to run rake:
Raven:~ untz$ rake
/usr/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:74:in =20
`load_specification': undefined method `cert_chain=3D' for =20
#<Gem::Specification:0x22ae2c> (NoMethodError)
from (eval):1:in `initialize'
from (eval):1:in `new'
from (eval):1:in `load_specification'
from /usr/lib/ruby/site_ruby/1.8/rubygems/=20
source_index.rb:45:in `eval'
from /usr/lib/ruby/site_ruby/1.8/rubygems/=20
source_index.rb:74:in `load_specification'
from /usr/lib/ruby/site_ruby/1.8/rubygems/=20
source_index.rb:45:in `from_installed_gems'
from /usr/lib/ruby/site_ruby/1.8/rubygems/=20
source_index.rb:44:in `each'
from /usr/lib/ruby/site_ruby/1.8/rubygems/=20
source_index.rb:44:in `from_installed_gems'
from /usr/lib/ruby/site_ruby/1.8/rubygems/=20
source_index.rb:63:in `from_installed_gems'
from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:79:in =20
`source_index'
from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:135:in =20
`activate'
from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:37:in =20
`require_gem_with_options'
from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:31:in =20
`require_gem'
from /usr/bin/rake:17
Raven:~ untz$
When I try to get rake or rails using RubyGems:
Raven:~ untz$ gem install --remote rake
Attempting remote installation of 'rake'
ERROR: While executing gem ... (NoMethodError)
undefined method `cert_chain=3D' for #<Gem::Specification:=20
0x712524>
Raven:~ untz$ gem install --remote rails
Attempting remote installation of 'rails'
ERROR: While executing gem ... (NoMethodError)
undefined method `cert_chain=3D' for #<Gem::Specification:=20
0x712524>
And, when I try to see what ruby is installed + the version:
Raven:~ untz$ ruby -v
ruby 1.8.2 (2004-12-25) [powerpc-darwin8.0]
Raven:~ untz$ which ruby
/usr/bin/ruby
Thanks for your help, but I wish I never tried it....
Can anyone help me at all?
Many, many, thanks!
-Unnsse
On Oct 13, 2005, at 2:48 PM, Ezra Zygmuntowicz wrote:
Yes I would still do this. Apple ships a broken version of ruby =20=
and this totally fixes it. I have done it on over 10 installs =20
of Tiger. It will go ahead and just write over your rubygems =20
install and worst case scenario you might need to reinstall any =20=
gems you already installed. But thats a small price to pay for =20
having a ruby binary that has readline support and can properly =20=
build C extensions.
HTH-
-Ezra
On Oct 13, 2005, at 2:00 PM, Unnsse Khan wrote:
Ezra,
I already have RubyGems installed....
Should I still do this?
Regards,
Unnsse
On Oct 13, 2005, at 10:38 AM, Ezra Zygmuntowicz wrote:
Unnsse-
Here is an easy way to fix the OSX default install of =20
ruby. This will fix the irb completion by installing readline =20=
and it will install rubygems for you. Just run this command =20
from the terminal:
$ sudo curl -O rufy.com/fix-ruby-tiger.sh; sh fix-ruby-tiger.sh
Hope that helps-
-Ezra
On Oct 13, 2005, at 7:07 AM, Unnsse Khan wrote:
Thanks James,
I would I "un-install" the Mac OS X Ruby and install the new =20=
one (ruby 1.8.3)?
Could I use the RubyGem utility? Or do I login as root and =20
just download the tar.gz file and unzip
it and then do a configure and then make install? Would this =20=
overwrite the ruby 1.8.2 that I have?
The same questions apply to tcl/tk...
Regards,
Unnsse
On Oct 13, 2005, at 6:35 AM, James Edward Gray II wrote:
On Oct 13, 2005, at 2:01 AM, Unnsse Khan wrote:

Hello again,
Hello.
I am a Ruby newbie... I am using the following version on =20
Mac OS X Tiger:
Raven:/Developer/DevResources/Ruby/Draw untz$ ruby --version
ruby 1.8.2 (2004-12-25) [powerpc-darwin8.0]
Raven:/Developer/DevResources/Ruby/Draw untz$ which ruby
/usr/bin/ruby
This is Apple's default install, it looks like. There are =20
a few issues with it, so I prefer to build my own version =20
of Ruby.
I am experiencing several problems....
1. My irb doesn't support tab completion (the same version =20=
of Ruby
on WinXP does support tab completion)...
I believe this is one of the issues with Apple's install. =20
If you build the readline library, then build your own copy =20=
of Ruby, you should be able to get this going.
2. How do I use similar functionality in irb to clear the =20
buffer, as one would
do in Unix using "clear" and WinXP, using "cls"?
Try pushing Control-L.
3. I copied a simple Draw coding sample and when I tried =20
to run it,
I got an error...
The code for Draw.rb:
[snip code]
I assume this is a TK issue, but I'll let someone who knows =20=
more than me address it...
4. What is the *BEST* free Ruby IDE in the world?
I'm a text editor fan, not an IDE guy, so I'll let someone =20
else field this question too...
James Edward Gray II
-Ezra Zygmuntowicz
Yakima Herald-Republic
WebMaster
http://yakimaherald.com
509-577-7732
(e-mail address removed)
-Ezra Zygmuntowicz
Yakima Herald-Republic
WebMaster
http://yakimaherald.com
509-577-7732
(e-mail address removed)
-Ezra Zygmuntowicz
Yakima Herald-Republic
WebMaster
http://yakimaherald.com
509-577-7732
(e-mail address removed)