Webpack merged into develop branch

Hello,

I am happy to inform you that Webpack has finally been added to Foreman.
This step which will help us modernize our front-end code, take advantage
of the blooming javascript eco-system, and easily integrate technologies
such as ES2015, React, js unit testing and more.
A deep-dive will be scheduled soon to explain all the changes, but there
are a few details that require your attention for running the current
develop branch.

This change requires a slight change to your workflow in the development
environment. First, you need to run npm install to get all of the needed
node modules to install (similar to bundle install for gems).
​Second, to run your server in development environment, you should use
foreman start which will run ​both the rails server and the webpack
live-reload development server. If you wish to use a non-default setting
for the rails server (e.g. using puma), you can set the RAILS_STARTUP
environment variable with the relevant command (see Procfile for an
example).

Please note that running this way will limit the ability to use pry for
debugging, as foreman prevents stdin echo. To use with pry, you can run
both servers separately in different terminals - run rails as usual in one,
and run ./node_modules/.bin/webpack-dev-server --config config/webpack.config.js in the other.

Also, new javascript code should be put in webpack/assets/javascript and
placed inside modules, using ES2015 syntax, whenever possible. Old code
will be gradually migrated into that location.

··· -- Have a nice day, Tomer Brisker Red Hat Engineering

> Hello,
>
> I am happy to inform you that Webpack has finally been added to Foreman.
> This step which will help us modernize our front-end code, take
> advantage of the blooming javascript eco-system, and easily integrate
> technologies such as ES2015, React, js unit testing and more.
> A deep-dive will be scheduled soon to explain all the changes, but there
> are a few details that require your attention for running the current
> develop branch.

Great news!

>
> This change requires a slight change to your workflow in the development
> environment. First, you need to run npm install to get all of the
> needed node modules to install (similar to bundle install for gems).
> ​Second, to run your server in development environment, you should use
> foreman start which will run ​both the rails server and the webpack
> live-reload development server. If you wish to use a non-default setting
> for the rails server (e.g. using puma), you can set the RAILS_STARTUP
> environment variable with the relevant command (see Procfile for an
> example).
>
> Please note that running this way will limit the ability to use pry for
> debugging, as foreman prevents stdin echo. To use with pry, you can run
> both servers separately in different terminals - run rails as usual in
> one, and run ./node_modules/.bin/webpack-dev-server --config > config/webpack.config.js in the other.

I noticed that when I run rails in development env, the webpack's
hostname in assets is set to localhost. So of course it doesn't work
when you're developing on a different host. Can this be tuned right away
in some config or does it need additional patches to switch the hostname?

>
> Also, new javascript code should be put in webpack/assets/javascript and
> placed inside modules, using ES2015 syntax, whenever possible. Old code
> will be gradually migrated into that location.

I'm glad it's finally merged. Good job!

Tomas

··· On 08/10/2016 02:01 PM, Tomer Brisker wrote:


Have a nice day,
Tomer Brisker
Red Hat Engineering


You received this message because you are subscribed to the Google
Groups “foreman-dev” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to foreman-dev+unsubscribe@googlegroups.com
mailto:foreman-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

> Hello,
>
> I am happy to inform you that Webpack has finally been added to Foreman.
> This step which will help us modernize our front-end code, take advantage
> of the blooming javascript eco-system, and easily integrate technologies
> such as ES2015, React, js unit testing and more.
> A deep-dive will be scheduled soon to explain all the changes, but there
> are a few details that require your attention for running the current
> develop branch.
>
> This change requires a slight change to your workflow in the development
> environment. First, you need to run npm install to get all of the needed
> node modules to install (similar to bundle install for gems).
> ​Second, to run your server in development environment, you should use
> foreman start which will run ​both the rails server and the webpack
> live-reload development server. If you wish to use a non-default setting
> for the rails server (e.g. using puma), you can set the RAILS_STARTUP
> environment variable with the relevant command (see Procfile for an
> example).
>
> Please note that running this way will limit the ability to use pry for
> debugging, as foreman prevents stdin echo. To use with pry, you can run
> both servers separately in different terminals - run rails as usual in one,
> and run ./node_modules/.bin/webpack-dev-server --config > config/webpack.config.js in the other.

