Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cells not reloading code in development #10

Open
Startouf opened this issue Oct 10, 2016 · 11 comments
Open

Cells not reloading code in development #10

Startouf opened this issue Oct 10, 2016 · 11 comments

Comments

@Startouf
Copy link

In my development environment my code is no longer reloading automatically. It seems to match my upgrade to cells-rails 0.0.6 and the latest cells. The rest of my app (controllers, Rails views) seems to reload correctly. How can I check the current configuration for cells caching ?

So right now I need to restart the server even if the cell crashes because of a syntax error :'(...

I will try to dig and blame the commit that introduced that...

@apotonick
Copy link
Member

@Startouf
Copy link
Author

Startouf commented Oct 13, 2016

Hey, I added a byebug in the Rails.env == 'development' branch but never got any break in my console after restarting the server :S
(Just to make sure I did it somewhat correctly : I had made an initializer where I patched cells code with the content of the file you linked)

EDIT : to be more precise,

    byebug # => breaks
    initializer("cells.development") do |app|
      byebug # => doesn't :S
      if Rails.env.development?
        require "cell/development"
        ViewModel.send(:include, Development)
      end
    end

Any idea where the problem might be ?

cells (4.1.3)
cells-erb (0.0.9)
cells-rails (0.0.6)
kaminari-cells (0.0.4)
trailblazer-cells (0.0.3)

@apotonick
Copy link
Member

Maybe @timoschilling got an idea?

@Startouf Startouf changed the title Cells not realoading code in development Cells not reloading code in development Nov 16, 2016
@Startouf
Copy link
Author

When I roll back, up to cells 4.1.1 it still works. The bug was introduced with cells 4.1.2. My version of cells-rails stayed the same, so I guess the bug lies in cells and not cells-rails. SHould the issue be moved to the main repo ?

@apotonick
Copy link
Member

It must be fixed here as Cells shouldn't contain any Rails code. What did we remove in 4.1.2?

@contentfree
Copy link

This still exists with cells-rails 0.0.7 and cells 4.1.6.

If a cell has a syntax error then reloading seems to work until the file is successfully parsed at which point I have to restart the server to get new changes.

@apotonick
Copy link
Member

View or cell class? 🤔

@apotonick
Copy link
Member

I don't have time to work on this in the next weeks, it's up to the community to fix it, so give it a go. 😉

@contentfree
Copy link

contentfree commented Feb 16, 2017 via email

@tbuehlmann
Copy link

@Startouf, @contentfree: Can you provide an example application including a Gemfile.lock?

@Startouf
Copy link
Author

I'm not working on many cells views anymore since we've developed our new frontend application, and I see in my Gemfile.lock my cells version number is now (4.1.7) and I don't recall having those problems again... maybe @contentfree still has some repro steps ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants