#RubyOnRails - 25 November 2018
« Back 1 day Forward 1 day »
[04:45:34] elcontrastador: Shouldn't this line in my assets.rb initializer load all stylesheets/js within node_modules? Rails.application.config.assets.paths << Rails.root.join('node_modules')
[04:46:39] elcontrastador: Shouldn't this path work to load within application layout? <%= stylesheet_link_tag 'bootstrap.css', media: 'all' %>
[08:09:36] elcontrastador: I've read the rails guid on the asset pipeline...I'm still missing something. I require bootstrap in the application.css the call the application stylesheet from my application layout...viewing rendered html source shows it listed and you can click the src in the rendered html. Yet, it doesn't style my views unless it's directly called from the application layout AND initialized in assets.rb. Is that
[08:14:30] elcontrastador: If I'm having to explicitly precompile them in assets.rb and call them explicitly in a layout, then it's pointless to list them in application.js/css right? What am I missing?
[08:33:26] elcontrastador: @Andr3as: ATimport bootstrap, ATimport mycss within mylib.scss located in app/assets/stylesheets and require mylib in application.css?
[08:45:56] elcontrastador: @andre3as I've installed boostrap via yarn as an npm_module. Will I need my import path to be @import 'boostrap/dist/css/boostrap'?
[08:48:54] Andr3as: found this via google.. they even use bootstrap as example: http://nithinbekal.com/posts/yarn-rails/
[08:49:13] elcontrastador: I may use webpack if I get my arms around this...I mean, i can get it working by adding it to precompile list in assets initializer and then listing directly in applicaiton layout
[08:50:18] elcontrastador: i did that but it still requires me to list explicitly in app layout and precompile it in assets.rb
[08:52:20] Andr3as: maybe you can figure it out with a starter app? https://github.com/diowa/ruby2-rails5-bootstrap-heroku
[08:53:18] Andr3as: here's another.. well... guide https://medium.com/@coorasse/goodbye-sprockets-welcome-webpacker-3-0-ff877fb8fa79
[09:06:21] elcontrastador: @Andr3as: webpacker looks good, I'll need to spend some time on that after I understand what i'm missing here... i think looking for a few real rails app would make it immediately clear to me...
[13:05:56] djass: I got that error when I try to display a image tag : The asset "my_image.jpg" is not present in the asset pipeline.
[17:33:21] shamacon: I don't have any other rails folks in my group, so I came here hoping to absorb what I can from conversations
[17:42:20] shamacon: I'm on a metered data plan and can't really watch many videos about rails to immerse myself.
[17:51:43] shamacon: I was assigned a feature and told to use test driven development with RSpec. It's a bit different from my previous experiences and I'm spending more time fixing my mistakes than anything else :P
[21:14:17] Stabby: Considering changing editor, I was using npp, but sessions are suboptimal. Requesting suggestions on Windows based editor.