mint still hitting rails

Discussion in 'Ruby/Rails' started by cswilliams, Apr 5, 2007.

  1. cswilliams

    cswilliams New Member

    Hi,
    I'm using mint with my Ruby on Rails app via lsphp. I'm just putting <script src="/mint/?js" type="text/javascript"></script> on each page. Mint is working fine.

    However, I started looking through my production logs and it appears that this javascript call is actually getting all the way to rails and generating errors like:
    ActionController::UnknownAction (No action responded to mint):
    in my production log. Is there anyway I can keep requests to /mint from hitting my rails app?

    Even though it's getting to my rails app, mint still seems to be working and recording hits though.

    Thanks!
  2. cswilliams

    cswilliams New Member

    well, i misspoke, mint actually wasn't working. Going to /mint gave me a 404 but /mint/index.php worked fine. I figured out now it stopped working once i added the rewrite cache rules in your rails guide:
    RewriteRule ^(.*)/$ $1/index.html [QSA]
    RewriteRule ^([^.]+)$ $1.html [QSA]

    Makes sense now. I'm pretty new to these rewrite rules, anyone correct me if I'm wrong, but I changed it to:
    RewriteCond %{REQUEST_URI} !mint/
    RewriteRule ^(.*)/$ $1/index.html [QSA]
    RewriteRule ^([^.]+)$ $1.html [QSA]

    And now it seems to work again.

Share This Page