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.1oc.com/web
$ ruby reorganization.rb
DONE !
now point to your website and you see your Ruby application running
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.
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
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.
on the “web root” you should use the full URL to the site, if your server is “test99” it should say http://test99
Regards
I changed root to “http://192.168.1.40/test99/” and still the file gxruby.cgi was not generated. Please advise.
Excellent blog! You clarify many of my doubts.
But I still have the same problem than Newton, my website is stacked on my Centos5.5 Server waiting for a gxruby that could not found. I haven’t a gxruby.cgi. How do you configured your httpd.conf? Did you use the information from apache.xml or just what is said here http://wiki.gxtechnical.com/commwiki/servlet/hwiki?Setting+up+centOS+environment+for+running+GX+Ruby+applications, ??
Thanks!
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.
Regards
That’s the link I give you
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)