undefined method `xss_terminate'

It's reasonably clear:

-If I import a project from github in my www dir, then rake
db:create/migrate work as expected and the site runs fine.
-If I import a project from github to any other directory (including
subdirectories of www) I get errors when running rake db:migrate
(usually to do with plugin initialization).

Now, I've tried checking environment variables and .rvm's configuration
files looking for a path to my www directory but I haven't come across
any explicit mentions of it. I'm on Ubuntu and do have apache installed
but I'm not trying to run rails with apache. Now the www dir I'm
talking about isn't /var/www because I setup a different virtualhost on
my machine to ~/www so it's odd that rails would focus on it by default.
I don't exactly know what's going on but for now at least I know how to
get sites going.