ForestAdmin / forest-rails

💎 Ruby on Rails agent for Forest Admin to integrate directly to your existing Ruby on Rails backend application.
https://www.forestadmin.com
GNU General Public License v3.0
374 stars 77 forks source link

Rails 6 - No collection problem #329

Closed ThomasSertorio closed 5 years ago

ThomasSertorio commented 5 years ago

Expected behavior

Expecting ForestRails to "see" our collections in our rails 6.0.0.

Actual behavior

Installation and setup look alright but forestadmin-schema.json stays empty. As a result we get a no collection error on the Forest UI.

Failure Logs

No specific logs apart from the forestadmin-schema.json being empty:

  "collections": [],
  "segments": [],
  "actions": [],
  "meta": {
    "database_type": "postgresql",
    "framework_version": "6.0.0",
    "liana": "forest-rails",
    "liana_version": "3.3.0",
    "orm_version": "6.0.0"
  }

Context

Here is the context: We 'd like to keep the "in app" installation in rails rather than going full-microservice as recommended in the lastest documentation: in our specific case, losing "automatic" validation, enum, has_many relationships, model instance method is a no go. So we "fake" installed Forest through npm to get our environment secret. When I check the result of this setup, everything looks 👍 : collection are retrieved and exposed to the ForestAdmin UI. Then we use the rails g forest_liana:install <environement_secret> command with the retrieved environement secret to switch to the rails setup. When doing this on our rails 6.0.0, we get an empty forestadmin-schema.json.

We've been trying a lot of different things:

baptistetruchet commented 5 years ago

I'm facing exactly the same issue. Everything is fine on rails 5.2.3 but collections remain empty on rails 6.0.0 (no error messages)

arnaudbesnier commented 5 years ago

Hi @ThomasSertorio @baptistetruchet It should be fixed with the liana v4.1.0.

Feel free to reopen this ticket if the issue persists.