In a CakePHP app, if you’ve done the right thing and defined your Model associations at the database level (ie, if you’ve added foreign key indexes to all the relevant fields in every table), then you might come across errors when deleting records...
read moreUsing these instructions, I was trying to use my own custom repository with composer. I had forked the package kamisama/cake-resque
to my own github account and was trying to include my own version in my project.
Here’s a simplified version of my...
read moreFor a spree project I’m working on, I needed a latest products page. Since I’m new to spree/rails, it took me a while, but it’s super easy once you know how. Here’s how it’s done, for any other newbies wanting to display most recent products in spree...
read moreIf you’ve reached this post, you probably already know… Postgres is generally considered better than MySQL. MySQL is more common, and therefore a bit easier to get up and running (it’ll come out of the box with a lot of hosts). Here’s how to setup...
read moreThis post is part of a series
Shortly into Part 1 of the rails install fest series, you’ll come across Ruby symbols. Symbols are those things prefixed by a colon, such as :posts
, :title
and :body
, which we come across in our database migration in...
First up, the date today is 6 Aug, 2013. I’m working on a Media Temple DV 4.0, with Plesk 11 installed. I’m running CentOS 5.8, using Apache as my webserver. If those details don’t match up closely with what you’re using, ignore this post!
The first...
read moreThe error: When setting up a Rails site with Passenger, you get the following message in your browser:
This web application process is being run as user ‘nobody’ and group ‘nobody’ and must be able to access its application root directory ‘/var/www...
read more1) Open Terminal, and cd
into your app’s db
directory, where your sqlite database files are stored.
cd /path/to/rails_app/db
2) Run this command (obviously, you can change the parameters accordingly - the first is the name of your existing database...
read moreThis post is part of a series
Here we’ll go over ‘WTF’ moments from the last few steps of Part 1 - publishing our blog on Heroku.
It happens pretty fast - you sign up for Herkoku, install the Heroku toolbelt, run a few commands at the terminal and...
read moreSometimes in your CakePHP apps, you’ll need to ditch the Containable
behaviour, and use raw joins instead. The problem is, specifying joins across a few tables gets pretty verbose, and the code is anything but DRY. Here’s a little method for your AppModel...