# RailsMachine + Mint

**URL:** <https://www.ruby-forum.com/t/railsmachine-mint/81123>\
**Category:** Rails\
**Created:** [January 4, 2007, 5:52am UTC](https://www.ruby-forum.com/t/railsmachine-mint/81123 "2007-01-04T05:52:21Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![deniedlates](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/13edae/32.png) [@deniedlates](https://www.ruby-forum.com/u/deniedlates)\
**Post date:** [January 4, 2007, 5:52am UTC](https://www.ruby-forum.com/t/railsmachine-mint/81123/1 "2007-01-04T05:52:21Z")

</div>

Hi,

I just deployed my first Rails app at [railsmachine.com](http://railsmachine.com) (highly  
recommended; check out their five-minute deployment guide.) After  
installing PHP on my Rails Machine (and passing the Mint compatibility  
test), I still cannot get Mint to work.

I can see the index page for Mint stats, but the count never updates  
even though I have the correct tag in my page header.

Has anyone else successfully deployed Mint on RailsMachine?

Thanks,  
Brandon

---

<div class="post-metadata">

**Author:** ![deniedlates](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/13edae/32.png) [@deniedlates](https://www.ruby-forum.com/u/deniedlates)\
**Post date:** [January 4, 2007, 5:47pm UTC](https://www.ruby-forum.com/t/railsmachine-mint/81123/2 "2007-01-04T17:47:40Z")

</div>

> I can see the index page for Mint stats, but the count never updates  
> even though I have the correct
> 
> this allows Apache to translate /mint/?js into /mint/index.php?js  
> (this is my understanding anyway).
> 
> > (highly recommended; check out their five-minute deployment guide.)
> 
> +1

---

<div class="post-metadata">

**Author:** ![deniedlates](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/13edae/32.png) [@deniedlates](https://www.ruby-forum.com/u/deniedlates)\
**Post date:** [January 4, 2007, 5:55pm UTC](https://www.ruby-forum.com/t/railsmachine-mint/81123/3 "2007-01-04T17:55:42Z")

</div>

Daniel L. wrote:

> I’m not sure if this problem corresponds to yours but the key for me was  
> to add the following to my application’s httpd conf file inside the  
> VirtualHost:  
> …  
> \<Directory /path\_to\_app/public/mint\>  
> DirectoryIndex index.php  
> … other Directory options, fairly standard ones but  
> not eager to reveal all of server configuration 🙂 …  
>   
> …

Let me clarify that a little. Make the change in  
/etc/httpd/conf/apps/app\_name.conf, inside the VirtualHost declaration  
in that file.

best,  
Dan

---

<div class="post-metadata">

**Author:** ![deniedlates](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/13edae/32.png) [@deniedlates](https://www.ruby-forum.com/u/deniedlates)\
**Post date:** [January 4, 2007, 8:43pm UTC](https://www.ruby-forum.com/t/railsmachine-mint/81123/4 "2007-01-04T20:43:51Z")

</div>

Daniel L. wrote:

> Daniel L. wrote:
> 
> > I’m not sure if this problem corresponds to yours but the key for me was  
> > to add the following to my application’s httpd conf file inside the  
> > VirtualHost:  
> > …  
> > \<Directory /path\_to\_app/public/mint\>  
> > DirectoryIndex index.php  
> > … other Directory options, fairly standard ones but  
> > not eager to reveal all of server configuration 🙂 …  
> >   
> > …
> 
> Let me clarify that a little. Make the change in  
> /etc/httpd/conf/apps/app\_name.conf, inside the VirtualHost declaration  
> in that file.
> 
> best,  
> Dan

Daniel,

Thanks for the guidance…

I am still having a few issues. I updated the public/.htaccess file and  
added the DirectoryIndex to my app’s httpd conf file. When I go to  
mint/ in the browser window, Rails is still processing “mint” as a  
controller. But if I go to mint/index.php, I see the stats page (with  
zero stats.)

Do you still have to access your stats by going to mint/index.php, or  
does mint/ work for you? Also did you have to edit any of the mint  
configuration files to get it to work?

Thanks again for your help…

Brandon

---

<div class="post-metadata">

**Author:** ![deniedlates](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/13edae/32.png) [@deniedlates](https://www.ruby-forum.com/u/deniedlates)\
**Post date:** [January 4, 2007, 9:01pm UTC](https://www.ruby-forum.com/t/railsmachine-mint/81123/5 "2007-01-04T21:01:03Z")

</div>

Brandon S. wrote:

> I am still having a few issues. I updated the public/.htaccess file and  
> added the DirectoryIndex to my app’s httpd conf file. When I go to  
> mint/ in the browser window, Rails is still processing “mint” as a  
> controller. But if I go to mint/index.php, I see the stats page (with  
> zero stats.)

I also have a ProxyPass directive to make the Proxy part look like (same  
conf file):

ProxyPass /mint !  
\<Proxy balancer://appname\_cluster\>  
BalancerMember [http://127.0.0.1:8000](http://127.0.0.1:8000)

And added the line:  
RewriteCond %{REQUEST\_URI} ^/mint.\*

before all the other Rewrite… directives (but after RewriteEngine On).

Dan

---

<div class="post-metadata">

**Author:** ![deniedlates](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/13edae/32.png) [@deniedlates](https://www.ruby-forum.com/u/deniedlates)\
**Post date:** [January 4, 2007, 9:10pm UTC](https://www.ruby-forum.com/t/railsmachine-mint/81123/6 "2007-01-04T21:10:30Z")

</div>

Daniel L. wrote:

> Brandon S. wrote:
> 
> > I am still having a few issues. I updated the public/.htaccess file and  
> > added the DirectoryIndex to my app’s httpd conf file. When I go to  
> > mint/ in the browser window, Rails is still processing “mint” as a  
> > controller. But if I go to mint/index.php, I see the stats page (with  
> > zero stats.)
> 
> I also have a ProxyPass directive to make the Proxy part look like (same  
> conf file):
> 
> ProxyPass /mint !  
> \<Proxy balancer://appname\_cluster\>  
> BalancerMember [http://127.0.0.1:8000](http://127.0.0.1:8000)
> 
> And added the line:  
> RewriteCond %{REQUEST\_URI} ^/mint.\*
> 
> before all the other Rewrite… directives (but after RewriteEngine On).
> 
> Dan

Daniel,

This is what the beginning of my public/.htaccess file looks like:

# General Apache options

AddHandler fastcgi-script .fcgi  
AddHandler cgi-script .cgi  
Options +FollowSymLinks +ExecCGI

# If you don’t want Rails to look in certain directories,

# use the following rewrite rules so that Apache won’t rewrite certain

requests

# 

# Example:

# RewriteCond %{REQUEST\_URI} ^/notrails.\*

# RewriteRule .\* - [L]

RewriteCond %{REQUEST\_URI} ^/mint.\*  
RewriteRule .\* - [L]

# Redirect all requests not available on the filesystem to Rails

# By default the cgi dispatcher is used which is very slow

# 

# For better performance replace the dispatcher with the fastcgi one

# 

# Example:

# RewriteRule ^(.\*)$ dispatch.fcgi [QSA,L]

RewriteEngine On

Is the ProxyPass directive also required to make this work? Or is that  
optional?

---

<div class="post-metadata">

**Author:** ![deniedlates](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/13edae/32.png) [@deniedlates](https://www.ruby-forum.com/u/deniedlates)\
**Post date:** [January 5, 2007, 12:32pm UTC](https://www.ruby-forum.com/t/railsmachine-mint/81123/7 "2007-01-05T12:32:02Z")

</div>

Daniel figured this one out… I made changes to my app’s .conf file  
(/etc/conf/apps/my\_rails\_app.conf) and now I am running Mint on  
RailsMachine.

Here is an exerpt from my .conf file:

DocumentRoot /var/www/apps/my\_rails\_app/current/public

\<Directory /var/www/apps/my\_rails\_app/current/public\>  
Options FollowSymLinks  
AllowOverride None  
Order allow,deny  
Allow from all

\<Directory /var/www/apps/my\_rails\_app/current/public/mint\>  
DirectoryIndex index.php

# Configure mongrel\_cluster

\<Proxy balancer://my\_rails\_app\_cluster\>

```
BalancerMember http://127.0.0.1:8000

```

RewriteEngine On

RewriteCond %{REQUEST\_URI} ^/mint.\*  
RewriteRule .\* - [L]

---

<div class="post-metadata">

**Author:** ![deniedlates](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/13edae/32.png) [@deniedlates](https://www.ruby-forum.com/u/deniedlates)\
**Post date:** [January 4, 2007, 11:43pm UTC](https://www.ruby-forum.com/t/railsmachine-mint/81123/8 "2007-01-04T23:43:58Z")

</div>

Brandon S. wrote:

> This is what the beginning of my public/.htaccess file looks like:

Hmmm, I actually don’t think that the public/.htaccess file does  
anything, since mongrel doesn’t use it anyway. Could be wrong.

> Is the ProxyPass directive also required to make this work? Or is that  
> optional?

I’m fairly sure you need this since mongrel wouldn’t know what to do  
with the Mint PHP, so we have to make sure that Apache doesn’t proxy it  
on. I’m really fumbling in the dark here.

My email is dan at fluentradical dot com Get in touch and I’ll show you  
my config.

Dan

---

<div class="post-metadata">

**Author:** ![deniedlates](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/13edae/32.png) [@deniedlates](https://www.ruby-forum.com/u/deniedlates)\
**Post date:** [January 5, 2007, 12:32pm UTC](https://www.ruby-forum.com/t/railsmachine-mint/81123/9 "2007-01-05T12:32:54Z")

</div>

BTW… thanks again for the help Daniel!
