Forest returning No model found for collection [model] on deployed instance

I have forest working locally in development no problem. However in our deployed instance Forest keeps returning the following errors: No model found for collection [name of model]

I’m not sure why it would work locally but not on our deployed staging instance. It is able to grab our .forestschema and display it in the UI, but for some reason and cannot grab our model data. What’s going on?

Expected behavior

I would expect it to load our models

Actual behavior

Cannot find models

Failure Logs

1:56:28 rails.1   | [2021-08-03 11:56:28] Forest 🌳🌳🌳  No model found for collection Company
11:56:28 rails.1   | [2021-08-03 11:56:28] Forest 🌳🌳🌳  Routing error: Resource not found for collection Company.
11:56:28 rails.1   | [2021-08-03 11:56:28] Forest 🌳🌳🌳  If this is a Smart Collection, please ensure your Smart Collection routes
 are defined before the mounted ForestLiana::Engine?
11:56:28 rails.1   | I, [2021-08-03T11:56:28.360107 #37]  INFO -- : [7d97a688-efd7-44f3-bde9-f39c78b0ca74] Processing by ForestLian
a::BaseController#route_not_found as JSON
11:56:28 rails.1   | I, [2021-08-03T11:56:28.360270 #37]  INFO -- : [7d97a688-efd7-44f3-bde9-f39c78b0ca74]   Parameters: {"timezone
"=>"Europe/Lisbon", "fields"=>{"Company"=>"company_type,created_at,id,name,platform,platform_id,updated_at", "platform"=>"id"}, "pa
ge"=>{"number"=>"1", "size"=>"15"}, "searchExtended"=>"0", "sort"=>"-id", "collection"=>"Company"}
11:56:28 rails.1   | I, [2021-08-03T11:56:28.361131 #37]  INFO -- : [7d97a688-efd7-44f3-bde9-f39c78b0ca74] Completed 404 Not Found 
in 1ms (Allocations: 198)
11:56:28 rails.1   | I, [2021-08-03T11:56:28.508725 #37]  INFO -- : [6f5278ea-7269-473d-94ea-221f6529f5b0] Started GET "/forest/Com
searchExtended=0&timezone=Europe%2FLisbon" for at 2021-08-03 11:56:28 +0000


Please provide any relevant information about your setup.
Rails 6.1.4

  • Package Version: 7.0.0
  • Database Dialect: PSQL
  • Database Version: 13
  • Project Name: Collider

Hello @KidA001

Thank you for bringing this issue to us.

Can you please tell me if this environment was working properly before or if your are setting it up for the first time?
Also sorry for asking the obvious but:

  • is the setup exactly the same on both environments (Forest Rails version, postgreSQL version…)?
  • is the database properly accessible with the credentials set in the project settings?

From what I see on our end, staging environment and its models seem properly setup.

The environment was working “properly” but I had no models in it prior to this. I just deployed my models and migrations along with adding some test data to the database but nothing is showing in Forest Admin UI on my deployed instance.

Is the setup exactly the same on both environments:


is the database properly accessible with the credentials set in the project settings?

my rails application can access it, so I would assume this is a yes.

Hi @Guillaume_Deslandes, any more insight from your end on what might be going on here?


Sorry for the wait.

I cannot reproduce your issue so far.

Could you try to remove the Company model file? To see if this is specific to this model, or if you get the same error with the next one?