« Back to channel list

#RubyOnRails - 29 April 2016

« Back 1 day Forward 1 day »
[00:09:08] neanderslob: audy: never heard of it
[00:10:09] pawnbox: has joined #RubyOnRails
[00:10:15] jenrzzz: has joined #RubyOnRails
[00:10:36] srinidhi1: has joined #RubyOnRails
[00:12:49] n008f4g_: has joined #RubyOnRails
[00:13:41] stardiviner: has joined #RubyOnRails
[00:14:27] tjbiddle: has joined #RubyOnRails
[00:14:47] smathy: neanderslob, did you try just throwing some `as: :text` in there somewhere?
[00:15:26] neanderslob: yea; unfortunately it just renders the whole date in a single textbox
[00:16:01] neanderslob: I like how the helper breaks it up but I can't stand those #$@# date_selects
[00:17:30] idefine: has joined #RubyOnRails
[00:18:04] smathy: I agree, which is why I never use that, I use one of the many JS widgets.
[00:19:36] duncannz: has joined #RubyOnRails
[00:19:49] mwlang: neanderslob: if I’m not mistaken, the date boxes are being rendered by the browser as part of the HTML5 standard. I don’t think simple_form is doing anything other than passing the html5 directive to the browser.
[00:19:50] neanderslob: smathy: that's interesting so do you just let it render as selects and then use javascript to set the values with textboxes or something?
[00:20:52] AoifeOToole: has joined #RubyOnRails
[00:20:53] neanderslob: mwlang: I don't believe that's the case, html5 has some sort of date picker but I think this is being rendered with the date_select helper?
[00:20:54] chipotle: has joined #RubyOnRails
[00:21:36] _Tariq: has joined #RubyOnRails
[00:24:53] mwlang: neanderslob: I could be wrong, just going by the readme — https://github.com/plataformatec/simple_form#html-5-notice
[00:25:08] smathy: neanderslob, most of them expect a JS Date object, so I create that for them.
[00:26:30] baweaver: has joined #RubyOnRails
[00:27:46] neanderslob: smathy: I see
[00:29:08] one_zero: has joined #RubyOnRails
[00:31:08] mwlang: neanderslob: I think you’re right. I just tried myself — looks like its what Rails generates: http://guides.rubyonrails.org/form_helpers.html#using-date-and-time-form-helpers
[00:32:00] daveomcd_: has joined #RubyOnRails
[00:32:11] neanderslob: mwlang: yea, I think the readme is saying that it's html5 compatible but you need to set "html5: true" to take advantage of it
[00:33:14] Cohedrin: has joined #RubyOnRails
[00:33:31] mwlang: I just started experimenting with simple_form a couple weeks back, but so far only doing basic text, dropdowns, and numeric fields.
[00:34:30] mwlang: the main thing I liked about simple_form was it’s approach to wrappers and using those to integrate with bootstrap framework.
[00:34:42] neanderslob: mwlang: it's a good plugin; I've only really found their treatment of dates vexing
[00:35:45] ur5us: has joined #RubyOnRails
[00:37:41] jeffleeismyhero: has joined #RubyOnRails
[00:38:31] bronson: has joined #RubyOnRails
[00:39:16] jeffleeismyhero: has left #RubyOnRails: ()
[00:39:25] jeffleeismyhero: has joined #RubyOnRails
[00:39:28] Mia: has joined #RubyOnRails
[00:39:28] Mia: has joined #RubyOnRails
[00:39:45] jeffleeismyhero: has left #RubyOnRails: ()
[00:39:47] Ropeney: has joined #RubyOnRails
[00:39:51] jeffleeismyhero: has joined #RubyOnRails
[00:40:51] jeffleeismyhero: I'm getting the following error from RackSpace Cloud Files (retrieval) in CarrierWave: ActionView::Template::Error (Storage must be instantiated with the :rackspace_temp_url_key option)
[00:41:17] Sawbones: has joined #RubyOnRails
[00:41:28] jeffleeismyhero: The container is public and things were working fine two days ago.
[00:45:59] Sawbones: has joined #RubyOnRails
[00:47:29] flashpoint9: has joined #RubyOnRails
[00:48:29] mwlang: hmmm…how do I remove spec files from the coverage reports that simplecov produces?
[00:54:42] flashpoint9: has joined #RubyOnRails
[00:56:09] rickmasta: has joined #RubyOnRails
[00:56:53] baweaver: http://stackoverflow.com/questions/18114126/is-there-a-way-to-exempt-files-folders-from-coveralls-test-coverage-scoring
[00:57:03] baweaver: filters looks like
[00:58:01] stardiviner: has joined #RubyOnRails
[01:01:16] idefine: has joined #RubyOnRails
[01:02:43] petor: has joined #RubyOnRails
[01:04:36] sypheren: has joined #RubyOnRails
[01:05:45] lycaonian: has joined #RubyOnRails
[01:05:59] quazimodo: has joined #RubyOnRails
[01:06:56] mwlang: baweaver: Filters did it.
[01:07:24] chouhoulis: has joined #RubyOnRails
[01:08:08] Sawbones: has joined #RubyOnRails
[01:11:01] quazimodo: has joined #RubyOnRails
[01:11:55] jowiar: has joined #RubyOnRails
[01:14:15] robbyoconnor: has joined #RubyOnRails
[01:17:29] roamingdog: has joined #RubyOnRails
[01:19:42] TessaM: has joined #RubyOnRails
[01:19:54] quazimodo: has joined #RubyOnRails
[01:20:24] quazimodo: I've configured rpush to use active_record as it's backend. This means that it would use a single db connection per thread, right?
[01:20:37] djbkd: has joined #RubyOnRails
[01:20:40] quazimodo: as in, it doesn't reconnect to the db each time it polls does it?
[01:21:10] quazimodo: Radar: i'm not sure how to phrase the question better, sorry
[01:21:25] Radar: I don't know what rpush is.
[01:21:53] The_Phoenix: has joined #RubyOnRails
[01:21:58] dopamean_: has joined #RubyOnRails
[01:22:13] quazimodo: well i suppose the general question here is, if I poll an active record model to get any new records every 2 seconds, i'd still be using the same database connection right
[01:22:46] quazimodo: i'm pretty sure that's thecase
[01:26:33] sevenseacat: has joined #RubyOnRails
[01:28:29] Sawbones: has joined #RubyOnRails
[01:29:22] Guest81609: has joined #RubyOnRails
[01:30:37] quazimodo: has joined #RubyOnRails
[01:31:28] roamingdog: has joined #RubyOnRails
[01:38:16] stardiviner: has joined #RubyOnRails
[01:38:54] tfitts: has joined #RubyOnRails
[01:39:00] bphogan: has joined #RubyOnRails
[01:39:14] bronson: has joined #RubyOnRails
[01:41:20] ur5us: has joined #RubyOnRails
[01:41:52] quazimodo: yeah rpush looks to be behaving super normally with AR's connection pool using ::ActiveRecord::Base.connection_pool.with_connection do; yield; end
[01:44:24] roamingdog: has joined #RubyOnRails
[01:44:36] jenrzzz: has joined #RubyOnRails
[01:44:36] jenrzzz: has joined #RubyOnRails
[01:50:20] silentpost: has joined #RubyOnRails
[01:50:25] Limix: has joined #RubyOnRails
[01:55:02] bphogan: has joined #RubyOnRails
[01:55:29] Sawbones: has joined #RubyOnRails
[01:58:21] chipotle: has joined #RubyOnRails
[02:00:15] diegoaguilar: has joined #RubyOnRails
[02:01:30] alex__c2022: has joined #RubyOnRails
[02:07:03] blufire42: has joined #RubyOnRails
[02:07:14] ur5us: has joined #RubyOnRails
[02:09:44] diegoaguilar: has joined #RubyOnRails
[02:11:39] jstransky: has joined #RubyOnRails
[02:15:31] codesoda: has joined #RubyOnRails
[02:16:15] roamingdog: has joined #RubyOnRails
[02:18:41] smoitra: has joined #RubyOnRails
[02:21:31] agent_white: has joined #RubyOnRails
[02:24:34] jenrzzz: has joined #RubyOnRails
[02:25:41] Guest81609: has joined #RubyOnRails
[02:26:25] roamingdog: has joined #RubyOnRails
[02:27:29] Guest81609: anyone out there
[02:27:33] codesoda: has joined #RubyOnRails
[02:27:45] Deathfacej: could really use some help with a no method error in rails
[02:29:18] Deathfacej: basically ive been running through all the examples and cant get my first controller index to be the home page, i dete the file im supposed to, i generate the controller index correctly but somehow my welcome controller still isnt home page even after uncommenting the line in routes.rb ... is there some new syntax or something and the guides are outdated???
[02:29:50] Deathfacej: i delete the file im supposed to**** which is the one in public something.html index i think
[02:30:53] sevenseacat: Deathfacej: can you show us some of your code? so you're setting the homepage route, where are you doing that in your routes.rb ?
[02:32:11] chipotle: has joined #RubyOnRails
[02:33:13] sevenseacat: you also shouldnt have to delete anything in public
[02:34:37] akshat: has joined #RubyOnRails
[02:36:16] stardiviner: has joined #RubyOnRails
[02:38:10] sevenseacat: also, I'm not sure what either of those things has to do with a no method error
[02:38:20] sevenseacat: Deathfacej: so if you'd like to provide some clarification, that would be appreciated :)
[02:40:32] heydonovan1: has joined #RubyOnRails
[02:44:58] hfp: has joined #RubyOnRails
[02:45:19] roamingdog: has joined #RubyOnRails
[02:47:14] manfrin`laptop: has joined #RubyOnRails
[02:49:23] ur5us: has joined #RubyOnRails
[02:50:13] aghalarp: has joined #RubyOnRails
[02:50:44] stannard: has joined #RubyOnRails
[02:52:03] Cache_Money: has joined #RubyOnRails
[02:54:35] quazimodo: has joined #RubyOnRails
[02:55:14] Sigma00: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[03:03:54] petor: has joined #RubyOnRails
[03:06:12] baweaver: has joined #RubyOnRails
[03:06:18] Gkj8899: has joined #RubyOnRails
[03:09:18] berserk_ren: has joined #RubyOnRails
[03:11:52] hfp: has joined #RubyOnRails
[03:12:24] kinduff: has joined #RubyOnRails
[03:12:47] pwnd_nsfw: Maybe someday sevenseacat
[03:13:19] braincrash: has joined #RubyOnRails
[03:16:46] pawnbox: has joined #RubyOnRails
[03:19:36] quazimodo: has joined #RubyOnRails
[03:20:11] The_Phoenix: has joined #RubyOnRails
[03:21:09] smathy: has joined #RubyOnRails
[03:21:21] The_Phoenix: has joined #RubyOnRails
[03:25:28] VeryBewitching: Deathfacej: Do you mean the step where you remove (or comment out) get 'welcome/index' and add root 'welcome#index' ?
[03:25:37] Sawbones: has joined #RubyOnRails
[03:26:05] roamingdog: has joined #RubyOnRails
[03:26:10] VeryBewitching: Deathfacej: http://guides.rubyonrails.org/getting_started.html#setting-the-application-home-page ?
[03:27:25] roamingdog: has joined #RubyOnRails
[03:29:33] roamingd_: has joined #RubyOnRails
[03:32:20] roamingdog: has joined #RubyOnRails
[03:33:46] Sawbones: has joined #RubyOnRails
[03:33:55] jbcden: has joined #RubyOnRails
[03:34:01] smoitra: has joined #RubyOnRails
[03:35:03] brycesenz: has joined #RubyOnRails
[03:37:52] brycesenz: Is anyone aware of a service that lets you simply store secure data and retrieve it via a token? It seems like it'd be really simple to find, yet I can't.
[03:39:06] adre: has joined #RubyOnRails
[03:41:23] crystal77: has joined #RubyOnRails
[03:42:37] The_Phoenix1: has joined #RubyOnRails
[03:44:38] fedexo: has joined #RubyOnRails
[03:46:06] codesoda: has joined #RubyOnRails
[03:46:22] Cohedrin: has joined #RubyOnRails
[03:46:46] silentpost: has joined #RubyOnRails
[03:47:15] Ropeney: brycesenz, would be super easy to implement if their isn't.
[03:47:20] Trynemjoel: has joined #RubyOnRails
[03:47:52] brycesenz: Ropeney - I guess, but I'm looking for a third party solution that can focus more on the security than I will be able to if I roll my own.
[03:53:48] brianpWins: has joined #RubyOnRails
[03:55:33] Trynemjoel: has joined #RubyOnRails
[03:57:21] pawnbox: has joined #RubyOnRails
[03:59:24] alexhartley: has joined #RubyOnRails
[04:01:19] pawnbox: has joined #RubyOnRails
[04:01:44] wethu: has joined #RubyOnRails
[04:01:55] Trynemjoel: has joined #RubyOnRails
[04:02:55] kinduff: brycesenz - auth service api?
[04:03:26] blufire42: has left #RubyOnRails: ()
[04:07:01] RegulationD: has joined #RubyOnRails
[04:07:24] pawnbox: has joined #RubyOnRails
[04:07:36] baweaver: has joined #RubyOnRails
[04:08:41] tjbiddle: has joined #RubyOnRails
[04:11:24] Sawbones: has joined #RubyOnRails
[04:11:25] Trynemjoel: has joined #RubyOnRails
[04:15:19] petor: has joined #RubyOnRails
[04:18:34] bphogan: has joined #RubyOnRails
[04:19:29] roamingdog: has joined #RubyOnRails
[04:21:26] smoitra: has joined #RubyOnRails
[04:27:57] Sawbones: has joined #RubyOnRails
[04:28:14] codesoda: has left #RubyOnRails: ("Leaving...")
[04:31:26] bphogan: has joined #RubyOnRails
[04:32:28] tjbiddle: has joined #RubyOnRails
[04:33:43] djbkd: has joined #RubyOnRails
[04:34:24] quazimodo: has joined #RubyOnRails
[04:35:43] DZj091231kld: has joined #RubyOnRails
[04:38:34] JesseH: has joined #RubyOnRails
[04:38:53] JesseH: has joined #RubyOnRails
[04:41:11] bphogan: has joined #RubyOnRails
[04:41:17] rvanlieshout: has joined #RubyOnRails
[04:42:18] bronson: has joined #RubyOnRails
[04:44:35] pyemkey: has joined #RubyOnRails
[04:44:59] yfeldblum: has joined #RubyOnRails
[04:45:11] quazimodo: has joined #RubyOnRails
[04:45:39] matt_d: hi rvanlieshout
[04:46:22] sevenseacat: has joined #RubyOnRails
[04:47:16] yfeldblum: has joined #RubyOnRails
[04:48:06] drusepth: has joined #RubyOnRails
[04:49:19] matt_d: hi drusepth
[04:49:57] matt_d: drusepth: so, what is your activerecord question?
[04:50:31] AntiSpamMeta: has joined #RubyOnRails
[04:50:58] lxsameer: has joined #RubyOnRails
[04:51:17] bphogan: has joined #RubyOnRails
[04:51:20] zacts: has joined #RubyOnRails
[04:51:49] bronson: has joined #RubyOnRails
[04:51:57] quazimodo: has joined #RubyOnRails
[04:52:01] yfeldblum: has joined #RubyOnRails
[04:53:13] zacts: is the Michael Hartl Ruby on Rails Tutorial recommended at all here? I don't see it in the /topic Guides: section...
[04:53:37] matt_d: zacts: never heard of it
[04:53:38] zacts: (I'm just curious if it's even worth skimming)
[04:53:44] zacts: ok, probably not then
[04:53:58] matt_d: doesn't mean its not any good though
[04:53:59] drusepth: basically, I have a Person class that I want users to be able to add 0+ objects to, for example a Person class with a has_many :siblings that actually points to other Persons (instead of some Sibling class), is that something I need to use self referential associations for, or is there some other/better way to handle it?
[04:54:30] zacts: matt_d: true, but I think I'll just stick with the /topic guides
[04:54:30] jenrzzz: has joined #RubyOnRails
[04:54:30] jenrzzz: has joined #RubyOnRails
[04:56:33] arup_r: has joined #RubyOnRails
[04:58:08] drusepth: (for example right now I just store an ID in a "siblings" text field that I know goes to Persons, but I'd like it to actually be an association to 0 or more other Persons)
[04:58:27] petor: has joined #RubyOnRails
[04:58:47] bphogan: has joined #RubyOnRails
[05:00:06] drusepth_: has joined #RubyOnRails
[05:02:29] bphogan: has joined #RubyOnRails
[05:03:02] PedramT: has joined #RubyOnRails
[05:04:47] matt_d: zacts: in my opinion, I think defining the relationship though a another model is better, perhaps a Relationship model?
[05:05:28] matt_d: zacts: within that model you can have: belongs_to :person and belongs_to :sibling
[05:05:40] matt_d: zacts: i'm not saying thats the correct way, just one way.
[05:05:59] Devalo: has joined #RubyOnRails
[05:06:53] drusepth_: I think I might've missed zacts' response due to timeout, sorry
[05:07:04] roamingdog: has joined #RubyOnRails
[05:07:29] TheNet: has joined #RubyOnRails
[05:07:36] drusepth_: matt_d: the only thing I think I need to keep in mind is that some relationships work both ways (e.g. siblings), but some are one-way (e.g. children)
[05:07:41] matt_d: i'm sorry, that was meant for you drusepth_
[05:07:54] drusepth_: so I could see a Relationship model handling that logic, though I can't picture how gracefully yet
[05:08:14] TheNet: has joined #RubyOnRails
[05:08:22] matt_d: drusepth_: talking to several people at once, while sleepy. i can confuse myself quite easy this way :P
[05:08:33] drusepth_: not a problem at all, I appreciate the thoughts :))
[05:08:40] lemur: has joined #RubyOnRails
[05:09:38] drusepth_: I assume I could just use nested attributes if I wanted users to be able to build those relationships from a form and add Persons to them manually
[05:09:53] TheNet: has joined #RubyOnRails
[05:10:59] matt_d: drusepth_: i guess this is why it's hard to articulate opinions; what is the abstract of your data model? One Peron model that can have siblings, children, cousins, aunts, uncles ?
[05:11:23] matt_d: *hard to articulate without all the info :P man, i'm tired ...
[05:12:14] drusepth_: no worries :)
[05:12:40] drusepth_: as of right now i'm just storing a single piece of text (name) in each field on my Character (Person) model: https://github.com/indentlabs/Indent/blob/master/db/schema.rb#L50
[05:13:10] drusepth_: and in the controller/view I'm looking at all other models that fit and have that name, and if I find one I replace the text with a link to it
[05:13:46] drusepth_: is the basic functionality I'm trying to improve on, since it has problems if someone changes the other Character's name after adding it, or misspells it, or wants to add multiple characters to a single field, etc
[05:14:04] drusepth_: so I figured a true relation would solve a lot of that :)
[05:15:50] drusepth_: UI example for a bit more concrete example, all the dropdown does is list all Characters and inserts the clicked option's text into the text field: http://i.imgur.com/z8uDVTs.png
[05:17:02] matt_d: drusepth_: oh, so siblings are other characters (records) within the game?
[05:17:04] drusepth_: and on the Character#show page, it looks up Characters with that name, finds one, so it links to it: http://i.imgur.com/Fj0LcRm.png
[05:17:18] drusepth_: matt_d: yep :)
[05:17:35] sleungcy: has joined #RubyOnRails
[05:17:50] User458764: has joined #RubyOnRails
[05:19:13] matt_d: drusepth_: i see. you can use a has_and_belongs_to_many association
[05:19:22] futilegames: has joined #RubyOnRails
[05:20:00] drusepth_: matt_d: can I name it so I can do Character.find(x).siblings ?
[05:20:17] drusepth_: or is that too much to ask :P
[05:20:20] sp1rs: has joined #RubyOnRails
[05:20:36] matt_d: drusepth_: yes, thats how it would work.
[05:21:41] tildes: has joined #RubyOnRails
[05:25:46] arup_r: I am trying to test a serialize attribute, and it is failing https://gist.github.com/aruprakshit/b838f5db90aaaec22f46cf2f356572fb. But if I look here https://github.com/thoughtbot/shoulda-matchers/blob/master/lib/shoulda/matchers/active_record/serialize_matcher.rb, seems it is valid way to write. But why then my test is failing?
[05:26:50] matt_d: drusepth_: if you need some help, i can post something to your gist in a minute.
[05:27:26] drusepth_: matt_d: any help is of course helpful, I'm reading through the awesome answer at http://stackoverflow.com/questions/2168442/many-to-many-relationship-with-the-same-model-in-rails now that I think you've got me on the right track
[05:32:13] matt_d: drusepth_: cool.
[05:36:03] quazimodo: has joined #RubyOnRails
[05:36:21] yfeldblum: has joined #RubyOnRails
[05:37:05] yfeldblum: has joined #RubyOnRails
[05:38:06] manfrin`laptop: has joined #RubyOnRails
[05:38:49] arup_r: any idea?
[05:39:06] matt_d: arup_r: just getting to your question, hold one second.
[05:39:18] arup_r: no problem..
[05:40:34] arup_r: I see the doc said use `as:` for custom classes, but then how would I test for builtin class.. because I have serialize :action_attributes, JSON in my model.
[05:42:46] drusepth: has joined #RubyOnRails
[05:43:10] lxsameer: has joined #RubyOnRails
[05:44:43] AimlessRAven: has joined #RubyOnRails
[05:46:39] baweaver: has joined #RubyOnRails
[05:46:40] hinbody: has joined #RubyOnRails
[05:48:18] User458764: has joined #RubyOnRails
[05:48:46] matt_d: arup_r: ah, you have a shoulda-matcher question
[05:49:07] matt_d: arup_r: yeah, as is for a custom serializer does your test pass without as ?
[05:49:37] arup_r: it seems they removed the support of `as` with built in class. That's why this old tests are failing. Previously they do
[05:49:48] arup_r: yes it pass without as
[05:50:19] jenrzzz: has joined #RubyOnRails
[05:51:15] matt_d: arup_r: and you're right the documentation section of the code doesn't address otherwise. but looking at the code, SerializeMatcher does ensure the attribute is serialized.
[05:52:43] matt_d: but, just not checking the type, which is what you're interested in
[05:53:22] arup_r: Yes, that's what i wanted to check
[05:53:34] kareeole_: has joined #RubyOnRails
[05:53:35] darkxploit: has joined #RubyOnRails
[05:53:48] arup_r: May be they have some reasoning to remove the support. But it is hard to find now that Change.log
[05:54:52] arup_r: I'm fixing some tests which are broken of an old project. I am sure the developer wrote the test with `as:` option, because that time it was supported. But later it was removed.
[05:55:21] sp1rs: has joined #RubyOnRails
[05:55:42] kareeole_: I am developing a Rails app that will run dozens of system commands, like (the simplest one) change the hostname of the system. I am thinking about including the whole "system commands execution" logic inside a dedicated class or a set of classes and I have never again used Engines or Plugins in the past - just rails services, so what do you think is more appropriate in this case?
[05:56:33] alex1a: has joined #RubyOnRails
[05:56:46] kareeoleez: Can someone suggest something ? I guess I can use everything, I am just asking as I am reading Engines in parallel for the first time.
[05:57:02] matt_d: arup_r: yup, i hate that. my new m.o. is to shed as many dependencies as i can (like shoulda). its been more work here and there, but has been fun in its own fit :)
[05:58:41] arup_r: I am assigned to fix 400+ failing tests :(
[05:58:54] arup_r: but yeah, enjoying it too..
[06:00:20] matt_d: kareeoleez: think of an engine as a "mini application" that provides some type of functionality to your application. running system commands might be outisde the scope of an engine. keeping the system command functions within a module or class might be the best bet. but then again, i don't know what the abstract of your application is.
[06:00:22] arup_r: I will work on a brand new project, whose architecture my project lead is making... and he is so busy it is taking time.. So I asked to give me some food till it gets ready. Then he laughed at me and gave some test fixes and upgrade..
[06:00:49] arup_r: and told "Have fun!"
[06:00:54] matt_d: kareeoleez: an activejob might be a better bet, more info is needed perhaps to give you a better consultation.
[06:01:16] matt_d: arup_r: i feel for ya! 400+!!!
[06:02:11] User458764: has joined #RubyOnRails
[06:02:40] tildes: has joined #RubyOnRails
[06:03:10] kareeoleez: matt_d: I will include everything is necessary to setup a system in an o/s level, like hostname, network interfaces, locale, dns etc.
[06:03:40] matt_d: arup_r: i hated that crap. i left the industry becuase of that years and years ago to get into something else. well, i guess i'm still in it part-time working on jobs -- on my own time, my terms :)
[06:04:46] arup_r: nice nice!! :) we should be happy end of the day!.. I am just completing 5 years in this industry! :)
[06:05:20] kareeoleez: has joined #RubyOnRails
[06:05:37] kareeoleez: matt_d: sorry I disconnected
[06:05:42] kareeoleez: matt_d: I am reading several articles like "engines vs plugins", service oriented architecture etc. and what I am saying can be done with any rails technology
[06:06:21] matt_d: kareeoleez: and thats all you want your rails app to do, is setup a system by executing those commands?
[06:06:33] matt_d: arup_r: man, i feel old now :) hehe
[06:06:52] kareeoleez: matt_d: so I'd like it to be separated by the Rails mvc, meaning I don't want the logic to mess with models, views, controllers
[06:06:57] kareeoleez: matt_d: true
[06:07:07] arup_r: I'm getting old too ,, don't worry. :p
[06:07:21] matt_d: kareeoleez: why use rails at all then?
[06:07:35] kareeoleez: matt_d: and "transaction" logic = execute command, test is completed successfully, done
[06:07:36] matt_d: kareeoleez: you can juse use ruby
[06:07:45] matt_d: kareeoleez: or better yet, Chef :)
[06:07:50] kareeoleez: matt_d: by web interface
[06:07:58] matt_d: kareeoleez: oh, okay, i see.
[06:08:08] kareeoleez: matt_d: I am ok with Rails, it's perfect for this
[06:08:33] kareeoleez: matt_d: before I have been using "Services", something like including classes in /lib
[06:08:37] matt_d: kareeoleez: no, i get it now. i actually love to see rails being used for non conventional use cases.
[06:09:11] kareeoleez: matt_d: do you think engines is appropriate for that ?
[06:09:32] kareeoleez: matt_d: I don't get the difference between Engines/Plugins but I see they're similar
[06:10:31] matt_d: arup_r: cool. i left the software company i was working for at the time in 2002 to go into law. but i never stopped programming, so with my contacts i still make some $ on the side doing something i love to do.
[06:11:01] matt_d: kareeoleez: no, i don't. an engine is just another rails app within a rails app
[06:11:03] kareeoleez: matt_d: creating a gemified component is not necessary for sharing it, but I would like to completely separate the web application with the system manipulation methods
[06:11:29] kareeoleez: matt_d: a ruby gem then ?
[06:12:50] matt_d: kareeoleez: think of a gem as a software lib, but a gem could also contain an engine
[06:14:57] kareeoleez: matt_d: so engines is out
[06:15:16] kareeoleez: matt_d: maybe creating a gem is all I need
[06:15:25] xall: has joined #RubyOnRails
[06:15:25] tjbiddle: has joined #RubyOnRails
[06:15:29] matt_d: kareeoleez: are you creating an application only you will be using?
[06:16:34] kareeoleez: has joined #RubyOnRails
[06:17:14] matt_d: kareeoleez: i just saw your message about wanting to seperate the web app with the system manipulation methods; yes creating gems would make this much easier to accomplish this.
[06:17:52] kareeoleez: matt_d: thank you
[06:18:08] kareeoleez: matt_d: this is something similar https://github.com/nosolosoftware/runnable
[06:18:16] kareeoleez: I think I am heading for this direction
[06:18:51] Dbugger: has joined #RubyOnRails
[06:19:06] matt_d: kareeoleez: have you checked out chef (chef-solo)? might help you from doing more work and keep your concerns seperated between your web app and system code
[06:19:22] kareeoleez: matt_d: of course
[06:19:41] kareeoleez: matt_d: but this is a hell of a tool, too heavy and does 100x of what I want to accomplish
[06:19:55] yfeldblum: has joined #RubyOnRails
[06:19:56] Dbugger: Hey fellas. I just joined a long-running project, and I realized that the helper "t" for I18n is not working. I have to type everytime "I18n.t". I was wondering if someone could give me tips, how to bring it back to life...
[06:20:01] kareeoleez: matt_d: I am good with running commands
[06:20:17] matt_d: kareeoleez: understood :)
[06:20:23] kareeoleez: matt_d: only thing I need is to keep it separated and also embed transaction logic
[06:20:33] kareeoleez: matt_d: as we do for sql queries
[06:20:53] kareeoleez: matt_d: so the command execution is critical
[06:21:07] kareeoleez: matt_d: maybe it is copying a user to the sudoers
[06:22:17] matt_d: dbugger: are you attempting #t outside of views?
[06:22:36] Dbugger: matt_d, No. I am in a view.
[06:22:51] matt_d: dbugger: which rails version?
[06:23:05] emachnic: has joined #RubyOnRails
[06:23:26] Dbugger: rails 4.2.1
[06:24:15] Radar: dbugger: What flavour of view?
[06:24:22] Radar: And how is the view being rendered?
[06:24:57] arup_r: has joined #RubyOnRails
[06:26:00] Dbugger: Radar, what do you mean with "flavour"?
[06:26:05] arBmind: has joined #RubyOnRails
[06:26:11] Dbugger: Im not even sure how to answer those question...
[06:26:22] kareeoleez: matt_d: do you know If I can use a "local" gem as a rubygem ? I mean, this project is a bit private and my manager won't want to upload to rubygems. Can I add it to Gemfile and process it with a local or private link ?
[06:26:37] Radar: dbugger: Well, is it an ERB view? A haml view? Is it being rendered by a controller?
[06:26:38] kareeoleez: matt_d: I guess our private gitlab
[06:26:44] matt_d: dbugger: erb, haml, etc
[06:26:48] Radar: dbugger: Can you show us the logs of the request that this view is rendering?]
[06:26:54] Radar: is rendered by*
[06:27:00] Dbugger: Radar, it is an ERB
[06:27:03] matt_d: kareeoleez: yes, of course you can.
[06:27:10] dionysus69: has joined #RubyOnRails
[06:27:18] Dbugger: Radar, Yes, it is being rendered by a controller
[06:27:44] Dbugger: Radar, the logs are monstrous. I cant even find myself between them. My team logs way too much.
[06:28:03] Radar: dbugger: Is it happening locally on your own server?
[06:28:08] Radar: i.e. on your own machine?
[06:28:13] bronson: has joined #RubyOnRails
[06:28:41] kareeoleez: has joined #RubyOnRails
[06:28:42] matt_d: kaspergrubbe: in your gemfile: gem "deployment_commands", path: "/home/matt/private_gems/deployment_commands"
[06:30:02] kareeoleez: matt_d: thanks!
[06:30:24] Dbugger: Radar, local
[06:31:02] Radar: dbugger: Right, so log/development.log shows what when you make the request?
[06:31:29] Dbugger: Radar, it shows the queries made to the server (quite a few)
[06:31:36] Radar: dbugger: !gist them please
[06:31:36] helpa: dbugger: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[06:32:18] Dbugger: Ok. im gonna leave out the SQL Queries
[06:32:24] Radar: That's fine
[06:32:31] Radar: What I'm interested in is the Rendered ... parts
[06:32:32] artto: has joined #RubyOnRails
[06:33:12] scepticulous: has joined #RubyOnRails
[06:33:12] Dbugger: Radar, here: https://gist.github.com/enriquemorenotent/a19e8fc0d747b0b0362daa3686159b4b
[06:33:20] rohit: has joined #RubyOnRails
[06:33:30] Radar: So by the looks of that it's a regular controller
[06:33:36] Radar: But I've seen computers lie before
[06:33:38] p1k: has joined #RubyOnRails
[06:33:50] Radar: dbugger: in Rails console: run "Frontend::Desktop::BasketController.ancestors" for me please.
[06:34:02] pawnbox: has joined #RubyOnRails
[06:34:08] Radar: This is the action where <%= t ... %> doesn't work in one of the views, yeah?
[06:34:27] castlelore: has joined #RubyOnRails
[06:35:02] pLaToOn: has joined #RubyOnRails
[06:35:29] Dbugger: Radar, https://gist.github.com/enriquemorenotent/d72b3601fdfc0d50663dd9569b18512d
[06:37:23] Radar: dbugger: Seems fine. I don't know why it's not working
[06:38:19] Dbugger: Me neither
[06:38:28] sevenseacat: there's no ApplicationController in that list.
[06:38:40] Radar: Does there need to be?
[06:38:47] sevenseacat: for a lot of things to work, yes
[06:39:20] Radar: Not for this though
[06:39:30] Radar: ActionView::helpers::TranslationHelper is where that `t` method is defined.
[06:39:41] Dbugger: It was renamed to BaseController
[06:39:43] castlelore: has joined #RubyOnRails
[06:40:06] sevenseacat: Radar: and where is that helper included
[06:40:19] Radar: Well, that list is the _controller_
[06:40:23] Radar: ancestors list
[06:40:38] Radar: it's included into ActionView::Helpers
[06:41:06] Radar: And I don't know where that's included into the views
[06:41:14] tildes: has joined #RubyOnRails
[06:41:18] Radar: Oh looks it's the top of ActionView::Base.
[06:41:58] Radar: https://github.com/rails/rails/blob/v4.2.6/actionview/lib/action_view/base.rb#L131-L132
[06:42:07] Radar: It'd be the same in 4.2.1.
[06:42:07] Dbugger: Im kinda lost in all this...
[06:42:13] Radar: dbugger: Me too :)
[06:42:34] Radar: dbugger: Can you show me what <%= t('.some_key') %> does in your view?
[06:42:42] Radar: I think we need to start at the beginning of this problem again.
[06:43:04] sp1rs: has joined #RubyOnRails
[06:43:21] kareeoleez: has joined #RubyOnRails
[06:43:21] Dbugger: Radar, sure
[06:43:26] Dbugger: let me try
[06:43:32] sevenseacat: yeah the alias is defined in AbstractController::Translation, which is in that ancestor list.
[06:43:54] Dbugger: t('.basket.your_auto') shows me "Your Auto"
[06:43:54] sevenseacat: but the ActionView ones arent.
[06:43:58] Radar: sevenseacat: is that the one for the view or the one for the controller? I think AbstractController:Translation is for controllers.
[06:44:03] sevenseacat: yeah seems so
[06:44:08] Radar: sevenseacat: AV aren't in that list because it's a controller
[06:44:12] Dbugger: while I18n.t('.basket.your_auto') shows me "No translation found"
[06:44:25] Radar: dbugger: Soooo what's the issue?
[06:44:25] sevenseacat: Radar: a lot of AV stuff is in that list
[06:44:42] sevenseacat: thats different than the original definition of the problem
[06:44:46] Radar: sevenseacat: Oh yeah it is. Sorry
[06:45:00] Dbugger: Radar, the issue is that I would like to be able to use the shortcut again- just "t", instead of "I18n.t"
[06:45:06] sevenseacat: "the helper "t" for I18n is not working. I have to type everytime "I18n.t"."
[06:45:14] Radar: dbugger: It looks like it is working for you.
[06:45:19] Radar: dbugger: There is likely a translation defined for your_auto
[06:45:20] sevenseacat: it looks like its working perfectly.
[06:45:54] bronson: has joined #RubyOnRails
[06:45:55] Dbugger: I want that, if I type "t('.randomcrap')", I get a "Translation not found"
[06:46:08] Dbugger: I can only get that with "I18n.t". I cant with simply "t"
[06:46:10] sevenseacat: I've never seen Rails do that. it doesnt do it by default.
[06:46:26] sevenseacat: I think your app has added something special to do that, and only hooked it up to the long form.
[06:46:27] Radar: dbugger: It wont show "translation not found" if a translation IS found
[06:46:31] Dbugger: Isn't "t" and "I18n.t" supposed to be the same?
[06:46:35] Radar: dbugger: No.
[06:46:49] Dbugger: ".randomcrap" is not an existing key
[06:47:03] Radar: dbugger: But "your_auto" is an existing key?
[06:47:03] Devalo: has joined #RubyOnRails
[06:47:07] Dbugger: what?? "t" and "I18n.t" is not the same??
[06:47:07] Radar: What happens if you use .randomcrap now?
[06:47:07] sevenseacat: I've never seen Rails print "translation not found"
[06:47:09] Radar: https://github.com/rails/rails/blob/v4.2.6/actionview/lib/action_view/helpers/translation_helper.rb#L38-L81
[06:47:13] Radar: dbugger: Use the source, luke.
[06:47:30] Dbugger: wait wait...
[06:47:39] Dbugger: Are you telling me that "translation not found" is the default behavior??
[06:47:47] sevenseacat: its not any behaviour.
[06:48:08] Dbugger: In that case.. .I had a wrong assumption
[06:48:10] konsolebox: has joined #RubyOnRails
[06:48:17] sevenseacat: colour me unsurprised.
[06:48:31] Dbugger: Yeah, well... sorry :P
[06:48:46] sevenseacat: should have known this conversation wouldnt go well when it started with 'hey fellas'
[06:49:31] Radar: aaand that topic is ending
[06:50:13] Dbugger: Ah, yes. I forgot. Fellas is gender-discriminating
[06:50:29] Dbugger: Sorry for that, not my mother-language, as you might have guessed
[06:50:42] sevenseacat: you keep apologizing for it
[06:50:45] sevenseacat: and then keep doing it
[06:50:54] Dbugger: Yeah, because it is NOT my mother language
[06:51:17] Dbugger: if you have EVER met a forgeiner, they keep making sometimes the same error over and over
[06:51:19] Pumukel: has joined #RubyOnRails
[06:52:13] Devalo: has joined #RubyOnRails
[06:53:37] Devalo: has joined #RubyOnRails
[06:54:55] jstransky: has joined #RubyOnRails
[06:55:56] xall: has joined #RubyOnRails
[06:56:22] Devalo: has joined #RubyOnRails
[06:57:22] djbkd: has joined #RubyOnRails
[06:57:32] SteenJobs: has joined #RubyOnRails
[07:00:04] Cohedrin: has joined #RubyOnRails
[07:00:08] pyemkey: has joined #RubyOnRails
[07:00:23] djellemah_: has joined #RubyOnRails
[07:05:00] Devalo: has joined #RubyOnRails
[07:05:35] comrad: has joined #RubyOnRails
[07:06:57] petor: has joined #RubyOnRails
[07:07:35] sandelius: has joined #RubyOnRails
[07:08:06] scepticulous: has joined #RubyOnRails
[07:09:20] pyemkey: has joined #RubyOnRails
[07:10:23] xcesariox: has joined #RubyOnRails
[07:10:33] pawnbox: has joined #RubyOnRails
[07:13:54] b0un7y: has joined #RubyOnRails
[07:14:00] chouhoulis: has joined #RubyOnRails
[07:15:13] marcdel: has joined #RubyOnRails
[07:15:21] quazimodo: has joined #RubyOnRails
[07:18:33] Spami: has joined #RubyOnRails
[07:19:42] alexhartley: has joined #RubyOnRails
[07:22:03] futilegames: has joined #RubyOnRails
[07:22:49] sp1rs: has joined #RubyOnRails
[07:26:36] tagaulap: has joined #RubyOnRails
[07:27:32] b0un7y: has joined #RubyOnRails
[07:33:18] AzaToth: has joined #RubyOnRails
[07:34:12] Macaveli: has joined #RubyOnRails
[07:36:55] Dbugger: Radar, My boss came in. I asked him directly, and it seems like they hacked the "t" helper, so that instead of the "translation missing", it shows the key itself as the presented text
[07:37:55] baweaver: dbugger: he'd mentioned he was heading out
[07:38:25] roshanavand: has joined #RubyOnRails
[07:38:37] xall: has joined #RubyOnRails
[07:38:41] roelof: has joined #RubyOnRails
[07:39:25] roelof: maybe a stupid beginners question but if I have a url like this : https://ticketee-wissel.c9users.io/projects/1 . How can I retrieve the 1 with param ?
[07:39:56] baweaver: params[:id]
[07:40:30] shibly: has joined #RubyOnRails
[07:41:03] shibly: Hi, i have a php background, is it a good move to go for rubyonrails from php?
[07:41:29] baweaver: for an established application, or for yourself?
[07:41:37] xall_: has joined #RubyOnRails
[07:42:01] shibly: For myself
[07:42:10] artto: has joined #RubyOnRails
[07:42:15] Dbugger: baweaver, what?
[07:42:17] baweaver: depends on what you want to do
[07:42:35] shibly: When do we need rubyonrails?
[07:42:35] baweaver: dbugger: Radar mentioned in another channel he was leaving for a bit
[07:42:51] baweaver: shibly: what are you wanting to do?
[07:43:13] Dbugger: baweaver, indeed. I forgot, thanks
[07:43:20] baweaver: Are you learning to learn, or do you have an application in mind?
[07:43:25] shibly: A blog or something where others can register and post,comment
[07:43:43] baweaver: then yes, Rails would work for that.
[07:43:49] shibly: NOTE: I know rubyonrails
[07:43:59] baweaver: I would encourage you to consider platforms that are already built for it
[07:44:25] baweaver: Avdi once mentioned in a blog post that he uses wordpress so he can just write without worrying about tweaking his backend all the time.
[07:44:43] baweaver: ah, there it is: http://devblog.avdi.org/2012/08/09/why-wordpress/
[07:44:51] pawnbox: has joined #RubyOnRails
[07:45:16] roelof: baweaver: why do I not get the div here : https://gist.github.com/rwobben/5c4f606b4eaa31da009c2bf5e34d0049 when the url is /projects/1 ?
[07:45:58] baweaver: Why are you using the params there in the view?
[07:46:14] baweaver: It would be easier to test if you use pry in the controller
[07:46:41] shibly: baweaver, Are you suggesting me to use wordpress instead of using rails?
[07:46:47] baweaver: also there's no content in that div, making it hard to see unless the CSS is making it more visible
[07:47:00] baweaver: shibly: is your goal to write tutorials and content?
[07:47:10] baweaver: shibly: or to build something in rails?
[07:47:18] roelof: baweaver: because I need a new div on every message
[07:47:20] baweaver: shibly: in the first case I would not use Rails
[07:47:39] roelof: baweaver: how can I use pry in the controller ?
[07:47:50] baweaver: roelof: one second, looking for something
[07:48:11] shibly: baweaver, When do we need to use rails then? When will you suggest to use rails?
[07:48:17] baweaver: roelof: http://pryrepl.org/screencasts.html
[07:48:29] shibly: Everyone can build a website with php.
[07:48:45] sevenseacat: not everyone. the people who don't know php can't.
[07:48:47] baweaver: shibly: in much the same circumstances as php
[07:49:01] baweaver: sevenseacat: yeah, that too :P
[07:49:31] baweaver: roelof: there's a Rails one down the page a bit.
[07:50:02] baweaver: Also look into Conrad Irwin's conference talk "Pry the Good Parts": https://www.youtube.com/watch?v=jDXsEzOHb2M
[07:50:41] shibly: So when do you suggest to use rails instead of php. (Every type of website can be built with php)
[07:50:55] adaedra: Rails too.
[07:51:00] baweaver: shibly: every type of website can be built with rails too
[07:51:03] adaedra: It's a rather subjective question, tbh.
[07:51:04] User458764: has joined #RubyOnRails
[07:51:06] baweaver: adaedra: I smell ninjas
[07:51:33] adaedra: There's no determined answer "you should do this in PHP" or "you should do this in Rails"
[07:51:36] adaedra: baweaver: ssssshhh
[07:51:51] baweaver: Anything you can do in PHP, you can effectively do something similar in Rails. Well, any turing complete language
[07:52:02] adaedra: personally, between the two I'd always go with the Rails answer, but that's me.
[07:52:11] darutoko: has joined #RubyOnRails
[07:52:19] baweaver: well it is the RubyOnRails channel, so we're notably biased on that point
[07:53:17] bruce_lee: has joined #RubyOnRails
[07:53:35] baweaver: Now as far as when not to use Rails, I find that to be when async tasks are needed. ActionCable supposedly fixes that, but I haven't had a chance to use it yet.
[07:53:49] Deathfacej: has joined #RubyOnRails
[07:53:54] matt_d: baweaver: same goes for Java, perl, lisp, The-Cs ..
[07:54:19] baweaver: matt_d: hence the "Well, any turing complete language"
[07:54:50] baweaver: Though I would not be incredibly fond of writing a website in Assembly
[07:55:10] matt_d: baweaver: that would be just punishment
[07:55:15] shibly: Did anyone write any website in assembly?
[07:55:18] adaedra: https://lh3.googleusercontent.com/-DYbWMtH301k/VD5CDjv9dQI/AAAAAAAAE1U/xXBMtug3cfY/w506-h662/webdev-assembly.png
[07:55:27] baweaver: shibly: it was more of a joke
[07:55:38] baweaver: ....don't make me lose faith in humanity adaedra
[07:55:53] baweaver: I already found IBM's JSONx today
[07:56:02] matt_d: shibly: really no need to get that low....
[07:57:04] baweaver: adaedra: http://azac.pl/cobol-on-wheelchair/ - that exists too (and should never be used)
[07:57:11] fox_mulder_cp: morning coffee's trash?^)
[07:58:02] adaedra: baweaver: ok, now how do I clean the vomit on my keyboard?
[07:58:13] baweaver: adaedra: you don't
[07:58:18] matt_d: Good ol' cobol, I remember you :)
[07:58:25] marcdel: has joined #RubyOnRails
[07:58:32] tildes: ACTION regrets opening the last link
[07:58:32] baweaver: you light it on fire while getting at least a lvl 15 cleric to cleanse the area and bless you
[07:58:44] baweaver: tildes: scroll down, it has a mascot too
[07:59:03] shibly: So to build a blog like website you would suggest wordpress, right(not rails)? Other type of websites can also be built with wordpress too.
[07:59:06] baweaver: matt_d: I had to learn COBOL and RPG both in college, local companies still use it
[07:59:23] baweaver: shibly: no, wordpress is a blogging engine for writing blogs
[07:59:38] baweaver: shibly: the point is to not reinvent something that's already been done fairly well
[07:59:42] matt_d: baweaver: yup, it's still alive and well.
[08:00:14] baweaver: It wasn't looking so hot there around 2000 ;)
[08:00:22] shibly: baweaver, But that's in php, not in ruby
[08:00:30] matt_d: shibly: RefineryCMS? I've not used it, but it looks like some good work.
[08:00:40] sevenseacat: I think the idea is, use the best tool for the job, no matter what language its in
[08:00:44] baweaver: shibly: the language does not matter
[08:00:46] Radar: shibly: Do you have to come in here and have this same discussion every week?
[08:00:48] baweaver: sevenseacat wins
[08:00:51] Radar: http://logs.ryanbigg.com/ruby?date=2016-04-21#5558205
[08:01:24] Radar: shibly: What is the point of this? I struggle to understand.
[08:01:25] fox_mulder_cp: shibly: wp - easy to use with any some centes shared hostings.
[08:01:32] sevenseacat: I've seen similar ilk quite a number of times.
[08:01:45] moep: has joined #RubyOnRails
[08:01:47] tildes: shibly: like previously stated, it depends on your goals. if you want to just publish content, you might want to focus on that. if you want to learn rails / have a sample rails app, you do rails
[08:01:50] matt_d: baweaver: yeah, I've not touched it since 2002 or so. you'll still find it on z/OS systems.
[08:02:17] baweaver: I try and forget when I last touched it
[08:02:17] xcesariox: has joined #RubyOnRails
[08:03:08] mark_66: has joined #RubyOnRails
[08:03:27] Radar: Ok, now seriously headed off for the night. Toodles.
[08:03:30] baweaver: I still remember when they were excited about freeform C specifications in RPG IV
[08:03:34] baweaver: Radar: suuuuuure
[08:03:38] bronson: has joined #RubyOnRails
[08:03:40] baweaver: see you in 5
[08:03:48] baweaver: have a good night
[08:04:00] fox_mulder_cp: Radar: good night
[08:04:05] baweaver: ACTION looks at clock
[08:04:15] baweaver: speaking of which, getting late here.
[08:04:29] fox_mulder_cp: baweaver: 11.04, mogning coffee n0w )
[08:04:37] adre: has joined #RubyOnRails
[08:04:44] baweaver: 1:04, coffee now would be a bad idea :)
[08:04:55] fox_mulder_cp: baweaver: what are u from?
[08:05:07] shibly: Radar, That log looks like that's #ruby channel, not #rubyonrails
[08:05:22] baweaver: Currently SF California
[08:05:42] fox_mulder_cp: baweaver: good night
[08:05:48] baweaver: but anyways, time to call it a night
[08:06:13] matt_d: baweaver: hey, we're neighbors!
[08:06:57] baweaver: remind me of that some time later, I tend to frequent coffee shops in SoMA
[08:07:57] matt_d: cool, nite. my daughter is sick, so who knows when I'll get to sleep. nite.
[08:08:43] shibly: has left #RubyOnRails: ("Leaving")
[08:08:52] RegulationD: has joined #RubyOnRails
[08:09:14] lxsameer: has joined #RubyOnRails
[08:09:14] lxsameer: has joined #RubyOnRails
[08:09:30] baweaver: good luck matt_d
[08:10:09] arup_r: has joined #RubyOnRails
[08:10:09] matt_d: thanks :P
[08:14:38] PedramT: has joined #RubyOnRails
[08:14:54] chouhoulis: has joined #RubyOnRails
[08:15:37] roamingdog: has joined #RubyOnRails
[08:16:59] snowy: has joined #RubyOnRails
[08:17:10] mikecmpbll: has joined #RubyOnRails
[08:18:24] gamer5: has joined #RubyOnRails
[08:21:58] workmad3: has joined #RubyOnRails
[08:27:03] roamingd_: has joined #RubyOnRails
[08:28:58] rohit: has joined #RubyOnRails
[08:29:25] marr: has joined #RubyOnRails
[08:30:50] bonswouar: has joined #RubyOnRails
[08:33:19] pydave6367: has joined #RubyOnRails
[08:34:25] Pupeno: has joined #RubyOnRails
[08:35:49] k13nox: has joined #RubyOnRails
[08:36:35] Pupeno: I'm trying to use RestClient and I'm doing this: RestClient.post "http://localhost:8081/accounts", {}.to_json, {content_type: :json, accept: :json}. It's raising this error: NoMethodError: undefined method `[]' for #<Set: {#<MIME::Type: application/json>}>. Does anybody see something obviously wrong here? The full backtrace looks like this: https://gist.github.com/pupeno/f68df5546ccfa944d89d37fd38004cd1
[08:36:55] lycaonian: has joined #RubyOnRails
[08:36:56] xall_: has joined #RubyOnRails
[08:37:30] skroon: is there a way to runder a web page on the backend to a png image? do I need a headless browser for this?
[08:37:34] darkxploit: has joined #RubyOnRails
[08:41:32] rvanlieshout: skroon: wkhtmltopimage
[08:42:13] rvanlieshout: Pupeno: the stack shows that it's in type_for_extension
[08:42:34] rvanlieshout: 1) what does the documentation tell you about that contenttype and accept parameter?)
[08:42:46] rvanlieshout: 2) look at the code of that method and see what it expects
[08:42:50] rvanlieshout: or tries to do
[08:43:59] arup_r: has joined #RubyOnRails
[08:44:34] skroon: rvanlieshout: thanks
[08:46:02] Pupeno: rvanlieshout: I copied those arguments from the documentation.
[08:46:22] rvanlieshout: of the same version?
[08:47:46] pawnbox: has joined #RubyOnRails
[08:49:22] Pupeno: Not sure. I was reading this: http://www.rubydoc.info/github/rest-client/rest-client
[08:49:24] pawnbox: has joined #RubyOnRails
[08:49:28] sp1rs: has joined #RubyOnRails
[08:49:46] Pupeno: There's a mention of something new in 2.0 and I'm running 1.x
[08:49:57] rvanlieshout: why aren't you using the latest version?
[08:52:10] Pupeno: 2.0 doesn't seem to be out yet, but there's a newer 1.x version (stripe just pulled an older one). Let me see if it makes a difference.
[08:52:28] rvanlieshout: then verify that you're using the right documentation
[08:53:17] Pupeno: Yeah, it made a difference. Now the error is different.
[08:53:27] Pupeno: Back to work. Thank you rvanlieshout.
[08:53:54] skislak: has joined #RubyOnRails
[08:54:30] DoubleMalt: has joined #RubyOnRails
[08:56:54] artto: has joined #RubyOnRails
[08:57:33] Megamos: has joined #RubyOnRails
[08:58:28] Weavel: has joined #RubyOnRails
[09:01:21] Megamos: has joined #RubyOnRails
[09:01:28] alexhart_: has joined #RubyOnRails
[09:01:38] stardiviner: has joined #RubyOnRails
[09:01:47] weckl: has joined #RubyOnRails
[09:02:13] artto: has joined #RubyOnRails
[09:03:54] pawnbox: has joined #RubyOnRails
[09:04:06] pydave6367: has joined #RubyOnRails
[09:04:33] bronson: has joined #RubyOnRails
[09:04:45] artto: has joined #RubyOnRails
[09:05:50] k13nox: has joined #RubyOnRails
[09:05:59] artto: has joined #RubyOnRails
[09:06:03] blackhuey: has joined #RubyOnRails
[09:09:45] jenrzzz: has joined #RubyOnRails
[09:11:26] futilegames: has joined #RubyOnRails
[09:11:35] test: has joined #RubyOnRails
[09:13:52] PedramT: has joined #RubyOnRails
[09:16:05] chouhoulis: has joined #RubyOnRails
[09:16:50] mmac: has joined #RubyOnRails
[09:16:53] xcesariox: has joined #RubyOnRails
[09:17:35] petor: has joined #RubyOnRails
[09:17:48] herbst: has joined #RubyOnRails
[09:18:40] herbst: I need help installing pg :/ Whatever i do (mostly iterating between these tips: https://bitbucket.org/ged/ruby-pg/src/e61a06f1f5ed1006563b731ee3dc1e10f426d6cf/README-OS_X.rdoc?fileviewer=file-view-default) all i get is http://pastebin.com/73pp5PPt
[09:19:31] sevenseacat: it looks like you're missing the OSX development tools, ie. xcode
[09:20:32] yfeldblum: has joined #RubyOnRails
[09:20:54] herbst: oh wow i hate myself right now. Big thanks sevenseacat. I tried everything but i did not expect that i have to start xcode to actually agree (again) to their shitty terms ...
[09:21:02] sevenseacat: ahhhh yeah that one
[09:21:03] herbst: fucking updates. really
[09:21:09] xall: has joined #RubyOnRails
[09:28:23] syndikate: has joined #RubyOnRails
[09:28:28] pydave6367: has joined #RubyOnRails
[09:30:09] Pupeno: What's the appropriate place to put third party API endpoints, secrets.yml?
[09:30:18] roamingdog: has joined #RubyOnRails
[09:34:24] asymmetric: has joined #RubyOnRails
[09:34:51] asymmetric: hey all - i am running a very large migration, and it seems that running it within a transaction makes much, much faster
[09:34:56] Pupeno: has joined #RubyOnRails
[09:35:04] asymmetric: this doesn't make a lot of sense to me though
[09:35:22] sevenseacat: it makes perfect sense - only one database commit
[09:35:42] rvanlieshout: is it a data of schema migration?
[09:36:00] asymmetric: so the transaction is not written to the db until the final commit?
[09:36:04] asymmetric: is it kept in memory until then?
[09:36:14] rvanlieshout: but it's isolated
[09:36:32] alexhartley: has joined #RubyOnRails
[09:36:43] asymmetric: so it's still written to the db - why would it be faster then?
[09:36:59] rvanlieshout: because it's isolated
[09:37:16] asymmetric: hmm.. what does that mean?
[09:37:20] asymmetric: got any links? :)
[09:37:39] rvanlieshout: https://en.wikipedia.org/wiki/Database_transaction
[09:38:28] sevenseacat: I don't know enough about db internals to know how it all works <_<
[09:38:40] roamingdog: has joined #RubyOnRails
[09:39:09] rvanlieshout: the db engine has to be aware of others messing around with the data or scheme if you don't run it in a transaction
[09:39:54] rvanlieshout: so i can imagine its easier if you run it isolated
[09:40:00] workmad3: rvanlieshout: depends on the db engine whether it's aware, or if it just locks stuff
[09:40:26] workmad3: (mysql tends to do row/table locks for 'transactions', iirc)
[09:40:41] rvanlieshout: mysql also doesn't support schema changes in transactions
[09:40:51] asymmetric: this is mysql 5.5 btw
[09:41:57] rvanlieshout: hence the question about data or schema migration :)
[09:42:54] Anubix: has joined #RubyOnRails
[09:44:06] workmad3: asymmetric: http://dev.mysql.com/doc/refman/5.7/en/innodb-transaction-model.html will give a bit more info
[09:44:26] rvanlieshout: change 5.7 to 5.5 in that link
[09:44:34] rvanlieshout: if it makes any difference
[09:44:50] asymmetric: rvanlieshout: yep, always good idea :)
[09:44:55] asymmetric: workmad3: thanks a lot for the link!
[09:45:37] workmad3: asymmetric: pay attention to the fact that without an explicit transaction, the default autocommit behaviour means every statement is treated as a new transaction with an implicit 'commit' too
[09:46:12] workmad3: and yeah... there's some differences between 5.5 and 5.7 there, sorry for wrong link :)
[09:47:25] asymmetric: workmad3: how does that affect my question?
[09:47:42] rvanlieshout: your question was why would a transaction make any difference?
[09:47:43] asymmetric: it's still not entirely clear to me how isolation affects performance here, as there are no other users accessing the db
[09:47:48] asymmetric: rvanlieshout: yes
[09:48:06] rvanlieshout: quote of first paragraph of that link: To implement a large-scale, busy, or highly reliable database application, to port substantial code from a different database system, or to tune MySQL performance, you must understand the notions of transactions and locking as they relate to the InnoDB storage engine.
[09:48:15] rvanlieshout: 'or to tune MySQL performance'
[09:48:31] rvanlieshout: 'you must understand the notions of transactions'
[09:49:19] universa1: simple thought example: change one record, check if others have changed something, change next record, check, change, check vs change all records, check if it doesn't conflict ;)
[09:50:44] asymmetric: universa1: as far as i understood, there shouldn't be any conflicts on innodb since it locks rows
[09:51:08] mdw: has joined #RubyOnRails
[09:51:10] asymmetric: rvanlieshout: thanks for the quotes, although that doesn't bring me any closer to a better understanding :)
[09:51:59] rvanlieshout: you also didn't read it
[09:52:40] arBmind: has joined #RubyOnRails
[09:53:16] workmad3: asymmetric: just because you're aware that 'nothing has happened' doesn't mean a) that nothing has or b) that the checks are skipped
[09:53:42] workmad3: asymmetric: especially as a transaction commit also does things like ensure data integrity constraints are preserved
[09:55:11] workmad3: asymmetric: basically, you're seeing the start/commit overhead of hundreds/thousands of transactions vs a single one
[09:55:14] webdestroya: has joined #RubyOnRails
[09:55:17] c355E3B: has joined #RubyOnRails
[09:55:44] asymmetric: workmad3: thank you, very clear explanation!
[09:57:38] xall_: has joined #RubyOnRails
[09:58:23] Anubix: Can you help me please, what mean ActionView::Template::Error (undefined method `[]' for nil:NilClass): for this line -> <%= check_nil_round(@weather['main']['temp']) %> ?
[09:59:15] rvanlieshout: Anubix: <%= debug @weather['main'] %>
[09:59:30] universa1: either @weither or @weither['main'] is nil
[09:59:30] emachnic: has joined #RubyOnRails
[09:59:36] universa1: *weather o0
[10:00:27] Anubix: This is why i have check_nil_round helper with this code http://pastie.org/private/wv02oyhnrymxzkjm7kq40g
[10:00:37] Anubix: if it is nul, then it just write nothing ''
[10:00:47] rvanlieshout: that method is called after the [][] is performed
[10:01:40] Anubix: well problem is that its from OpenWeather api and sometimes it sends null
[10:02:07] Anubix: so this is why i created helper -> if its null, then wrote nothing (and dont throw error), if its not, then just write it
[10:02:23] rvanlieshout: but then it's still created after
[10:02:27] rvanlieshout: pass the full @weather to your helper
[10:02:52] rvanlieshout: and use ((@weather || {})['main'] || {})['temp'], but then in a nice way
[10:03:03] rvanlieshout: or switch to ruby 2.3 and use @weather.dig(:main, :temp) (iirc)
[10:03:46] bronson: has joined #RubyOnRails
[10:03:50] Anubix: if i pass full @weather, then can be problem some values are ok (wind, temp_min ..) and some not
[10:05:54] antgel: has joined #RubyOnRails
[10:06:45] pawnbox: has joined #RubyOnRails
[10:07:26] renegadeandy: has joined #RubyOnRails
[10:09:01] Pupeno: has joined #RubyOnRails
[10:10:42] baweaver: has joined #RubyOnRails
[10:10:55] syath_: has joined #RubyOnRails
[10:12:34] Anubix: rvanlieshout: dig method is not support in ruby 2.2.3?
[10:12:43] Ergo: has joined #RubyOnRails
[10:13:27] rvanlieshout: nope. that's a new one in 2.3
[10:14:20] sandelius: has joined #RubyOnRails
[10:14:27] Anubix: If i pass full array @weather and heck if it nil, there can be just one value nil and all fails. There are many values and i use just 6 of them.
[10:14:37] BaNzounet: Is it possible to override the join of a has_many relation from WHERE user_id = $1 to WHERE user_id = $1 OR user_id IS NULL ?
[10:15:00] rvanlieshout: BaNzounet: iirc it is, just as an argument (or block) to the has_many call
[10:16:49] chouhoulis: has joined #RubyOnRails
[10:17:20] BaNzounet: rvanlieshout: I'll try that
[10:18:37] DaniG2k: has joined #RubyOnRails
[10:20:59] ur5us: has joined #RubyOnRails
[10:21:20] shibly: has joined #RubyOnRails
[10:21:33] shibly: has left #RubyOnRails: ("Leaving")
[10:22:19] xcesariox: has joined #RubyOnRails
[10:23:35] pawnbox: has joined #RubyOnRails
[10:24:00] artto: has joined #RubyOnRails
[10:24:58] BaNzounet: rvanlieshout: By adding a where a in block that I pass to the has_many, it Currently just and another where -> (WHERE "commission_plans"."user_id" = $1 AND (user_id = 8186 OR user_id IS NULL) [["user_id", 8186]]), it possible to remove all the previous where?
[10:27:50] Anubix: rvanlieshout: Can u please look on this? I repaired that, but it still doesnt work -> http://pastie.org/private/ldzytbsp0mkbrpkwawkaq
[10:28:22] sevenseacat: Anubix: if @weather['main'] is nil, how does that code help
[10:29:04] brazenbraden: has joined #RubyOnRails
[10:29:24] Anubix: sevenseacat: it should be nil then and wrote nothing
[10:29:37] sevenseacat: Anubix: then you're calling nil['temp']
[10:29:40] sevenseacat: which raises an error
[10:30:03] brazenbraden: im getting an error when trying to load my app. "Not a directory @ rb_sysopen - /app/tmp/data/meta_request/af98fd93-cf4b-455d-88a5-cbb798bb7623.json". I have run rake tmp:clear to get rid of old tmp files and restarted everything but alas, no cigar. what do i do?
[10:30:52] Anubix: sevenseacat: this is why i am checking also value != nil
[10:31:13] sevenseacat: Anubix: except the nil['temp'] is called before the contents of your method
[10:31:21] sevenseacat: the arguments to the method have to be evaluated before the content of it
[10:31:37] Anubix: sevenseacat: And how can i do that then?
[10:31:56] sevenseacat: Anubix: check if @weather['main'] is nil before calling ['temp']
[10:32:07] sevenseacat: you were given several ways to do that
[10:32:46] mikecmpb_: has joined #RubyOnRails
[10:33:26] mdw7: has joined #RubyOnRails
[10:33:35] Anubix: sevenseacat: If i check @weather main for nil, then is the same "is called before the contents of methos"
[10:34:08] sevenseacat: Anubix: we can't help you if you don't follow suggestions made
[10:34:14] mdw7: has joined #RubyOnRails
[10:34:21] Anubix: senveseacat: I am trying to understand that...
[10:34:50] BaNzounet: rvanlieshout: using http://apidock.com/rails/ActiveRecord/QueryMethods/unscope -> unscope(where: :user_id) removed the default where condition that I was trying to get ride of
[10:34:58] brazenbraden: tried clearing browser cache and also accessing via incognito mode, no diff
[10:35:54] lxsameer: has joined #RubyOnRails
[10:36:27] n008f4g_: has joined #RubyOnRails
[10:42:51] renegadeandy: has joined #RubyOnRails
[10:46:12] arup_r: has joined #RubyOnRails
[10:47:39] Anubix: sevenseacat: I changed it to http://pastie.org/private/yhgagvulix8cigle4aqnq again not working
[10:48:25] subsonik: has joined #RubyOnRails
[10:48:42] Anubix: sevenseat: First i call @weather if its nil, then check weather value and still same error
[10:50:13] pawnbox: has joined #RubyOnRails
[10:50:21] srinidhi: has joined #RubyOnRails
[10:51:11] pawnbox: has joined #RubyOnRails
[10:51:19] weckl: has joined #RubyOnRails
[10:55:32] asymmetric: has joined #RubyOnRails
[10:57:59] siaW: has joined #RubyOnRails
[10:59:25] GodFather: has joined #RubyOnRails
[10:59:35] ferr: has joined #RubyOnRails
[11:00:52] roamingdog: has joined #RubyOnRails
[11:01:28] sp1rs: has joined #RubyOnRails
[11:05:01] meoblast001: has joined #RubyOnRails
[11:10:29] artto: has joined #RubyOnRails
[11:10:31] rodfersou: has joined #RubyOnRails
[11:11:10] brazenbraden: fooey still no luck
[11:11:58] baweaver: has joined #RubyOnRails
[11:12:54] adlerdias: has joined #RubyOnRails
[11:16:03] moeabdol: has joined #RubyOnRails
[11:19:06] petor: has joined #RubyOnRails
[11:19:30] chouhoulis: has joined #RubyOnRails
[11:19:37] adlerdias: has joined #RubyOnRails
[11:21:59] Megamos: has joined #RubyOnRails
[11:23:15] ArTiSTiX: has joined #RubyOnRails
[11:24:39] qejk: has joined #RubyOnRails
[11:26:57] ferr: https://gist.github.com/Fercell/e01194930378abce9d76f90fe0c5d5e3 how would I pass params to this? "data-params" does not work
[11:27:29] xcesariox: sevenseacat : need your help can't bundle install, issue with capybara https://gist.github.com/shaunstanislaus/28e5329bda295b4df96327b0aa219489
[11:28:01] k13nox_: has joined #RubyOnRails
[11:28:16] sevenseacat: xcesariox: !rule12
[11:28:16] helpa: xcesariox: Do not PM members of the channel without first asking if that is OK.
[11:28:43] xcesariox: sevenseacat : sorry, it was the first time i PM you .
[11:28:48] sevenseacat: xcesariox: don't use crazy old versions of capybara-webkit.
[11:29:02] xcesariox: sevenseacat : lol then what version to use, recommend?
[11:29:12] sevenseacat: ah, i misread, sorry
[11:29:18] sevenseacat: i thought it was 0.11.0 not 1.11.0
[11:29:53] antgel: has joined #RubyOnRails
[11:29:57] pwnd_nsfw: "You'll need to download the Qt libraries to build and install the gem."
[11:30:00] pwnd_nsfw: them docs dough
[11:30:13] pwnd_nsfw: xcesariox, https://github.com/thoughtbot/capybara-webkit
[11:30:23] pwnd_nsfw: Under "Qt Dependencies"
[11:30:30] pwnd_nsfw: or well, dependency
[11:31:09] xcesariox: pwnd_nsfw : eh i have capybara-webkit in my gem, isn't it the same ?
[11:31:17] rvanlieshout: xcesariox: no
[11:31:27] rvanlieshout: that gem has dependencies
[11:31:27] pwnd_nsfw: It wouldn't tell you that it's required to install the gem
[11:31:30] pwnd_nsfw: if it wasn't required
[11:32:52] jenrzzz: has joined #RubyOnRails
[11:32:52] jenrzzz: has joined #RubyOnRails
[11:33:22] pawnbox_: has joined #RubyOnRails
[11:33:29] xcesariox: pwnd_nsfw : you are confusing me. you have me thoughtbot link, they ask to add 'gem `capybara-webkit`' i already have them in, it just won't install.
[11:33:43] xcesariox: pwnd_nsfw : did you read the gist i pasted?
[11:34:00] xcesariox: pwnd_nsfw : so i must install qt libraries first?
[11:34:19] pwnd_nsfw: xcesariox, did you read anything I said?
[11:34:34] xcesariox: pwnd_nsfw : could i have the link to the qt libaries you talking about
[11:34:40] rvanlieshout: read the documentation
[11:34:41] universa1: or just switch to phantomjs / poltergeist ;) brew install phantomjs ;)
[11:35:09] pwnd_nsfw: You can lead a horse to water
[11:35:36] xcesariox: pwnd_nsfw : okay i got it.
[11:35:43] xcesariox: pwnd_nsfw : easy install from brew.
[11:36:56] _Tariq: has joined #RubyOnRails
[11:37:07] lxsameer: has joined #RubyOnRails
[11:38:01] _3by8: has joined #RubyOnRails
[11:38:14] _3by8: Sprockets is built-in to Rails, right?
[11:38:24] _3by8: So I don't need to include the gem unless I need a specific version?
[11:38:26] xcesariox: pwnd_nsfw : thanks
[11:38:54] universa1: _3by8: you need to have it in your gemfile.
[11:39:24] _3by8: universa1: what's the difference between sprockets-rails and sprockets?
[11:39:56] universa1: open their code / their repositories on github ;)
[11:40:41] njero: has joined #RubyOnRails
[11:40:48] pwnd_nsfw: universa1, DRY
[11:40:56] _3by8: But then I'd have to clone a repository!
[11:40:56] xcesariox: has joined #RubyOnRails
[11:42:00] universa1: _3by8: https://github.com/rails/sprockets-rails and https://github.com/rails/sprockets
[11:42:09] universa1: why do you need to clone anything?
[11:42:11] _3by8: universa1: I mean I could always just click around in my browser until something opens but I'm such a hacker that I only use command-line programs like Vim, etc.
[11:42:28] universa1: _3by8: so use w3m / lynx...
[11:42:47] _3by8: universa1: I'm too l33t for that. I use wget and vim.
[11:42:52] sevenseacat: _3by8: let's tone down the attitude a little.
[11:42:57] _3by8: My goodness.
[11:42:59] ldnunes: has joined #RubyOnRails
[11:43:14] _3by8: I'll just sit over here in the corner until I've calmed down.
[11:43:51] universa1: _3by8: tbh i don't care what tools you use, just take a look for yourself.
[11:44:16] universa1: _3by8: !rule12
[11:44:16] helpa: _3by8: Do not PM members of the channel without first asking if that is OK.
[11:44:35] _3by8: Thanks for the help!
[11:47:10] silentpost: has joined #RubyOnRails
[11:49:27] pawnbox: has joined #RubyOnRails
[11:49:57] davee_: has joined #RubyOnRails
[11:50:08] pawnbox: has joined #RubyOnRails
[11:50:09] moeabdol: has joined #RubyOnRails
[11:52:29] arup_r: has joined #RubyOnRails
[11:55:52] arup_r: has joined #RubyOnRails
[12:05:00] antgel: has joined #RubyOnRails
[12:05:19] Detch: has joined #RubyOnRails
[12:05:45] bronson: has joined #RubyOnRails
[12:10:26] PedramT: has joined #RubyOnRails
[12:12:04] swav: has joined #RubyOnRails
[12:15:41] pawnbox: has joined #RubyOnRails
[12:17:26] tknz: has joined #RubyOnRails
[12:20:16] chouhoulis: has joined #RubyOnRails
[12:23:23] FooMunki: has joined #RubyOnRails
[12:24:07] pawnbox: has joined #RubyOnRails
[12:25:45] Megamos: has joined #RubyOnRails
[12:27:51] sp1rs: has joined #RubyOnRails
[12:28:24] Megamosaren: has joined #RubyOnRails
[12:32:08] marcules: has joined #RubyOnRails
[12:34:26] jenrzzz: has joined #RubyOnRails
[12:34:31] Pupeno: has joined #RubyOnRails
[12:41:34] dgncn: has joined #RubyOnRails
[12:41:45] Jasaka: has joined #RubyOnRails
[12:41:57] FooMunki: has joined #RubyOnRails
[12:44:42] Pupeno: has joined #RubyOnRails
[12:45:11] eljimmy: has joined #RubyOnRails
[12:45:25] chrisml: when allowing users to upload images, is it best to resize them to a fixed width & height?
[12:46:49] sp1rs: has joined #RubyOnRails
[12:50:14] rvanlieshout: that depens on your needs
[12:51:17] mmac: has joined #RubyOnRails
[12:52:04] epochwolf: I just don't allow people to upload things.
[12:52:33] chrisml: i have articles on the homepage of this site, which admins can upload images to
[12:52:59] chrisml: currently i'm just resizing the height to 400px
[12:53:10] chrisml: but that means not all images have the same width
[12:55:50] crameth: has joined #RubyOnRails
[12:57:18] beauby: has joined #RubyOnRails
[12:58:03] flashpoint9: has joined #RubyOnRails
[12:58:03] ramortegui: has joined #RubyOnRails
[12:59:00] wolfravenous: has joined #RubyOnRails
[12:59:01] k13nox: has joined #RubyOnRails
[13:00:02] EdwardIII: has joined #RubyOnRails
[13:04:14] AlexJakeGreen: has joined #RubyOnRails
[13:05:37] ZerGabriel: has joined #RubyOnRails
[13:06:21] bronson: has joined #RubyOnRails
[13:06:43] ZerGabriel: has joined #RubyOnRails
[13:07:42] ZerGabriel: has joined #RubyOnRails
[13:08:04] pawnbox: has joined #RubyOnRails
[13:08:29] bphogan: has joined #RubyOnRails
[13:08:32] pawnbox: has joined #RubyOnRails
[13:13:06] theblang: has joined #RubyOnRails
[13:15:40] mdw: has joined #RubyOnRails
[13:15:44] mmac: has left #RubyOnRails: ()
[13:15:57] SeanLazer: has joined #RubyOnRails
[13:18:31] Macaveli: has joined #RubyOnRails
[13:19:15] bphogan: has joined #RubyOnRails
[13:20:17] Megamos: has joined #RubyOnRails
[13:20:30] petor: has joined #RubyOnRails
[13:21:00] chouhoulis: has joined #RubyOnRails
[13:22:41] Megamos_: has joined #RubyOnRails
[13:25:45] stardiviner: has joined #RubyOnRails
[13:25:56] AoifeOToole: has joined #RubyOnRails
[13:26:06] roamingdog: has joined #RubyOnRails
[13:31:03] Macaveli: has joined #RubyOnRails
[13:34:25] drbayer: has joined #RubyOnRails
[13:36:08] Riva: has joined #RubyOnRails
[13:37:58] akshat: has joined #RubyOnRails
[13:40:09] Riva: Hello everyone, maybe someone can help me out. Trying to follow the tutorials over at http://www.peoplecancode.com/en/paths/4/tutorials/27 , however I hit a snag where on step 1.5, im getting a error "undefined method `each' for nil:NilClass" , my code is a exact copy of what's on that site. Any insight on what i might be doing wrong?
[13:42:39] sevenseacat: your code must be somewhat different - can you start by gisting the full error?
[13:43:20] qejk: has joined #RubyOnRails
[13:43:29] kailido: has joined #RubyOnRails
[13:43:38] kailido: how can I delete a post with comments inside?
[13:43:41] Riva: Well the error points to <% @users.each do |users| %> this line
[13:44:11] sevenseacat: ok, so can you gist the code that sets the @users variable?
[13:44:24] n008f4g_: has joined #RubyOnRails
[13:44:29] kailido: update or delete on table "improvement_actions" violates foreign key constraint
[13:45:29] sevenseacat: kailido: !debug
[13:45:29] helpa: kailido: You have not provided enough information to debug your problem. Please provide this information: https://gist.github.com/radar/5384431
[13:45:33] Riva: https://gist.github.com/rivacom/9f114395e4f94c72c200cf1e3a60d166
[13:45:37] Riva: Theres my controller
[13:46:05] sevenseacat: ok, that code isnt being run
[13:46:59] sevenseacat: so can you please gist the full error so I can see what code *is* being run? :)
[13:47:37] artto: has joined #RubyOnRails
[13:48:16] arup_r: has joined #RubyOnRails
[13:49:02] Riva: Apologize if this isn't what your looking for exactly. https://gist.github.com/rivacom/256f93cc95125b54efab383171fdcf39
[13:49:53] sevenseacat: your controller should be raising a no method error at the `user.all` line (it should be User.all)
[13:50:01] sevenseacat: (as in the tutorial)
[13:50:38] sevenseacat: suspect there's more code that isnt being shown
[13:50:59] alexhartley: has joined #RubyOnRails
[13:56:08] Riva: Oh, apologies, i found the issue, the file was never being updated after I saved it due to permissions. My apologies and thank you for the help.
[13:57:22] Pupeno: has joined #RubyOnRails
[13:57:48] zave: has joined #RubyOnRails
[13:57:54] Riva: Can I just ask a general question, for the line @users = User.all , @users is the table out of the database correct?
[13:58:30] sevenseacat: @users is the instance variable that gets passed from your controller to your view
[13:58:44] sevenseacat: User is the ActiveRecord model located in /app/models, which is backed by a database table
[14:00:07] quazimodo: has joined #RubyOnRails
[14:00:12] meoblast001: has joined #RubyOnRails
[14:00:27] sevenseacat: I hadn't seen that tutorial, but it doesnt seem to explain many concepts, just give you code to copy and paste
[14:00:46] arup_r: hmm.. !r4ia
[14:00:57] sevenseacat: !r4ia thats the one :)
[14:00:57] helpa: Rails 4 in Action - http://manning.com/bigg2 - An excellent book combining Rails and TDD/BDD development. Written by Rebecca Skinner, Steve Klabnik, Ryan Bigg, Yehuda Katz
[14:01:08] sevenseacat: (disclaimer: I am one of the authors of Rails 4 in Action)
[14:01:15] S_Waqas: has joined #RubyOnRails
[14:01:34] arup_r: Riva: Read a book, if it takes time , still it is worth
[14:02:06] arup_r: otherwise, you will be stuck always basic stuff, and it will take more more time to get up..
[14:02:39] Riva: It's probably not a good intro to rails, I've been doing php for years, but never got into the MVC stuff, I learn better by example so I like the tutorial, but your right it probably doesn't cover exactly what i need
[14:02:48] maxx88: Riva: r4ia is an excellent book, but, also read the well grounded rubyist by david black
[14:03:20] arup_r: ^ David A. Black's book is awesome! +1 maxx88
[14:03:30] arup_r: That's my first Ruby book
[14:03:44] helpa: Learn Ruby by reading this book - http://manning.com/black3 - The Well-Grounded Rubyist by David A. Black
[14:03:45] Riva: Not that I'm doubting any of the books =), but im more of a visual by example learner. I have a hard time sitting down with books. Any suggestions on that ?
[14:03:46] sevenseacat: also +1 to that
[14:03:59] macsteps: has joined #RubyOnRails
[14:04:14] arup_r: Riva: books have examples too :(
[14:04:41] sevenseacat: I'm not sure I can help with that, because that isn't how I learn and it isn't how I believe most people learn
[14:04:48] dudepare: has joined #RubyOnRails
[14:04:55] sevenseacat: based on your questions here
[14:05:15] Riva: Right, but it's just a learning thing for me however, I just shut off when it come to books.
[14:05:53] tildes_: has joined #RubyOnRails
[14:06:08] Riva: I appreciate the suggestions though.
[14:07:15] bronson: has joined #RubyOnRails
[14:08:33] roamingdog: has joined #RubyOnRails
[14:10:38] daveomcd: im trying to deploy with capistrano for my project, and it errors out "An error occurred while installing capistrano-harrow (0.3.2), and Bundler cannot continue."... however my installed gem for capistrano-harrow is 0.4.0. How do I get my deploy to look for 0.4.0 instead of 0.3.2?
[14:11:13] sevenseacat: daveomcd: is that version of the gem listed in your Gemfile.lock ?
[14:12:23] daveomcd: sevenseacat, i see two references to the gem in there... one doesn't have a version to the right of it and the other has 0.4.0
[14:12:49] sevenseacat: then what are you doing to get the error? please gist the entire error message with what is causing it
[14:13:02] daveomcd: sevenseacat, will do one second
[14:13:55] PedramT: has joined #RubyOnRails
[14:14:31] siaW: has joined #RubyOnRails
[14:14:53] Guest57947: has joined #RubyOnRails
[14:15:16] siaW: i have a problem
[14:15:27] siaW: when i do “gem uninstall rails”
[14:15:33] sevenseacat: i have many problems.
[14:15:44] siaW: its shows me all versions of rails
[14:15:52] siaW: so i choose to unistall all versions
[14:15:55] siaW: but when i do
[14:16:02] sevenseacat: siaw: !enternotspace
[14:16:02] helpa: siaw: The enter key should not be used as a space bar. Lines on IRC can be up to 400 characters long.
[14:16:22] siaW: gem install rails -v 4.2.6 it always intsalls the latest rails 5 beta. which i don’t want
[14:16:38] daveomcd: sevenseacat, https://gist.github.com/anonymous/6e54d2fa2ead74c0d4cfa56e9c5103bb
[14:17:00] daveomcd: sevenseacat, that's the cap production deploy I used, and the error it gave
[14:17:27] sevenseacat: daveomcd: and you're sure that Gemfile.lock is checked into the repo and being pushed as part of the deploy?
[14:18:27] siaW: please see the sequence of my commands and what i’m getting https://gist.github.com/siaw23/9c484589279e2d9815617c5c203ec6be
[14:18:51] siaW: even after installing all rails versions. if i do rails -v i sill get Rails 5 beta
[14:19:27] sevenseacat: siaw: did you do what it suggests to try
[14:19:57] treehug88: has joined #RubyOnRails
[14:20:16] siaW: sevenseacat: yes i have
[14:20:24] sevenseacat: and what happened? thats not part of the logs
[14:20:35] siaW: same thing
[14:20:41] daveomcd: sevenseacat, that seemed to be the problem thanks for helping! Learned something new
[14:20:42] sevenseacat: can you add that to the logs please
[14:20:48] sevenseacat: daveomcd: no probs :)
[14:20:51] siaW: https://gist.github.com/siaw23/9c484589279e2d9815617c5c203ec6be
[14:21:00] siaW: yeap. just updated logs
[14:21:29] sevenseacat: siaw: you may need to specify --pre when uninstalling, just like you do when installing - ie. gem uninstall rails --pre
[14:21:42] sevenseacat: (because its a prerelease version)
[14:22:31] siaW: no that’s not working https://gist.github.com/siaw23/9c484589279e2d9815617c5c203ec6be#file-console-txt-L79
[14:23:18] Martyn: has joined #RubyOnRails
[14:23:25] siaW: maybe i’ll format my computer 😂
[14:24:25] siaW: if anyone has any idea how to get Rails 5 beta off my computer i’ll appreciate it
[14:24:31] sevenseacat: yeah I'm seeing the same thing, just tried installing the beta - the uninstall doesnt seem to clean up the binstub
[14:25:02] siaW: this is a problem with rails 5?
[14:25:15] siaW: or with RubyGems?
[14:25:24] crdpink: has joined #RubyOnRails
[14:25:47] sevenseacat: ahhhh the rails command is actually part of the railties gem - you'll need to uninstall that too
[14:25:56] sevenseacat: uninstalling rails doesnt uninstall the dependencies of rails
[14:26:10] sevenseacat: there we go, now it works
[14:26:16] sevenseacat: `gem uninstall railties`
[14:26:48] Gkj8899_: has joined #RubyOnRails
[14:28:09] siaW: this is weird
[14:28:11] siaW: now look
[14:28:12] siaW: https://gist.github.com/siaw23/9c484589279e2d9815617c5c203ec6be
[14:28:18] siaW: it STILL has rails 4.2.6
[14:28:47] siaW: which is what i want, but why it shouldn’t be there after i do “gem uninstall rails” and then choose the option to uninstall all versions
[14:29:32] sevenseacat: well, then you still have it installed somewhere, perhaps in a global gemset
[14:30:51] syndikate: has joined #RubyOnRails
[14:31:44] okdas_: has joined #RubyOnRails
[14:31:45] noah256_: has joined #RubyOnRails
[14:31:56] Plas: has joined #RubyOnRails
[14:32:44] chouhoulis: has joined #RubyOnRails
[14:33:46] marcdel: has joined #RubyOnRails
[14:34:08] TheMoonMaster: has joined #RubyOnRails
[14:34:21] gmas: has joined #RubyOnRails
[14:34:56] siaW: thanks, figured it out
[14:35:13] marcdel_: has joined #RubyOnRails
[14:35:26] siaW: now i want to be able to set a spefic rails version and ruby version for a given rails app.
[14:35:51] siaW: i’d need to put a file to specify this in the rails app, is that correct?
[14:36:29] jenrzzz: has joined #RubyOnRails
[14:36:30] sevenseacat: Rails gets specified in your Gemfile. you can specify your Ruby version there too.
[14:36:43] marcules: has joined #RubyOnRails
[14:36:44] Tempesta: has joined #RubyOnRails
[14:36:44] Tempesta: has joined #RubyOnRails
[14:36:44] tubbo: you might also need a .ruby-version file
[14:36:45] roamingdog: siaw: one, forgive me, but one might want to google that first
[14:37:13] JakFrist: has joined #RubyOnRails
[14:37:13] tildes_: has joined #RubyOnRails
[14:37:13] weckl: has joined #RubyOnRails
[14:37:13] mikecmpbll: has joined #RubyOnRails
[14:37:13] adre: has joined #RubyOnRails
[14:37:13] bruce_lee: has joined #RubyOnRails
[14:37:13] brianpWins: has joined #RubyOnRails
[14:37:14] nertzy: has joined #RubyOnRails
[14:37:14] borkdude: has joined #RubyOnRails
[14:37:14] neanderslob: has joined #RubyOnRails
[14:37:14] Jet4Fire: has joined #RubyOnRails
[14:37:14] AnoHito: has joined #RubyOnRails
[14:37:14] hoodow: has joined #RubyOnRails
[14:37:14] kp666: has joined #RubyOnRails
[14:37:14] nibbo: has joined #RubyOnRails
[14:37:14] duderonomy: has joined #RubyOnRails
[14:37:14] toydestroyer: has joined #RubyOnRails
[14:37:21] siaW: i google anything first before i come here. if i’m here means i couldn’t find it with google’s help
[14:37:36] roamingdog: siaw: did you read about .ruby-version on your quest?
[14:37:41] siaW: and i learned about .ruby-version from google
[14:37:48] roamingdog: then why ask?
[14:37:48] enkristoffer: has joined #RubyOnRails
[14:37:52] siaW: but that only sets the ruby version,
[14:38:07] a1fa: couple of days ago someone suggested i shouldnt use GET actions to modify anything in the database, with that in mind, if I use post actions, how do you handle user actions that need to be invoked through notification, such as email?
[14:38:09] siaW: and when i asked now i know the Gemfile can do both ruby and rails version
[14:38:12] roamingdog: so you only need the rails version. that goes in Gemfile like every other gem
[14:38:21] bahar: has joined #RubyOnRails
[14:38:31] siaW: roamingdog: now i know. i didn’t know this from google
[14:38:55] roamingdog: as i said, forgive me. seemed like asking for spoon-feeding
[14:39:18] dudepare: has joined #RubyOnRails
[14:39:23] tubbo: siaw: it can't quite do both. it's a little confusing so it makes sense for you to ask here.
[14:39:30] siaW: no, i’m not stupid. but sometimes i try to know that i KNOW than act that i know and then be wrong
[14:39:39] tubbo: siaw: the `ruby` directive in your Gemfile just makes sure the *gems* in your Gemfile are running with that specific Ruby version.
[14:39:46] tubbo: personally....i don't feel like that's really necessary for most projects
[14:40:12] siaW: and i’m not ashamed of asking stupid questions romaingdog, if you can answer, great, i’ll be thankful. if not, i’m sure people who come here are from google and can’t figure stuff out
[14:40:16] roamingdog: siaw: i agree with that sentiment, fwiw
[14:40:26] jlpeters: has joined #RubyOnRails
[14:40:29] sevenseacat: some. not most.
[14:40:37] pawnbox: has joined #RubyOnRails
[14:40:59] siaW: you see? and now it appears it’s more complicated that it seems
[14:41:15] pawnbox: has joined #RubyOnRails
[14:41:29] alxndr: has joined #RubyOnRails
[14:41:35] Guest57947: has joined #RubyOnRails
[14:42:01] roamingdog: siaw: i don't get how you couldn't get this by googling, for the record
[14:42:18] jxf: has joined #RubyOnRails
[14:43:41] siaW: roamingdog: sometimes if you don’t know much about a subject, you don’t even know what to google. especially technical stuff. not sure if you’ve experienced this before, if not, then i’m extremely jealous of you!
[14:44:49] sevenseacat: siaw: you know that a lot of the questions people ask here, if we don't know the answers to them, *we* just go and google them, right?
[14:44:58] roamingdog: unless you know my wife
[14:45:26] siaW: sevenseacat: yeap. if you know what to google :)
[14:45:45] sevenseacat: ACTION googled "uninstall rails beta" when diagnosing your other issue
[14:45:50] adaedra: it's a matter of phrasing
[14:45:55] a1fa: couple of days ago someone suggested i shouldnt use GET actions to modify anything in the database, with that in mind, if I use post actions, how do you handle user actions that need to be invoked through notification, such as email? ( sorry for repeating myself )
[14:46:11] sevenseacat: a1fa: you secure them with a big long authentication token
[14:46:35] adaedra: a1fa: redirect to a page with a form that does the real POST request
[14:46:54] chipotle: has joined #RubyOnRails
[14:46:58] a1fa: sevenseacat: users have to auth first
[14:47:42] dmcc: has joined #RubyOnRails
[14:48:03] a1fa: sevenseacat: i email users a notification to accept an assignment, they click on a link, if they are not authenticated already (cookies/session), then they go to the auth form first
[14:48:11] a1fa: and then they get directed to the gt page /accept
[14:48:20] sevenseacat: seems fair. whats the problem?
[14:48:44] swgillespie: has joined #RubyOnRails
[14:49:06] a1fa: maybe it was you who said i shouldnt use GET to modify anything because of HTTP prefetching
[14:49:40] a1fa: my buffer does not go back that far
[14:50:28] a1fa: but somebody was saying i shouldnt use GET instead use POST, and if I use GET to direct users to POST form, then they have more items to click on
[14:50:41] a1fa: if thats acceptable practice, then its ok, i suppose
[14:51:26] a1fa: and that would not work very well, because then i have to modify my redirect_to
[14:51:28] jetpack_joe: has joined #RubyOnRails
[14:52:20] rknLA: has left #RubyOnRails: ()
[14:52:30] a1fa: i am ussing session[:return_to] = request.referer; redirect_to session.delete(:return_to)...
[14:52:50] a1fa: open for suggestions if there is a better way to do this?
[14:53:07] a1fa: session[:return_to] = request.referer || :root
[14:54:04] wolfravenous: has joined #RubyOnRails
[14:54:06] adaedra: Yeah, for multiple reasons you shouldn't, in general cases, do modifying informations on a GET request (pre-fetching, bots, history, ...)
[14:54:31] svkurowski: has joined #RubyOnRails
[14:54:34] sevenseacat: generally, thats true.
[14:54:49] roamingdog: a1fa: _ideally_, you don't want to modify things on a GET request, but _realistically_ things do change upon that event. for ex. log entries are made, session timestamps get updated etc.
[14:54:54] PedramT: has joined #RubyOnRails
[14:55:22] roamingdog: just try to minimize such things imo
[14:56:07] sevenseacat: *gets an email "confirm your subscription" *clicks link "are you sure you want to confirm your subscription?" 'why the crap do you think I clicked on the big confirm button'
[14:56:12] a1fa: ok, is there a html tag to tell browsers to not pre-fetch? bots would not be a problem, history would not be a problem too because all my actions are very limited, and can only be run 1 time
[14:56:20] yellow5: has joined #RubyOnRails
[14:56:49] a1fa: for example I do Model.where('status_id = xx..).take!
[14:56:55] a1fa: and then make sure status is also updated
[14:57:27] a1fa: again, i could be doing it wrong.. but it seems like there is no universal way of doing things ;) just bad, worse, and better
[14:58:14] roamingdog: asking this in #passenger, but perhaps the light's better here: deploying rails app with passenger/capistrano/apache2 on ubuntu. everything seems to check out fine, but whatever i do, browsing to the ip address shows the directory of /var/www/ (and let's me click on all files of app and view as text) what could it be?
[14:58:43] sevenseacat: roamingdog: misconfiguration of the server
[14:59:38] roamingdog: perhaps i should have googled that first...ducks
[15:01:55] epochwolf: sevenseacat: prehaps you shouldn't be playing with random strays. :P
[15:02:17] sevenseacat: theres a lot of things I shouldnt be doing ._.
[15:03:21] alexhartley: has joined #RubyOnRails
[15:04:37] pawnbox: has joined #RubyOnRails
[15:05:52] gmas: has joined #RubyOnRails
[15:06:23] a1fa: looks like prefetching shouldnt be a problem either.. prefetching on modern browsers requires link tag with rel="prefetch"
[15:06:33] DragonPunch: has joined #RubyOnRails
[15:07:00] a1fa: Source: https://developer.mozilla.org/en-US/docs/Web/HTTP/Link_prefetching_FAQ
[15:08:24] bronson: has joined #RubyOnRails
[15:09:01] smathy: has joined #RubyOnRails
[15:09:15] diegoaguilar: has joined #RubyOnRails
[15:10:47] roadt: has joined #RubyOnRails
[15:16:51] Devalo: has joined #RubyOnRails
[15:20:12] PedramT: has joined #RubyOnRails
[15:21:37] Dimik: has joined #RubyOnRails
[15:21:55] petor: has joined #RubyOnRails
[15:22:12] Limix: has joined #RubyOnRails
[15:23:25] sp1rs: has joined #RubyOnRails
[15:26:29] macsteps: has joined #RubyOnRails
[15:27:08] ferr: has joined #RubyOnRails
[15:32:12] hobodave: has joined #RubyOnRails
[15:34:01] ErhardtMundt: has joined #RubyOnRails
[15:34:32] ErhardtMundt: I was testing a piece of code with a transaction block inside
[15:34:59] ErhardtMundt: then I looked in the logs and I found no TRANSACTION statement in the logs
[15:35:04] mdel: has joined #RubyOnRails
[15:35:09] Rodya_: has joined #RubyOnRails
[15:35:35] ErhardtMundt: are there contexts in which Model.transaction do … end is ignored?
[15:35:43] shinnya: has joined #RubyOnRails
[15:35:57] Ergo: has joined #RubyOnRails
[15:36:21] fryguy: i have a test that requires a valid ssh key. ssh keys are long, and rubocop is yelling about line length. I'm looking for interesting options to work around this
[15:36:39] mikecmpbll: has joined #RubyOnRails
[15:37:34] akshat: has joined #RubyOnRails
[15:38:10] jenrzzz: has joined #RubyOnRails
[15:38:59] wolfravenous: has joined #RubyOnRails
[15:39:49] roamingdog: fryguy: interesting option #1: ignore rubocop?
[15:40:42] roamingdog: #2: set env var to ssh string and bring in during test run?
[15:42:06] roamingdog: fryguy: look here https://github.com/bbatsov/rubocop and search for LineLength
[15:42:17] PedramT: has joined #RubyOnRails
[15:42:42] fryguy: yes I have it set to something reasonable which is great for the vast majority of the code
[15:42:46] fryguy: except this ssh key
[15:43:10] hobodave: has joined #RubyOnRails
[15:43:37] roshanavand: has joined #RubyOnRails
[15:44:08] roamingdog: #3: you're stuck
[15:48:55] drusepth: has joined #RubyOnRails
[15:49:27] njero: has joined #RubyOnRails
[15:51:08] fryguy: using implicit concatenation seems to work ok
[15:52:10] moeabdol: has joined #RubyOnRails
[15:52:42] davidw: has joined #RubyOnRails
[15:52:44] disgrntld: has joined #RubyOnRails
[15:52:49] ferr: has joined #RubyOnRails
[15:53:15] akshat: has joined #RubyOnRails
[15:53:22] FooMunki: has joined #RubyOnRails
[15:54:17] [Butch]: has joined #RubyOnRails
[15:56:22] Devalo: has joined #RubyOnRails
[15:57:57] qejk: has joined #RubyOnRails
[15:58:19] rbr: has joined #RubyOnRails
[15:59:06] siaW: has left #RubyOnRails: ()
[16:00:41] evenix: has joined #RubyOnRails
[16:00:48] bahar: has joined #RubyOnRails
[16:00:54] tubbo: fryguy: i usually put an exception for that file
[16:01:17] tubbo: wish i could set exceptions for a particular *line* of a file...for example, config/initializers/devise.rb
[16:01:34] wenchenx_: has joined #RubyOnRails
[16:02:06] agent_white: has joined #RubyOnRails
[16:03:05] evenix: I'm getting AbstractController::ActionNotFound (The action 'index' could not be found for Api::V1::StatsController) but the action exists and sometimes works sometimes doesn't
[16:03:19] evenix: what do you think could be the cause of an issue like this one or what are you suggesting that I do to investigate it.
[16:03:43] siaW: has joined #RubyOnRails
[16:03:46] evenix: https://gist.github.com/richardsondx/6f2a9aeb9592b28a8d6ca772f677a45a
[16:05:46] njero: evenix: gist ur route pla
[16:05:47] siaW: i’m trying to start a rails 3.2 app. I get this error after running “./bin/setup”. i’m following the instructions on here https://github.com/siaw23/lumendatabase/blob/dev/README.md and this is the error i’m getting https://gist.github.com/siaw23/37136570db10cde88fb0d285fabe01d8 i have googled “Gem::Ext::BuildError: ERROR: Failed to build gem native extension.” but it looks like this is a comon problem to a lot of other thing
[16:05:48] siaW: any help would be cool.
[16:07:40] evenix: @n_e_o : Sure. I just made an update to the gist. I added the routes.
[16:09:19] bronson: has joined #RubyOnRails
[16:09:21] roamingdog: siaw: just had similar, fixed by installing nodejs on the server and removing therubyracer
[16:09:21] njero: evenix: are the controllers inside correct module and directory structures?
[16:10:43] njero: i mean while it's passing is it routing to the correct controllers?
[16:10:53] davee_: has joined #RubyOnRails
[16:10:56] evenix: @n_e_o : yes i just updated the gist again
[16:10:58] evenix: with the structure
[16:11:15] evenix: sometiems it works.. sometimes its doesnt its just weird
[16:11:29] siaW: roamingdog: problem is i already have nodejs installed. so maybe i have to remove “therubyracer” from gem lock
[16:11:32] siaW: let me try that first
[16:11:55] roamingdog: siaw: don't remove it manually from Gemfile.lock, just from Gemfile and bundle
[16:15:01] evenix: @n_e_o : i'm wondering if 'v1' and :V1: matters
[16:16:21] njero: evenix: what about content of Ap1:StatsController?
[16:16:35] godzillaenlacasa: has joined #RubyOnRails
[16:16:37] evenix: class Api::StatsController < ApplicationController
[16:16:41] beauby: has joined #RubyOnRails
[16:16:45] njero: Hm.. Weird
[16:17:29] njero: evenix: Are you still able to regenerate failing and success cases? for same route
[16:18:34] evenix: sometimes its working because i do get the stats
[16:18:43] evenix: and sometimes it doesn't because some stat don't show
[16:19:03] evenix: and i get that error
[16:21:09] drbayer: has joined #RubyOnRails
[16:21:09] evenix: @n_e_o : also a `rake routes
[16:21:15] evenix: | grep api`
[16:21:18] evenix: returns the route
[16:21:22] evenix: properly*
[16:21:47] PedramT: has joined #RubyOnRails
[16:22:56] evenix: http://localhost:3000/api/v1/stats => Routing error undefined method `v1' for Api:Module
[16:23:08] macsteps: has joined #RubyOnRails
[16:23:10] rakm: has joined #RubyOnRails
[16:23:21] evenix: but api_v1_stats | GET /api/v1/stats(.:format) | api/v1/stats#index
[16:23:48] siaW: roamingdog: works
[16:24:09] drbayer: has joined #RubyOnRails
[16:24:11] siaW: but trying to start forman and this is what i get https://gist.github.com/siaw23/37136570db10cde88fb0d285fabe01d8
[16:24:18] siaW: if you look on line 4
[16:24:52] siaW: you see gdbm, that also appears to be a common problem with different cause maybe you know how to tacklet that?
[16:25:47] PedramT: has joined #RubyOnRails
[16:26:01] Devalo: has joined #RubyOnRails
[16:26:29] evenix: The scoping might be wrong http://api.rubyonrails.org/classes/ActionDispatch/Routing/Mapper/Scoping.html
[16:27:04] drbayer: has joined #RubyOnRails
[16:28:13] roamingdog: siaw: without more info, wild guess: use bundle exec foreman start? or to troubleshoot, comment out gdbm (if it's in your Gemfile), bundle and if the error goes away you know gdbm is the culprit, and if not, you know you're just loading your gems correctly
[16:28:27] rafaelfranca: has joined #RubyOnRails
[16:28:27] rafaelfranca: has joined #RubyOnRails
[16:28:34] roamingdog: 'incorrectly' that is
[16:28:40] itsmeduncan: has joined #RubyOnRails
[16:30:08] njero: evenix: no idea, i couldn't recreate such an issue, really weird
[16:30:12] drbayer: has joined #RubyOnRails
[16:30:26] siaW: bundle exec foreman start doesn’t work same error. also i have tried commenting out the part where it’s requiring gdbm and get /Users/siaw/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.11.2/lib/bundler/runtime.rb:80:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'mysql2'
[16:30:35] evenix: @n_e_o ha thx for trying.. yes its confusing
[16:31:24] evenix: I find it weird that im getting ActionController::RoutingError (undefined method `v1' for Api:Module):
[16:31:31] evenix: when i call the route manually on the browser
[16:32:37] stannard: has joined #RubyOnRails
[16:32:44] evenix: @n_e_o : weird i fixed it by adding `require 'action_pack'`
[16:32:47] evenix: at the top
[16:33:09] drbayer: has joined #RubyOnRails
[16:33:34] evenix: but im getting a Footnotes Footnotes::Notes::ViewNote Exception: undefined method `[]' for nil:NilClass
[16:34:00] tubbo: notes. footnotes. everybody cut footnotes.
[16:34:11] antgel: has joined #RubyOnRails
[16:34:15] lawton: has joined #RubyOnRails
[16:34:54] tubbo: siaw: so when you `bundle` it says all the gems are installed already, but when you run any commands it gives you errors?
[16:34:58] kies: has joined #RubyOnRails
[16:35:04] renegadeandy: has joined #RubyOnRails
[16:35:11] siaW: tubbo: right
[16:35:37] drbayer: has joined #RubyOnRails
[16:36:14] siaW: as can be seen here: https://gist.github.com/siaw23/37136570db10cde88fb0d285fabe01d8#file-bundle-txt
[16:36:16] siaW: everything installed
[16:36:35] tubbo: siaw: where does `which foreman` point to?
[16:36:53] siaW: it points to /Users/siaw/.rvm/gems/ruby-2.0.0-p247/bin/foreman
[16:37:41] tubbo: siaw: ah, well you might have problems if, for example, 'gdbm' isn't in your Gemfile :P
[16:38:11] baweaver: has joined #RubyOnRails
[16:38:13] tubbo: is that a dependency on something else?
[16:38:39] drbayer: has joined #RubyOnRails
[16:38:44] siaW: you mean gdbm?
[16:38:59] siaW: i don’t know, i can’t tell
[16:39:12] flashpoint9: has joined #RubyOnRails
[16:39:24] tubbo: siaw: well your app is requiring it, and the Gemfile doesn't specify it.
[16:39:33] tubbo: siaw: so it doesn't seem like the library 'gdbm' is loaded.
[16:39:34] siaW: yes i added it and it works.
[16:39:37] roamingdog: siaw: you had it in Gemfile and commented out right?
[16:39:46] siaW: no it wasn’t in the gemfile before
[16:39:57] roamingdog: siaw: then where did you comment it out?
[16:39:57] siaW: just added it
[16:40:17] siaW: no no it wasn’t in the gemfile at all
[16:40:20] siaW: i just added it
[16:40:21] siaW: right now
[16:40:34] arup_r: has joined #RubyOnRails
[16:40:35] drbayer: has joined #RubyOnRails
[16:40:47] roamingdog: siaw: you said "also i have tried commenting out the part where it’s requiring gdbm"
[16:40:51] roamingdog: where was that?
[16:41:05] siaW: ah. that was in application.rb on line 10
[16:41:22] arup_r: Hi, Any idea why my test is failing? I can see the correct data in Pry, but the same code fails with expectation. https://gist.github.com/aruprakshit/f450371a7cd6ebfee8d05e3f451efabd
[16:41:32] roamingdog: k. i didn't mean that before, i meant in Gemfile, as I said
[16:41:55] siaW: ah ok :)
[16:42:25] arup_r: nvm, ignore me
[16:43:32] roamingdog: siaw: to double check, bundle install works?
[16:43:33] drbayer: has joined #RubyOnRails
[16:43:33] emachnic: has joined #RubyOnRails
[16:45:36] roamingdog: siaw: not familiar with foreman. do you have foreman in your Gemfile maybe?
[16:45:41] Ropeney: has joined #RubyOnRails
[16:45:50] siaW: roamingdog: i do
[16:45:54] siaW: everything is working now
[16:45:56] roamingdog: comment it out
[16:46:02] siaW: not seeing new errors with i’m trying to fix
[16:46:12] roamingdog: what was the fix?
[16:46:34] drbayer: has joined #RubyOnRails
[16:46:38] siaW: the fix was adding gdbm to the gemfile
[16:47:12] FooMunki: has joined #RubyOnRails
[16:49:31] drbayer: has joined #RubyOnRails
[16:49:39] DoubleMalt: has joined #RubyOnRails
[16:51:33] Cache_Money: has joined #RubyOnRails
[16:52:25] Rodya_: has joined #RubyOnRails
[16:52:31] drbayer: has joined #RubyOnRails
[16:52:58] antgel: has joined #RubyOnRails
[16:55:00] JakFrist: has joined #RubyOnRails
[16:55:36] drbayer: has joined #RubyOnRails
[16:56:34] rbr: has joined #RubyOnRails
[16:57:06] barhum2013: has joined #RubyOnRails
[16:57:26] roamingdog: siaw: on second thought, if you were requiring it but it wasn't in Gemfile or a dependency, then not surprising :/
[16:57:52] siaW: it’s strange because this is a fork
[16:58:04] bphogan: has joined #RubyOnRails
[16:58:34] drbayer: has joined #RubyOnRails
[17:00:09] sbarg: has joined #RubyOnRails
[17:01:35] drbayer: has joined #RubyOnRails
[17:02:29] pawnbox: has joined #RubyOnRails
[17:02:58] sleungcy: has joined #RubyOnRails
[17:03:08] Cohedrin: has joined #RubyOnRails
[17:04:40] drbayer: has joined #RubyOnRails
[17:07:35] drbayer: has joined #RubyOnRails
[17:08:23] sbarg1: has joined #RubyOnRails
[17:08:35] itsmeduncan: has joined #RubyOnRails
[17:09:21] futilegames: has joined #RubyOnRails
[17:09:34] futilegames: has left #RubyOnRails: ()
[17:10:20] bronson: has joined #RubyOnRails
[17:10:35] drbayer: has joined #RubyOnRails
[17:11:02] silentpost: has joined #RubyOnRails
[17:11:14] tubbo: doesn't mean it works :)
[17:11:19] tubbo: plenty of my rails apps on github don't work
[17:13:37] drbayer: has joined #RubyOnRails
[17:14:46] berserk_ren: has joined #RubyOnRails
[17:15:42] triptec: has joined #RubyOnRails
[17:16:37] drbayer: has joined #RubyOnRails
[17:17:07] drbayer: has joined #RubyOnRails
[17:19:59] artto: has joined #RubyOnRails
[17:20:07] brianpWins_: has joined #RubyOnRails
[17:20:08] drbayer: has joined #RubyOnRails
[17:21:42] berserk_ren: has joined #RubyOnRails
[17:22:39] petor: has joined #RubyOnRails
[17:22:45] barhum2013: Hello, is there a way to use a regex on a text_field_tag? I am using = text_field_tag :card_cvv, nil, :pattern => '/^[0-9]{3,4}$/', required: true but I cannot seem to get to work.
[17:23:18] drbayer: has joined #RubyOnRails
[17:24:00] drbayer: has joined #RubyOnRails
[17:24:37] drbayer: has joined #RubyOnRails
[17:25:55] drbayer: has joined #RubyOnRails
[17:26:10] ismaelga: has joined #RubyOnRails
[17:26:23] tbuehlmann: barhum2013: what does that do?
[17:26:47] roamingdog: barhum2013: not sure about those single quotes around the regex
[17:26:56] smathy: barhum2013, that should work.
[17:27:15] dangerousdave: has joined #RubyOnRails
[17:27:27] smathy: ...oh, sorry, shouldn't have //s
[17:27:43] smathy: I also don't think you need the ^ or $ - I think html5 does that for you too.
[17:27:55] djbkd: has joined #RubyOnRails
[17:28:15] tbuehlmann: ah, an HTML5 thingy
[17:28:26] xhoy: hi! i can do Model.where(x: nil) and i can do Model.where.not(x: nil) but now can i do something like Model.where(x: nil).not(z: y)?
[17:28:28] smathy: (confirmed, you don't need the ^ or $ either)
[17:28:31] xhoy: that doesn't seem to work
[17:28:41] smathy: ((although I don't think it will cause a problem having them))
[17:28:49] Limix: has joined #RubyOnRails
[17:29:00] drbayer: has joined #RubyOnRails
[17:29:06] roamingdog: xhoy: you tried and got errors?
[17:29:09] smathy: xhoy, the `.not` always needs to be called on a `where`
[17:29:27] xhoy: smathy: yeah but i can not do Model.where(x: nil).where.not(x: y)
[17:29:36] barhum2013: smathy: seems to not be working
[17:29:37] barhum2013: http://2.1m.yt/En1A7C8.png
[17:29:51] xhoy: i can do that but not in scope?
[17:30:00] roamingdog: xhoy: tried sticking an 'and' in there? just guessing here
[17:30:00] smathy: barhum2013, see my second comment.
[17:30:20] barhum2013: smathy: thanks
[17:30:59] xhoy: roamingdog: works on the CLI so why doesn't it work in a scope?
[17:31:16] roamingdog: xhoy: your version works in console?
[17:31:26] smathy: xhoy, so the code you've shown so far is not a scope, but you can do that in a scope too.
[17:32:01] drbayer: has joined #RubyOnRails
[17:32:07] roamingdog: xhoy: ja i should work, what error?
[17:33:26] pawnbox: has joined #RubyOnRails
[17:33:29] drbayer: has joined #RubyOnRails
[17:33:56] xhoy: https://gist.github.com/anonymous/ccc37ad1d371eff12aebd64fc97ddcbf
[17:34:15] xhoy: smathy: well i figured if i cant do it in a scope it shouldn't work at all :)
[17:35:10] smathy: xhoy, rename your scope, send is a core method in ruby.
[17:35:17] xhoy: smathy: DOW
[17:35:20] xhoy: smathy: THANK YOU
[17:35:23] rafaelfranca: has joined #RubyOnRails
[17:35:25] smathy: xhoy, you're welcome.
[17:35:27] xhoy: that would have costed me a lot of time :)
[17:35:44] drusepth: has joined #RubyOnRails
[17:35:50] drbayer: has joined #RubyOnRails
[17:36:08] xhoy: so what is good name of leters that we have "send" :)
[17:36:21] yfeldblum: has joined #RubyOnRails
[17:37:04] jxs_: has joined #RubyOnRails
[17:37:22] smathy: Your question isn't clear to me.
[17:37:25] drbayer: has joined #RubyOnRails
[17:37:27] rafaelfranca: has joined #RubyOnRails
[17:37:28] jenrzzz: has joined #RubyOnRails
[17:38:09] smathy: ...just based on the logic, I'd rename it to `sent` - past tense.
[17:39:11] RegulationD: has joined #RubyOnRails
[17:39:28] PedramT: has joined #RubyOnRails
[17:39:56] xhoy: smathy: https://www.englishforums.com/English/ToBeSendOrToBeSent/hbjxr/post.htm i didn't know as not native
[17:39:59] xhoy: thanks again :)
[17:40:12] xhoy: !smathy beer
[17:40:32] drbayer: has joined #RubyOnRails
[17:42:50] sbarg: has joined #RubyOnRails
[17:43:20] xhoy: !beer smathy then? :)
[17:43:28] drbayer: has joined #RubyOnRails
[17:43:50] Limix: has joined #RubyOnRails
[17:44:09] smathy: ACTION is so much more than a bot command ;(
[17:44:58] xhoy: i would love to send you a beeer :)
[17:45:12] moeabdol: has joined #RubyOnRails
[17:45:37] epochwolf: xhoy: send monies to epochwolf@gmail.com via paypal ;)
[17:45:47] netzfisch: has joined #RubyOnRails
[17:45:54] smathy: Cheers 🍺
[17:46:11] emachnic: has joined #RubyOnRails
[17:46:35] drbayer: has joined #RubyOnRails
[17:46:35] xhoy: epochwolf: i have a feeling that is not smathy :)
[17:46:50] smathy: epochwolf, handles all of my finances.
[17:47:06] xhoy: BUT that said, it would be a great idear to do something like ubuntu does when you download it, it gives you a list of options for your donations
[17:47:37] xhoy: i would donate some money every year and then tick some boxes depending on my 'needs'/wishes
[17:47:46] smathy: xhoy, next time you're at a pub, just buy a stranger a beer, the universe will sort out the rest.
[17:48:22] xhoy: 42 roger that
[17:48:26] barhum2013: i tried changing the pattern to '[0-9]{3,4}' but still no validation, I notice in the DOM that the form has the novalidate=“novalidate” option set but I read that this only works on submit.
[17:48:33] barhum2013: http://pasteboard.co/ymIet0K.png
[17:51:12] akshat_: has joined #RubyOnRails
[17:53:09] chipotle: did someone ping me on here?
[17:53:18] tubbo: chipotle: i want a burrito.
[17:53:42] epochwolf: chipotle: chips and gauc plz
[17:54:05] bronson: has joined #RubyOnRails
[17:55:10] drusepth: has joined #RubyOnRails
[17:55:26] chipotle: tubbo: i recommend the bowl. you get more product than the burrito
[17:55:29] smathy: chipotle, I did by mistake.
[17:55:41] smathy: Was aiming for chicken...something, but they'd left.
[17:55:55] emachnic: has joined #RubyOnRails
[17:56:00] chipotle: smathy: okay. no worries
[17:56:13] chipotle: it still shows up as a highlight for some reason, i guess i'lll just restart my irc client
[17:56:21] tomeara: has joined #RubyOnRails
[17:56:31] arup_r: has joined #RubyOnRails
[17:58:20] smathy: barhum2013, well that'll definitely do it (switch off html5 validation).
[17:58:24] DoctorMonocular: has joined #RubyOnRails
[17:59:28] srinidhi: has joined #RubyOnRails
[17:59:48] dopie: has joined #RubyOnRails
[18:00:16] scepticulous: has joined #RubyOnRails
[18:00:33] jenrzzz: has joined #RubyOnRails
[18:00:33] jenrzzz: has joined #RubyOnRails
[18:00:36] barhum2013: smathy: you mean turn on html5 validation? How would I pass that option on the form_tag?
[18:03:09] [Butch]: has joined #RubyOnRails
[18:03:14] smathy: barhum2013, `novalidate` is not passed by default, something is passing that option already. I suspect ActiveAdmin.
[18:04:06] barhum2013: smathy: Hmmm, I will research that. Thanks
[18:04:49] scepticulous: has joined #RubyOnRails
[18:05:43] jenrzzz_: has joined #RubyOnRails
[18:06:46] Maletor: has joined #RubyOnRails
[18:06:51] Maletor: do I need to use Rails.root.join even if i'm just doing File.read?
[18:07:22] replay: has joined #RubyOnRails
[18:07:49] replay: has joined #RubyOnRails
[18:09:19] tubbo: maletor: you don't ever really need to do Rails.root.join, it's just usually easier.
[18:09:30] tubbo: maletor: that is, unless you want to reliably get a file path from within your rails app dir
[18:10:09] smathy: It's never a good idea to assume a current working directory.
[18:10:27] rodfersou: has joined #RubyOnRails
[18:10:38] marr: has joined #RubyOnRails
[18:11:29] Maletor: smathy: true. who knows what working directory people are booting the app from.
[18:11:56] ferr: has joined #RubyOnRails
[18:12:25] smathy: Yeah, I mean in Rails it is actually very reliable, but why assume when you can be sure.
[18:13:07] Megamos: has joined #RubyOnRails
[18:15:40] drusepth: has joined #RubyOnRails
[18:17:03] macsteps: has joined #RubyOnRails
[18:19:49] jstransky: has joined #RubyOnRails
[18:23:06] moeabdol: has joined #RubyOnRails
[18:25:51] emachnic: has joined #RubyOnRails
[18:25:59] asymmetric: has joined #RubyOnRails
[18:27:44] baweaver: has joined #RubyOnRails
[18:29:56] baweaver: has joined #RubyOnRails
[18:32:58] itsmeduncan: has joined #RubyOnRails
[18:33:34] Rodya_: has joined #RubyOnRails
[18:34:37] Devalo: has joined #RubyOnRails
[18:34:39] triptec: has joined #RubyOnRails
[18:36:16] srinidhi: has joined #RubyOnRails
[18:37:41] Devalo: has joined #RubyOnRails
[18:39:14] drusepth: has joined #RubyOnRails
[18:40:55] SeanLazer: is there a way that i can stub or prevent the rendering of templates in my controller tests?
[18:41:04] drale2k: is there example code for having multiple chat channels with Actioncable ? I can't get the concept around my head on how to make the channel subscription and broadcasting dynamic
[18:41:24] SeanLazer: i have to do some mocking to test control flow in my action and it's messing with the rendered template. i don't care about the template at all in this test and i don't want to deal with it.
[18:42:10] war_pigs: has joined #RubyOnRails
[18:42:25] idefine: has joined #RubyOnRails
[18:47:01] Rodya_: has joined #RubyOnRails
[18:49:00] roelof: has joined #RubyOnRails
[18:49:42] roelof: How can I translate this to erb : http://lpaste.net/161963
[18:49:46] draynium: has joined #RubyOnRails
[18:50:14] xhoy: roelof: Het mogelijk maken om een vacture op de website te zetten. Het heeft ons uit eindelijk 4 weken gekost voor dat deze online stond.
[18:50:19] xhoy: sorry wrong past :P
[18:50:34] xhoy: roelof: https://haml2erb.org/
[18:51:28] xhoy: roelof: basicly its erb :)
[18:51:41] matt_d: roelof: do you want some of that content to be dynamic?
[18:52:02] roelof: no, just schowing a image that has a div in a link
[18:52:03] xhoy: but you can use some rails short cuts like, link_to pinbin_path or something :)
[18:52:18] xhoy: roelof: then you can just past this in a an erb file :)
[18:52:19] matt_d: roelof: just insert an "erb" tag: <%= @my_var %>
[18:52:40] smathy: ERB is a superset of HTML, so that is ERB.
[18:53:24] roelof: or can I do something like (link_to imagetag(logo.png :class => "logo") , rootpath) ?
[18:53:42] matt_d: roelof: oh.. rails provides an image helper if you'd like: <%= image_tag "image.png" %>
[18:54:39] roelof: matt_d: then I would be <%= link_to <%= image_tag "image.png" %> rootpath %>
[18:54:51] matt_d: roelof: yes: link_to some_path do\n image_tag "logo.png", class: "logo"\n end <-- encapsulated within correct "erb" tags of course
[18:54:58] roelof: I only have to find out how to put the class in the image-tag :)
[18:55:10] Rodya_: has joined #RubyOnRails
[18:56:02] matt_d: roelof: you already do know :)
[18:57:00] roelof: no, im not , when I do : <%= link_to <%= image_tag "logo.png", :class => "logo" %> rootpath %> I see this error message : undefined method `>' for false:FalseClass
[18:57:24] Limix: has joined #RubyOnRails
[18:57:54] matt_d: roelof: no, you need link_to some_path do within its own tag, then nest image_tag and then close them up
[18:58:08] matt_d: roelof: https://gist.github.com/anonymous/be977103e6016a5757a39a60c7d1b073
[18:58:10] emachnic: has joined #RubyOnRails
[18:59:19] triptec: has joined #RubyOnRails
[18:59:32] asymmetric1: has joined #RubyOnRails
[18:59:33] roelof: matt_d: thanks, learned another thing
[19:00:02] matt_d: roelof: any time
[19:01:42] roelof: another question : is it possible that the output of rspec do not contain a stack trace ?
[19:01:43] drusepth: has joined #RubyOnRails
[19:02:47] asymmetric2: has joined #RubyOnRails
[19:03:40] apotry: has joined #RubyOnRails
[19:04:25] sneakerhax: has joined #RubyOnRails
[19:06:17] matt_d: roelof: not sure, don't use it. have you checked the command line options?
[19:07:52] netzfisch: has joined #RubyOnRails
[19:08:44] apotry: has joined #RubyOnRails
[19:15:05] SteenJobs: has joined #RubyOnRails
[19:15:18] baweaver: has joined #RubyOnRails
[19:17:16] choke: has joined #RubyOnRails
[19:17:46] mdw: has joined #RubyOnRails
[19:18:42] yfeldblum: has joined #RubyOnRails
[19:19:23] Devalo: has joined #RubyOnRails
[19:20:07] berserk_ren: has joined #RubyOnRails
[19:20:19] n008f4g_: has joined #RubyOnRails
[19:20:43] mwlang: hmmm…What’s the smartest way to convert “false” and “true” strings to boolean? (looking at hidden inputs that are being set by javascript with string representations of “true” and “false”). I’m open to bettering the javascript or a Rails built-in helper if one exists.
[19:20:52] xall_: has joined #RubyOnRails
[19:21:07] mwlang: I just don’t want to do params[:apply_voucher] == ‘true’
[19:22:19] JesseH: has joined #RubyOnRails
[19:22:28] aegis3121: has joined #RubyOnRails
[19:22:41] drusepth: if eval(params[:apply_voucher]) ;)
[19:22:58] emachnic: has joined #RubyOnRails
[19:22:59] baweaver: has joined #RubyOnRails
[19:23:07] renegadeandy: has joined #RubyOnRails
[19:23:52] petor: has joined #RubyOnRails
[19:24:50] idefine_: has joined #RubyOnRails
[19:26:19] tubbo: mwlang: ActiveRecord::ConnectionAdapters::Columns::TRUE_VALUES.include? params[:apply_voucher]
[19:26:43] smathy: or ActiveRecord::Type::Boolean.new.type_cast_from_user params[:apply_voucher]
[19:27:36] xall_: has joined #RubyOnRails
[19:28:30] itsmeduncan: has joined #RubyOnRails
[19:28:42] maxx88: has joined #RubyOnRails
[19:33:56] drusepth: has joined #RubyOnRails
[19:34:54] htmldrum: has joined #RubyOnRails
[19:36:23] kodnin: has joined #RubyOnRails
[19:37:11] kodnin: has left #RubyOnRails: ()
[19:37:59] idefine: has joined #RubyOnRails
[19:38:07] Rodya_: has joined #RubyOnRails
[19:39:43] RegulationD: has joined #RubyOnRails
[19:40:59] idefine: has joined #RubyOnRails
[19:41:35] itsmeduncan: has joined #RubyOnRails
[19:41:45] Guest57947: has joined #RubyOnRails
[19:42:06] alexhartley: has joined #RubyOnRails
[19:42:24] theod: has joined #RubyOnRails
[19:42:41] drusepth: has joined #RubyOnRails
[19:44:48] tildes: has joined #RubyOnRails
[19:45:24] antgel: has joined #RubyOnRails
[19:46:18] pawnbox: has joined #RubyOnRails
[19:47:18] Detch: has joined #RubyOnRails
[19:48:20] emachnic: has joined #RubyOnRails
[19:48:37] ZerGabriel: has joined #RubyOnRails
[19:48:50] ur5us: has joined #RubyOnRails
[19:48:58] ZerGabriel: has joined #RubyOnRails
[19:51:56] macsteps: has joined #RubyOnRails
[19:54:22] crameth: has joined #RubyOnRails
[19:55:07] bronson: has joined #RubyOnRails
[19:55:27] crameth: has joined #RubyOnRails
[19:55:45] idefine: has joined #RubyOnRails
[19:57:50] idefine_: has joined #RubyOnRails
[19:59:41] adlerdias: has joined #RubyOnRails
[20:00:06] scepticulous: has joined #RubyOnRails
[20:01:14] baweaver: has joined #RubyOnRails
[20:01:45] emachnic: has joined #RubyOnRails
[20:04:15] gambl0re: has joined #RubyOnRails
[20:04:32] hobodave_: has joined #RubyOnRails
[20:05:19] maxx88: has left #RubyOnRails: ()
[20:06:28] djbkd: has joined #RubyOnRails
[20:08:12] idefine: has joined #RubyOnRails
[20:11:22] bbrowning_: has joined #RubyOnRails
[20:12:24] Devalo: has joined #RubyOnRails
[20:17:45] stardiviner: has joined #RubyOnRails
[20:20:57] Rodya_: has joined #RubyOnRails
[20:23:09] scepticulous: has joined #RubyOnRails
[20:26:17] ZerGabriel: has joined #RubyOnRails
[20:26:36] ZerGabriel: has joined #RubyOnRails
[20:26:56] jenrzzz: has joined #RubyOnRails
[20:26:56] jenrzzz: has joined #RubyOnRails
[20:27:49] Megamos: has joined #RubyOnRails
[20:28:00] smizell: has joined #RubyOnRails
[20:29:30] arBmind: has joined #RubyOnRails
[20:31:36] replay: has joined #RubyOnRails
[20:36:53] Guest57947: has joined #RubyOnRails
[20:37:52] gambl0re: has joined #RubyOnRails
[20:37:52] gambl0re: has joined #RubyOnRails
[20:39:01] bronson: has joined #RubyOnRails
[20:39:37] idefine: has joined #RubyOnRails
[20:42:53] xall_: has joined #RubyOnRails
[20:43:54] zave: has joined #RubyOnRails
[20:49:10] hobodave: has joined #RubyOnRails
[20:49:38] Sawbones: has joined #RubyOnRails
[20:50:15] crdpink2: has joined #RubyOnRails
[20:51:20] jessemcgilallen: has joined #RubyOnRails
[20:52:24] cschneid: has joined #RubyOnRails
[20:53:07] dionysus69: has joined #RubyOnRails
[20:53:31] cschneid: How can I have a partial where I can pass a local, or if not, use a default? `= title || "Default"` fails becaues it attempts to call a `title` method and fails. Is there a nicer way to do that other than either setting an instance var @title, or abusing `defined?`?
[20:53:32] JakFrist: has joined #RubyOnRails
[20:53:40] Sawbones: has joined #RubyOnRails
[20:54:05] cschneid: Goal is a reusable partial - render partial: 'header', locals: { title: "Foo" } or the same without the locals block
[20:54:10] Guest57947: has joined #RubyOnRails
[20:54:37] Sawbones: has joined #RubyOnRails
[20:57:04] mdw: has joined #RubyOnRails
[20:57:31] xalupeao: has joined #RubyOnRails
[20:57:52] gonzalo_: has joined #RubyOnRails
[20:58:16] mdw7: has joined #RubyOnRails
[20:58:18] xalupeao: has left #RubyOnRails: ()
[20:58:58] gonzalo_: i have a question
[20:59:04] dionysus69: has joined #RubyOnRails
[20:59:48] gonzalo_: i have a Class Subscriber with has_many Events .. and i need all events but with specific type event
[21:00:42] gonzalo_: s = Subscriber.first
[21:00:42] gonzalo_: s.Event # Here i need select only with type: 2 for example
[21:00:46] gonzalo_: is possible ?
[21:01:12] gonzalo_: ** s.events # Here i need select only with type: 2 for example
[21:01:39] drusepth: gonzalo_: can you do s.events.where(type: 2) ?
[21:01:40] gabr13l: has joined #RubyOnRails
[21:02:33] gabr13l: Hi. Has anyone used gulp w/ rails to transpile typescript to javascript? Where does the tsconfig file go? Thanks.
[21:02:42] jenrzzz: has joined #RubyOnRails
[21:07:35] triptec: has joined #RubyOnRails
[21:07:50] macsteps: has joined #RubyOnRails
[21:07:58] Devalo: has joined #RubyOnRails
[21:08:12] macsteps: has joined #RubyOnRails
[21:08:32] neanderslob: has joined #RubyOnRails
[21:10:07] idefine: has joined #RubyOnRails
[21:11:43] deur-_: has joined #RubyOnRails
[21:12:12] kareeoleez: has joined #RubyOnRails
[21:12:27] chridal: Anyone know about a board where a lot of U.S based Ruby on Rails devs hang around?
[21:12:55] havenwood: chridal: LA here.
[21:13:07] gabr13l: chridal: SF here.
[21:13:55] chridal: I actually need to sell off a ticket to RailsConf that I sadly won't be able to use. So I was looking for some sort of board where I could post it
[21:14:02] macsteps: has joined #RubyOnRails
[21:15:26] havenwood: Hmm, May 4-6 in Kansas City.
[21:15:54] drusepth: Kansas City is pretty great ~
[21:15:59] drusepth: (represent')
[21:16:25] baweaver: has joined #RubyOnRails
[21:17:00] chridal: Yea, tickets are $900 now. I'm selling for 500.
[21:20:14] havenwood: chridal: I'd crosspost the details in #ruby too.
[21:20:21] havenwood: Now's a good time of day.
[21:20:27] chridal: I'll try that. Thanks.
[21:20:47] Sawbones: has joined #RubyOnRails
[21:21:07] drusepth: If I've got a class Content with an owner association to a User, and a variable named 'owner', is there a good way to tell 1) that content.owner is a relation, and 2) that relation is intended to point to Users?
[21:21:27] drusepth: *variable with the value 'owner', of course :)
[21:22:23] idefine: has joined #RubyOnRails
[21:23:12] drusepth: I can technically do content.send(my_var_that_is_owner).is_a?(ActiveRecord_Associations_CollectionProxy) / content.send(my_var_that_is_owner).build.class.name, but I sincerely doubt that's the best way to do that :P
[21:24:58] petor: has joined #RubyOnRails
[21:25:56] yfeldblum: has joined #RubyOnRails
[21:26:30] mwlang: Content.owner isn’t directly assessible within instance method of that same class unless you do self.class.owner. So, is it reasonable to just assume Ruby’s variable scopes give you the right answer?
[21:26:54] mwlang: that is, owner in an instance method is a variable and not the association.
[21:26:59] lxsameer: has joined #RubyOnRails
[21:26:59] lxsameer: has joined #RubyOnRails
[21:27:20] mwlang: oh, wait…nevermind me, I’m thinking about scopes vs variables! not associations vs. variables.
[21:27:29] xall_: has joined #RubyOnRails
[21:27:39] mwlang: ACTION ponders the loooong week that has gone by.
[21:29:20] drusepth: no worries :) basically I have a big form on an object with a lot of relations to different classes, and I'd like a user to be able to select value(s) for them from autocomplete fields
[21:29:24] drusepth: something like https://gist.github.com/drusepth/afad327382dc2e2468d62df1efe2c622
[21:30:56] mwlang: You know…I’d grep the ActveAdmin code base to see how they solved that one.
[21:31:40] emachnic: has joined #RubyOnRails
[21:31:48] timdotrb: has joined #RubyOnRails
[21:32:30] drusepth: Hrm, I'll give it a look
[21:34:05] diegoaguilar: has joined #RubyOnRails
[21:34:28] timdotrb: I’m having tons of issues getting private_pub to work in production (messages are saved but not pushed to any of the clients). Is there anything else out there that’s good for getting real-time chat working in a rails app?
[21:35:06] diegoaguilar: has joined #RubyOnRails
[21:35:33] triptec: has joined #RubyOnRails
[21:36:05] mwlang: timdotrb: what approach are you using to push?
[21:36:12] gabr13l: has joined #RubyOnRails
[21:36:34] timdotrb: mwlang: publish_to “path” in create.js.erb
[21:37:10] mwlang: hmmm…just googled and see private_pub is a gem. Have you tried SSE? http://www.sitepoint.com/mini-chat-rails-server-sent-events/
[21:38:59] Kallis: has joined #RubyOnRails
[21:39:06] timdotrb: mwlang: I haven’t tried SSE.. That does say SSE can only listen, it can’t publish, so I’m not sure if that would work for a chat?
[21:41:25] timdotrb: I have seen that article, which I believe they continue as “realtime mini-chat with rails and faye”, which involved setting up a faye server. However, there are some steps required to secure the faye server which private_pub has already taken, hence why I was trying to use it
[21:41:42] timdotrb: Everything works locally, I just can’t for the life of me get it to work in production.
[21:42:56] alexhartley: has joined #RubyOnRails
[21:43:44] idefine: has joined #RubyOnRails
[21:43:49] baweaver: has joined #RubyOnRails
[21:44:36] certainty: has joined #RubyOnRails
[21:44:50] SPYGAME: has joined #RubyOnRails
[21:50:54] SPYGAME: hey guys, need some help with ruby-opencv installation https://gist.github.com/furqan85/f7b503816a80a8e2b30065b1e8c1e130
[21:51:11] triptec: has joined #RubyOnRails
[21:51:39] idefine: has joined #RubyOnRails
[21:52:07] S_Waqas: has joined #RubyOnRails
[21:52:08] malcolmva: has joined #RubyOnRails
[21:54:05] aloneintheworld: has joined #RubyOnRails
[21:58:49] xall_: has joined #RubyOnRails
[21:59:00] superlou: has joined #RubyOnRails
[22:02:31] duderonomy: has joined #RubyOnRails
[22:03:02] emachnic: has joined #RubyOnRails
[22:03:16] ur5us: has joined #RubyOnRails
[22:04:44] Megamosaren: has joined #RubyOnRails
[22:05:27] smathy: spygame, your comment about following the install guide but had no luck with the gem installation doesn't make sense.
[22:05:44] smathy: spygame, that install guide isn't for the gem.
[22:08:20] rafaelfr_: has joined #RubyOnRails
[22:08:33] barhum2013: has joined #RubyOnRails
[22:11:04] idefine_: has joined #RubyOnRails
[22:11:32] zave: has joined #RubyOnRails
[22:11:41] pawnbox: has joined #RubyOnRails
[22:12:00] SPYGAME: smathy: yes, but it's a pre- requisite to the gem installation if i understand it correctly
[22:13:00] smathy: spygame, right, so did you perform the steps in that installation guide? And they worked without any error?
[22:13:27] FooMunki: has joined #RubyOnRails
[22:13:44] SPYGAME: smathy: yes i performed the steps as mentioned, i was able to install opencv but gem installation is giving me errors
[22:14:08] smathy: spygame, right, and do you have that file it mentions anywhere on your system?
[22:14:38] sbarg: has left #RubyOnRails: ()
[22:14:50] smathy: spygame, core.hpp
[22:14:54] Devalo: has joined #RubyOnRails
[22:15:16] Guest57947: has joined #RubyOnRails
[22:16:39] sleungcy: has joined #RubyOnRails
[22:19:55] alexhartley: has joined #RubyOnRails
[22:21:23] triptec: has joined #RubyOnRails
[22:21:34] petor: has joined #RubyOnRails
[22:23:05] mwlang: timdotrb: production issue could be related to a number of things from apache/nginx config to firewall settings, etc. without details, hard for me to help, but I’d suggest studying the log files for your http server as well as rails logs and see.
[22:23:37] gabr13l: has left #RubyOnRails: ()
[22:23:53] mwlang: also, try running rails on the production server (bundle exec rails s) and connecting on port 3000 and see if it works that way.
[22:24:05] mwlang: if it does, then you know it’s apache/nginx
[22:24:15] timdotrb: mwlang: I’ve tried setting up the chat app on a Linode VPS, as well as on Heroku. In both scenarios, the message is saved and the web app says it rendered create.js.erb, but the message never appears
[22:25:13] mwlang: timdotrb: eliminate the server for now by directly running rails on the Linode VPS.
[22:25:40] timdotrb: mwlang: I’ve also tried running it from the web server. I wasn’t sure what to set the production URL as
[22:25:52] Sawbones: has joined #RubyOnRails
[22:25:54] timdotrb: mwlang: so I tried localhost, as well as setting a fake url in hosts
[22:25:58] SPYGAME: smathy: core.hpp is here /home/spygame/opencv/modules/core/include/opencv2
[22:26:08] SPYGAME: smathy: core.hpp is here /home/spygame/opencv/modules/core/include/opencv2/core.hpp
[22:26:25] mwlang: timdotrb: the public IP address of the VPS or the DNS if you’ve added one will work.
[22:27:18] timdotrb: mwlang: the problem I seem to be having there is a connection refused error. I’ve tried adding an exception to port 9292 in the firewall, as well as completely disabling the firewall to no avail
[22:27:29] timdotrb: I haven’t tried the public IP address..
[22:28:29] renegadeandy: has joined #RubyOnRails
[22:29:23] timdotrb: mwlang: one thing I haven’t tried is the URL / IP with /faye. Would that be required?
[22:29:29] timdotrb: i.e. http://host.com/faye
[22:30:11] smathy: spygame, ah, why is it there? Why not in your system lib somewhere?
[22:30:19] mwlang: if the same worked locally http://localhost:3000/faye, then do http://host.com:3000/faye
[22:30:29] smathy: spygame, anyway, try setting --with-opencv_nonfreelib=/home/spygame/opencv/modules/core/include
[22:30:47] smathy: and/or --with-opencv-include=same
[22:33:01] Guest57947: has joined #RubyOnRails
[22:36:02] benlieb: has joined #RubyOnRails
[22:37:02] barhum2013: has joined #RubyOnRails
[22:37:37] SPYGAME: smathy: invalid option: --with-opencv_nonfreelib=
[22:37:51] SPYGAME: is this a valid option ?
[22:37:54] rbr: has joined #RubyOnRails
[22:39:14] smathy: spygame, setting to a value might not be, try just the --with-opencv-include one (you're doing the -- thing right? So gem doesn't see it as *it's* option?)
[22:39:21] tfitts: has joined #RubyOnRails
[22:40:09] SPYGAME: i was doing gem install ruby-opencv -- --with-opencv_nonfreelib=/home/spygame/opencv/modules/core/include
[22:40:47] SPYGAME: and i still have the same error :(
[22:40:50] smathy: spygame, perfect, so yeah, just try with the other option instead, --with-opencv-include
[22:41:12] quazimodo: has joined #RubyOnRails
[22:41:17] roamingdog: has joined #RubyOnRails
[22:41:27] SPYGAME: yeah just did that with the path you just mentioned. same error extconf.rb:63:in `block in <main>': opencv2/core/core.hpp not found. (RuntimeError)
[22:41:39] smathy: spygame, can try --with-opt-include too, same setting.
[22:41:51] tfitts: I have a form using simple_form that has an association for a has_many :through. When I create the association by checking the box the after_create callback fires on it like I would expect. If I uncheck a box for an association the association gets deleted but no callbacks ever fire. I've tried before_ and after_ save, destroy, and commit and none of
[22:41:52] tfitts: them fire.
[22:42:28] nickenchuggets: has joined #RubyOnRails
[22:43:41] scott_o: has joined #RubyOnRails
[22:48:01] smathy: tfitts, it'll just be removing the association, not the record.
[22:50:05] tfitts: smathy: shouldn't a before_save or after_save callback be fired?
[22:50:33] tfitts: also, I can actually see in the log that it is actually deleting the record, not just setting the association to nil
[22:51:31] smathy: tfitts, on the :through record? Maybe. But not on the end record, it's not touched at all.
[22:52:02] smathy: tfitts, huh, shouldn't be, although I'm several layers deep in totally guessing what you're talking about now.
[22:52:19] aghalarp: has joined #RubyOnRails
[22:52:29] tfitts: yeah, the callback is on the through record
[22:53:16] brianpWins: has joined #RubyOnRails
[22:54:03] Kallis: has joined #RubyOnRails
[22:54:09] DefV: has joined #RubyOnRails
[22:54:51] tfitts: item -> channels -> store. the channel record gets deleted but no callbacks are fired
[22:55:25] lemur: has joined #RubyOnRails
[22:55:37] SPYGAME: has joined #RubyOnRails
[22:58:25] emachnic: has joined #RubyOnRails
[23:00:16] DefV: has joined #RubyOnRails
[23:03:53] triptec: has joined #RubyOnRails
[23:04:35] Spami: has joined #RubyOnRails
[23:09:01] diegoaguilar: has joined #RubyOnRails
[23:09:01] Sawbones: has joined #RubyOnRails
[23:09:24] DragonPunch: has joined #RubyOnRails
[23:10:17] eyeamaye: has joined #RubyOnRails
[23:10:38] smathy: tfitts, is that where you have the after_create callback too?
[23:10:55] tfitts: yes, and the after_create callback fires just fine
[23:11:29] smathy: tfitts, ok, sounds like a bug.
[23:11:31] tfitts: https://github.com/rails/rails/issues/7618 I think it's this. I guess I can do an after_remove callback
[23:15:35] barhum2013: has joined #RubyOnRails
[23:19:29] triptec: has joined #RubyOnRails
[23:21:42] baweaver: has joined #RubyOnRails
[23:22:40] kies: has joined #RubyOnRails
[23:23:04] _Tariq: has joined #RubyOnRails
[23:29:42] maxx88: has joined #RubyOnRails
[23:31:11] DefV: has joined #RubyOnRails
[23:32:48] ismaelga: has joined #RubyOnRails
[23:33:22] wldcordeiro: has joined #RubyOnRails
[23:34:08] ur5us: has joined #RubyOnRails
[23:37:52] ur5us: has joined #RubyOnRails
[23:39:03] benlieb: has joined #RubyOnRails
[23:41:18] Megamos: has joined #RubyOnRails
[23:44:28] macsteps: has joined #RubyOnRails
[23:45:47] matt_d: hi hypnosb
[23:48:19] bronson: has joined #RubyOnRails
[23:51:06] barhum2013: has joined #RubyOnRails
[23:52:07] macsteps: has joined #RubyOnRails
[23:55:49] macsteps: has joined #RubyOnRails