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

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

  1. Thank you for your guide. It was quite helpful. I am also trying to deploy my application on CentOS, using a Ruby Environment and MySQL.

    I have followed your instructions and have done a “build all” on my knowledge base.

    I have copied the entire contents of my “local deploy web directory” into my server deployed web directory.

    I am able to get to the Developer Menu (DeveloperMenu.xml).

    However, when I click on the link to create a transaction I get the error
    “The requested URL /test99/gxruby was not found on this server.”

    according to the apache configuration added to httpd.conf from (apache.xml) /test99/gxruby should actually point gxruby.cgi

    This is the config:
    ScriptAlias /test99/gxruby “/var/www/html/test99/gxruby.cgi”

    So this is my problem, gxruby.cgi is never generated. Did you have the same problem? How did you resolve? Please advise.

  2. What is the “internal and external (web) path” to your “web” directory?
    In addition what are the paths on GeneXus Model? (Web root and Site directory)
    You actually don’t need to pay attention on what the apache.xml says

  3. Thank you for responding.

    The internal path (I assume you mean the property “site directory seen from server”) was specified as, “/var/www/html/test99”

    The external path (I assume you mean the property “web root”) was specified as, “/test99/”

    Please advise.

  4. Make sure that you are using the ruby version 1.9.1 (detailed on the post) and also you are NOT running a 64 bits version.

    In addition, GeneXus recently update they’re post Including CentOS (after working with them on this issue for almost 2 months).
    Here’s the link to their post.

    Let me know.

  5. You are write 🙂
    I’m sorry.
    No, answering your question, no I didn’t use the apache.xml config at all.
    An example of the httpd.conf is on previous blogs. Is your CentOS 32 or 64 bits? What version of Ruby did you install? What version of GeneXus are you using? (I have U3)

Leave a Reply

Your email address will not be published. Required fields are marked *