hey does anyone know if there is some type of workaround or known bug fix available to individuals who are trying to get RMagick and Rails talking to each other properly on WindowsXP / Apache2 / FastCGI? Ive been frustrated over this issue since last week and I have barely gotten anyone to respond, and not a single solution. I have installed ImageMagick and RMagick and tested both as per the documentation, as soon as I bring it into my rails application, it fails giving me NameError messages. im just trying some super basic stuff right now, so in my application controller I have the following code (equal signs not included): ================================================== require "RMagick" class BiographyController < ApplicationController include Magick layout "public" def index helloworld = Magick::ImageList.new( "images/rails.png" ) @biography = Biography.find( :all ) end end ================================================== Now.. looking at the code above, is anything wrong? I have only been using Ruby on Rails for a few weeks now, and learning as much as I can as I go. I also have no previous knowledge of the Ruby language.. so bare with me if its painfully obvious.. im trying though if that counts.. The Error I get is as follow (equal signs not included): ==================================================NameError in BiographyController#index uninitialized constant ImageList RAILS_ROOT: C:/web/firstappever/public/../config/.. This error occured while loading the following files: magick/image_list.rb ================================================== If I comment out the @biography, error still occurs.. im desperate to get this working properly.. my setup is as follows: WinXP SP2 (win32) Ruby 1.8.4 Rails 1.1.6 RMagick 1.13.0 ImageMagick 6.2.9-Q8 Sometimes I get another NameError, usually when first loading the application section where I have this code placed.. and its: ================================================== uninitialized constant Enum This error occured while loading the following files (equal signs not included): C:/web/firstappever/public/../config/../app/controllers/biography_controller.rb RMagick magick/enum.rb ================================================== Right now im at a 100% stand still until I can get this working.. if I need to drop back a few versions of ruby or rails or whatever, then please let me know, but im dying to get this working! Thanks to anyone who can show me the light!! -- Posted via http://www.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 http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
What happens if you remove the "include Magick" line? -- Posted via http://www.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 http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Try : helloworld = ImageList.new( "images/rails.png" ) On 9/13/06, Curtis Summers <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > What happens if you remove the "include Magick" line? > > > -- > Posted via http://www.ruby-forum.com/. > > > >-- rm -rf / 2>/dev/null - http://null.in Dont judge those who try and fail, judge those who fail to try.. --~--~---------~--~----~------------~-------~--~----~ 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 http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
hey guys, ill post both replies in this post instead of two seperate posts. First of all, thanks for the replies!! =================RE: Curtis Summers ================= I tried your method, and removed the "include Magick" line, but I still receive the exact same error as before. I tried to combine your method with the method explained directly under yours, the only change was the error said: ============This error occured while loading the following files: image_list.rb ============ So not much luck there unfortunately, any other advice is welcomed, this is the most activity ive had on it all week!! =============RE Pratik Naik ============= As I typed above, I tried this method combined with removing the "include Magick" line, and I get the same errors, wit hthe slight adjustment of the error occuring on the file it is trying to load (I realize there is not a physical file, but a reference to a class name). Any other ideas.. its getting close.. I can feel it in my bones!! Pratik Naik wrote:> Try : > > helloworld = ImageList.new( "images/rails.png" ) > > On 9/13/06, Curtis Summers <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: >> >> What happens if you remove the "include Magick" line? >> >> >> -- >> Posted via http://www.ruby-forum.com/. >> >> > >> > > > -- > rm -rf / 2>/dev/null - http://null.in > > Dont judge those who try and fail, judge those who fail to try..-- Posted via http://www.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 http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
> As I typed above, I tried this method combined with removing the > "include Magick" line,Try it without removing "include Magick". Thanks, Pratik -- rm -rf / 2>/dev/null - http://null.in Dont judge those who try and fail, judge those who fail to try.. --~--~---------~--~----~------------~-------~--~----~ 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 http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
hey.. just tried it same error shows up.. Pratik Naik wrote:>> As I typed above, I tried this method combined with removing the >> "include Magick" line, > > Try it without removing "include Magick". > > Thanks, > Pratik > -- > rm -rf / 2>/dev/null - http://null.in > > Dont judge those who try and fail, judge those who fail to try..-- Posted via http://www.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 http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Okay, out of curiousity, try: helloworld = ::Magick::ImageList.new( "images/rails.png" ) Notice the extra prepended :: -- Posted via http://www.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 http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Hey.. I actually have tried this way before as well, still the same error. I only use 2 plugins on my website, custom_err_msg, and EmailColumn, ive heard sometimes plugins overwrite or interfere with some NameSpaces.. but im not 100% sure my two plugins have anything to do with this case.. Curtis Summers wrote:> Okay, out of curiousity, try: > > helloworld = ::Magick::ImageList.new( "images/rails.png" ) > > > Notice the extra prepended ::-- Posted via http://www.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 http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
hey.. just wondering if you had any other ideas :S Ive done this install on 3 different PC computers, home, work and all of them have had the same problem.. so thats weird! thanks for all the help during the day today though! adam d wrote:> Hey.. I actually have tried this way before as well, still the same > error. > > I only use 2 plugins on my website, custom_err_msg, and EmailColumn, ive > heard sometimes plugins overwrite or interfere with some NameSpaces.. > but im not 100% sure my two plugins have anything to do with this case.. > > > > > Curtis Summers wrote: >> Okay, out of curiousity, try: >> >> helloworld = ::Magick::ImageList.new( "images/rails.png" ) >> >> >> Notice the extra prepended ::-- Posted via http://www.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 http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
adam d wrote:> hey.. just wondering if you had any other ideas :S Ive done this install > on 3 different PC computers, home, work and all of them have had the > same problem.. so thats weird!Are they all windows machines? -- Posted via http://www.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 http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
yup all 3 of them, apache2/fastcgi, (the rails app is working outside of the sections Im trying to add RMagick too) Curtis Summers wrote:> adam d wrote: >> hey.. just wondering if you had any other ideas :S Ive done this install >> on 3 different PC computers, home, work and all of them have had the >> same problem.. so thats weird! > > Are they all windows machines?-- Posted via http://www.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 http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
hey does anyone have any further ideas on this? or does anyone have any references on NameSpace Errors so I can read up and try to find out the problem myself some more.. thanks. adam d wrote:> yup all 3 of them, apache2/fastcgi, (the rails app is working outside of > the sections Im trying to add RMagick too) > > Curtis Summers wrote: >> adam d wrote: >>> hey.. just wondering if you had any other ideas :S Ive done this install >>> on 3 different PC computers, home, work and all of them have had the >>> same problem.. so thats weird! >> >> Are they all windows machines?-- Posted via http://www.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 http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
adam d wrote:> hey does anyone have any further ideas on this?So, it only fails in Rails, right? It works from irb? irb(main):001:0> require ''RMagick'' => true irb(main):002:0> a = Magick::ImageList.new(''/path/to/pic/pic.jpg'') => [/path/to/pic/pic.jpg JPEG 299x356 299x356+0+0 DirectClass 8-bit 48kb] scene=0 -- Posted via http://www.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 http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
hey.. yea its working in IRB. Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. irb irb(main):001:0> require "RMagick" => true irb(main):002:0> a = Magick::ImageList.new("big.jpg") => [big.jpg JPEG 300x250 300x250+0+0 DirectClass 8-bit 10kb] scene=0 irb(main):003:0> exit Curtis Summers wrote:> adam d wrote: >> hey does anyone have any further ideas on this? > > So, it only fails in Rails, right? It works from irb? > > irb(main):001:0> require ''RMagick'' > => true > irb(main):002:0> a = Magick::ImageList.new(''/path/to/pic/pic.jpg'') > => [/path/to/pic/pic.jpg JPEG 299x356 299x356+0+0 DirectClass 8-bit > 48kb] > scene=0-- Posted via http://www.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 http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
adam d wrote:>>> hey does anyone have any further ideas on this?Reboot? http://rubyforge.org/forum/forum.php?thread_id=7956&forum_id=33 -- Posted via http://www.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 http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
I have rebooted the entire computer and the webservers.. on all 3 systems.. Curtis Summers wrote:> adam d wrote: >>>> hey does anyone have any further ideas on this? > > Reboot? > http://rubyforge.org/forum/forum.php?thread_id=7956&forum_id=33-- Posted via http://www.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 http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
im still having major problems with this, so if anyone can offer anything further please let me know.. im totally stumped. adam d wrote:> I have rebooted the entire computer and the webservers.. on all 3 > systems.. > > Curtis Summers wrote: >> adam d wrote: >>>>> hey does anyone have any further ideas on this? >> >> Reboot? >> http://rubyforge.org/forum/forum.php?thread_id=7956&forum_id=33-- Posted via http://www.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 http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---