Hi, I just deployed my first Rails app at 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 <script> tag in my page header. Has anyone else successfully deployed Mint on RailsMachine? Thanks, Brandon -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> I can see the index page for Mint stats, but the count never updates > even though I have the correct <script> tag in my page header. > > Has anyone else successfully deployed Mint on RailsMachine?Yes, I have managed to get this working after a lot of aggro. First, I followed the instructions in http://nubyonrails.com/articles/2005/12/05/mint-stats-for-your-ruby-on-rails-app, in particular about the public/.htaccess file, but I still had problems. (The index page was visible, but not through quite the right link, and the counters never updated). 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 :) ... </Directory> ... Given that the link to the script in your app pages is something like: <script src="/mint/?js" type="text/javascript"></script> 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 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Daniel Lucraft 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 :) ... > </Directory> > ...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 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Daniel Lucraft wrote:> Daniel Lucraft 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 :) ... >> </Directory> >> ... > > 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, > DanDaniel, 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 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 </Proxy> And added the line: RewriteCond %{REQUEST_URI} ^/mint.* before all the other Rewrite... directives (but after RewriteEngine On). Dan -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Daniel Lucraft 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 > </Proxy> > > And added the line: > RewriteCond %{REQUEST_URI} ^/mint.* > > before all the other Rewrite... directives (but after RewriteEngine On). > > DanDaniel, 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? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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> <Directory /var/www/apps/my_rails_app/current/public/mint> DirectoryIndex index.php </Directory> # Configure mongrel_cluster <Proxy balancer://my_rails_app_cluster> BalancerMember http://127.0.0.1:8000 </Proxy> RewriteEngine On RewriteCond %{REQUEST_URI} ^/mint.* RewriteRule .* - [L] -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
BTW... thanks again for the help Daniel! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---