Rails 3 use bundler, rubygems doesn't work?

Hello, all,

I’m using rails and ruport

but require ‘ruport/util’ in my rails application doesn’t work,

it cannot find related files,

(in standalone ruby application, require ‘rubygems’;require ‘ruport/util’ works),

but cannot work in rails application,

so I add things like

gem “ruport”

gem “gruff”

in Gemfile,

but still not work,and adding this line to Gemfile,

gem “rmagick”,“2.12.0”,:platform=>“mswin”,:require=>‘RMagick’

it reports Uncaught exception: no such file to load – RMagick

( D:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.9/lib/bundler/runtime.rb:68:in `require’),

but in other standalone ruby environment

require ‘rubygems’

require ‘RMagick’ works

so I add the following lines to my rails application

$: << ‘D:\Ruby187\lib\ruby\gems\1.8\gems\ruport-util-0.14.0\lib’ if !$:.include? ‘D:\Ruby187\lib\ruby\gems\1.8\gems\ruport-util-0.14.0\lib’

$:<< ‘D:\Ruby187\lib\ruby\gems\1.8\gems\gruff-0.3.6\lib’ if !$:.include? ‘D:\Ruby187\lib\ruby\gems\1.8\gems\gruff-0.3.6\lib’

$:<< ‘D:\Ruby187\lib\ruby\gems\1.8\gems\rmagick-2.12.0-x86-mswin32\lib’ if !$:.include? ‘D:\Ruby187\lib\ruby\gems\1.8\gems\rmagick-2.12.0-x86-mswin32\lib’

$:<< ‘D:\Ruby187\lib\ruby\gems\1.8\gems\rmagick-2.12.0-x86-mswin32\ext’ if !$:.include? ‘D:\Ruby187\lib\ruby\gems\1.8\gems\rmagick-2.12.0-x86-mswin32\ext’

$:<< ‘D:\Ruby187\lib\ruby\gems\1.8\gems\zip-2.0.2\lib’ if !$:.include? ‘D:\Ruby187\lib\ruby\gems\1.8\gems\zip-2.0.2\lib’

as a temp workaround,

but it sure is not good, does anyone knows why rubygems in rails cannot work?

Please ask this question on the rubyonrails-talk mailing list. This list is for issues about the Rails core itself.