Home
Installing Valentina for Ruby/Ruby on Rails PDF Print E-mail

Installing Valentina for Ruby/Ruby on Rails

The installation procedure of “Valentina for Ruby” module is as easy as the following:

Download and Install

Download the Valentina for RUBY for MAC OS X archive.

Open the disk image and run theinstaller. It installs the following items onto the computer - if these directories do not already exist, the installer creates them:

  • /usr/local/lib/VComponents
  • HOME/Paradigma Software/VRUBY_3

The implementation of Ruby on MAC OS X not Univeral Binary, but as PPC and i686 for MAC PPC and MAC INTEL separately. Because of this, there are two different modules included:

  • VRUBY_3/vruby_ppc_release.bundle
  • VRUBY_3/vruby_i686_release.bundle

Symbolic Links for Valentina for Ruby

We recommend creating a symbolic link in this location that points to the VRUBY_3/vruby_xxx_release.bundle. In order to do this, open your terminal and do the following, based on the version of host computer:

MAC INTEL:

ln -s /Users/rz/Paradigma Software/VRUBY_3/vruby_i686_release.bundle /usr/local/lib/ruby/site_ruby/1.8/i686-darwin8.7.1/vruby_i686_release.bundle

MAC PPC:

ln -s /Users/rz/Paradigma Software/VRUBY_3/vruby_ppc_release.bundle /usr/local/lib/ruby/site_ruby/1.8/powerpc-darwin8.11.0/vruby_ppc_release.bundle

Adding Valentina References to Ruby on Rails

First, make sure you have followed the instructions on Enabling Valentina for Ruby. You should have installed Ruby on Rails on your computer into system location.

Because packaged Ruby on Rails can introduce their own idiosyncrasies, you may have problems with Ruby on Rails if you used Locomotive.

Edit active_record.rb

You must edit this file in order for Ruby on Rails to recognize Valentina: RUBYDIR/lib/ruby/gems/activerecord-1.15.2/lib/active_record.rb Change the following line:

RAILS_CONNECTION_ADAPTERS = %w( mysql postgresql sqlite firebird sqlserver db2 oracle sybase openbase )

To... RAILS_CONNECTION_ADAPTERS = %w( mysql postgresql sqlite firebird sqlserver db2 oracle sybase openbase valentina )

Please let the Ruby on Rails team you'd like this adapter reference to be added automatically.

Install the Valentina for Ruby (VRUBY) Adapter

Copy "VRUBY_3/valentina_adapter.rb" into the following location:

/usr/local/lib/ruby/gems/activerecord-1.15.2/lib/active_record/connection_adapters

That's it! You should be ready to write your Ruby on Rails applications and enjoy the minutes-to-seconds speed Valentina affords. 

Get Started with Valentina for Ruby Examples

You should be able now to use VRUBY examples from these folders:

  • VRUBY_3/Examples/local
  • VRUBY_3/Examples/server

To use the example pages, you must have Valentina Server running on the same computer as the examples point to localhost. If you run Valentina Server on another computer then you need to correct the “examples_globals.rb” file to specify a correct IP of Valentina Server.

System Requirements

  • MacOS 10.4 or higher
  • Ruby 1.8.6 or higher (see below)
  • ActiveRecord-1.15 (Active Record 2.0 support in development)
  • Valentina Server 3.5 or higher (optional but used usually).
 
< Prev   Next >

© 2007. Mirye Software Division of Proactive International.