# Color is not a module

**URL:** <https://www.ruby-forum.com/t/color-is-not-a-module/105505>\
**Category:** Rails\
**Created:** [May 30, 2007, 3:41pm UTC](https://www.ruby-forum.com/t/color-is-not-a-module/105505 "2007-05-30T15:41:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Martijn\_van\_Leeuwen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b5a626/32.png) [@Martijn\_van\_Leeuwen](https://www.ruby-forum.com/u/Martijn_van_Leeuwen)\
**Post date:** [May 30, 2007, 3:41pm UTC](https://www.ruby-forum.com/t/color-is-not-a-module/105505/1 "2007-05-30T15:41:18Z")

</div>

I have a problem with my pdf-writer-1.1.3 installation. When type  
require “pdf/writer” in the console i get the following error:

TypeError: Color is not a module  
from  
/usr/local/lib/ruby/gems/1.8/gems/color-tools-1.3.0/lib/color.rb:49  
from  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in  
`gem_original_require' from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in`require’  
from  
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active\_support/dependencies.rb:147:in  
`require' from /usr/local/lib/ruby/gems/1.8/gems/pdf-writer-1.1.3/lib/pdf/writer.rb:15 from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in`gem\_original\_require’  
from  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:32:in  
`require' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in`require’  
from (irb):2

My version is:  
ruby 1.8.5 (2006-12-25 patchlevel 12) [i686-darwin8.8.1]

\*\*\* LOCAL GEMS \*\*\*

actionmailer (1.3.3, 1.3.2, 1.3.1, 1.2.5, 1.2.1)  
Service layer for easy email delivery and testing.

actionpack (1.13.3, 1.13.2, 1.13.1, 1.12.5, 1.12.1)  
Web-flow and rendering framework putting the VC in MVC.

actionwebservice (1.2.3, 1.2.2, 1.2.1, 1.1.6, 1.1.2)  
Web service support for Action Pack.

activerecord (1.15.3, 1.15.2, 1.15.1, 1.14.4, 1.14.2)  
Implements the ActiveRecord pattern for ORM.

activesupport (1.4.2, 1.4.1, 1.4.0, 1.3.1)  
Support and utility classes used by the Rails framework.

captcha (0.1.2)  
Ruby/CAPTCHA is an implementation of the ‘Completely Automated  
Public Turing Test to Tell Computers and Humans Apart’.

color-tools (1.3.0)  
color-tools provides colour space definition and manpiulation as  
well as commonly named RGB colours.

googlecalendar (0.0.2)  
Google C. api for Ruby

mime-types (1.15)  
Manages a MIME Content-Type that will return the Content-Type for a  
given filename.

pdf-writer (1.1.3)  
A pure Ruby PDF document creation library.

railroad (0.3.4)  
A DOT diagram generator for Ruby on Rail applications

rails (1.2.3, 1.2.2, 1.2.1, 1.1.6, 1.1.2)  
Web-application framework with template engine, control-flow layer,  
and ORM.

rake (0.7.2, 0.7.1)  
Ruby based make-like utility.

RedCloth (3.0.3)  
RedCloth is a module for using Textile and Markdown in Ruby. Textile  
and Markdown are text formats. A very simple text format. Another  
stab at making readable text that can be converted to HTML.

rmagick (1.12.0)  
RMagick is an interface between the Ruby programming language and  
the ImageMagick and GraphicsMagick image processing libraries.

ruby-openid (1.1.4)  
A library for consuming and serving OpenID identities.

ruby-yadis (0.3.4)  
A library for performing Yadis service discovery

rubygems-update (0.9.2)  
RubyGems Update GEM

sources (0.0.1)  
This package provides download sources for remote gem installation

transaction-simple (1.3.0)  
Simple object transaction support for Ruby.

---

<div class="post-metadata">

**Author:** ![Martijn\_van\_Leeuwen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b5a626/32.png) [@Martijn\_van\_Leeuwen](https://www.ruby-forum.com/u/Martijn_van_Leeuwen)\
**Post date:** [May 30, 2007, 3:44pm UTC](https://www.ruby-forum.com/t/color-is-not-a-module/105505/2 "2007-05-30T15:44:56Z")

</div>

2007/5/30, Martijn van Leeuwen [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> I have a problem with my pdf-writer-1.1.3 installation. When type  
> require “pdf/writer” in the console i get the following error:
> 
> TypeError: Color is not a module

Try this:

gem install color

Regards  
Nicolai

---

<div class="post-metadata">

**Author:** ![Martijn\_van\_Leeuwen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b5a626/32.png) [@Martijn\_van\_Leeuwen](https://www.ruby-forum.com/u/Martijn_van_Leeuwen)\
**Post date:** [May 30, 2007, 4:00pm UTC](https://www.ruby-forum.com/t/color-is-not-a-module/105505/3 "2007-05-30T16:00:57Z")

</div>

Nicolai Reuschling wrote:

> 2007/5/30, Martijn van Leeuwen [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):
> 
> > I have a problem with my pdf-writer-1.1.3 installation. When type  
> > require “pdf/writer” in the console i get the following error:
> > 
> > TypeError: Color is not a module
> 
> Try this:
> 
> gem install color
> 
> Regards  
> Nicolai

I tried it, but color-tools is allready installed. I uninstalled  
color-tools and then installed color. But problem still exists.  
Installed color-tools again but no success. Tried it on my FreeBSD 1.8.5  
box, and my Apple 1.8.5.

---

<div class="post-metadata">

**Author:** ![Martijn\_van\_Leeuwen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b5a626/32.png) [@Martijn\_van\_Leeuwen](https://www.ruby-forum.com/u/Martijn_van_Leeuwen)\
**Post date:** [May 30, 2007, 4:13pm UTC](https://www.ruby-forum.com/t/color-is-not-a-module/105505/4 "2007-05-30T16:13:34Z")

</div>

Martijn van Leeuwen wrote:

> Nicolai Reuschling wrote:
> 
> > 2007/5/30, Martijn van Leeuwen [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):
> > 
> > > I have a problem with my pdf-writer-1.1.3 installation. When type  
> > > require “pdf/writer” in the console i get the following error:
> > > 
> > > TypeError: Color is not a module
> > 
> > Try this:
> > 
> > gem install color
> > 
> > Regards  
> > Nicolai
> 
> I tried it, but color-tools is allready installed. I uninstalled  
> color-tools and then installed color. But problem still exists.  
> Installed color-tools again but no success. Tried it on my FreeBSD 1.8.5  
> box, and my Apple 1.8.5.

If i open script/console and enter:  
module Color  
Color::Test = 1  
end

I get the same error. Is Color a reserved word, or is it set elsewhere  
as something else?

---

<div class="post-metadata">

**Author:** ![Martijn\_van\_Leeuwen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b5a626/32.png) [@Martijn\_van\_Leeuwen](https://www.ruby-forum.com/u/Martijn_van_Leeuwen)\
**Post date:** [May 30, 2007, 4:21pm UTC](https://www.ruby-forum.com/t/color-is-not-a-module/105505/5 "2007-05-30T16:21:38Z")

</div>

Martijn van Leeuwen wrote:

> Martijn van Leeuwen wrote:
> 
> > Nicolai Reuschling wrote:
> > 
> > > 2007/5/30, Martijn van Leeuwen [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):
> > > 
> > > > I have a problem with my pdf-writer-1.1.3 installation. When type  
> > > > require “pdf/writer” in the console i get the following error:
> > > > 
> > > > TypeError: Color is not a module
> > > 
> > > Try this:
> > > 
> > > gem install color
> > > 
> > > Regards  
> > > Nicolai
> > 
> > I tried it, but color-tools is allready installed. I uninstalled  
> > color-tools and then installed color. But problem still exists.  
> > Installed color-tools again but no success. Tried it on my FreeBSD 1.8.5  
> > box, and my Apple 1.8.5.
> 
> If i open script/console and enter:  
> module Color  
> Color::Test = 1  
> end
> 
> I get the same error. Is Color a reserved word, or is it set elsewhere  
> as something else?

Sorry for the Spam, but i found the problem. When i type \>\> Color in the  
console it says.  
=\> Magick::Color

So Color is allready been set to a Class in ImageMagick. Now im looking  
for the answer how to handle with this.

Kind Regards,

Martijn

---

<div class="post-metadata">

**Author:** ![Martijn\_van\_Leeuwen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b5a626/32.png) [@Martijn\_van\_Leeuwen](https://www.ruby-forum.com/u/Martijn_van_Leeuwen)\
**Post date:** [May 30, 2007, 10:14pm UTC](https://www.ruby-forum.com/t/color-is-not-a-module/105505/6 "2007-05-30T22:14:25Z")

</div>

I’m not a fan of PDFWriter…

[http://sublog.subimage.com/articles/2007/05/29/html-css-to-pdf-using-ruby-on-rails](http://sublog.subimage.com/articles/2007/05/29/html-css-to-pdf-using-ruby-on-rails)

On 5/30/07, Martijn van Leeuwen [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> > > > >
> > > 
> > > I tried it, but color-tools is allready installed. I uninstalled
> 
> Kind Regards,
> 
> Martijn
> 
> –  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> >

## –

## seth at subimage interactive

## [http://www.subimage.com](http://www.subimage.com) [http://sublog.subimage.com](http://sublog.subimage.com)

> **[Freelance Time Tracking Software — Online Invoice Software](https://cashboardapp.com/)**
>
> Freelance time tracking software, online invoice software & project management.
> Used by thousands worldwide since 2007. FREE trial.

[http://dev.subimage.com/projects/substruct](http://dev.subimage.com/projects/substruct)

---

<div class="post-metadata">

**Author:** ![Martijn\_van\_Leeuwen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b5a626/32.png) [@Martijn\_van\_Leeuwen](https://www.ruby-forum.com/u/Martijn_van_Leeuwen)\
**Post date:** [May 31, 2007, 1:08pm UTC](https://www.ruby-forum.com/t/color-is-not-a-module/105505/7 "2007-05-31T13:08:19Z")

</div>

Subimage Interactive wrote:

> I’m not a fan of PDFWriter…
> 
> [http://sublog.subimage.com/articles/2007/05/29/html-css-to-pdf-using-ruby-on-rails](http://sublog.subimage.com/articles/2007/05/29/html-css-to-pdf-using-ruby-on-rails)

Nice piece of software, but it’s expensive. I found the problem for my  
error. It was a bug in the simple\_captcha plugin. It included the  
RMagick gem the wrong way. So there is nog problem with the color-tools  
gem.
