DEV Community

The Progressive Rails App

Alessandro Rodi on June 04, 2020

A step by step tutorial to create a Progressive Web App with Ruby on Rails and Webpacker If you Google for this topic you will find diff...
Collapse
 
mariod78 profile image
Mario D'Arco •

Thanks Alessandro for the interesting read. I'm trying to follow your guide, but I'm stuck at the bit where it says and add the following to webpacker.json. I started a new Rails app from scratch and I do not have such file (Rails 6).

It's probably something obvious, but last time I had to work with frontend code, jQuery was still in fashion, so please bear with me!

Collapse
 
tococorocko profile image
Toco Corocko •

It's webpacker.yml.

Collapse
 
fwolfst profile image
Felix Wolfsteller •

Nice read - although I am absolutely not sold on on this kind of stuff. I feel like DHH a decade ago ;) . One little improvement: the link to renuo should point to renuo.ch , I believe.

Collapse
 
coorasse profile image
Alessandro Rodi •

Thank you Felix! What do you mean exactly with "I am absolutely not sold on on this kind of stuff"?

Collapse
 
fwolfst profile image
Felix Wolfsteller •

It's a personal(!) thing: At the moment, I do not want to invest brain-mass and development-hours into modern Javascript-based functionality. I would have to write a lot to be understood - bottom line is probably: I hope to settle on tech that is still around without many changes in 5 years + my typical projects wouldnt benefit a lot from that.

Thread Thread
 
superails profile image
Yaroslav Shmarov •

Felix, moving to webpacker is not as hard as you think ;)
And regarding PWA, imagine:
You add a manifest, a service_worker and that's it!
Whenever someone opens your website in mobile he gets the "mobile app experience". That's a nice bargain!

Collapse
 
superails profile image
Yaroslav Shmarov •

Very good article. Thanks, Alissandro. I've done the implementation and it works well.
However there's one thing bothering me:
1) I "download" the PWA on mobile
2) I press "log in with google/github/etc"
3) I am redirected to the web browser to log in
4) After log in I stay in the browser version of the app (not redirect back to PWA)
How would you tackle redirecting back into the PWA after social login?

Collapse
 
codicacom profile image
Codica •

Great read!

Collapse
 
broger profile image
broger •

Hi alessandro, great job with the gem, is there a way to use it with chunks-webpack-plugin?

Collapse
 
mbm1607 profile image
Muhammad Khan •

@broger Did you ever end up finding a way to do this?

Collapse
 
deikka profile image
Alex Núñez •

Hi Alessandro. Is this tutorial compatible with webpacker 6? I'm struggling hard with the webpacker configuration and can´t make it work...

thanks in advance!