Integrating a GeneXus (X) application with gxportal 4.5

First, you can download and import de following XPZ Data and Example. Which contains all the data views required to access the portal. (Make sure to have GeneXus X Update 3 or grater), in addition, and for now (hopefuly), you’ll have to add the additional DLL to the “bin” directory under ../web/bin, if you are developing for .NET

Importing Data Objects and Example







You have to set up the “GXportal” DataSource to access the database “gxportal” using the user “gxporta” (the default password is “gxportal” 🙂 )

DataSource to gxportal







Then, build it and execute.
Create Model






Menu Execution






On portal:

  1. Under “Configuration” Create a new Application
  2. Update the “Enviroments”, host where the application is located, port and the Virtual Directory is the “relative path” to the file (program) on the URL and filanlly the extension of the file
  3. Ad Activities (the actual program), under the Program Name just the actual name of the program ,without extension or path (we created on the step above under Environments)
  4. Under “Name” use the real name of the application, on the example is “TestWWEmployees” all together (same name as in Genexus)
  5. After that we’ll create 3 additional applications related to the main one, which reflect the status of the transaction, so later we can configure privileges, those are Delete, Display, Insert and Delete,  the “Name” we’ll use are going to be: TestTrnEmployee_DLT, TestTrnEmployee_DSP, TestTrnEmployee_INS and TestTrnEmployee_UDP all of them with NO Program Name (we’ll check the status on the actual Genexus Application)
  6. We create a “Menu” for the Application with one option that is going to be the Main Activity, in this case “TestWWEmployees”.
  7. Now let’s add the “Application” in to the portal, go to the page where you want to display the application, and add a GxPortlet of “Aplication Integration” and add “Application Activity”, now configure the Portlet where the “activity” points to our Main Activity (TestWWEmployees) and give it a “Dynamik hight” (make sure that the Hight of the portlet is NUL). At this point you’ll see the application running on the portal (although there is nothing to see because you don’t have the right privileges to see it right now 🙂 )
  8. Now, let’s create the Privileges to access the application, in order to do that, go to

Deploying GeneXus applications on CentOS with Ruby 1.9 and mysql (part 2)

If you haven’t’ read it, make sure to first, take a look at the part 1

What we’ll going to do today is actually create a GeneXus application with Ruby and mySql and deply (an run) it under CentOS platform

For this example we are going to install an run GeneXus “GoogleVisualization” Example.

You can download the KB from genexus open server.

First we recommend we run it under the Default Ruby web-brick (local) environment. This is your development environment.

And the have a Deployment environment, in my case I’ve named it “Ruby-Hosted”.

On this new environment you have to configure the following options:

Under DataStore, configure the credentials for your “production” mySQL database.

Under Generators, you have to change from “Webbrik HTTP server” to “Apache HTTP Server”.

On “Web Root”, the actual URL to the deployed website

and on “Site directory..” the full path of your application from “inside” the server.

Now you need to “Build All”.

Once it’s done, you simply copy the entire content of your “local deploy web directory” into your server deployed web directory, and run the application.

Now, you are “almost” ready, before you can RUN the program you have to run your “REORG” that on your first deployment is going to be the creation of the database.

In order to do that you need to “login” into your CentOS server through a TERMINAL, go to your deployment directory and run the reorg, like this:

$ cd /var/www/virtualhost/

$ ruby reorganization.rb


now point to your website and you see your Ruby application running

Deploying GeneXus applications on CentOS with Ruby 1.9 and mysql (part 1)

Firs of all you need a CentOS operating system with mysql, ruby 1.9 and passenger installed

If you don’t have this or you don’t know how to do it, just follow the simple instructions on these 2 posts:

Installing Ruby 1.9 on CentOS

Installing Phusion’s Passenger on CentOS (for Ruby 1.9)

Once you are done with this you are ready to move forward.

First you need to copy the following directories from your GeneXus installation to the CentOS server.

From under “gxruby” copy the “linux” and “generic” directory both under the same subdirectory.

In my case I’ve created a new directory on the server called “gxruby” (original 🙂 ), and put them there.

Now before you run the installation script, in order to work properly under CentOS you have to do the following:

  1. The installation script is based on Debian, so it expects to have certain libraries installed in places where CentOS doesn’t normally used them
    specially the “libmysqlclient”. On CentOS these library is called “” and it’s under “/usr/lib/mysql/”, but in the installation
    script it should be under “/usr/local/lib/” so we’ll have to link it to the new location, we do this with the following command:
    $ ln -s /usr/lib/mysql/ /usr/local/lib/
  2. Under the subdirectory “gxruby/generic/gx_lucene” (this is where you copy from the GeneXus machine), you have to edit the script “”.
    In reality, because this file is corrupted on GeneXus Evo1 U3, it’s better if you delete it an create a new one with the same name with the following contente:

    tar -xzf clucene-core-0.9.21b.tar.gz
    cd clucene-core-0.9.21b
    sh configure
    make install
    cd ..
    ruby extconf.rb –with-clucene-include=’clucene-core-0.9.21b/src’ –with-clucene-lib=’clucene-core-0.9.21b/src/.libs’ –with-ldflags=’-lclucene’
    mkdir lib
    mv lib
    gem build build_gem.rb
    gem install  CLucene_gx-0.1.1-x86-linux


In addition, if you are using a 64 bit platform replace the last line of the script for gem install  CLucene_gx-0.1.1-x86_64-linux

Now you are ready to run the installation script that will install all GeneXus gems on your system.

Go to “./gxruby/linux”, and run the “installgems.bash” script.

In order to do that just change the mode of the file to “executable” with $ chmod +x installgems.bash

and then runt $ ./installgems.bash

Now, you are ready to deploy your GeneXus Ruby applications.

If you don’t know how to do it, follow the next post where I’m going to walk you through the deployment process


Installing Phusion’s Passenger on CentOS (for Ruby 1.9)

As a prerequisite you have to have installed Ruby 1.9.x on your CentOS system.

If you don’t know how to do it, follow the instructions on this post:

Installing Ruby 1.9 on CentOS

Once you are ready follow the next steps:

On a terminal type:

gem install passenger

$ passenger-install-apache2-module

This last command is going to walk you through the process of installation,

helping you install whatever is missing on your system and at the end giving the instructions

to “patch” your apache’s configurations file.


On my case, I had to install the following modules:

$ yum install httpd-devel

$ yum install apr-devel

$ yum install apr-util-devel

After installing them re-run the command again

$ passenger-install-apache2-module

And then edit the apache configuration


Ad the following lines to the file:

LoadModule passenger_module /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.2/ext/apache2/
PassengerRoot /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.2
PassengerRuby /usr/local/bin/ruby
And finally configure your VirtualDirectories (on the same file)
<VirtualHost *:80>
DocumentRoot “/var/www/virtualhost/”
<Directory “/var/www/virtualhost/”>
AllowOverride all
Options -MultiViews
Now reboot the apache server
$ /etc/init.d/httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]
Now you are ready to go.
Test the site

Installing Ruby 1.9 on CentOS

$ sudo yum groupinstall 'Development Tools' $ sudo yum install readline-devel $ cd /usr/local/src $ wget $ tar xzvf ruby-1.9.2-p0.tar.gz $ cd ruby-1.9.2-p0 $ ./configure && make $ sudo make install
test the installations with
$ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29036) [i686-linux]
Now, just in case the source became unavailable I'm including it here:
If you're going to use Ruby for Genexus, the version 1.9.2 and above are NOT suported as this date, instead use the version 1.9.1