and both are caused by load_application_classes trying to load all
your models at startup. That routine does nothing when
config.cache_classes is false (the default in development mode, but
not in test).
As a quick workaround, try setting config.cache_classes to false in
environments/test.rb to get the gems installed.