Using the following as a reference: http://wiki.rubyonrails.org/rails/pages/HowtoGenerateJFreeCharts I''m trying to build some charts and I need to call a .jar file from within my controller. Here''s my code: pipe = IO.popen("java -jar /raid/projects/Dashboard/charting/ requestByProject.jar "+params[:name]+"") pipe.close This gives me nothing, however, if I run the command via the command line then it returns the images I need. I''m running Rails through JRuby on a Sun Solaris machine if that helps at all. Thanks. --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
> I''m running Rails through JRuby on a Sun Solaris machine if that helps > at all.Yes, it makes a difference. The wiki article assumed you were running ruby, not JRuby. That''s why the article uses a command-line invocation of java. In JRuby, you should be able to do it natively via require ''java'' and include_class, instead of invoking java on the command line. This should get you started: http://kfahlgren.com/blog/2007/04/12/more-jruby-play-jfreechart/ - Mark. --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---