#RubyOnRails - 23 December 2018
« Back 1 day Forward 1 day »
[06:19:41] darris: Hi guys, I have a model query like https://hastebin.com/relerigima.rb, every time I load its taking crazy amount of minutes, what are some strategy to fix it?
[12:52:33] IGnorAND: I'm trying to use vue with webpack, I understand webpack does not expose globals. Is there something that can be done about that?
[13:40:32] nickjj: IGnorAND, i never used vue but you can use the webpack provide plugin to expose globals
[13:41:47] nickjj: you can add something like that in your list of plugins to expose globals for a library
[13:43:50] nickjj: i don't use rails webpacker, so i dunno if it handles its own webpack config -- i just happened to set up webpack recently for another project and saw your msg in chat
[13:44:51] nickjj: looks like it would go in https://github.com/rails/webpacker/blob/master/docs/webpack.md
[13:45:25] nickjj: and actually, those docs happen to have an example of using the same provideplugin i mentioned before, even with vue
[13:51:54] IGnorAND: nickjj: well, it seems vue 'works' but my vuetify doesn't unless I do an <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
[13:52:45] nickjj: i know nothing about vue but if it only works if you pull it in from a CDN then chances are something is busted with the webpack set up
[14:03:44] IGnorAND: nickjj: the thing is I did not set it up, all I did was rails webpacker:install and rails webpacker:install:vue
[23:26:07] acovrig: I’m currently using Rails 5.1.4 with ActionCable and love it, however, I’m having issues integrating the sockets in a mobile app, can I have rails provide a socket.io style websocket?