# Integrating Rails with other technologies

**URL:** <https://www.ruby-forum.com/t/integrating-rails-with-other-technologies/150936>\
**Category:** Rails\
**Created:** [October 15, 2008, 12:58am UTC](https://www.ruby-forum.com/t/integrating-rails-with-other-technologies/150936 "2008-10-15T00:58:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9de0a6/32.png) [@marcos](https://www.ruby-forum.com/u/marcos)\
**Post date:** [October 15, 2008, 12:58am UTC](https://www.ruby-forum.com/t/integrating-rails-with-other-technologies/150936/1 "2008-10-15T00:58:57Z")

</div>

Hi there

Can anyone here give me examples/experiences of integrating Rails with  
other technologies?

For instance, if I want to create nice graphs, I really like  
JFreeChart, which is a Java app. The best way I could imagine doing  
this would be to have the Java charting component (or whatever app)  
something like this:

(In the following omiitting [http://www.domain.com](http://www.domain.com))

1. User requests /reports/name
2. Goes to the show method on the reports controller
3. Ruby posts to the java web service, which returns a URL to the  
graph
4. This URL is returned to the web client

Again, suggestions/experiences welcome.

Thanks

Marcos

---

<div class="post-metadata">

**Author:** ![marcos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9de0a6/32.png) [@marcos](https://www.ruby-forum.com/u/marcos)\
**Post date:** [October 15, 2008, 1:27am UTC](https://www.ruby-forum.com/t/integrating-rails-with-other-technologies/150936/2 "2008-10-15T01:27:39Z")

</div>

On Oct 14, 6:38 pm, Marcos [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 1. This URL is returned to the web client  
> I believe JFreeChart exposes a nice Java API for creating charts and  
> graphs and such. If you really want to use it in your Rails app, the  
> cleanest way to do that (in my opinion) is to use JRuby as your  
> interpreter. This allows you to mix-and-match Java and Ruby code in  
> your application. Your Ruby controllers and models can access the Java  
> API that JFreeChart provides, rather than having to run JFC separately  
> and access it as a web service.

Switching to JRuby isn’t exactly trivial, but neither is it all that  
hard if you’re familiar with Java and Ruby. You can check it out here:  
[http://jruby.codehaus.org](http://jruby.codehaus.org)

Hope that’s helpful.

-Bill
