trailblazer / cells

View components for Ruby and Rails.
https://trailblazer.to/2.1/docs/cells.html
3.07k stars 236 forks source link

Cell code not reloading with Rails 5 beta #384

Closed darkhelmet closed 6 years ago

darkhelmet commented 8 years ago

I'm trying out cells with a new Rails 5.0.0.beta3 app, and my *_cell.rb files aren't reloading. Is there something broken? Am I just doing something wrong?

I'm using the github branch at 43083e37bedf5ee9f00c2b2f1636486f0bbbee9d

GIT
  remote: git://github.com/apotonick/cells.git
  revision: 43083e37bedf5ee9f00c2b2f1636486f0bbbee9d
  specs:
    cells (4.1.0)
      tilt (>= 1.4, < 3)
      uber (~> 0.0.9)

Things are in the eager_load_paths as expected:

[8] pry(main)> Rails.application.config.eager_load_paths
=> ["/app/app/assets", "/app/app/cells", "/app/app/controllers", "/app/app/controllers/concerns", "/app/app/helpers", "/app/app/jobs", "/app/app/mailers", "/app/app/models", "/app/app/models/concerns", "/app/app/policies"]

I'll change something simple like adding a new property to the cell, refresh, and nothing exciting happens. The cell is not reloaded. Restarting the application picks up the changes.

timoschilling commented 8 years ago

can you test it with this branch?

gem 'cells', github: 'timoschilling/cells', branch: 'improve-development-reloading'
darkhelmet commented 8 years ago

That works, though it's missing this commit: https://github.com/apotonick/cells/commit/08d85c79fef301f5f23419ca095b2f802ba42794

It also takes a while to detect changes. With the code from this repo, template changes are picked up instantly and *_cell.rb changes aren't picked up at all. Using your branch, changes in both are picked up, but it takes numerous requests to get the new code.

I am using a vagrant/docker setup to develop, which means NFS is involved, but again, template changes would happen instantly with this repo. Weird.