ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  how to install in ruby and rails using rvm?
Posted by shawn on Sep-20-2011 05:23
Hey all

I have used ChartDirector for years, great sofware. I am having some trouble knowing
how to install it into a rails application if the ruby versions are installed by rvm. Where do
i need to put all of the pieces now? the library, the license file, the chartdirector.rb.. just
need to know how to set this up since my computer doesn't really have a single ruby
installation.

thanks for any tips.

shawn

  Re: how to install in ruby and rails using rvm?
Posted by Peter Kwan on Sep-21-2011 00:14
Hi shawn,

I have not used RVM before. In any case, if your computer can run Rails, your computer must have Ruby (may be it is not installed by you, but by RVM), because Rails is a Ruby application and requires Ruby to run.

If you are developing a Rails application, you must have a Rails directory structure for application to store your Rails code. For example, the controllers should be stored in "app/controllers" under your Rails application directory, and the views should be in "app/views". There should also be a "vendor" subdirectory under your Rails application directory. You can put all third party libraries there, including ChartDirector. In fact, the ChartDirector for Ruby distribution includes a Rails sample application, and it puts the ChartDirector library in the "vendor" subdirectory too.

For your case, please go to "ChartDirector/railsdemo/vendor". You should see 5 files rubycdapi18.so, rubycdapi191.so, libchartdir.so, chartdirector.rb and financechart.rb, and also a "fonts" subdirectory. Please copy these 5 files and the fonts subdirectory to the vendor subdirectory of your Rails application. In this way, ChartDirector will be available to your Rails application.

If you want ChartDirector to be usable and available to all Ruby applications (including all Rails applications), please use the "install.rb" script that comes with ChartDirector. It ls like:

/path/to/your/ruby install.rb

Hope this can help.

Regards
Peter Kwan