« Back to channel list

#RubyOnRails - 24 February 2018

« Back 1 day Forward 1 day »
[00:02:00] apeiros: has joined #RubyOnRails
[00:08:16] hmaronon: has joined #RubyOnRails
[00:12:59] safetypin: has joined #RubyOnRails
[00:15:05] dviola: has joined #RubyOnRails
[00:15:21] hmaronon: has joined #RubyOnRails
[00:24:32] hmaronon: has joined #RubyOnRails
[00:32:56] hmaronon: has joined #RubyOnRails
[00:42:38] alfiemax: has joined #RubyOnRails
[00:45:07] agent_white: has joined #RubyOnRails
[00:45:14] hmaronon: has joined #RubyOnRails
[00:53:47] workmad3: has joined #RubyOnRails
[01:01:17] Psy-Q: has joined #RubyOnRails
[01:14:39] jottr_: has joined #RubyOnRails
[01:20:19] jottr_: has joined #RubyOnRails
[01:28:35] agent_white: has joined #RubyOnRails
[01:46:59] guardianx: has joined #RubyOnRails
[01:59:25] Dykam: has joined #RubyOnRails
[02:01:30] jottr_: has joined #RubyOnRails
[02:03:39] orbyt_: has joined #RubyOnRails
[02:22:25] jottr_: has joined #RubyOnRails
[02:54:26] workmad3: has joined #RubyOnRails
[02:56:11] cagmz: has joined #RubyOnRails
[03:04:51] AzaToth: has joined #RubyOnRails
[03:23:09] jottr_: has joined #RubyOnRails
[03:24:16] kapil___: has joined #RubyOnRails
[04:25:16] trautwein: has joined #RubyOnRails
[04:26:54] jottr_: has joined #RubyOnRails
[04:35:48] wethu: has joined #RubyOnRails
[04:45:47] Omnilord: has joined #RubyOnRails
[04:46:23] darkhanb: has joined #RubyOnRails
[04:55:12] workmad3: has joined #RubyOnRails
[05:21:26] jnollette: has joined #RubyOnRails
[05:21:39] mostlybadfly: has joined #RubyOnRails
[05:28:47] morenoh149: has joined #RubyOnRails
[05:29:02] hmaronon: has joined #RubyOnRails
[05:30:09] jottr_: has joined #RubyOnRails
[06:18:37] alfiemax: has joined #RubyOnRails
[06:19:39] alfiemax_: has joined #RubyOnRails
[06:22:46] morenoh149: has joined #RubyOnRails
[06:23:42] orbyt_: has joined #RubyOnRails
[06:27:00] srinidhi: has joined #RubyOnRails
[06:29:52] jottr_: has joined #RubyOnRails
[06:36:28] wethu: has joined #RubyOnRails
[06:55:54] workmad3: has joined #RubyOnRails
[07:02:49] mroutis: has joined #RubyOnRails
[07:06:40] conta: has joined #RubyOnRails
[07:16:16] hd1: has joined #RubyOnRails
[07:16:28] hd1: has left #RubyOnRails: ()
[07:18:00] wethu: has joined #RubyOnRails
[07:23:06] mtkd: has joined #RubyOnRails
[07:26:03] _aeris_: has joined #RubyOnRails
[07:28:10] jottr_: has joined #RubyOnRails
[07:59:51] powrtoch: has joined #RubyOnRails
[08:00:30] reber: has joined #RubyOnRails
[08:10:32] crst: Where's the the file https://stackoverflow.com/a/10631147 should be implemented?
[08:23:43] marr: has joined #RubyOnRails
[08:24:38] quazimodo: has joined #RubyOnRails
[08:26:22] jottr_: has joined #RubyOnRails
[08:32:43] Tempesta: has joined #RubyOnRails
[08:43:29] tevio: has joined #RubyOnRails
[08:56:37] workmad3: has joined #RubyOnRails
[09:01:55] macxim: has joined #RubyOnRails
[09:19:05] apparition: has joined #RubyOnRails
[09:28:10] jottr_: has joined #RubyOnRails
[09:41:03] snickers: has joined #RubyOnRails
[10:00:08] alfiemax: has joined #RubyOnRails
[10:27:30] jottr_: has joined #RubyOnRails
[10:29:36] sameerynho: has joined #RubyOnRails
[10:54:27] kapil___: has joined #RubyOnRails
[10:57:18] workmad3: has joined #RubyOnRails
[11:15:46] mostlybadfly: has joined #RubyOnRails
[11:18:40] cabotto: has joined #RubyOnRails
[11:23:58] hmaronon: has joined #RubyOnRails
[11:29:52] jottr_: has joined #RubyOnRails
[11:32:16] hmaronon: has joined #RubyOnRails
[11:36:36] defsdoor: has joined #RubyOnRails
[11:40:20] snickers: has joined #RubyOnRails
[11:49:46] hmaronon: has joined #RubyOnRails
[11:54:28] mtkd: has joined #RubyOnRails
[12:08:59] mikecmpbll: has joined #RubyOnRails
[12:10:18] cstls: has joined #RubyOnRails
[12:15:03] jottr_: has joined #RubyOnRails
[12:30:32] pLaTo0n: has joined #RubyOnRails
[12:53:22] digitalowl: has joined #RubyOnRails
[12:53:55] mtkd: has joined #RubyOnRails
[12:55:34] digitalowl: Hello, guys. Can you tell me about bootstrap-sass using? I do all from instruction on github, but assets:precompile faile with 'bootstrap-sprockets' with type 'style' not found. When I looking for files in gem directory I found files _bootstrap.scss and _bootstrap-sprockets.scss. I use rails 5.
[12:56:32] digitalowl: I try include bootstrap libraries in application.css.scss like /*= require bootstrap-sprockets /*= require bootstrap /*= require_self
[12:58:02] workmad3: has joined #RubyOnRails
[13:02:32] srinidhi: has joined #RubyOnRails
[13:05:26] cstls: has joined #RubyOnRails
[13:08:58] macxim: has joined #RubyOnRails
[13:14:55] srinidhi: has joined #RubyOnRails
[13:25:38] mtkd: has joined #RubyOnRails
[13:32:46] dionysus69: has joined #RubyOnRails
[13:41:25] desperek: has joined #RubyOnRails
[13:53:24] alfiemax: has joined #RubyOnRails
[14:10:32] fumk: has joined #RubyOnRails
[14:10:49] qyliss_: has joined #RubyOnRails
[14:12:57] S007: has joined #RubyOnRails
[14:18:03] cstls: has joined #RubyOnRails
[14:20:22] mikecmpbll: has joined #RubyOnRails
[14:30:58] fumck: has joined #RubyOnRails
[14:31:36] ^mtkd: has joined #RubyOnRails
[14:32:07] mikecmpbll: has joined #RubyOnRails
[14:33:18] alfiemax: has joined #RubyOnRails
[14:36:22] za1b1tsu: has joined #RubyOnRails
[14:47:45] mtkd: has joined #RubyOnRails
[15:02:54] schneide_: has joined #RubyOnRails
[15:03:26] mikecmpbll: has joined #RubyOnRails
[15:04:12] snickers: has joined #RubyOnRails
[15:05:08] safetypin: has joined #RubyOnRails
[15:16:32] safetypin: has joined #RubyOnRails
[15:21:12] kapil___: has joined #RubyOnRails
[15:22:31] urbanmonk: has joined #RubyOnRails
[15:22:45] AzaToth: has joined #RubyOnRails
[15:33:24] schneide1: has joined #RubyOnRails
[15:34:34] schneide_: has left #RubyOnRails: ()
[15:39:32] alfiemax: has joined #RubyOnRails
[15:40:08] dionysus69: has joined #RubyOnRails
[15:42:20] hammer065: has joined #RubyOnRails
[15:44:33] laekur: has joined #RubyOnRails
[15:51:05] cabotto: has joined #RubyOnRails
[15:55:28] powrtoch: has joined #RubyOnRails
[16:04:51] Omnilord: has joined #RubyOnRails
[16:10:05] alfiemax: has joined #RubyOnRails
[16:22:33] cabotto: has joined #RubyOnRails
[16:45:20] Dimik: has joined #RubyOnRails
[16:45:29] alfiemax: has joined #RubyOnRails
[16:53:32] LiamW: has joined #RubyOnRails
[16:58:57] LiamW: has left #RubyOnRails: ("WeeChat 2.0.1")
[16:59:28] workmad3: has joined #RubyOnRails
[17:02:13] mtkd: has joined #RubyOnRails
[17:03:29] mroutis: has joined #RubyOnRails
[17:04:19] Aherin: has joined #RubyOnRails
[17:07:59] dionysus69: has joined #RubyOnRails
[17:11:31] cabotto: has joined #RubyOnRails
[17:11:31] garyserj: has joined #RubyOnRails
[17:13:28] garyserj: is there a form helper that creates a button element rather than an <input type...> because my buttons have text that is quite explanatory like "create new user" and I want that displayed on the button but I don't want it sent to the server. The button element allows the value to be distinct from what is displayed on the button
[17:15:21] dviola: has joined #RubyOnRails
[17:22:05] mroutis: garyserj: if you are inside a form, typing `f.button` will create a button of `type=submit`, if I understand your question, you don't want to "submit" your form using that button, however I don't get why "creating a user" would not reach the server, can you help me more to understand what you are trying to achieve?
[17:23:58] alfiemax_: has joined #RubyOnRails
[17:24:54] mroutis: garyserj: here's the source, if you're interested in how does this "helpers" do their magick: https://github.com/rails/rails/blob/bdc581616b760d1e2be3795c6f0f3ab4b1e125a5/actionview/lib/action_view/helpers/form_helper.rb#L2259-L2263
[17:25:08] mroutis: garyserj: https://github.com/rails/rails/blob/bdc581616b760d1e2be3795c6f0f3ab4b1e125a5/actionview/lib/action_view/helpers/form_helper.rb#L2274-L2290
[17:27:01] mroutis: garyserj: so, if you only want to display a button without any actions, you could use the `button_tag` with type `button` as described here: http://api.rubyonrails.org/classes/ActionView/Helpers/FormTagHelper.html#method-i-button_tag
[17:29:05] mroutis: garyserj: I haven't tried it, but by reading the source, I guess is also possible to do `f.button type: 'button'`
[17:32:54] cabotto: has joined #RubyOnRails
[17:36:44] crst: has joined #RubyOnRails
[17:37:34] mtkd: has joined #RubyOnRails
[17:37:48] cabotto: has joined #RubyOnRails
[17:38:41] crst: Hi, I'm trying to upgrade 4.2 -> 5.1. Added gem 'rails', '5.1.5'. But when I run bundle update rails I get: The bundle currently has rails locked at 4.2.10. Try running `bundle update rails`
[17:39:20] mroutis: crst: did you try already running `bundle update rails` ?
[17:39:49] crst: mroutis: It's a loop
[17:42:30] mroutis: crst: it's not a good advise (I don't understand why running `bundle update rails` is not working), but you could always remove your Gemfile.lock to update everything; however, this will probably break some stuff (if your Gemfile is not versioned enough)
[17:43:42] crst: mroutis: It's so strange, isn't it? I've been avoiding deleting Gemfile.lock since I run into multiple issues when I did.
[17:44:48] mroutis: yeah, I can't help you that much; are you using a ruby environment manager? (as rbenv)
[17:45:16] rikkipitt: has joined #RubyOnRails
[17:45:27] crst: yep, rbenv
[17:46:06] cabotto: has joined #RubyOnRails
[17:50:25] crst: Maybe it's because some gems link to github directly
[17:51:03] mroutis: could you copy your Gemfile.lock?
[17:51:54] mroutis: crst: ^ using a gist, hehe, maybe you are using an engine that requires rails 4, I really don't know
[17:52:13] c0dec_: has joined #RubyOnRails
[17:53:34] crst: lol, now when I bundle install after removal of Gemfile.lock I get: Could not find gem 'rails (= 5.1.5)' in any of the gem sources listed in your Gemfile.
[17:54:29] cabotto: has joined #RubyOnRails
[17:55:22] crst: mroutis: This is the Gemfile: https://bpaste.net/show/f16ba897aeec
[18:01:38] crst: wait, I've got it. It's been either rbenv-bundle-exec or rbenv-binstubs which caused that. Good riddance.
[18:11:26] cabotto: has joined #RubyOnRails
[18:15:24] mroutis: crst: good to know!
[18:16:10] cabotto: has joined #RubyOnRails
[18:23:53] darkhanb: has joined #RubyOnRails
[18:24:29] cabotto: has joined #RubyOnRails
[18:29:11] garyserj: mr-spoon: thanks, i'll check that out
[18:30:03] garyserj: mroutis rather
[18:33:39] cstls: has joined #RubyOnRails
[18:35:00] orbyt_: has joined #RubyOnRails
[18:38:25] cabotto: has joined #RubyOnRails
[18:39:36] maesitos: has joined #RubyOnRails
[18:40:16] maesitos: Hello I'm trying to run a code before initialisation in a Rails generator I'm developing, any help?
[18:45:26] garyserj: is English your first language maesitos?
[18:45:45] maesitos: *initialising
[18:45:49] maesitos: no it's not
[18:46:20] maesitos: I tend to destroy the english language, I know
[18:47:12] mroutis: maesitos: what do you refer to as "initialization"?
[18:47:57] maesitos: basically, what I need is to run a script after the configuration from my gem has been loaded
[18:48:23] alfie: has joined #RubyOnRails
[18:49:14] mroutis: maesitos: and it's part of your "generator"? why don't you offer an `init` task, as devise does
[18:49:36] mroutis: it's -> is it*
[18:49:41] maesitos: yes it's a generator
[18:50:19] maesitos: I'm pretty new to rails and the convention over configuration and the load process is a bit of a puzzle
[18:51:11] cabotto: has joined #RubyOnRails
[18:51:46] mroutis: maesitos: I don't quite understand why are you trying to achieve...
[18:52:40] mroutis: maesitos: do you run your generator with `rails new -m template.rb` ?
[18:52:58] mroutis: maesitos: or `rails generate custom_generator` ?
[18:53:09] maesitos: Basically it's a gem that provides multiple adaptors for different APIs. So the gem users defines the adaptor he'd like to use in /config/initializers/gem_name.rb
[18:53:45] maesitos: and I'd like to have a singleton class that includes an instance for that generator, the one provided by the gem user
[18:54:23] maesitos: I did the generator by hand
[18:54:59] maesitos: I'm adding new code to an existing gem and they didn't include any generator
[18:55:13] srinidhi: has joined #RubyOnRails
[18:58:07] maesitos: I've been reading there's a method "config.after_initialize"
[18:58:25] ebsen: has joined #RubyOnRails
[18:58:26] maesitos: that's pretty much what I'd need but I don't know how to reach it from my gem
[18:58:35] maesitos: and if I even should do it that way
[19:00:08] workmad3: has joined #RubyOnRails
[19:00:51] uks: has joined #RubyOnRails
[19:02:00] TessaM: has joined #RubyOnRails
[19:03:06] funnel: has joined #RubyOnRails
[19:05:53] mroutis: maesitos: so, you are writing a gem, and when the user includes the gem to his/her Rails app, you want them to configure it through an initializer, right?
[19:06:34] maesitos: that gem needs to post some things based on that configuration to a server just once
[19:07:03] maesitos: in fact it posts the URLs for a web-hook so I'd also need ActionDispatch loaded
[19:07:44] maesitos: once in the lifetime of the app
[19:08:52] mroutis: maesitos: I haven't done it before, but try to take a look into rollbar's gem https://github.com/rollbar/rollbar-gem
[19:09:11] mroutis: maesitos: I think they have something similar
[19:12:36] cabotto: has joined #RubyOnRails
[19:12:41] schneide1: has joined #RubyOnRails
[19:19:06] garyserj: I understand the concept of loops. But I don't understand how rails processes this. Given this code in a rails template.. https://gist.githubusercontent.com/anonymous/f6c88140bc0d86fa17963b91cc619935/raw/68b6180b0570305c8e88ac307d15c6c96daf7a01/gistfile1.txt what does Rails do with it?
[19:21:06] cstls: has joined #RubyOnRails
[19:22:03] cabotto: has joined #RubyOnRails
[19:23:27] DoubleMalt: has joined #RubyOnRails
[19:34:35] cabotto: has joined #RubyOnRails
[19:35:35] awolfson0: has joined #RubyOnRails
[19:39:12] macxim: has joined #RubyOnRails
[19:39:26] cabotto: has joined #RubyOnRails
[19:45:00] uksio: has joined #RubyOnRails
[19:48:47] garyserj: It seems like the rails interpreter is saying Read line 1, execute it. Line 2, execute @a.each then it sees the 'do' so it sees a block is being apssed in, then it sees |x| which is still ruby code, then you get this interspersing of html to display, and ruby code to run. And some code will return html which is displayed. What exactly is the rails interpreter doing to deal with that?
[19:49:33] DoubleMalt: has joined #RubyOnRails
[19:49:48] schneide1: has joined #RubyOnRails
[19:49:59] fryguy: garyserj: what you are looking at isn't ruby, it's erb, it runs through a preprocessor first
[19:53:47] garyserj: ah so it's not ruby and it's not rails, it's erb.. so I guess I want to know what the erb preprocessor is doing.
[19:54:12] lupine: it's basically php with ruby syntax
[19:54:30] tcopeland: has joined #RubyOnRails
[19:54:49] garyserj: i'm not that familiar with php
[20:05:41] roshanavand: has joined #RubyOnRails
[20:09:11] cabotto: has joined #RubyOnRails
[20:10:09] darkhanb: has joined #RubyOnRails
[20:10:19] garyserj: If I want more text in my form's submit button than just one word, e.g. <%= submit_tag("create new user") %> Then ideally i'd want just the name value pair of commit=createuser to be sent to the server, and the text of "create new user" to be displayed on the button. But what I get is something like commit="create+new+user" which is a bit laborious. What method would you suggest to
[20:10:19] garyserj: get a smaller value sent to the server while still having the longer description as text on the button?
[20:18:25] cabotto: has joined #RubyOnRails
[20:23:15] cabotto: has joined #RubyOnRails
[20:31:47] cabotto: has joined #RubyOnRails
[20:40:06] cabotto: has joined #RubyOnRails
[20:43:34] cstls: has joined #RubyOnRails
[20:44:29] darkhanb_: has joined #RubyOnRails
[20:49:01] cabotto: has joined #RubyOnRails
[21:04:45] IanMalcolm: has joined #RubyOnRails
[21:12:20] c0dec: has joined #RubyOnRails
[21:18:10] mroutis: has joined #RubyOnRails
[21:18:23] cabotto: has joined #RubyOnRails
[21:19:52] cagmz: has joined #RubyOnRails
[21:24:18] schneider-: has joined #RubyOnRails
[21:26:54] cabotto: has joined #RubyOnRails
[21:31:36] cabotto: has joined #RubyOnRails
[21:40:12] cabotto: has joined #RubyOnRails
[21:41:44] darkhanb: has joined #RubyOnRails
[21:57:20] cabotto: has joined #RubyOnRails
[22:05:51] cabotto: has joined #RubyOnRails
[22:08:55] _cabotto: has joined #RubyOnRails
[22:11:58] c0dec: has joined #RubyOnRails
[22:21:25] cabotto: has joined #RubyOnRails
[22:38:51] cabotto: has joined #RubyOnRails
[22:55:47] schneider-: has joined #RubyOnRails
[22:57:06] cstls: has joined #RubyOnRails
[23:04:28] schneider-: has joined #RubyOnRails
[23:07:33] mroutis: what are your experiences with using templates to generate projects?
[23:08:05] mroutis: for example, thoughtbot's suspenders https://github.com/thoughtbot/suspenders (well, technically not a template, but you get the idea)
[23:13:03] cabotto: has joined #RubyOnRails
[23:13:22] mikecmpbll: has joined #RubyOnRails
[23:24:01] cabotto: has joined #RubyOnRails
[23:39:25] cabotto: has joined #RubyOnRails
[23:47:38] hmaronon: has joined #RubyOnRails
[23:50:39] cabotto: has joined #RubyOnRails
[23:52:35] cstls: has joined #RubyOnRails
[23:55:56] cabotto: has joined #RubyOnRails