Color is not a module
/usr/lib/ruby/gems/1.8/gems/color-1.4.0/lib/color.rb:19
Gems installed in application:
pdf-writer 1.1.8 + color 1.4.0 + color-tools 1.3.0
can happen to any pdf-writer version and in any OS (tested on XP/Ubuntu/Debian/FreeBSD)
I have two models:
#require "color"
require 'pdf/writer'
require 'pdf/writer/graphics'
require 'pdf/simpletable'
class ModelA
In this model i generate pdf's.
require 'RMagick'
include Magick
require 'rvg/rvg'
class ModelB
And in this model i generate images's.
Problem are raised when i added ModelB to project.
I was unable to use pdf generator(ModelA) as well as ModelB.
After some research i found that if i remove requires from ANY model, other model is working well ....
Temporary i removed ModelB requirements (generating images from another place).
Looking for solution ..
SOLVED
add
require "color"BEFORE
require 'RMagick'in ModelB so it will looks like:
require "color"
require 'RMagick'
include Magick
require 'rvg/rvg'
class ModelB
Magick should not to be on the toplevel.