I''m using the ruby gem "Color" and I''m having some troubles with to_hex. I''ve installed the gem, and when I try and run the test program I get this error:>> red = Color.new(''ff0000'')=> #<Color:0x3685990 @saturation=1.0, @hue=0.0, @lightness=0.5>>> yellow = Color.new(''ffff00'')=> #<Color:0x367e5a0 @saturation=1.0, @hue=0.166666666666667, @lightness=0.5>>> orange = red.mix_with yellow, 0.5=> #<Color:0x3675c34 @saturation=0.503875968992248, @hue=0.0820512820512821, @lightness=0.252941176470588>>> orange.to_hexNoMethodError: You have a nil object when you didn''t expect it! You might have expected an instance of Array. The error occurred while evaluating nil.collect from /Applications/Locomotive2/Bundles/rmagickRailsMar2007_ppc.locobundle/framework/lib/ruby/gems/1.8/gems/color-0.1.0/lib/color.rb:91:in `rgb_to_rgbhex'' from /Applications/Locomotive2/Bundles/rmagickRailsMar2007_ppc.locobundle/framework/lib/ruby/gems/1.8/gems/color-0.1.0/lib/color.rb:81:in `to_hex'' from (irb):15 Does anyone know what''s going on here? Thanks in advance. -- Posted via ruby-forum.com. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 8/25/07, Mariko C. <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> I''m using the ruby gem "Color" and I''m having some troubles with to_hex. > > I''ve installed the gem, and when I try and run the test program I get > this error:I recommend holding off on the use of this particular gem; use color-tools instead, or use Stefan''s color gem on the butler project. There are three colour manipulation projects that are being pulled together in one way or another; the Color project and color-tools have already been merged, but there''s been a lack of maintainer time to release an updated version. -austin -- Austin Ziegler * halostatue-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org * halostatue.ca * austin-/yODNl0JVVCozMbzO90S/Q@public.gmane.org * halostatue.ca/feed * austin-BGvFLPKiNqwsA/PxXw9srA@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I''ll look into those. Thanks for the response. -- Posted via ruby-forum.com. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---