Rails 2.0 with Ruby 1.8.7
Wolfram Arnold — Sat, 05/30/2009 - 02:24
The Ruby 1.8.7 interpreter
$> ruby -v ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]
has a built-in method named "chars" which clashes with Rails 2.0's String extensions. The problem does not happen for Rails 2.1 or later.
The fix is simple. Add a file to config/initializers/ruby-1.8.7-string-workaround.rb as follows:
The next problem you might have is that your production machine might be on Ruby 1.8.6 and be just fine, while your dev box is on the latest bleeding edge. In that case, you probably don't want to commit this snippet above into the repository.
Git has a handy feature to let you ingore files just locally. This is different from .gitignore which gets checked in and ignores things for everybody who downloads the repository, including, possibly, your production server.
To set a local ignore, edit:
.git/info/exclude


