Using RedCloth 3.0.3. Rails when RedCloth 3.0.4. exists

Hi all,
I am trying to use RedCloth 3.0.3. on shared host but when I put direction to include this version in enviroment.rb:
require 'rubygems'
require_gem 'RedCloth', '= 3.0.3'

I receive error: /usr/lib/site_ruby/1.8/rubygems.rb:149:in `activate': can't activate RedCloth (= 3.0.3), already activated RedCloth 3.0.4.
Exception).

When I put this commands in boot.rb instead, it works, but it say that boot.rb should not use for configuration... so the question is where requiring should occur and if there is better way to do this? (nistalling 3.0.4 is not an option)

thanks for answer in advance,
Bojan

Hi, you may need to freeze rails as well as non-rails gems locally
before upload to your shared host. This simply recreates your local
configuration onto the remote host and I believe this is the
recommended way of doing things in this situation.

Good luck,

-Conrad

Thanks Conrad,
but what if I have both versions of RedCloth on local machine as well?
there should be way to specify which RedCloth Rails should use,
shouldn't it?

Bojan

Conrad Taylor wrote:

I’ve run across this problem myself and found that [for my setup at
least] requiring “redcloth” in config/environment.rb BEFORE the Rails Initializer block loads
the correct, specified version. Rails loads RedCloth on its own in the initialization block so unless you do it before then you’re stuck with the Rails version. Most of the time it’s not a problem so I wouldn’t call it a bug really. Just undocumented.

RSL