Anastasia
Anastasia

Reputation: 1

ruby on rails - Unable to load application: LoadError: cannot load such file -- database_cleaner/active_record

I am trying to deploy ruby on rails project on render platform. I inherited this project in my school and added new features there. I get the following error when I run my Rails application in production mode, but when I run my app in development mode it works fine. "Unable to load application: LoadError: cannot load such file -- database_cleaner/active_record ".

I tried to follow all steps in docs https://render.com/docs/deploy-rails, reinstall cleaner gem, checked compatability, nothing helped

Upvotes: 0

Views: 448

Answers (1)

Anastasia
Anastasia

Reputation: 1

The following worked for me:

  1. In the Gemfile, moved database_cleaner-active_record out of the :development block, so it gets installed always
  2. Moved the require in the cypress_rails intializer to after the return statement

Upvotes: 0

Related Questions