• CONTACT

TheTechnologist.TV

  • the column

Loading...
Loading...
Home › Blogs › Wolfram Arnold's blog

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
  • interpreter
  • Linux
  • Wolfram Arnold's blog

AUDIT THE FED

Latest

Generative Art From The Math of The Rodin Vortex, The Fibonacci Spiral, and The Gielis Superformula
18 hours 15 min ago
An Historic Press Release
2 weeks 3 days ago
Tahrir Tilt Shift
2 weeks 3 days ago

Below The Fold

On "The Ascent of Money", A BBC Series on The History of Finance
6 weeks 3 days ago
The History of All Earth Ever, as A Drop of Water on The Sun (abstract)
6 weeks 3 days ago
FTC Deals FaceBook The Largest "Hump On The Wrist" In Silicon Valley History
8 weeks 18 hours ago
In The 6 Months Since I Closed The Lab, 11|3L3V3N Happened
10 weeks 2 days ago
When Did I Become Dr Who?
38 weeks 6 days ago
more

Active Topics

  • Technology
  • Google
  • Android
  • iPhone
  • Entertainment

AUDIT THE FED

  • the column