Posts Tagged ‘Rails’

Typo/Rails bugging me

Monday, October 8th, 2007

So I just modified the layout slightly to my blog here, and what happened? Oh the front page stopped rendering, due to some filter chain stuff, which I know nothing about.

WTF? I had this happen before, forget what fixed it. It’s been restarted, now let’s see if this post helps

Mint within Typo (or other rails apps)

Thursday, April 12th, 2007

So I decided to splurge and throw down $30 for Mint since seemed like a lot of people love it, and it looks pretty awesome. Currently my blog is driven by Typo which is Ruby on Rails based. This means that my web folder has rewrite rules to push pretty much any path that isn’t a specific file into the rails app. So putting mint in there at /mint/ would mean it 404s when expecting to fetch index.php. So I just gave mint it’s own htaccess file that rewrites URLs to mint without filename to index.php.

RewriteRule ^mint/$ index.php [QSA]

RewriteRule ^([^.]+)$ $1.php [QSA]

RewriteCond %{REQUEST_FILENAME} !-f

I’m really not that sure if the last 2 lines were at all necessary, I’m thinking no due to the nature of mint, which pushes everything through index.php it looks like.

EDIT: Better yet, google first before just doing it myself and find out that this: Mint Stats for Your Ruby on Rails App has a lot more information and a better solution, not sure why I didn’t bother looking first.

Technorati Tags: , , ,

Database migrations, ActiveRecord:Migration wannabe

Tuesday, January 24th, 2006

I just recently finished a ‘beta’ version of a ActiveRecord:Migration wannabe database schema migration system in PHP at work. It allows me to version the database schema/structure easily and allow for easy database structure updates when updating an install of a web app on some site. Eventually it could do downgrades like the rails version too but that’s not something I’ll worry about right away. It does function, isn’t as elegant as AR:Migration but it does the job which is pretty cool. It might join PHPFlash class as one of my most useful chunks of code.