Rspec tests run locally and in SSH but not through UI

I’ve been scratching my head about this one and can’t quite figure it out.
I’m pushing a Rails app to CircleCI and trying to run Rspec tests. Some of those fail, mostly ones that depends on the seed data (which is loaded in before_suite hook) but there are also some errors with making dirs and opening files like:

  Failure/Error: Dir.mkdir(csv_template_dir) unless Dir.exists?(csv_template_dir)
  
  Errno::ENOENT:
    No such file or directory @ dir_s_mkdir - /home/ubuntu/Hanover/files/hanover/data_import

Now when I ssh into the container and run bundle exec rspec or bin/rspec, everything goes green.

I’m bit at loss why would that be. Any ideas out there for what else I can try? Tried to wait thinking mysql might not be up yet and tried to make sure correct RAILS_ENV is set but no dice.

Any help would be appreciated and if there’s any additional info I can provide, let me know

Thanks,
Tom