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

Mounting assets doesn't build ember app #555

Open
ryanjm opened this issue Dec 6, 2017 · 0 comments
Open

Mounting assets doesn't build ember app #555

ryanjm opened this issue Dec 6, 2017 · 0 comments

Comments

@ryanjm
Copy link

ryanjm commented Dec 6, 2017

Which operating system and version is the project developed on?
macOS 10.12.6

Which version of ruby is the project developed on?
ruby 2.3.1p112

Which version of npm is the project developed on?
5.5.1

Which version of ember-cli is the project developed on?
2.17.0

What is the rails version?
Rails 4.2.7.1

What is the ember-cli-rails version (from Gemfile)?
0.10.0

What is the ember-cli-rails-addon version (from package.json)?
0.10.0

Is your application server multi-threaded
(such as puma and unicorn) or is it multi-process (such as thin and webrick)?

Running with POW, not sure if it is multithreaded or not.

What are the contents of config/initializers/ember.rb?

EmberCli.configure do |c|
  c.app :frontend, yarn: true
end

What are the contents of the Rails' view that renders the Ember application?
n/a - default

How are the EmberCLI-related routes defined?

  mount_ember_assets :frontend, to: "frontend"

How is the application deployed?
Still working with it in development. Uses pow.

What is the issue?
I can run rake ember:compile and my assets are created and I can see Ember on my page like I want. But if I change my Ember app and reload the page, nothing is updated. It is still resolving to the original compile.

I can't tell if this is an issue with the fact that (1) the ember app isn't built via the Rails app or (2) that watchman isn't properly watching my files and recompiling behind the scenes.

Build the app within Rails

The rails app never calls build when using just the ember assets. When the app is rendered into the page using render_ember_app (which is expected when doing a full page render), ember-cli-rails will build the ember app to make sure it has the latest version. But there is nothing like that when using mount_ember_assets.

There is a rack app which is mounted but I don't see that rack app ever calling build.

If I call EmberCli["frontend"].build in a before_filter within my application_controller.rb then it updates properly but that is less than ideal since it is only used one a small handful of pages.

Watchman

I saw over here that one build method is supposed to start watching the files. I assume that would be making sure that watchman is running. How can I check to see if that is the issue?


What is the expected workflow for getting assets built when using mount_ember_assets?

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

1 participant