Alternatively use pry-remote https://github.com/mon-ouie/pry-remote and
you can still use 'foreman start' with it

··· On 08/10, Tomer Brisker wrote:

Also, new javascript code should be put in webpack/assets/javascript and
placed inside modules, using ES2015 syntax, whenever possible. Old code
will be gradually migrated into that location.


Have a nice day,
Tomer Brisker
Red Hat Engineering


You received this message because you are subscribed to the Google Groups “foreman-dev” group.
To unsubscribe from this group and stop receiving emails from it, send an email to foreman-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Daniel Lobato Garcia

@dLobatog
blog.daniellobato.me
daniellobato.me

GPG: http://keys.gnupg.net/pks/lookup?op=get&search=0x7A92D6DD38D6DE30
Keybase: https://keybase.io/elobato

Am I missing something in getting this to work?

I tried several things -

npm install
foreman start

And it fails. I also tried:

Set :webpack_dev_server: false in settings.yml
rake webpack:compile
rails s

In both cases I get:

couldn't find file 'bootstrap' with type 'application/javascript'

Checked in these paths:
/home/vagrant/foreman/app/assets/images
/home/vagrant/foreman/app/assets/javascripts
/home/vagrant/foreman/app/assets/stylesheets
/home/vagrant/foreman/vendor/assets/fonts
/home/vagrant/foreman/vendor/assets/javascripts
/home/vagrant/foreman/vendor/assets/stylesheets
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/ipaddrjs-rails-1.1.1/vendor/assets/javascripts
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/jquery_pwstrength_bootstrap_4-1.2.2/vendor/assets/javascript
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/spice-html5-rails-0.1.5/vendor/assets/javascripts
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/ace-rails-ap-4.1.0/vendor/assets/javascripts
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/gettext_i18n_rails_js-1.1.0/lib/assets/javascripts
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/gettext_i18n_rails_js-1.1.0/vendor/assets/javascripts
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/select2-rails-3.5.10/vendor/assets/images
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/select2-rails-3.5.10/vendor/assets/javascripts
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/select2-rails-3.5.10/vendor/assets/stylesheets
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/gridster-rails-0.5.6.1/vendor/assets/javascripts
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/gridster-rails-0.5.6.1/vendor/assets/stylesheets
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/multi-select-rails-0.9.12/app/assets/images
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/multi-select-rails-0.9.12/app/assets/javascripts
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/multi-select-rails-0.9.12/app/assets/stylesheets
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/jquery-turbolinks-2.1.0/vendor/assets/javascripts
/home/vagrant/katello/app/assets/images
/home/vagrant/katello/app/assets/javascripts
/home/vagrant/katello/app/assets/stylesheets
/home/vagrant/katello/vendor/assets/images
/home/vagrant/katello/vendor/assets/javascripts
/home/vagrant/katello/vendor/assets/stylesheets
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/bastion-3.3.1/app/assets/javascripts
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/bastion-3.3.1/app/assets/stylesheets
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/bastion-3.3.1/vendor/assets/javascripts
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/angular-rails-templates-0.1.2/vendor/assets/javascripts
/home/vagrant/katello/engines/bastion_katello/app/assets/javascripts
/home/vagrant/katello/engines/bastion_katello/app/assets/stylesheets
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/jquery-ui-rails-4.2.1/app/assets/images
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/jquery-ui-rails-4.2.1/app/assets/javascripts
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/jquery-ui-rails-4.2.1/app/assets/stylesheets
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/foreman_docker-3.0.0/app/assets/javascripts
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/foreman_docker-3.0.0/app/assets/stylesheets
/home/vagrant/foreman_salt/app/assets/javascripts
/home/vagrant/foreman_chef/app/assets/javascripts
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/foreman-tasks-0.8.0/app/assets/javascripts
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/foreman-tasks-0.8.0/app/assets/stylesheets
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/x-editable-rails-1.5.5/vendor/assets/images
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/x-editable-rails-1.5.5/vendor/assets/javascripts
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/x-editable-rails-1.5.5/vendor/assets/stylesheets
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/turbolinks-2.5.3/lib/assets/javascripts
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/scoped_search-3.3.0/app/assets/images
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/scoped_search-3.3.0/app/assets/javascripts
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/scoped_search-3.3.0/app/assets/stylesheets
/home/vagrant/foreman/vendor/assets/fonts

