Giter Club home page Giter Club logo

Comments (2)

MaxenceLenoir avatar MaxenceLenoir commented on July 17, 2024 1

For those who still face this issue, it's possible to avoid the db calls with an explicit type definition in ModelResource file :

class ModeleResource < Madmin::Resource
...
  attribute :content, :rich_text
  attribute :position, :integer
  ...

It's more a workaround than a solution but it allowed me to fix my deploy.

from madmin.

sebastiencarceles avatar sebastiencarceles commented on July 17, 2024

I have the same problem here (sort of): when a review app is started automatically by Scalingo for the first time, the database has not been initialized yet, because the app starts before the init scripts is run for the first time.

Which results in this error:

2022-09-02 06:19:34.543722746 +0000 UTC [web-1] 	from bin/rails:4:in `<main>'
2022-09-02 06:19:34.543734501 +0000 UTC [web-1] /app/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.3.1/lib/active_record/connection_adapters/postgresql/database_statements.rb:19:in `exec': ERROR:  relation "events" does not exist (PG::UndefinedTable)
2022-09-02 06:19:34.543734842 +0000 UTC [web-1] LINE 9:  WHERE a.attrelid = '"events"'::regclass
2022-09-02 06:19:34.543735145 +0000 UTC [web-1] ^

Did you find a way to avoid madmin to access the ressources at application start up?

from madmin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.