Ruby Model Configuration

Unofficial Content

Ruby Generator properties

Specific properties

  • Code Namespace
  • Full Text Search options -> Search Engine
  • Full Text Search options -> Index Directory

Execution Properties

Trace generation

In many cases it's useful to have a log file with the SQL sentences that have been executed by the application.
If the Log Level property is set to any value other than None, a gxlog<random_num> file will be generated in the current directory of the application with that information.

The possible values for Log Level property are:

NONE: trace is not generated
FATAL: trace is generated only if an error occurs that cancels execution
ERROR: the same as FATAL, but trace is also generated when the error does not cancel execution
WARN: trace is generated when errors and warnings are thrown
INFO: the same as WARN level but trace is also generated when some type of information other than a warning is thrown by the application.
DEBUG: trace is always generated

Configuration files

The gxconfig.yaml file located under the application directory includes configuration options which are taken into account by the application at runtime.

The syntax used in this file is:


Below is an example of this file:

std_version: '10_0_3-18179'
decimal_point: '.'
date_fmt: 'ENG'
time_fmt: 12
year_limit: 40
cs_blob_path: 'temp'
tmpmedia_dir: 'temp'
log_level: 'NONE'
webroot: 'http://localhost:10080/KBPracticoRuby/'
app_namespace: 'KBPractico'
text_index_drb_url: 'druby://localhost:9000'
index_directory: './FerretIndex'
att_max_name_len: 30
language: 'eng'
lang_name: 'English'
  Default: !ruby/object:GX::Datasource
    database: 'TravelAgency3'
    schema: ''
    server: 'localhost'
    user: 'root'
    pass: 'root'
    dbms:  'mysql'
    retry_times: 30
    retry_delay: 1000
    command_timeout: 0

Note: the .yaml extension corresponds to "Yet Another Markup Language", very similar to the XML format. It's used in Ruby because, among other reasons, it's integrated into the standard routines of the language. 

 Production Cutover

In production, several Web Servers can be used:

Linux setup for running Ruby applications using mod-rack

Running Ruby applications on Thin server

Related links:  

First Ruby Model