Configuring a RoR app w/ Mint...

Discussion in 'Ruby/Rails' started by travisbell, Apr 2, 2007.

  1. travisbell

    travisbell Well-Known Member

    Hey guys,

    I have a working RoR app and dumped Mint insde /public. Then I setup a context to get the working and all (to my suprise) is good so far. It even runs the PHP properly :)

    Here's the catch. Mint says to append the following to your .htaccess, so I did but it's not working.

    AddType application/x-httpd-php .html .htm
    php_value auto_prepend_file /var/www/domain/public/mint/config/auto.php
    I *could* simply append the js file but I would match rather prefer to have to keep the stats of everything behind the scenes regardless of what is included in my web page.

    So, within my LiteSpeed environment, how can I make this work?

    Thanks in advance guys!
  2. mistwang

    mistwang LiteSpeed Staff

    It should work. Mabye htaccess support has not been enabled in your setup. Please check "Allow Override" configuration for your RoR vhost.
  3. travisbell

    travisbell Well-Known Member

    Which Override would be needed for this function?


  4. mistwang

    mistwang LiteSpeed Staff

    FileInfo and Options, and it does not hurt to check all of them.
    It follows the same spec mentioned in Apache/PHP documentation.
  5. travisbell

    travisbell Well-Known Member

    I have both the server and vhost set with the following and still, Mint won't pick up and of the visits. Is this correct?


  6. mistwang

    mistwang LiteSpeed Staff

    The configuration looks ok.
    You can turn on debug logging by set "Debug Level" to "HIGH" then check error.log see what is going on. Make sure to restart the server after configuration change.
    Another way to do it is to create a static context for Mint directory, and add the configurations you mentioned in the first post to "Apache Style Configuration".
  7. travisbell

    travisbell Well-Known Member

    This way worked for me. Thanks!
  8. travisbell

    travisbell Well-Known Member

    OK, I spoke too soon. I think I got too excited.

    Yes, Mint is working in the /mint directory (which is useless) I still can't get anything happening off the root of the site. After I realized what I did with the context, this does make sense :)

    I enabled debug logging but there is no error related to this.

    I also don't see a single error in the logs (/opt/lsws/logs/error.log) either.

    Any other avenues to check?
  9. mistwang

    mistwang LiteSpeed Staff

    Have you include the Mint java script in your rails application, I think it is the only thing required to make Mint to collect access information for a Rails application.
  10. travisbell

    travisbell Well-Known Member

    Yes, in the end it's looking like that the only way this is going to work.

    So for the record, no matter what I tried to do with the .htaccess (which has worked on countless Apache installations for me) I couldn't get LiteSpeed to get it to click for me.

    For now, just including:

    <script src="/mint/?js" type="text/javascript"></script>
    Will do.

  11. mistwang

    mistwang LiteSpeed Staff

    It is recommended to do it this way as the .htaccess hack will make all html static files served as PHP scripts, it will be a big performance hit for cached pages.

Share This Page