Topic: RedCloth 4.1.1 and config.gem sadness
I am using RedCloth 4.1.1 in a Rails 2.2.2 project, and thought I'd try out the new gem dependency stuff. After overcoming a foible of ruby on FreeBSD (who knew you needed to set RB_USER_INSTALL to enable installing gems in ~/.gem?), I got the gem installed correctly. It works, but I must explicitly require it in environment.rb.
Then I removed the explicit call to require, and added `config.gem "RedCloth"' in the configuration block, and ran `rake gems:unpack'. The gem is correctly copied to vendor/gems, but now when I start the app, I get this error:
zsh 1663 (svn)-[steam:9]-% ./script/server webrick
=> Booting WEBrick...
no such file to load -- redcloth_scan
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in `require'--- backtrace snipped ---
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in `require'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/server.rb:49
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
./script/server:3
Missing these required gems:
RedClothYou're running:
ruby 1.8.6.287 at /usr/local/bin/ruby18
rubygems 1.3.1 at /home/dan/.gem/ruby/1.8, /usr/local/lib/ruby/gems/1.8
The supposedly missing file (redcloth_scan) is in vendor/gems/RedCloth-4.1.1, exactly where you'd expect to find it.
I have tried specifying :lib => 'redcloth' in environment.rb, but to no avail. The only way I can get it all working again is to remove the copy of the gem under vendor, remove the gem dependency in the configuration and explicitly call require 'RedCloth'.
Anyone else seen this problem? Anyone figured out how to fix it?