Giter Site home page Giter Site logo

Comments (11)

allmarkedup avatar allmarkedup commented on May 25, 2024 1

Hey @guillaumebriday-pa, I'm afraid I can't replicate this at all and don't really know how to investigate it any further I'm afraid :(

I realise it's been a long time since you opened this issue and I'm sorry I can be of more help. I'm going to close this issue but if you have any additional info to share that could give me some clues then feel free to reopen it at any time.

from lookbook.

Spone avatar Spone commented on May 25, 2024

Hi @guillaumebriday-pa! What's at line 7 in your environment.rb?

from lookbook.

guillaumebriday-pa avatar guillaumebriday-pa commented on May 25, 2024
# frozen_string_literal: true

# Load the Rails application.
require_relative "application"

# Initialize the Rails application.
Rails.application.initialize!  # <-- THIS

So it does not really help me to find the root cause :/

from lookbook.

guillaumebriday-pa avatar guillaumebriday-pa commented on May 25, 2024

Hi @allmarkedup

I dived into the issue and found something that might help

The problem comes from this line: https://github.com/ViewComponent/lookbook/blob/main/lib/lookbook/engine.rb#L74

Screenshot 2023-09-25 at 12 20 28

For some reasons it only works in development

from lookbook.

guillaumebriday-pa avatar guillaumebriday-pa commented on May 25, 2024
Screenshot 2023-09-25 at 12 20 37

Engine.load_previews causes the issue

from lookbook.

guillaumebriday-pa avatar guillaumebriday-pa commented on May 25, 2024
Screenshot 2023-09-25 at 12 34 41

And here is the real problem I guess

from lookbook.

allmarkedup avatar allmarkedup commented on May 25, 2024

@guillaumebriday-pa okay thanks for digging into this a bit more.

reloaders.execute should never be called in production, only in development, as there should be no file watching happening in production.

I'm not sure why it would be causing an argument error if it was running but it's worth just making sure that is disabled correctly.

In your config/environments/production.rb file can you try setting the reload_on_change config option to false?

config.lookbook.reload_on_change = false

That setting is not normally needed but it should ensure that the reloaders are not running, even if Lookbook's logic for determining when to watch files is not working in this case.

Could you give that a try and see if that makes any difference?

from lookbook.

guillaumebriday-pa avatar guillaumebriday-pa commented on May 25, 2024

It fails even in test, I changed the config

config.lookbook.reload_on_change = false

globally in application.rb and still fails everywhere :/

from lookbook.

guillaumebriday-pa avatar guillaumebriday-pa commented on May 25, 2024

Any idea @allmarkedup? 😇

from lookbook.

allmarkedup avatar allmarkedup commented on May 25, 2024

@guillaumebriday-pa I'm sorry but I really don't know what is going on here. I can't replicate it myself and I haven't had any other reports of similar issues.

There may be something unique about your particular setup but I'm not sure how I can really progress this I'm afraid :(

from lookbook.

guillaumebriday-pa avatar guillaumebriday-pa commented on May 25, 2024

Ok I fully understand, let's close it for now, I'll reopen it if I find something! 🙏

from lookbook.

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.