ISPConfig and Ruby

Discussion in 'HOWTO-Related Questions' started by antun, Jun 30, 2008.

  1. antun

    antun New Member

    I'm trying to enable my ISPConfig (on Ubuntu) to run Rails apps. I just updated ISPConfig to 2.2.7, and followed this HowTo:

    When I run the test, it doesn't work; I just see the Ruby source displayed.

    Step 5 of the instructions says:
    How do I "enable Ruby" for a web site? I don't see any options in the ISPConfig panel.

    Should I have the ruby executable installed? I just installed the mod_ruby module as described in the instructions above. I'm using Ubuntu 6.06.2 LTS.

    Thanks for any help in advance!

  2. Hans

    Hans Moderator ISPConfig Developer

    On the basis tab of the website in ISPConfig you should see a checkbox "Ruby".
  3. antun

    antun New Member

    Hi Hans,

    I don't see a "Ruby" checkbox on the basis tab.

    I've verified that ISPConfig 2.2.7 is successfully installed, by going to Tools>Software Version.

    Is there anything else I have to install or update as far as Apache is concerned?


  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Ruby is not supported by ISPConfig 2.2.7. Please update to the latest release (2.2.23).
  5. antun

    antun New Member

    Hi Till,

    Ah - silly me! I downloaded 2.2.23, but then inadvertently re-installed 2.2.7 (which I still had in my downloads directory from before)! I've installed 2.2.23 correctly now, and I do get the Ruby option on the basis tab. I've checked it for a site, but my test .rb script still doesn't work.

    Do I need to do anything else? After checking the Ruby checkbox, and restarting Apache, I don't see anything about Ruby in the vhosts file here:


    Should there be something there?


  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Did you install mod_ruby first? Otherwise it will lead to an error when you enable ruby in ISPConfig and ISPConfig will use a copy of the last working version of the Vhosts_ispconfig.conf file, the one without ruby enabled.
  7. antun

    antun New Member

    Hi Till,

    Yes, I had installed mod_ruby yesterday, using the following command:

    apt-get install libapache2-mod-ruby

    I did a phpinfo() to check whether it was installed, and mod_ruby is in the list of "Loaded Modules" under "apache2handler".

  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the output of:

    ls -la /etc/apache2/vhosts/
  9. antun

    antun New Member

    Hi Till,

    Thanks for your time:

    root@www:~/downloads/ispconfig# ls -la /etc/apache2/vhosts/
    total 92
    drwxr-xr-x 2 root root 4096 2008-06-30 10:32 .
    drwxr-xr-x 9 root root 4096 2008-06-29 22:26 ..
    -rw-r--r-- 1 root root 10915 2008-06-30 10:27 Vhosts_ispconfig.conf
    -rw-r--r-- 1 root root 10977 2008-06-19 22:25 Vhosts_ispconfig.conf_19-06-08_22-25-31
    -rw-r--r-- 1 root root 10975 2008-06-20 10:01 Vhosts_ispconfig.conf_20-06-08_10-01-31
    -rw-r--r-- 1 root root 10975 2008-06-29 22:15 Vhosts_ispconfig.conf_29-06-08_22-15-55
    -rw-r--r-- 1 root root 10975 2008-06-30 10:10 Vhosts_ispconfig.conf_30-06-08_10-10-36
    -rw-r--r-- 1 root root 10933 2008-06-30 10:25 Vhosts_ispconfig.conf_30-06-08_10-25-50
    -rw-r--r-- 1 root root 11273 2008-06-30 10:27 Vhosts_ispconfig.conf_30-06-08_10-27-34


  10. falko

    falko Super Moderator ISPConfig Developer

  11. antun

    antun New Member

    Hi Falko,

    I'm not sure how this happened, but I had already responded to a different thread. I received an email notification that someone had responded to a thread I was subscribed to, and I clicked the link in the email, and posted my reply there. I had never posted on that other thread (entitled "After adding "Include vhosts/Vhosts_ispconfig.conf" httpd won;t startup"), and I don't remember ever reading it, let alone subscribing to it. Does Till have the ability to subscribe me to another thread?

    Anyway, here are the results from doing the following:

    1) Rename Vhosts_ispconfig.conf to Vhosts_ispconfig.conf.bak
    2) Rename Vhosts_ispconfig.conf_30-06-08_10-27-34 to Vhosts_ispconfig.conf
    3) Run:
    httpd -t
    I ran the http -t command like you said (thanks for the pointer, by the way) and it gave the following error:

    Syntax error on line 323 of /etc/apache2/vhosts/Vhosts_ispconfig.conf:
    AllowOverride not allowed here

    There was an AllowOverride All on line 323. I removed it, ran httpd -t again, then got a Syntax OK message.

    What's the right next step here - should I reinstall ISPConfig, leaving the current vhost file in place, or can I just edit that vhost file?

    BTW, how would the AllowOverride All get into that file - is it possible that it was added there because I added it to the Apache Directives section of the particular site in ISPConfig?

    My main question now is: what should I do now? If I remove the offending line (AllowOverride All), then what triggers ISPConfig to reset? Do I have to reinstall it?


  12. antun

    antun New Member

    Thanks all for your help. I got this resolved, but the discussion's on another thread, so here's the link:

    Oh, and as a temporary workaround I had created a file called antun-ruby in /etc/apache2/conf.d with the following settings to "force" the mod_ruby option for that site:

    <IfModule mod_ruby.c>
      <Directory /var/www/web9/web>
        Options +ExecCGI
      RubyRequire apache/ruby-run
      #RubySafeLevel 0
      <Files *.rb>
        SetHandler ruby-object
        RubyHandler Apache::RubyRun.instance
      <Files *.rbx>
        SetHandler ruby-object
        RubyHandler Apache::RubyRun.instance

Share This Page