··· ----- Original Message ----- > From: "Tomer Brisker" > To: "foreman-dev" > Sent: Wednesday, August 10, 2016 8:01:57 AM > Subject: [foreman-dev] Webpack merged into develop branch > > Hello, > > I am happy to inform you that Webpack has finally been added to Foreman. > This step which will help us modernize our front-end code, take advantage > of the blooming javascript eco-system, and easily integrate technologies > such as ES2015, React, js unit testing and more. > A deep-dive will be scheduled soon to explain all the changes, but there > are a few details that require your attention for running the current > develop branch. > > This change requires a slight change to your workflow in the development > environment. First, you need to run `npm install` to get all of the needed > node modules to install (similar to `bundle install` for gems). > ​Second, to run your server in development environment, you should use > `foreman start` which will run ​both the rails server and the webpack > live-reload development server. If you wish to use a non-default setting > for the rails server (e.g. using puma), you can set the RAILS_STARTUP > environment variable with the relevant command (see Procfile for an > example). > > Please note that running this way will limit the ability to use pry for > debugging, as foreman prevents stdin echo. To use with pry, you can run > both servers separately in different terminals - run rails as usual in one, > and run `./node_modules/.bin/webpack-dev-server --config > config/webpack.config.js` in the other. > > Also, new javascript code should be put in webpack/assets/javascript and > placed inside modules, using ES2015 syntax, whenever possible. Old code > will be gradually migrated into that location. > > -- > Have a nice day, > Tomer Brisker > Red Hat Engineering

I think this should cover that? It was merged just yesterday

··· On 08/12, Tomas Strachota wrote: > On 08/10/2016 02:01 PM, Tomer Brisker wrote: > >Please note that running this way will limit the ability to use pry for > >debugging, as foreman prevents stdin echo. To use with pry, you can run > >both servers separately in different terminals - run rails as usual in > >one, and run `./node_modules/.bin/webpack-dev-server --config > >config/webpack.config.js` in the other. > > I noticed that when I run rails in development env, the webpack's hostname > in assets is set to localhost. So of course it doesn't work when you're > developing on a different host. Can this be tuned right away in some config > or does it need additional patches to switch the hostname?


Daniel Lobato Garcia

@dLobatog

GPG: http://keys.gnupg.net/pks/lookup?op=get&search=0x7A92D6DD38D6DE30
Keybase: elobato (Daniel Lobato Garcia) | Keybase

I'm not sure why - but I also can reproduce this.

It seems like having foreman_templates on your list of plugins is what's
causing this. I don't really know why yet but I don't get the error without
that plugin, and I get it the moment I put it in bundler.d

··· On Thursday, August 18, 2016 at 6:07:18 PM UTC+2, stephen wrote: > > > > ----- Original Message ----- > > From: "Tomer Brisker" <tbri...@redhat.com > > > To: "foreman-dev" <forem...@googlegroups.com > > > Sent: Wednesday, August 10, 2016 8:01:57 AM > > Subject: [foreman-dev] Webpack merged into develop branch > > > > Hello, > > > > I am happy to inform you that Webpack has finally been added to Foreman. > > This step which will help us modernize our front-end code, take > advantage > > of the blooming javascript eco-system, and easily integrate technologies > > such as ES2015, React, js unit testing and more. > > A deep-dive will be scheduled soon to explain all the changes, but there > > are a few details that require your attention for running the current > > develop branch. > > > > This change requires a slight change to your workflow in the development > > environment. First, you need to run `npm install` to get all of the > needed > > node modules to install (similar to `bundle install` for gems). > > ​Second, to run your server in development environment, you should use > > `foreman start` which will run ​both the rails server and the webpack > > live-reload development server. If you wish to use a non-default setting > > for the rails server (e.g. using puma), you can set the RAILS_STARTUP > > environment variable with the relevant command (see Procfile for an > > example). > > > > Please note that running this way will limit the ability to use pry for > > debugging, as foreman prevents stdin echo. To use with pry, you can run > > both servers separately in different terminals - run rails as usual in > one, > > and run `./node_modules/.bin/webpack-dev-server --config > > config/webpack.config.js` in the other. > > > > Also, new javascript code should be put in webpack/assets/javascript and > > placed inside modules, using ES2015 syntax, whenever possible. Old code > > will be gradually migrated into that location. > > > > -- > > Have a nice day, > > Tomer Brisker > > Red Hat Engineering > > Am I missing something in getting this to work? > > I tried several things - > > npm install > foreman start > > And it fails. I also tried: > > > Set `:webpack_dev_server: false` in settings.yml > rake webpack:compile > rails s > > > In both cases I get: > > couldn't find file 'bootstrap' with type 'application/javascript' > > Checked in these paths: > /home/vagrant/foreman/app/assets/images > /home/vagrant/foreman/app/assets/javascripts > /home/vagrant/foreman/app/assets/stylesheets > /home/vagrant/foreman/vendor/assets/fonts > /home/vagrant/foreman/vendor/assets/javascripts > /home/vagrant/foreman/vendor/assets/stylesheets > > /home/vagrant/.rvm/gems/ruby-2.2.4/gems/ipaddrjs-rails-1.1.1/vendor/assets/javascripts > > > /home/vagrant/.rvm/gems/ruby-2.2.4/gems/jquery_pwstrength_bootstrap_4-1.2.2/vendor/assets/javascript > > > /home/vagrant/.rvm/gems/ruby-2.2.4/gems/spice-html5-rails-0.1.5/vendor/assets/javascripts > > > /home/vagrant/.rvm/gems/ruby-2.2.4/gems/ace-rails-ap-4.1.0/vendor/assets/javascripts > > > /home/vagrant/.rvm/gems/ruby-2.2.4/gems/gettext_i18n_rails_js-1.1.0/lib/assets/javascripts > > > /home/vagrant/.rvm/gems/ruby-2.2.4/gems/gettext_i18n_rails_js-1.1.0/vendor/assets/javascripts > > > /home/vagrant/.rvm/gems/ruby-2.2.4/gems/select2-rails-3.5.10/vendor/assets/images > > > /home/vagrant/.rvm/gems/ruby-2.2.4/gems/select2-rails-3.5.10/vendor/assets/javascripts > > > /home/vagrant/.rvm/gems/ruby-2.2.4/gems/select2-rails-3.5.10/vendor/assets/stylesheets > > > /home/vagrant/.rvm/gems/ruby-2.2.4/gems/gridster-rails-0.5.6.1/vendor/assets/javascripts > > > /home/vagrant/.rvm/gems/ruby-2.2.4/gems/gridster-rails-0.5.6.1/vendor/assets/stylesheets > > > /home/vagrant/.rvm/gems/ruby-2.2.4/gems/multi-select-rails-0.9.12/app/assets/images > > > /home/vagrant/.rvm/gems/ruby-2.2.4/gems/multi-select-rails-0.9.12/app/assets/javascripts > > > /home/vagrant/.rvm/gems/ruby-2.2.4/gems/multi-select-rails-0.9.12/app/assets/stylesheets > > > /home/vagrant/.rvm/gems/ruby-2.2.4/gems/jquery-turbolinks-2.1.0/vendor/assets/javascripts > > /home/vagrant/katello/app/assets/images > /home/vagrant/katello/app/assets/javascripts > /home/vagrant/katello/app/assets/stylesheets > /home/vagrant/katello/vendor/assets/images > /home/vagrant/katello/vendor/assets/javascripts > /home/vagrant/katello/vendor/assets/stylesheets > > /home/vagrant/.rvm/gems/ruby-2.2.4/gems/bastion-3.3.1/app/assets/javascripts > > > /home/vagrant/.rvm/gems/ruby-2.2.4/gems/bastion-3.3.1/app/assets/stylesheets > > > /home/vagrant/.rvm/gems/ruby-2.2.4/gems/bastion-3.3.1/vendor/assets/javascripts > > > /home/vagrant/.rvm/gems/ruby-2.2.4/gems/angular-rails-templates-0.1.2/vendor/assets/javascripts > > /home/vagrant/katello/engines/bastion_katello/app/assets/javascripts > /home/vagrant/katello/engines/bastion_katello/app/assets/stylesheets > > /home/vagrant/.rvm/gems/ruby-2.2.4/gems/jquery-ui-rails-4.2.1/app/assets/images > > > /home/vagrant/.rvm/gems/ruby-2.2.4/gems/jquery-ui-rails-4.2.1/app/assets/javascripts > > > /home/vagrant/.rvm/gems/ruby-2.2.4/gems/jquery-ui-rails-4.2.1/app/assets/stylesheets > > > /home/vagrant/.rvm/gems/ruby-2.2.4/gems/foreman_docker-3.0.0/app/assets/javascripts > > > /home/vagrant/.rvm/gems/ruby-2.2.4/gems/foreman_docker-3.0.0/app/assets/stylesheets > > /home/vagrant/foreman_salt/app/assets/javascripts > /home/vagrant/foreman_chef/app/assets/javascripts > > /home/vagrant/.rvm/gems/ruby-2.2.4/gems/foreman-tasks-0.8.0/app/assets/javascripts > > > /home/vagrant/.rvm/gems/ruby-2.2.4/gems/foreman-tasks-0.8.0/app/assets/stylesheets > > > /home/vagrant/.rvm/gems/ruby-2.2.4/gems/x-editable-rails-1.5.5/vendor/assets/images > > > /home/vagrant/.rvm/gems/ruby-2.2.4/gems/x-editable-rails-1.5.5/vendor/assets/javascripts > > > /home/vagrant/.rvm/gems/ruby-2.2.4/gems/x-editable-rails-1.5.5/vendor/assets/stylesheets > > > /home/vagrant/.rvm/gems/ruby-2.2.4/gems/turbolinks-2.5.3/lib/assets/javascripts > > > /home/vagrant/.rvm/gems/ruby-2.2.4/gems/scoped_search-3.3.0/app/assets/images > > > /home/vagrant/.rvm/gems/ruby-2.2.4/gems/scoped_search-3.3.0/app/assets/javascripts > > > /home/vagrant/.rvm/gems/ruby-2.2.4/gems/scoped_search-3.3.0/app/assets/stylesheets > > /home/vagrant/foreman/vendor/assets/fonts >

>>> Please note that running this way will limit the ability to use pry for
>>> debugging, as foreman prevents stdin echo. To use with pry, you can run
>>> both servers separately in different terminals - run rails as usual in
>>> one, and run ./node_modules/.bin/webpack-dev-server --config &gt;&gt;&gt; config/webpack.config.js in the other.
>>
>> I noticed that when I run rails in development env, the webpack's hostname
>> in assets is set to localhost. So of course it doesn't work when you're
>> developing on a different host. Can this be tuned right away in some config
>> or does it need additional patches to switch the hostname?
>
> I think this should cover that? It was merged just yesterday
>
> https://github.com/theforeman/foreman/commit/42ba771cc8bfc09257c15c5d388542d4d1b69358
>

Nice, thanks!

··· On 08/12/2016 11:25 AM, Daniel Lobato Garcia wrote: > On 08/12, Tomas Strachota wrote: >> On 08/10/2016 02:01 PM, Tomer Brisker wrote:


Daniel Lobato Garcia

@dLobatog
blog.daniellobato.me
daniellobato.me

GPG: http://keys.gnupg.net/pks/lookup?op=get&search=0x7A92D6DD38D6DE30
Keybase: https://keybase.io/elobato

I know I haven't updated templates for this: https://groups.google.com/d/
topic/foreman-dev/MFW1bAj-eFk/discussion (hit that myself last night). Not
the same error, but possibly related. I'll push that change to
templates/develop today and hopefully it'll help.

··· On 19 August 2016 at 07:26, Daniel Lobato wrote:

I’m not sure why - but I also can reproduce this.

It seems like having foreman_templates on your list of plugins is what’s
causing this. I don’t really know why yet but I don’t get the error without
that plugin, and I get it the moment I put it in bundler.d

Hi
Quick update - https://github.com/theforeman/foreman/pull/3722 has been
merged, which allows easy disabling of the webpack development server, in
case you aren't working on the front-end.
If disabled, you can continue running foreman as usual (e.g. rails s).
Note that if you disable the dev server, you will need to run rake webpack:compile to generate the js bundle needed for Foreman to run
correctly.

··· On Fri, Aug 12, 2016 at 1:01 PM, Tomas Strachota wrote:

On 08/12/2016 11:25 AM, Daniel Lobato Garcia wrote:

On 08/12, Tomas Strachota wrote:

On 08/10/2016 02:01 PM, Tomer Brisker wrote:

Please note that running this way will limit the ability to use pry for
debugging, as foreman prevents stdin echo. To use with pry, you can run
both servers separately in different terminals - run rails as usual in
one, and run ./node_modules/.bin/webpack-dev-server --config config/webpack.config.js in the other.

I noticed that when I run rails in development env, the webpack’s
hostname
in assets is set to localhost. So of course it doesn’t work when you’re
developing on a different host. Can this be tuned right away in some
config
or does it need additional patches to switch the hostname?

I think this should cover that? It was merged just yesterday

https://github.com/theforeman/foreman/commit/42ba771cc8bfc09
257c15c5d388542d4d1b69358

Nice, thanks!

Daniel Lobato Garcia

@dLobatog
blog.daniellobato.me
daniellobato.me

GPG: http://keys.gnupg.net/pks/lookup?op=get&search=0x7A92D6DD38D6DE30
Keybase: https://keybase.io/elobato


You received this message because you are subscribed to the Google Groups
"foreman-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Have a nice day,
Tomer Brisker
Red Hat Engineering

Thank you, that was it. foreman_chef wasn't updated for that.

  • Stephen
··· ----- Original Message ----- > From: "Greg Sutcliffe" > To: "Foreman" > Sent: Friday, August 19, 2016 4:24:17 AM > Subject: Re: [foreman-dev] Webpack merged into develop branch > > On 19 August 2016 at 07:26, Daniel Lobato wrote: > > > I'm not sure why - but I also can reproduce this. > > > > It seems like having `foreman_templates` on your list of plugins is what's > > causing this. I don't really know why yet but I don't get the error without > > that plugin, and I get it the moment I put it in bundler.d > > > > I know I haven't updated templates for this: https://groups.google.com/d/ > topic/foreman-dev/MFW1bAj-eFk/discussion (hit that myself last night). Not > the same error, but possibly related. I'll push that change to > templates/develop today and hopefully it'll help. >

Well, sort of. Now none of the menus, dropdowns etc work. There's plenty
of errors in the JS console like this:

ReferenceError: $ is not defined editable_form.self.js:5:5
ReferenceError: jQuery is not defined

I've tried cleaning out the node_modules dir and reinstalled, and trying
webpack:compile with the server off, and it doesn't help.

  • Stephen
··· ----- Original Message ----- > From: "Stephen Benjamin" > To: foreman-dev@googlegroups.com > Sent: Friday, August 19, 2016 7:29:21 AM > Subject: Re: [foreman-dev] Webpack merged into develop branch > > > > ----- Original Message ----- > > From: "Greg Sutcliffe" > > To: "Foreman" > > Sent: Friday, August 19, 2016 4:24:17 AM > > Subject: Re: [foreman-dev] Webpack merged into develop branch > > > > On 19 August 2016 at 07:26, Daniel Lobato wrote: > > > > > I'm not sure why - but I also can reproduce this. > > > > > > It seems like having `foreman_templates` on your list of plugins is > > > what's > > > causing this. I don't really know why yet but I don't get the error > > > without > > > that plugin, and I get it the moment I put it in bundler.d > > > > > > > I know I haven't updated templates for this: https://groups.google.com/d/ > > topic/foreman-dev/MFW1bAj-eFk/discussion (hit that myself last night). Not > > the same error, but possibly related. I'll push that change to > > templates/develop today and hopefully it'll help. > > > > Thank you, that was it. foreman_chef wasn't updated for that. > > > - Stephen

Are there any errors in the console related to fetching of assets from the
server? Can you look through the list of files loaded from the server in
your browser console and see if bundle.js is present with content?

··· On Fri, Aug 19, 2016 at 2:35 PM, Stephen Benjamin wrote:

----- Original Message -----

From: “Stephen Benjamin” stephen@redhat.com
To: foreman-dev@googlegroups.com
Sent: Friday, August 19, 2016 7:29:21 AM
Subject: Re: [foreman-dev] Webpack merged into develop branch

----- Original Message -----

From: “Greg Sutcliffe” greg.sutcliffe@gmail.com
To: “Foreman” foreman-dev@googlegroups.com
Sent: Friday, August 19, 2016 4:24:17 AM
Subject: Re: [foreman-dev] Webpack merged into develop branch

On 19 August 2016 at 07:26, Daniel Lobato elobatocs@gmail.com wrote:

I’m not sure why - but I also can reproduce this.

It seems like having foreman_templates on your list of plugins is
what’s
causing this. I don’t really know why yet but I don’t get the error
without
that plugin, and I get it the moment I put it in bundler.d

I know I haven’t updated templates for this:
https://groups.google.com/d/

topic/foreman-dev/MFW1bAj-eFk/discussion (hit that myself last
night). Not

the same error, but possibly related. I’ll push that change to
templates/develop today and hopefully it’ll help.

Thank you, that was it. foreman_chef wasn’t updated for that.

  • Stephen

Well, sort of. Now none of the menus, dropdowns etc work. There’s plenty
of errors in the JS console like this:

ReferenceError: $ is not defined editable_form.self.js:5:5
ReferenceError: jQuery is not defined

I’ve tried cleaning out the node_modules dir and reinstalled, and trying
webpack:compile with the server off, and it doesn’t help.

  • Stephen


You received this message because you are subscribed to the Google Groups
"foreman-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Eric D. Helms
Red Hat Engineering
Ph.D. Student - North Carolina State University

There was an issue with webpack when running in a vagrant box and serving
assets over https. Have a look at:

https://github.com/theforeman/foreman/commit/ab5c7c28f3c8e6a4fd4731cba590b62d5497ac97

':webpack_dev_server_https: true' in settings.yml fixed the console errors
for me

··· On Friday, August 19, 2016 at 8:35:32 PM UTC+2, stephen wrote: > > > > ----- Original Message ----- > > From: "Stephen Benjamin" <ste...@redhat.com > > > To: forem...@googlegroups.com > > Sent: Friday, August 19, 2016 7:29:21 AM > > Subject: Re: [foreman-dev] Webpack merged into develop branch > > > > > > > > ----- Original Message ----- > > > From: "Greg Sutcliffe" <greg.su...@gmail.com > > > > To: "Foreman" <forem...@googlegroups.com > > > > Sent: Friday, August 19, 2016 4:24:17 AM > > > Subject: Re: [foreman-dev] Webpack merged into develop branch > > > > > > On 19 August 2016 at 07:26, Daniel Lobato > wrote: > > > > > > > I'm not sure why - but I also can reproduce this. > > > > > > > > It seems like having `foreman_templates` on your list of plugins is > > > > what's > > > > causing this. I don't really know why yet but I don't get the error > > > > without > > > > that plugin, and I get it the moment I put it in bundler.d > > > > > > > > > > I know I haven't updated templates for this: > https://groups.google.com/d/ > > > topic/foreman-dev/MFW1bAj-eFk/discussion (hit that myself last night). > Not > > > the same error, but possibly related. I'll push that change to > > > templates/develop today and hopefully it'll help. > > > > > > > Thank you, that was it. foreman_chef wasn't updated for that. > > > > > > - Stephen > > Well, sort of. Now none of the menus, dropdowns etc work. There's plenty > of errors in the JS console like this: > > ReferenceError: $ is not defined editable_form.self.js:5:5 > ReferenceError: jQuery is not defined > > I've tried cleaning out the node_modules dir and reinstalled, and trying > webpack:compile with the server off, and it doesn't help. > > > - Stephen > > >

> From: "Eric D Helms" <ericdhelms@gmail.com>
> To: "foreman-dev" <foreman-dev@googlegroups.com>
> Sent: Saturday, August 20, 2016 11:34:27 AM
> Subject: Re: [foreman-dev] Webpack merged into develop branch
>
> Are there any errors in the console related to fetching of assets from the
> server? Can you look through the list of files loaded from the server in
> your browser console and see if bundle.js is present with content?

It works this morning without doing anything, so it must've been my browser
cache or something.

  • Stephen
··· ----- Original Message -----

On Fri, Aug 19, 2016 at 2:35 PM, Stephen Benjamin stephen@redhat.com > wrote:

----- Original Message -----

From: “Stephen Benjamin” stephen@redhat.com
To: foreman-dev@googlegroups.com
Sent: Friday, August 19, 2016 7:29:21 AM
Subject: Re: [foreman-dev] Webpack merged into develop branch

----- Original Message -----

From: “Greg Sutcliffe” greg.sutcliffe@gmail.com
To: “Foreman” foreman-dev@googlegroups.com
Sent: Friday, August 19, 2016 4:24:17 AM
Subject: Re: [foreman-dev] Webpack merged into develop branch

On 19 August 2016 at 07:26, Daniel Lobato elobatocs@gmail.com wrote:

I’m not sure why - but I also can reproduce this.

It seems like having foreman_templates on your list of plugins is
what’s
causing this. I don’t really know why yet but I don’t get the error
without
that plugin, and I get it the moment I put it in bundler.d

I know I haven’t updated templates for this:
https://groups.google.com/d/

topic/foreman-dev/MFW1bAj-eFk/discussion (hit that myself last
night). Not

the same error, but possibly related. I’ll push that change to
templates/develop today and hopefully it’ll help.

Thank you, that was it. foreman_chef wasn’t updated for that.

  • Stephen

Well, sort of. Now none of the menus, dropdowns etc work. There’s plenty
of errors in the JS console like this:

ReferenceError: $ is not defined editable_form.self.js:5:5
ReferenceError: jQuery is not defined

I’ve tried cleaning out the node_modules dir and reinstalled, and trying
webpack:compile with the server off, and it doesn’t help.

  • Stephen


You received this message because you are subscribed to the Google Groups
"foreman-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Eric D. Helms
Red Hat Engineering
Ph.D. Student - North Carolina State University


You received this message because you are subscribed to the Google Groups
"foreman-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.