upgrade to rails 6

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

upgrade to rails 6

fugee ohu
to upgrade an app to rails 6 i should run `yarn add <requirement>' for everything that was listing as "//= require <requirement>" ?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/c28d3d35-5c90-4228-bdb6-236268bf5f09%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: upgrade to rails 6

Ariel Juodziukynas
You shouldn't need to do that, you could use yarn to manage JavaScript dependencies with rails 5 too. Also the assets pipeline still works the same way with rails 6, only webpacker is the default now, but you can keep the old behaviour

El lun., 14 oct. 2019 19:44, fugee ohu <[hidden email]> escribió:
to upgrade an app to rails 6 i should run `yarn add <requirement>' for everything that was listing as "//= require <requirement>" ?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/c28d3d35-5c90-4228-bdb6-236268bf5f09%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAPS3bcCn_sQgiNia-Xi0eZgGS16Es3t94rBzAkFQaJb20X%2BXPw%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: upgrade to rails 6

fugee ohu


On Monday, October 14, 2019 at 6:50:53 PM UTC-4, Ariel Juodziukynas wrote:
You shouldn't need to do that, you could use yarn to manage JavaScript dependencies with rails 5 too. Also the assets pipeline still works the same way with rails 6, only webpacker is the default now, but you can keep the old behaviour

El lun., 14 oct. 2019 19:44, fugee ohu <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="H5MyULzVCQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">fuge...@...> escribió:
to upgrade an app to rails 6 i should run `yarn add <requirement>' for everything that was listing as "//= require <requirement>" ?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" rel="nofollow" target="_blank" gdf-obfuscated-mailto="H5MyULzVCQAJ" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">rubyonra...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/rubyonrails-talk/c28d3d35-5c90-4228-bdb6-236268bf5f09%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/rubyonrails-talk/c28d3d35-5c90-4228-bdb6-236268bf5f09%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/rubyonrails-talk/c28d3d35-5c90-4228-bdb6-236268bf5f09%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/rubyonrails-talk/c28d3d35-5c90-4228-bdb6-236268bf5f09%40googlegroups.com.

When I run yarn install it doesn't create a /public/packs folder and that's the cause of my 

Webpacker::Manifest::MissingEntryError error? Because the manifest file isn't found?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/da0ad727-e0d7-4796-ba49-2c5fbe4a68c6%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: upgrade to rails 6

Ariel Juodziukynas
You are mixing webpack with yarn. The only use of yarn is to download javascript packages from https://yarnpkg.com/lang/en/ to your app's node_modules folder. Webpacker is a gem that uses Webpack which is an assets manager/packer solution similar (but with conceptually different approach) to Sprockets (known as the rails' assets pipeline). Both Webpack and Sprockets can use the node_modules folder to find the required files.

You can use webpacker or sprockets on rails projects, you can even use both at the same time, the only difference between rails 5 and 6 is that 5 defaults to sprockets and 6 defaults to webpacker for new projects. You don't have to migrate to webpack if you don't want to, you should be able to upgrade to rails 6 without using webpack and everything should work as before.

Yarn won't create the /packs folder, webpacker should do that, maybe you didn't configure webpacker correctly or you didn't run the webpacker compiler. I suggest you follow the official webpacker guide to understand it https://github.com/rails/webpacker#installation

El lun., 14 oct. 2019 a las 20:17, fugee ohu (<[hidden email]>) escribió:


On Monday, October 14, 2019 at 6:50:53 PM UTC-4, Ariel Juodziukynas wrote:
You shouldn't need to do that, you could use yarn to manage JavaScript dependencies with rails 5 too. Also the assets pipeline still works the same way with rails 6, only webpacker is the default now, but you can keep the old behaviour

El lun., 14 oct. 2019 19:44, fugee ohu <[hidden email]> escribió:
to upgrade an app to rails 6 i should run `yarn add <requirement>' for everything that was listing as "//= require <requirement>" ?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/c28d3d35-5c90-4228-bdb6-236268bf5f09%40googlegroups.com.

When I run yarn install it doesn't create a /public/packs folder and that's the cause of my 

Webpacker::Manifest::MissingEntryError error? Because the manifest file isn't found?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/da0ad727-e0d7-4796-ba49-2c5fbe4a68c6%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAPS3bcAc%2B7p8VBrh7P6j0FbNptWCkXXgWbhR%2BERKrm-31VFmaw%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: upgrade to rails 6

fugee ohu


On Monday, October 14, 2019 at 7:53:21 PM UTC-4, Ariel Juodziukynas wrote:
You are mixing webpack with yarn. The only use of yarn is to download javascript packages from <a href="https://yarnpkg.com/lang/en/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fyarnpkg.com%2Flang%2Fen%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGypoRcohqRNcMV1e3tg2RPdEXH_w&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fyarnpkg.com%2Flang%2Fen%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGypoRcohqRNcMV1e3tg2RPdEXH_w&#39;;return true;">https://yarnpkg.com/lang/en/ to your app's node_modules folder. Webpacker is a gem that uses Webpack which is an assets manager/packer solution similar (but with conceptually different approach) to Sprockets (known as the rails' assets pipeline). Both Webpack and Sprockets can use the node_modules folder to find the required files.

You can use webpacker or sprockets on rails projects, you can even use both at the same time, the only difference between rails 5 and 6 is that 5 defaults to sprockets and 6 defaults to webpacker for new projects. You don't have to migrate to webpack if you don't want to, you should be able to upgrade to rails 6 without using webpack and everything should work as before.

Yarn won't create the /packs folder, webpacker should do that, maybe you didn't configure webpacker correctly or you didn't run the webpacker compiler. I suggest you follow the official webpacker guide to understand it <a href="https://github.com/rails/webpacker#installation" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Frails%2Fwebpacker%23installation\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGlmRqQGVGLvM8TugRCg5VOL6nYsA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Frails%2Fwebpacker%23installation\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGlmRqQGVGLvM8TugRCg5VOL6nYsA&#39;;return true;">https://github.com/rails/webpacker#installation

El lun., 14 oct. 2019 a las 20:17, fugee ohu (<<a href="javascript:" target="_blank" gdf-obfuscated-mailto="iE8T0yTZCQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">fuge...@...>) escribió:


On Monday, October 14, 2019 at 6:50:53 PM UTC-4, Ariel Juodziukynas wrote:
You shouldn't need to do that, you could use yarn to manage JavaScript dependencies with rails 5 too. Also the assets pipeline still works the same way with rails 6, only webpacker is the default now, but you can keep the old behaviour

El lun., 14 oct. 2019 19:44, fugee ohu <[hidden email]> escribió:
to upgrade an app to rails 6 i should run `yarn add <requirement>' for everything that was listing as "//= require <requirement>" ?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/rubyonrails-talk/c28d3d35-5c90-4228-bdb6-236268bf5f09%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/rubyonrails-talk/c28d3d35-5c90-4228-bdb6-236268bf5f09%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/rubyonrails-talk/c28d3d35-5c90-4228-bdb6-236268bf5f09%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/rubyonrails-talk/c28d3d35-5c90-4228-bdb6-236268bf5f09%40googlegroups.com.

When I run yarn install it doesn't create a /public/packs folder and that's the cause of my 

Webpacker::Manifest::MissingEntryError error? Because the manifest file isn't found?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="iE8T0yTZCQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">rubyonra...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/rubyonrails-talk/da0ad727-e0d7-4796-ba49-2c5fbe4a68c6%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/rubyonrails-talk/da0ad727-e0d7-4796-ba49-2c5fbe4a68c6%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/rubyonrails-talk/da0ad727-e0d7-4796-ba49-2c5fbe4a68c6%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/rubyonrails-talk/da0ad727-e0d7-4796-ba49-2c5fbe4a68c6%40googlegroups.com.

Thanks for clarifying I ran bin/webpack to find out what was borked and it said webpack-cli needed to be installed and prompted me to install it
Do you want to install 'webpack-cli' (yes/no): 
then the public/packs folder with manifest.json was created
after that i had to add babel-cli to satisfy a few node modules that use it

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/48fc6415-20b5-43d8-a6dc-7d3db99626ae%40googlegroups.com.