On migration I get the following error message:
PG::UndefinedTable: ERROR: relation \"actioncodes\" does not exist : ALTER TABLE \"organizations\" ADD CONST
I was also getting this error. If you are using a test database to run rspec make sure you run rake db:test:prepare in the terminal before running rspec.
rake db:test:prepare