Is it normal that I should restart Rails to see component preview changes? #148
Replies: 5 comments 14 replies
-
Hey @Jackson200 - that is certainly not how things should be working! When you make a change, is it causing the server to hang? Or can you still navigate around in Lookbook ok, but just not see the changes? Also, what version of Lookbook are you running? |
Beta Was this translation helpful? Give feedback.
-
@aarongough Thanks for the debug data dump and sorry once again I'm so slow in replying... Another question - are you using a forking server like Puma? And if so is your Unfortunately Lookbook's file watching system doesn't play nicely with forked processes due to a limitation of the underlying library that is used to watch for changes. So if you are using Puma with more than one process locally you will see the behaviour that you are describing. Setting Let me know if that works for you anyway if/when you get a chance to look at it. |
Beta Was this translation helpful? Give feedback.
-
I'm having this problem as well, and none of the suggested fixes seem to work. Even stranger, my lookbook nav area doesn't update, even after a server restart. In order to get the nav to reflect changes to my Perhaps useful: When I click "Copy debug data" I get the following error: |
Beta Was this translation helpful? Give feedback.
-
@allmarkedup I just run into this issue with the latest version of rails and lookbook, here's my debug log https://gist.github.com/cj/2ef79973652a533cadbb1f1f4e33148d. If I change the following value, I have to do a full rails restart to see the changes reflected. |
Beta Was this translation helpful? Give feedback.
-
Hey everyone, thanks for all your input on this. I think there are actually a number of different issues affecting people here, although caching does seem to be a likely culprit for a lot of these issues. I've got a PR up here that adds some very basic cache-invalidation logic in to hopefully ensure updates are still seen even if caching is enabled in development. If anyone has a spare few minutes to give that branch a test and let me know if it helps at all that would be much appreciated! |
Beta Was this translation helpful? Give feedback.
-
Hi all,
Any changes I make to my
_preview.rb
files in/spec/components
require me to restart rails to see my changes on Lookbook.eg. If I add
I will need to restart Rails instead of just refreshing the page to see the params select dropdown.
I'm not convinced that it is a Lookbook problem, since I have a similar (sometimes) issue with my vanilla viewComponent previews.
I have looked for spring running, a cache that shouldn't be on, etc, but come up blank. Any ideas?
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions