Comments (11)
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.
Hi @guillaumebriday-pa! What's at line 7 in your environment.rb?
from lookbook.
# 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.
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
For some reasons it only works in development
from lookbook.
Engine.load_previews
causes the issue
from lookbook.
And here is the real problem I guess
from lookbook.
@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.
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.
Any idea @allmarkedup? 😇
from lookbook.
@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.
Ok I fully understand, let's close it for now, I'll reopen it if I find something! 🙏
from lookbook.
Related Issues (20)
- Cannot choose display options in an embedded preview HOT 4
- Support better errors / web console instead of rescuing errors in Lookbook HOT 2
- undefined method `strftime' for nil:NilClass with nil datetime HOT 1
- Hidden scenarios within groups are not accessible via their URL
- Swap the order of Previews and Pages sections HOT 4
- Ability to search within pages section HOT 3
- X-Frame-Options always set to deny HOT 8
- Can't draw templates that require instance variables HOT 5
- Lookbook overrides ViewComponent `show_previews` config depending on load order HOT 3
- ActionView::Template::Error occurs when trying to render a template file with a partial HOT 5
- FEA: Support for Mailer Previews HOT 1
- Support configurable frame ancestors for embeds HOT 2
- Documentation request: mention support for Phlex in the README HOT 5
- Previews not rendering nested components HOT 2
- Better integration with Phlex HOT 1
- Version requirement for listen gem is not specified, and wrong version error is suppressed HOT 1
- Syntax error reporting in Lookbook HOT 2
- Sharing View Component Previews Across Multiple Projects Without Duplicating Files
- Enlarge search field clear button
- Can we configure the Output or Source tab to display HAML/Other Coding Language instead HTML
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lookbook.