« Back to channel list

#RubyOnRails - 02 June 2016

« Back 1 day Forward 1 day »
[00:01:26] kies: has joined #RubyOnRails
[00:04:25] Aherin: has joined #RubyOnRails
[00:09:26] arBmind: has joined #RubyOnRails
[00:09:45] triptec: has joined #RubyOnRails
[00:10:17] IFrank004: has joined #RubyOnRails
[00:10:20] IFrank00: has joined #RubyOnRails
[00:10:29] macsteps: has joined #RubyOnRails
[00:10:36] chouhoulis: has joined #RubyOnRails
[00:15:14] gambl0re: has joined #RubyOnRails
[00:18:13] qsun: has joined #RubyOnRails
[00:19:06] owenjones: has joined #RubyOnRails
[00:21:45] manfrin: has joined #RubyOnRails
[00:24:11] dandaman: has joined #RubyOnRails
[00:24:41] roamingdog: has joined #RubyOnRails
[00:26:11] rickmasta: has joined #RubyOnRails
[00:33:39] lightt: has joined #RubyOnRails
[00:34:04] lightt: has joined #RubyOnRails
[00:40:54] one_zero: has joined #RubyOnRails
[00:43:22] RegulationD: has joined #RubyOnRails
[00:44:36] idefine_: has joined #RubyOnRails
[00:44:38] cd83x: has joined #RubyOnRails
[00:45:03] roamingdog: has joined #RubyOnRails
[00:47:58] quazimodo: has joined #RubyOnRails
[00:48:32] jenrzzz: has joined #RubyOnRails
[00:51:49] hahuang61: has joined #RubyOnRails
[00:52:40] SteenJobs: has joined #RubyOnRails
[00:53:00] quazimod1: has joined #RubyOnRails
[00:53:40] roamingdog: has joined #RubyOnRails
[00:54:42] roamingdog: has joined #RubyOnRails
[00:55:49] nettoweb: has joined #RubyOnRails
[00:57:34] tenderlo_: has joined #RubyOnRails
[00:59:07] emachnic: has joined #RubyOnRails
[01:00:05] Phaenix: has joined #RubyOnRails
[01:02:33] dandaman: has joined #RubyOnRails
[01:03:04] AntiSpamMeta: has joined #RubyOnRails
[01:03:15] sevenseacat: has joined #RubyOnRails
[01:03:28] Phaenix: Hi. How could I improve this implementation so I don't need to provide/rely on multiple fields? https://gist.github.com/phaenix/f0508014f6e95f517c21463e5b4d0fc7
[01:03:40] lightt: has joined #RubyOnRails
[01:06:35] agent_white: has joined #RubyOnRails
[01:09:06] roamingdog: has joined #RubyOnRails
[01:10:16] douglasc_: has joined #RubyOnRails
[01:12:48] wd40s: has joined #RubyOnRails
[01:13:46] datanoise: has joined #RubyOnRails
[01:16:42] Radar: Phaenix: !gist-usage
[01:16:42] helpa: Phaenix: How to use Gist properly: https://github.com/radar/guides/blob/master/using-gist.markdown
[01:17:47] Radar: Phaenix: You can validate the presence / uniqueness of a port only when the protocol is TCP / UDP.
[01:17:54] roamingdog: has joined #RubyOnRails
[01:18:11] Radar: Phaenix: I don't understand this: https://gist.github.com/phaenix/f0508014f6e95f517c21463e5b4d0fc7#file-gistfile1-txt-L8-L13
[01:18:22] Radar: Or this: https://gist.github.com/phaenix/f0508014f6e95f517c21463e5b4d0fc7#file-gistfile1-txt-L43
[01:18:27] Radar: Or this: https://gist.github.com/phaenix/f0508014f6e95f517c21463e5b4d0fc7#file-gistfile1-txt-L86
[01:18:37] Radar: I think #2 and #3 rely on a better explanation of #1.
[01:19:05] djbkd: has joined #RubyOnRails
[01:19:49] dandaman: has joined #RubyOnRails
[01:20:26] Ropeney: has joined #RubyOnRails
[01:21:41] dandaman: has joined #RubyOnRails
[01:25:00] refinerysource: has joined #RubyOnRails
[01:25:08] roamingdog: has joined #RubyOnRails
[01:26:59] dandaman: has joined #RubyOnRails
[01:32:25] twilling: has joined #RubyOnRails
[01:32:41] Phaenix: Radar: I've updated the gist, does that explain it better? https://gist.github.com/phaenix/f0508014f6e95f517c21463e5b4d0fc7
[01:34:28] roamingdog: has joined #RubyOnRails
[01:35:04] Spami_: has joined #RubyOnRails
[01:35:58] jancel: has joined #RubyOnRails
[01:36:23] roamingdog: has joined #RubyOnRails
[01:37:12] jenrzzz: has joined #RubyOnRails
[01:38:50] cd83x: has joined #RubyOnRails
[01:39:06] Radar: che cking
[01:39:42] Inside: has joined #RubyOnRails
[01:39:47] jeyraof: has joined #RubyOnRails
[01:40:03] Radar: Phaenix: I don't know how to help you here. It makes sense, but I don't know where to start on it.
[01:40:04] _Tariq: has joined #RubyOnRails
[01:40:05] diegoaguilar: has joined #RubyOnRails
[01:40:23] Phaenix: Oh well, thanks for looking. :-)
[01:41:54] roamingdog: has joined #RubyOnRails
[01:49:22] arBmind: has joined #RubyOnRails
[01:50:04] Spami_: has joined #RubyOnRails
[01:52:35] infinitone: has joined #RubyOnRails
[01:53:13] cd83x: has joined #RubyOnRails
[01:56:10] flashpoint9: has joined #RubyOnRails
[02:01:14] deweysdecimal: has joined #RubyOnRails
[02:07:08] deweysdecimal: has joined #RubyOnRails
[02:08:10] Guest48: has joined #RubyOnRails
[02:08:12] dandaman: has joined #RubyOnRails
[02:09:16] quazimodo: has joined #RubyOnRails
[02:09:20] quazimod1: has joined #RubyOnRails
[02:12:15] _Tariq: has joined #RubyOnRails
[02:12:24] der-landgraf: has joined #RubyOnRails
[02:14:51] bachmann: has joined #RubyOnRails
[02:15:42] emachnic: has joined #RubyOnRails
[02:18:27] _Tariq_: has joined #RubyOnRails
[02:20:35] shintao: has joined #RubyOnRails
[02:21:44] triptec: has joined #RubyOnRails
[02:23:22] Devalo: has joined #RubyOnRails
[02:24:55] jancel: has joined #RubyOnRails
[02:25:22] indianowl: has joined #RubyOnRails
[02:26:37] refinerysource: has joined #RubyOnRails
[02:28:45] watersoul: has joined #RubyOnRails
[02:30:21] shintao: Hey there. I would like to use tracking pixels to track email opens. Is it practical to set up the pixel as a route in my Rails app? I'm worried something like that would bog down the rest of my app.
[02:30:26] Emily: has joined #RubyOnRails
[02:32:24] watersoul: has joined #RubyOnRails
[02:32:43] Ropeney: shintao, use a 1px image
[02:33:38] Ropeney: shintao http://garethrees.org/2007/11/14/pngcrush/ smallest png
[02:33:48] sevenseacat: that doesnt really answer the qustion
[02:34:11] pipework: shintao: why do you need rails to use a webserver that logs requests to routes?
[02:34:16] Ropeney: itll bog down your app if you have more connections then your app can handle then
[02:34:21] pipework: Are you trying to get more information?
[02:34:46] pipework: What are you doing that requires the rails stack and not just a webserver properly configured (obviously you want one of these in front of rails too)
[02:35:06] Ropeney: pipework, it sounded like email confirmation?
[02:36:19] sevenseacat: it sounded like a tracking pixel
[02:36:31] emachnic: has joined #RubyOnRails
[02:36:51] sevenseacat: i dont see a problem with setting it up as a route in your app so you can do detailed statistic reporting
[02:37:10] Ropeney: yep, and using the smallest pixel image will help not bog down the app :)
[02:37:20] shintao: Sorry I should have elaborated. Most likely there will be an action to be performed when the email is opened. At the very least I would like to log it in my database for later processing.
[02:37:23] triptec: has joined #RubyOnRails
[02:37:44] sevenseacat: its okay, some people just like being overly pedantic
[02:38:02] shintao: I've seen this done on a large scale (page loads on a website) using a CDN and processing the log files. I'm thinking maybe that's overkill to start with.
[02:39:23] sevenseacat: thats certainly an option too, a more involved one though
[02:39:26] Ropeney: shintao, I have use it for this purpose if you were interested in some code. I basically setup a route that sent back a 73byte png and inside the action it calls a woorker to store the data in database so instant responses.
[02:41:11] pipework: Ropeney: It's a tracking pixel, no need to use ruby at all, let alone the whole rails stack and all that it entails.
[02:41:25] Ropeney: pipework, but its definitely easy too
[02:41:35] pipework: Ropeney: So is cp file /path/to/www
[02:41:45] pipework: your webserver probably logs already
[02:41:49] Ropeney: and monitor apache/nginx logs?
[02:42:08] pipework: Ropeney: You get monitoring rails logs for free?
[02:42:17] pipework: or are you just reusing another library to get it for you?
[02:42:55] shintao: Ah, that's another question I had! Besides reading/writing to my database, is it correct that I should be making any external API calls from a worker?
[02:43:09] pipework: shintao: Well, it depends.
[02:43:34] shintao: Using the Gmail API to send an email for example.
[02:43:34] pipework: shintao: You should only make external calls that need to be returned inside the response of the current request inside the request, others should be offloaded to workers.
[02:43:40] pipework: Think inversely about it, is what I mean.
[02:45:02] pipework: shintao: "What _must_ be in the response?"
[02:45:05] owenjones: has joined #RubyOnRails
[02:45:25] pipework: After that, whether it lives in a worker, a thread, a process, etc. is really up to you, but workers are a viable option!
[02:46:10] maxz: has joined #RubyOnRails
[02:52:30] hahuang61: has joined #RubyOnRails
[02:53:14] crystal77: has joined #RubyOnRails
[02:54:34] rogue_koder: has joined #RubyOnRails
[02:54:35] shintao: thanks for the advice I'll check out that option
[02:55:19] bachmann: has joined #RubyOnRails
[02:59:47] wd40s: has joined #RubyOnRails
[03:00:14] sandstrom: has joined #RubyOnRails
[03:05:13] emachnic: has joined #RubyOnRails
[03:06:40] DanByc: Whats up sevenseacat!
[03:06:51] sevenseacat: DanByc: morning :)
[03:07:07] DanByc: This tutorial is incredible
[03:07:48] sevenseacat: glad you're liking it!
[03:08:20] Cohedrin: has joined #RubyOnRails
[03:08:43] DanByc: Yeah the rspec stuff was irritating at first but it clicked halfway through ch. 4.
[03:09:21] sevenseacat: yeah I would have liked to expand the first few chapters a bit. it's a lot to take in all at once
[03:10:38] Ragen: has joined #RubyOnRails
[03:12:09] DanByc: I thought it was pretty fast paced, but thought you guys broke down every little bit perfectly. Very much appreciated!
[03:12:29] IFrank004: has joined #RubyOnRails
[03:12:29] IFrank00: has joined #RubyOnRails
[03:13:12] braincrash: has joined #RubyOnRails
[03:15:55] yfeldblum: has joined #RubyOnRails
[03:18:40] idefine: has joined #RubyOnRails
[03:18:55] yfeldblum: has joined #RubyOnRails
[03:19:43] justrohu: has joined #RubyOnRails
[03:20:55] k3rn31: has joined #RubyOnRails
[03:21:14] wd40s: has joined #RubyOnRails
[03:22:15] gambl0re: has joined #RubyOnRails
[03:22:22] quazimodo: has joined #RubyOnRails
[03:22:25] quazimod1: has joined #RubyOnRails
[03:22:44] Ragen: hey i'm a linux new-be and never used xchat b4.....i keep getting BUILD FAILED (LinuxMint 17.3 using ruby-build 20160426)
[03:25:53] chouhoulis: has joined #RubyOnRails
[03:28:30] chouhoulis: has joined #RubyOnRails
[03:28:45] SteenJobs: has joined #RubyOnRails
[03:29:54] crystal77: has joined #RubyOnRails
[03:30:27] glasz_: has joined #RubyOnRails
[03:31:20] qejk: has joined #RubyOnRails
[03:33:47] Radar: Ragen: Please put the full output on gist.github.com
[03:34:08] sypheren: has joined #RubyOnRails
[03:36:13] chipotle: has joined #RubyOnRails
[03:36:32] DanByc: I'm having a small styling problem with the bootstrap responsive styling at the end of Chapter 4 in the rails 4 tutorial. Everything works well enough, however after adding the responsive.scss file, my buttons always float to the left as if the window was small, even at full screen. I have doubled back my code, but still cannot find out where I wen
[03:37:16] DanByc: https://gist.github.com/DanByczynski18/0363e31d2bec2a8462a313b867c39313 <-- These are my stylesheets, I believe they are correct though
[03:42:29] dandaman: has joined #RubyOnRails
[03:46:11] idefine: has joined #RubyOnRails
[03:46:13] DanByc: Figured it out! Had @import "responsive" in the wrong style sheet!
[03:48:26] Inside_: has joined #RubyOnRails
[03:48:46] AnoHito_: has joined #RubyOnRails
[03:48:50] indianowl: has joined #RubyOnRails
[03:48:50] chouhoul_: has joined #RubyOnRails
[03:49:28] beilabs: has joined #RubyOnRails
[03:52:48] Seich: has joined #RubyOnRails
[03:53:31] yfeldblum: has joined #RubyOnRails
[03:53:37] sevenseacat: has joined #RubyOnRails
[03:54:16] yfeldblum: has joined #RubyOnRails
[03:54:38] jancel: has joined #RubyOnRails
[03:54:49] srinidhi: has joined #RubyOnRails
[03:56:06] rogue_koder_: has joined #RubyOnRails
[03:58:02] sevenseacat: DanByc: your application.css should import the responsive stylesheet, and the responsive stylesheet shouldnt have all the imports at the top
[03:58:25] emachnic: has joined #RubyOnRails
[03:59:15] sevenseacat: you can compare your app to our sample app at that point in time here: https://github.com/rubysherpas/r4ia_examples/tree/3f18bc9dc2424013fa55de7916000cc3cbed37d3/ticketee
[04:00:42] DanByc: Awesome, will do. And I figured that out. Still had the other imports in there though, I suppose its not very DRY to put them in there
[04:01:08] sevenseacat: ah okay, I timed out after you posted the stylesheets :) only saw the message after I got back
[04:01:23] DanByc: no worries, thanks for the help anyway
[04:06:07] MarkTR: has joined #RubyOnRails
[04:09:10] JesseH: has joined #RubyOnRails
[04:09:45] linocisco: has joined #RubyOnRails
[04:12:51] yfeldblum: has joined #RubyOnRails
[04:13:44] linocisco: hi all, I would like to create customer database entry form and report on demand also on webpage and pdf
[04:13:47] linocisco: how to do this?
[04:14:10] indianowl: has joined #RubyOnRails
[04:14:34] yfeldblum: has joined #RubyOnRails
[04:16:37] scepticulous: has joined #RubyOnRails
[04:18:45] ketherah: has joined #RubyOnRails
[04:19:10] baweaver: linocisco: What have you tried?
[04:19:58] linocisco: baweaver, nothing. I also need to host free after that. is there any free hosting like wordpress?
[04:20:16] baweaver: linocisco: Then you need to go out and read tutorials
[04:21:07] indianowl: has joined #RubyOnRails
[04:21:08] AnoHito_: has joined #RubyOnRails
[04:21:25] baweaver: Many of them will answer questions far faster than you will get here.
[04:21:26] linocisco: baweaver, actually I need to develop asap learn by doing as need to finish in 2 days.
[04:21:45] baweaver: Read the tutorials
[04:22:14] baweaver: They'll cover most all of the questions you have
[04:22:17] sevenseacat: not asking for much linocisco are you?
[04:22:41] baweaver: To fully learn a framework and have an application live is beyond reason
[04:22:51] baweaver: in your timeframe
[04:23:04] monoprotic: has joined #RubyOnRails
[04:23:12] grassass: has joined #RubyOnRails
[04:23:31] baweaver: to an experienced developer, maybe, but that would still be pushing it.
[04:24:20] baweaver: I don't say this to be mean, but rather to let you know that what you're asking is likely impossible.
[04:24:56] neanderslob: has joined #RubyOnRails
[04:25:12] beilabs: has joined #RubyOnRails
[04:26:04] hinbody: has joined #RubyOnRails
[04:26:27] 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
[04:26:38] baweaver: That'll take you through the basics at least.
[04:27:13] baweaver: There are some free tutorials, but this one tends to be the best.
[04:28:43] dionysus69: has joined #RubyOnRails
[04:31:58] djbkd: has joined #RubyOnRails
[04:32:37] datanoise: has joined #RubyOnRails
[04:35:20] pawnbox: has joined #RubyOnRails
[04:36:10] k3rn31: has joined #RubyOnRails
[04:37:19] JakFrist: has joined #RubyOnRails
[04:39:03] nickenchuggets: has joined #RubyOnRails
[04:39:03] nickenchuggets: has joined #RubyOnRails
[04:39:54] ziggy: has joined #RubyOnRails
[04:44:51] hahuang61: has joined #RubyOnRails
[04:45:37] RegulationD: has joined #RubyOnRails
[04:48:00] beilabs: has joined #RubyOnRails
[04:48:50] triptec: has joined #RubyOnRails
[04:49:33] nickenchuggets: has joined #RubyOnRails
[04:51:24] indianowl: any one has some sample tutorail for cocoon gen for nested form
[04:53:11] emachnic: has joined #RubyOnRails
[04:54:13] Coldblackice: has joined #RubyOnRails
[04:56:08] dandaman: has joined #RubyOnRails
[04:58:24] dandaman: has joined #RubyOnRails
[04:58:40] IFrank004: has joined #RubyOnRails
[04:58:40] IFrank00: has joined #RubyOnRails
[05:05:21] triptec: has joined #RubyOnRails
[05:05:38] shinnya: has joined #RubyOnRails
[05:06:39] Devalo: has joined #RubyOnRails
[05:06:58] nickjj_: has joined #RubyOnRails
[05:08:49] idefine: has joined #RubyOnRails
[05:17:00] Pupeno: has joined #RubyOnRails
[05:17:53] davidw: has joined #RubyOnRails
[05:21:54] jancel: has joined #RubyOnRails
[05:27:42] owenjones: has joined #RubyOnRails
[05:28:40] ur5us: has joined #RubyOnRails
[05:29:38] roelof: has joined #RubyOnRails
[05:29:59] roelof: someon e a idea for this problem : https://www.reddit.com/r/rails/comments/4m2893/how_to_test_a_a_tag_without_the_href_with_capabary/
[05:32:01] sevenseacat: roelof: `click_link "Boekhouding"`
[05:32:46] sevenseacat: also, the name of the library is capybara, not capabary.
[05:34:15] roelof: sevenseacat: still this errror message : Unable to find link "Boekhouding"
[05:34:24] sevenseacat: are you looking at the right page?
[05:35:25] JakFrist: has joined #RubyOnRails
[05:38:13] phredus: has joined #RubyOnRails
[05:38:29] Pupeno: has joined #RubyOnRails
[05:39:17] tildes_: has joined #RubyOnRails
[05:39:18] wd40s: has joined #RubyOnRails
[05:46:20] roelof: sevenseacat yes, I do
[05:47:54] roelof: as I said on reddit. When I do this : find("a", :text => "Boekhouding").click . its finding it but the submenu do not get opened
[05:48:19] cd83x: has joined #RubyOnRails
[05:50:00] sandstrom: has joined #RubyOnRails
[05:51:56] sevenseacat: how do you know?
[05:52:18] sevenseacat: and dont say because of save_and_open_page because that has nothing to do with javascript
[05:56:42] DZj091231kld: has joined #RubyOnRails
[05:58:08] roelof: oke, I used save_and_open_page after the click_link and I see that the style of the submenu was still hidden and the submenu could not be found
[05:58:49] phredus: has joined #RubyOnRails
[05:59:57] moeabdol: has joined #RubyOnRails
[06:00:35] beilabs: has joined #RubyOnRails
[06:00:43] datanoise: has joined #RubyOnRails
[06:00:58] roelof: then I see : Unable to find link "Rekening schema" . where it could be found here : Unable to find link "Rekening schema" if the style is not hidden
[06:01:22] roelof: or is the problem I use poltergeist
[06:01:58] roelof: sorry : I could be found here : <%= link_to "Rekening schema", accounts_path %>
[06:07:00] Macaveli: has joined #RubyOnRails
[06:08:54] ur5us: has joined #RubyOnRails
[06:08:59] eGGshke: has joined #RubyOnRails
[06:10:11] roelof: sevenseacat: so I get the feeling to run around in circles :(
[06:10:36] sevenseacat: roelof: I don't have a complete picture of your problem because you've only posted like four lines of code.
[06:11:55] roelof: sevenseacat: what can I do to let you see the whole picture. Pasting the whole menu in reddit ?
[06:12:09] sevenseacat: roelof: let's start with the full code for the test and the full error
[06:12:18] comrad: has joined #RubyOnRails
[06:12:57] Robtop__: has joined #RubyOnRails
[06:13:50] roelof: sevenseacat: here you have : https://gist.github.com/rwobben/c4aebe105ed4b3e021a5a40edcf521de
[06:14:52] sevenseacat: roelof: okay, and where's the view that has this "Rekening schema" link in it?
[06:14:59] Macaveli: has joined #RubyOnRails
[06:15:01] jetpackjoe: has joined #RubyOnRails
[06:16:39] roelof: sevenseacat: updated the gist with the menu view
[06:17:27] sevenseacat: roelof: so what makes that menu appear?
[06:18:14] roelof: you mean the submenu ?
[06:18:34] sevenseacat: arathald: good afternoon
[06:18:58] roelof: you can see the rekening schema menu choice after you clicked on the boekhouding link
[06:19:09] sevenseacat: roelof: and what makes that menu appear?
[06:19:23] roelof: the boekhouden link appears every time
[06:19:35] sevenseacat: what makes the Rekening Schema link appear?
[06:19:53] sevenseacat: where is the code for that?
[06:19:54] roelof: a click on the Boekhouding link
[06:20:20] roelof: moment, I have to figure out what javascript does that
[06:20:47] Pazician: has joined #RubyOnRails
[06:20:51] arathald: so, we have tests that call ImageMagick binaries (via paperclip). For reasons I won't get into at the moment, each of these invocations (hundreds across our entire test suite) spits out an error to stderr. I want to suppress just these specific errors (leave other errors like deprecation warnings)
[06:21:56] sevenseacat: roelof: also, if the link is made to appear via javascript, your test needs to be configured to use a webdriver that supports Javascript
[06:22:29] roelof: Does poltergeist not support javascript then
[06:22:38] sevenseacat: where is the test configured to use poltergeist?
[06:22:46] arathald: to effectively redirect stderr for subprocesses, I'm using $stderr.reopen. I spent the entire day trying to figure out how to create an IO object (subclass or a mock/delegate) that would let me do this filtering, and spit everything else back out to stderr. It's looking like reopen ends up doing some really deep type checks so I couldn't get the mock/delegate approach to work... and I could get a subclass to actually override everything
[06:23:11] roelof: sevenseacat: in rails_helper.rb : require 'capybara/poltergeist' Capybara.javascript_driver = :poltergeist
[06:23:20] sevenseacat: ok, thats for a javascript driver
[06:23:27] sevenseacat: where are you configuring your test to use that driver
[06:23:30] roelof: and I found the javascript. I will add it also to the gist
[06:23:52] arathald: I ended up redirecting stderr to a temp file, then reading it back in at the end of every test, and dumping anything not filtered out back to stderr. I'm just wondering if there was a better way of doing this
[06:25:07] Dimik: has joined #RubyOnRails
[06:25:14] arathald: (I also tried StringIO, but that doesn't work with reopen, presumably because reopen actually messes with file handles, so it can't be a mocked file that only exists in memory in the ruby app?)
[06:25:26] roelof: sevenseacat: added the javascript to the gist and I said earlier . I did add require 'capybara/poltergeist' Capybara.javascript_driver = :poltergeist in rails_helper.rb
[06:25:27] sevenseacat: roelof: if your test relies on JavaScript, typically you would tag the test to tell it as such, ie. scenario "my scenario", js: true do
[06:25:40] sevenseacat: roelof: and again that doesnt tell that specific test to use that driver
[06:26:04] arathald: I just jumped into the deep end of RoR in the past couple of weeks since I just started a new job using it as its main web stack
[06:26:13] arathald: so I only sort of know what I'm doing :)
[06:26:45] sevenseacat: arathald: to be quite honest I'd fix the error, not hide it.
[06:27:34] roelof: sevenseacat: oke, another error : http://lpaste.net/165055
[06:27:42] arathald: sevenseacat: the error is about a dependency lib not having a version. googling led to the answer that there's multiple versions of this lib accessible, so while ImageMagick finds one and works, it complains about it
[06:28:00] sevenseacat: roelof: great, now you can fix the JavaScript error on the page.
[06:28:04] sevenseacat: roelof: good luck!
[06:28:25] arathald: the dependency is Libxml.so.2 - the way our dependency system works means it's next to impossible to fix that cleanly
[06:28:54] arathald: because both the version installed on the OS and the one pulled in by the dependency system end up visible
[06:29:08] arathald: it correctly chooses the one pulled in as a dep, but it complains about it
[06:29:22] arathald: it's really an entirely spurious and unnecessary error
[06:29:33] arathald: at least in the context we're running in
[06:29:46] sevenseacat: good to know.
[06:31:08] arathald: in other words, I know I'm looking at the right problem, even if it might not seem like it. I've been very far down this rabbit hole already. I figured the context of our proprietary dep system wasn't interesting to you so I skipped it
[06:31:38] arathald: plus at this point, I'm curious about the problem I was trying to solve today, even if it turns out to be shaving a yak
[06:33:26] arathald: and this seemed like a good place to ask about some of the stranger intricacies of IO and how it fits in with everything else
[06:36:52] phredus: has joined #RubyOnRails
[06:41:37] emachnic: has joined #RubyOnRails
[06:42:06] njero: has joined #RubyOnRails
[06:42:40] cd83x: has joined #RubyOnRails
[06:45:15] arBmind: has joined #RubyOnRails
[06:45:30] roelof: sevenseacat: thanks, I hope I can solve it
[06:46:50] scepticulous: has joined #RubyOnRails
[07:00:30] DZj091231kld: has joined #RubyOnRails
[07:00:37] Spami_: has joined #RubyOnRails
[07:05:08] kali2: has joined #RubyOnRails
[07:05:31] wd40s: has joined #RubyOnRails
[07:05:37] scepticulous: has joined #RubyOnRails
[07:17:25] IT-Manager: has joined #RubyOnRails
[07:17:34] triptec: has joined #RubyOnRails
[07:20:13] deadhound: has joined #RubyOnRails
[07:23:56] michael_mbp: sevenseacat: hello!
[07:24:03] ferr: has joined #RubyOnRails
[07:24:06] darutoko: has joined #RubyOnRails
[07:24:44] michael_mbp: I'm looking at dealing with ElasticSearch async. delta updates from background jobs, anyone done anything similar?
[07:24:50] sandstrom: has joined #RubyOnRails
[07:25:08] Mia: has joined #RubyOnRails
[07:25:08] Mia: has joined #RubyOnRails
[07:26:38] Macaveli: I have found this code (someone who left the company wrote it) https://gist.github.com/DelawareConsulting/f36445bf591e672e6c3c8dbedd62984b Shouldn't klazz normally be filled above the binding part?
[07:31:18] ur5us: has joined #RubyOnRails
[07:33:26] triptec: has joined #RubyOnRails
[07:36:11] norc: has joined #RubyOnRails
[07:37:14] cd83x: has joined #RubyOnRails
[07:37:44] tildes: hi all, anyone knows how to search errors in errbit (https://github.com/errbit/errbit) by URL-field? I already asked in ##javascript, because this is what we use for tracking frontend errors, but apparently they haven't even heard of it
[07:37:58] michael_mbp: Macaveli: yeah, you would bind at line 13 or so
[07:37:59] tildes: and as the source is ruby, perhaps someone here might know?
[07:38:04] michael_mbp: then you can at least play with 'klazz' in pry.
[07:38:46] michael_mbp: Although Class.new(Field) makes no sense as that's not even being used.
[07:38:58] mark_66: has joined #RubyOnRails
[07:39:26] beilabs: has joined #RubyOnRails
[07:40:13] phredus: has joined #RubyOnRails
[07:40:30] michael_mbp: Ugh line 15... Why on earth is a const being set on Object all willy-nilly.
[07:40:46] michael_mbp: Macaveli: good luck.
[07:45:06] beilabs: has joined #RubyOnRails
[07:45:15] aganov: has joined #RubyOnRails
[07:47:21] Ragen: has joined #RubyOnRails
[07:51:15] alfiemax: has joined #RubyOnRails
[07:51:52] czerasz: has joined #RubyOnRails
[07:55:38] artto: has joined #RubyOnRails
[08:01:13] blackmesa: has joined #RubyOnRails
[08:02:09] Macaveli: michael_mbp suicide :(
[08:02:55] jenrzzz: has joined #RubyOnRails
[08:06:09] jsrn: has joined #RubyOnRails
[08:06:59] lightt: has joined #RubyOnRails
[08:07:43] GriffinHeart: has joined #RubyOnRails
[08:08:48] moep: has joined #RubyOnRails
[08:08:54] moep: has joined #RubyOnRails
[08:12:45] beilabs: has joined #RubyOnRails
[08:15:42] beilabs_: has joined #RubyOnRails
[08:16:32] Pupeno: has joined #RubyOnRails
[08:17:02] artto: has joined #RubyOnRails
[08:18:08] GorillaApe: has joined #RubyOnRails
[08:18:15] GorillaApe: is there a way to remove unused
[08:18:23] GorillaApe: sizes with paperclip?
[08:19:30] universa1: GorillaApe: collect the file names now, write them to a file, remove the sizes from the code, delete collected files
[08:20:06] universa1: GorillaApe: or: since the names are following a certain schema, "grep" for that schema and delete the files
[08:20:19] GorillaApe: actually it is
[08:20:32] GorillaApe: product/:id/:size/image
[08:20:37] GorillaApe: i want to keep only
[08:20:44] GorillaApe: product/:id/original/image
[08:21:05] universa1: well... ...deleting all folders that are not original doesn't sound like a complex task.
[08:21:12] xhoy: has joined #RubyOnRails
[08:21:34] GorillaApe: indeed if you have experience
[08:22:00] universa1: no, even as a beginner. look at the Dir and File classes in ruby.
[08:23:30] CornishPasty: GorillaApe: have you tried this? http://stackoverflow.com/a/12703666
[08:23:32] GorillaApe: with ruby it is easy I mean with linux command
[08:23:50] GorillaApe: yes it doesnt do anything
[08:24:13] universa1: GorillaApe: then ask in #bash #zsh ....
[08:24:33] null__: shouldn't you be able to do this through a console command?
[08:24:38] null__: rails server console I mean
[08:25:03] startupality: has joined #RubyOnRails
[08:25:36] universa1: i don't see the benefit of doing that in the shell, especially if you can do it in ruby, but not in shell... but hey... ;)
[08:25:41] universa1: knock yourself out ;)
[08:25:57] null__: maybe it's less efficient to use ruby
[08:26:01] null__: but then again it's what you know so
[08:26:25] GorillaApe: maybe I'll do it ruby
[08:26:56] null__: how many files do you think you'll need to delete?
[08:27:14] sevenseacat: ...use the provided rake task
[08:29:03] fumk: has joined #RubyOnRails
[08:29:50] emachnic: has joined #RubyOnRails
[08:30:05] konsolebox: has joined #RubyOnRails
[08:34:37] Inside: has joined #RubyOnRails
[08:38:09] marr: has joined #RubyOnRails
[08:39:29] arBmind: has joined #RubyOnRails
[08:42:52] osama: has joined #RubyOnRails
[08:43:02] osama: has left #RubyOnRails: ()
[08:46:09] iooner: has joined #RubyOnRails
[08:46:12] iooner: Hi guys !
[08:47:15] Circuit8: has joined #RubyOnRails
[08:53:43] wd40s: has joined #RubyOnRails
[08:57:59] idefine: has joined #RubyOnRails
[08:58:53] phredus: has joined #RubyOnRails
[09:01:04] ariejan: has joined #RubyOnRails
[09:03:27] pawnbox: has joined #RubyOnRails
[09:05:58] Signum: has joined #RubyOnRails
[09:10:16] emachnic: has joined #RubyOnRails
[09:11:03] triptec: has joined #RubyOnRails
[09:12:01] idefine: has joined #RubyOnRails
[09:13:49] britter: has joined #RubyOnRails
[09:14:05] IT-Manager_: has joined #RubyOnRails
[09:18:30] dandaman: has joined #RubyOnRails
[09:25:08] TvL2386: has joined #RubyOnRails
[09:25:24] cd83x: has joined #RubyOnRails
[09:25:41] ariejan: has joined #RubyOnRails
[09:27:44] phredus: has joined #RubyOnRails
[09:31:06] workmad3: has joined #RubyOnRails
[09:31:39] artto: has joined #RubyOnRails
[09:32:29] Pupeno: has joined #RubyOnRails
[09:37:53] AzaToth: has joined #RubyOnRails
[09:37:59] beilabs: has joined #RubyOnRails
[09:38:19] webhat: has joined #RubyOnRails
[09:39:55] artto: has joined #RubyOnRails
[09:40:00] haaj: has joined #RubyOnRails
[09:40:13] triangles2: has joined #RubyOnRails
[09:42:24] arup_r: has joined #RubyOnRails
[09:43:04] datanoise: has joined #RubyOnRails
[09:43:10] arup_r: Hi, How would you include custom helper module inside the devise controller, it seems my understanding not working. Because I am getting "NoMethodError - undefined method `after_subscription_path_for' for #<Admins::SessionsController:0x007f9015ac2090>: "
[09:43:15] arup_r: https://gist.github.com/aruprakshit/89a5792163b6f0652a1fb0ae57fb577e
[09:43:22] startupality: has joined #RubyOnRails
[09:45:21] artto_: has joined #RubyOnRails
[09:45:58] sid_fules: has joined #RubyOnRails
[09:46:13] jenrzzz: has joined #RubyOnRails
[09:46:13] jenrzzz: has joined #RubyOnRails
[09:47:56] srinidhi: has joined #RubyOnRails
[09:52:33] jenrzzz: has joined #RubyOnRails
[09:52:33] jenrzzz: has joined #RubyOnRails
[09:54:20] beilabs: has joined #RubyOnRails
[09:54:54] artto: has joined #RubyOnRails
[09:56:27] BaNzounet: Is is possible to return x arguments from a function directly into another function ?. e.g. `def foo(a, b)` -> `foo(another_function)` but if I `return x,y` from `another_function` it returns an array and so only 1 parameter
[09:57:14] norc: BaNzounet: Nope. Ruby can only return a single object
[09:57:29] BaNzounet: norc: ok :)
[09:57:47] norc: BaNzounet: You can use the * splat operator though.
[09:57:59] norc: BaNzounet: But that will not change the fact that an intermediate array is created.
[09:58:12] norc: i.e. foo(*another_function())
[09:58:12] beilabs: has joined #RubyOnRails
[09:59:19] BaNzounet: norc: Good to know :) thank you !
[10:01:25] norc: BaNzounet: I can think of one corner case where you can do something similar though: a, b = b, a
[10:01:43] artto: has joined #RubyOnRails
[10:02:02] norc: Whops nevermind. That also uses an array.
[10:06:56] c355E3B: has joined #RubyOnRails
[10:10:13] arup_r: ignore me
[10:15:24] rbr: ACTION adds arup_r to ignore list.
[10:15:43] ErhardtMundt: hey guys, I'm using react-rails and I set this in my production environment config
[10:15:45] ErhardtMundt: config.assets.compile = true
[10:15:45] ErhardtMundt: config.assets.initialize_on_precompile = true
[10:15:55] arup_r: ACTION said to ignore his question.. :)
[10:16:07] sid_fules: has joined #RubyOnRails
[10:16:16] ErhardtMundt: but still rails compiles jsx on demand
[10:16:23] ErhardtMundt: any suggestion?
[10:16:24] weckl: has joined #RubyOnRails
[10:16:57] universa1: ErhardtMundt: well, you told it to compile the assets... if you want them precompiled, run the rake assets:precompile task
[10:17:03] rbr: arup_r: ;)
[10:17:16] universa1: ErhardtMundt: that config setting tells the app, to compile assets on demand. not precompile them.
[10:17:34] Pupeno: has joined #RubyOnRails
[10:17:47] universa1: ErhardtMundt: the initialize_on_precompile flag tells the app to fully load before precompilation happens. (in most cases you don't need that)
[10:18:03] ErhardtMundt: universa1: should I run the rake task and set those to false?
[10:19:38] universa1: ErhardtMundt: the assets.compile flag should be false, if you don't want dynamic compilation (similar to development mode), the other flag depends on your app.
[10:19:44] cd83x: has joined #RubyOnRails
[10:21:18] Pupeno: has joined #RubyOnRails
[10:21:53] ErhardtMundt: universa1: what happens if I leave it true and I precompile the assets?
[10:22:57] universa1: ErhardtMundt: if you forget to precompile assets, and add new ones to the "precompile" it would compile them on demand
[10:23:03] universa1: nothing bad afaik
[10:23:37] nickjj_: has joined #RubyOnRails
[10:23:45] Trynemjoel: has joined #RubyOnRails
[10:25:20] ErhardtMundt: universa1: can I decide to precompile only js and not stylesheets, for instance?
[10:25:50] universa1: ErhardtMundt: with some hackery probably yes, but it makes no sense imho
[10:26:15] universa1: ErhardtMundt: whenever you deploy a new version, you precompile your assets.
[10:27:22] snowy: has joined #RubyOnRails
[10:30:59] beilabs: has joined #RubyOnRails
[10:32:51] nickenchuggets: has joined #RubyOnRails
[10:32:51] nickenchuggets: has joined #RubyOnRails
[10:33:01] owenjones: has joined #RubyOnRails
[10:36:43] alfiemax: has joined #RubyOnRails
[10:37:47] haaj: has joined #RubyOnRails
[10:37:54] GriffinHeart: has joined #RubyOnRails
[10:39:00] sandstrom: has joined #RubyOnRails
[10:39:31] wd40s: has joined #RubyOnRails
[10:40:00] Moeh: has joined #RubyOnRails
[10:41:40] Moeh: Hey guys. So we use an "after_create" callback to create another entity using "User.create!(...)" in the callback. Now, if "User.create!(...)" fails, we don't see any exception, the transaction is just rolled back. How can we make sure that the errors in the callbacks are properly handled?
[10:41:43] agit0: has joined #RubyOnRails
[10:42:33] syndikate: has joined #RubyOnRails
[10:42:44] syndikate: Hello people
[10:42:52] syndikate: Am yet again stuck with a problem in defining a custom route
[10:43:14] syndikate: I have a button pointing to a custom method defined in my controller, but I get an error saying the route cannot be found
[10:43:41] alfiemax: syndikate, what route have you define?
[10:44:10] syndikate: update_group is the method I defined
[10:44:30] alfiemax: can you share the exact line of code you have in your routes.rb ?
[10:44:36] syndikate: sure, hold on
[10:44:56] alfiemax: Moeh, do you have `raise_in_transactional_callbacks` enabled in your application.rb ?
[10:45:07] pawnbox_: has joined #RubyOnRails
[10:46:00] syndikate: https://gist.github.com/anonymous/0037c895219876e2480134b983eb9d05
[10:46:27] syndikate: That's snippet from my routes.rb relating to this controller alfiemax
[10:46:46] ur5us: has joined #RubyOnRails
[10:46:52] alfiemax: syndikate, and what is the error message you get
[10:47:32] syndikate: No route matches {:action=>"update_group", :controller=>"engagements", :form_id=>"12345"}
[10:47:41] syndikate: I have defined a custom button in my index.html.erb
[10:47:47] tildes: syndikate: what does the line in your view look like, where you call the api?
[10:47:58] syndikate: <td><%= button_to 'Refresh', {:controller => "engagements", :action => "update_group", :form_id => s.id} , :method=>:post %></td>
[10:48:04] tildes: syndikate: and what is the corresponding line you get, when you run rake routes?
[10:48:14] tildes: post != put
[10:48:20] tildes: could that be it?
[10:48:23] beilabs: has joined #RubyOnRails
[10:48:26] alfiemax: syndikate, you are making a post request
[10:48:53] Moeh: alfiemax: Yes, we do
[10:49:32] syndikate: alfiemax, that's a typo, it's put
[10:49:41] syndikate: in my routes
[10:49:45] srinidhi: has joined #RubyOnRails
[10:49:48] syndikate: rake routes give this
[10:50:03] syndikate: update_group_engagement POST /engagements/:id/update_group(.:format) engagements#update_group
[10:50:04] alfiemax: syndikate, but the code you shared had :put
[10:50:14] triptec: has joined #RubyOnRails
[10:50:20] alfiemax: Moeh, when you say that you create another entity in the callback, is the entity of the same model?
[10:50:21] syndikate: alfiemax, yes it is my bad, it's post I just cross checked, I made a mistake while sharing
[10:52:26] alfiemax: syndikate, if you are getting no route matches error, it should also mention which method it cannot match, can you make sure thats also post
[10:52:27] edwinvdgraaf: has joined #RubyOnRails
[10:52:53] Pupeno: has joined #RubyOnRails
[10:53:29] tildes: syndikate: rake routes looks for :id param, and in your post request there's a :form_id param
[10:53:35] tildes: could that be it?
[10:53:45] alfiemax: like this : 'Routing Error No route matches [GET] "/"'
[10:55:15] syndikate: This is the only error I get No route matches {:action=>"update_group", :controller=>"engagements", :form_id=>"12345"}
[10:55:27] alfiemax: tildes, don't think a missing parameter would cause a Routing error, could it?
[10:55:39] syndikate: <td><%= button_to 'Refresh', {:controller => "engagements", :action => "update_group", :form_id => s.id} , :method=>:post %></td>
[10:55:52] alfiemax: syndikate, is this a custom generated error message then?
[10:56:00] tildes: alfiemax: it's part of the url, so it might
[10:56:15] tildes: syndikate: check in browser development console what does the actual request url look like
[10:56:39] syndikate: I am not able to get the view loaded, it throws an error
[10:57:06] syndikate: ActionController::UrlGenerationError in Engagements#index
[10:57:53] tildes: syndikate: sounds like an unrelated error, unless there's something quite funky going on
[10:58:08] tildes: syndikate: but then, how do you produce the routing error? if not from the view?
[10:58:51] syndikate: tildes, when I hit the url for the view in my browser,what I get is that error
[10:59:03] syndikate: or rather I could say when I navigate to that url
[10:59:41] tildes: and if you open first developer console, then hit the url
[10:59:41] alfiemax: i'm confused.. :(
[10:59:50] tildes: ACTION not sure where syndikate gets which error
[11:00:27] rodfersou: has joined #RubyOnRails
[11:00:59] tildes: syndikate: sounds like there's more than one thing broken, and you would need to find a way to isolate the errors
[11:01:09] tildes: at least it would help a lot, to work on only one at a time
[11:01:09] lalalaaa: has joined #RubyOnRails
[11:01:26] syndikate: Okay,I have no clue where to start though tildes
[11:02:02] tildes: syndikate: you could share the entire view and the entire controller, and all related routes
[11:02:13] alfiemax: syndikate, you said you have a update button in your view, how is that view rendered when you say that you are getting an error when navigating to the view?
[11:03:18] tildes: and full trace
[11:04:39] syndikate: Okay. This update button is in the index view, I navigate to this view from my homepage
[11:05:33] wd40s: has joined #RubyOnRails
[11:05:36] sid_fules: has joined #RubyOnRails
[11:07:47] GodFather: has joined #RubyOnRails
[11:08:06] alfiemax: syndikate, isn't this index that causes your url generation error?
[11:09:01] futilegames: has joined #RubyOnRails
[11:09:52] IT-Manager_: has joined #RubyOnRails
[11:12:15] Ropeney: has joined #RubyOnRails
[11:12:33] GodFather: has joined #RubyOnRails
[11:13:53] cd83x: has joined #RubyOnRails
[11:15:01] GodFather: has joined #RubyOnRails
[11:17:10] Fernando-Basso: has joined #RubyOnRails
[11:17:47] beilabs: has joined #RubyOnRails
[11:20:00] roamingdog: has joined #RubyOnRails
[11:21:44] Pupeno: has joined #RubyOnRails
[11:23:59] emilkarl: has joined #RubyOnRails
[11:25:00] k3rn31: has joined #RubyOnRails
[11:27:16] JH_2: has joined #RubyOnRails
[11:27:26] artto: has joined #RubyOnRails
[11:29:04] haaj: has joined #RubyOnRails
[11:29:15] polse: has joined #RubyOnRails
[11:29:25] polse: Is there a way to log timeouts in production?
[11:30:59] idefine: has joined #RubyOnRails
[11:31:17] King_Rex: has joined #RubyOnRails
[11:31:36] beilabs: has joined #RubyOnRails
[11:32:29] sid_fules: has joined #RubyOnRails
[11:33:20] norc: polse: That depends on who is timing out on what.
[11:33:35] norc: polse: can you be more specific?
[11:34:52] polse: norc: That's the problem. I dont know. Nginx says "socket Connection timed out", that's it
[11:35:10] lalalaaa: Anybody know why Puma exits in development mode? https://gist.github.com/anonymous/efce7ebeb68327a4739c951f967d41b8
[11:35:14] polse: Nothing in the logs
[11:35:42] alfiemax: lalalaaa, Daemonizing...
[11:35:47] alfiemax: it's still running
[11:35:59] lalalaaa: alfiemax: Nope seems to have exited
[11:36:07] norc: polse: Are you using websockets?
[11:36:22] ldnunes: has joined #RubyOnRails
[11:36:34] polse: Not thins paticular application, but nginx is using websockets
[11:36:39] polse: *Not this
[11:36:42] dionysus69: has joined #RubyOnRails
[11:36:42] alfiemax: did you check if any puma processes are running?
[11:36:53] lalalaaa: yes alfiemax
[11:37:00] lalalaaa: I removed Puma from the Gemfile and now it works
[11:37:16] polse: Aha, I think I know what you refering to
[11:37:19] norc: polse: mm. Well it could have any number of causes without knowing more.
[11:41:39] marchelzo: has joined #RubyOnRails
[11:42:06] k3rn31: has joined #RubyOnRails
[11:42:15] quazimodo: has joined #RubyOnRails
[11:42:15] quazimod1: has joined #RubyOnRails
[11:43:57] startupality: has joined #RubyOnRails
[11:45:33] sid_fules: has joined #RubyOnRails
[11:49:01] __apt: has joined #RubyOnRails
[11:50:53] triptec: has joined #RubyOnRails
[11:51:08] ErhardtMundt: universa1: sass is complaining about css syntax
[11:51:46] ErhardtMundt: why does it work if I don't precompile?
[11:52:26] iamvery: has joined #RubyOnRails
[11:53:13] allcentury: has joined #RubyOnRails
[11:54:23] syndikate: hello guys, sorry I was AFK with some stuff
[11:54:26] lalalaaa: Why does bundle install always install older versions of gems? I always have to do a bundle update afterwards to get everything in order.
[11:54:43] syndikate: so it turns out the problem is between how I have defined the button_to in the index
[11:54:56] syndikate: alfiemax, and tildes - I could not fix it yet
[11:55:04] syndikate: But that is where the problem is
[11:55:40] srinidhi: has joined #RubyOnRails
[11:55:43] tildes: syndikate: so if you comment the button out, no errors, or what do you mean?
[11:55:48] syndikate: tildes, yes
[11:56:00] tildes: and if not, the view won't render
[11:56:54] Ropeney: has joined #RubyOnRails
[11:57:02] Phaenix: Hi. How could I improve this implementation so I don't need to provide/rely on multiple fields? https://gist.github.com/phaenix/f0508014f6e95f517c21463e5b4d0fc7
[11:57:39] syndikate: tildes, yes. Also I have a similar button which is for 'create' that works fine. Both these buttons are working almost similarly just that one is create and the other is a custom action method. The custo action method is having problems
[11:59:48] alfiemax: syndikate, it would be helpful if you could share your code, like your routes.rb, error stack trace, controller, views
[12:00:01] universa1: ErhardtMundt: you probably just don't see the error... ;)
[12:00:26] tildes: syndikate: I think there must be a way to define a button, even if the request is wrong, so that the view doesn
[12:00:35] jokke: is it possible to define the id to be used by the form helper (and all fields inside of it)
[12:00:37] alfiemax: without what we are just guessing....
[12:01:00] ErhardtMundt: universa1: the thing is that nothing breaks, whereas if I decide to precompile, I get an error
[12:01:15] jokke: for the fields the field name is just appended to the form id
[12:01:22] idefine: has joined #RubyOnRails
[12:01:28] universa1: ErhardtMundt: well, look at the error, is it there?
[12:01:33] jokke: so if i could change the form id that would be great
[12:02:00] tildes: syndikate: personally I suck with view helpers, so if it was my project, my next step might be to try write the button in plain html
[12:02:03] universa1: jokke: form_for blub, as: :bar do |f| ?
[12:02:03] ErhardtMundt: universa1: where should I look for it?
[12:02:08] tildes: perhaps the helper code is off somehow
[12:02:18] jokke: universa1: as?
[12:02:19] universa1: ErhardtMundt: well, you have the error, don't you?!
[12:02:27] universa1: jokke: yes.
[12:02:30] tildes: to first get a button, that doesn't crash the view :D
[12:02:31] qejk: has joined #RubyOnRails
[12:02:32] ErhardtMundt: universa1: I get the error only if I precompile
[12:02:39] syndikate: okay tildes and alfiemax I would try to make that plain html and get back to you
[12:02:45] universa1: ErhardtMundt: so run precompile... -> error -> what is the error?
[12:02:51] jokke: universa1: great thanks!
[12:02:54] universa1: ErhardtMundt: error is rather unspecific.
[12:02:59] tildes: syndikate: OR share the view and related code
[12:03:05] ErhardtMundt: universa1: syntax error, it's about css syntax
[12:03:13] universa1: ErhardtMundt: gist the full error!
[12:03:25] alfiemax: ErhardtMundt, please be specific...
[12:03:37] sid_fules: has joined #RubyOnRails
[12:03:47] tildes: syndikate: for sure there are view helper experts around too
[12:05:04] universa1: lalalaaa: bundle install -> installs the versions that are written down in the Gemfile.lock file, if you run bundle update it will update all gems to the latest version allowed by your Gemfile.
[12:05:11] nettoweb: has joined #RubyOnRails
[12:05:24] ErhardtMundt: rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
[12:05:24] ErhardtMundt: rake aborted!
[12:05:24] ErhardtMundt: Sass::SyntaxError: Invalid CSS after ".pg-pulse-frames ": expected selector, was "0%"
[12:05:24] ErhardtMundt: (in /home/ubuntu/Dashboard_v2/app/assets/stylesheets/application.css)
[12:05:38] lalalaaa: universa1: Oh I understand
[12:05:41] sid_fules: has joined #RubyOnRails
[12:05:46] syndikate: tildes, alfiemax https://gist.github.com/anonymous/879f7c9f65c0fb1007e7c62da8712f7d
[12:06:18] universa1: ErhardtMundt: so look at your application.css and search for .pg-pulse-frames
[12:08:35] cd83x: has joined #RubyOnRails
[12:09:35] kitsuneyo: has joined #RubyOnRails
[12:11:55] syndikate: any luck guys tildes and alfiemax ?
[12:12:13] tildes: syndikate: not a guy, and no luck, sorry
[12:12:18] alfiemax: syndikate, which button is causing the error?
[12:12:23] alfiemax: create or refresh?
[12:12:41] tildes: syndikate: but refresh seems to be missing a controller now
[12:12:45] syndikate: tildes, my bad
[12:12:47] syndikate: alfiemax, refresh
[12:13:02] alfiemax: does it have a controller specified?
[12:13:03] universa1: error trace?
[12:13:08] syndikate: tildes, yes, I was testing it, although ti picks it up automatically
[12:13:33] universa1: alfiemax: it doesn't need to necessarily ;) but not using the named url helpers feels so rails 1.2 ;)
[12:14:38] universa1: especially since the names are there...
[12:14:39] futilegames: has joined #RubyOnRails
[12:15:04] universa1: button_to 'create', engagements_url(form_id: s.id), method: :post
[12:15:57] universa1: and the refresh should just be: button_to 'Refresh', refresh_bluegroup_engagement_path(s), method: :post
[12:16:56] scepticulous: has joined #RubyOnRails
[12:17:29] alfiemax: tildes, you were right, the error was caused due to the missing parameter
[12:17:48] patientj: has joined #RubyOnRails
[12:17:55] alfiemax: syndikate, use the approach specified by universa1 above, or pass in :id instead of :form_id
[12:18:19] alfiemax: i recommend you using the named url helpers
[12:18:38] tvw: has joined #RubyOnRails
[12:19:48] kitsuneyo: i've just upgraded from ruby 2.2.1 to 2.3.1 but i guess i need to do something to my gems bundle. how do i migrate it or whatever?
[12:19:53] alfiemax: syndikate, https://gist.github.com/alfie-max/caa5c22bf7f88ff79297bf4032d80323
[12:20:49] universa1: kitsuneyo: run bundle
[12:20:56] startupality: has joined #RubyOnRails
[12:21:03] rubyonrails989: has joined #RubyOnRails
[12:21:30] kitsuneyo: universa1, bundler isn't found
[12:21:39] universa1: kitsuneyo: gem install bundler; bundle
[12:21:54] universa1: kitsuneyo: notice the difference! the gem is named bundler, the command is just bundle
[12:22:12] universa1: rubyonrails989: !anyone
[12:22:12] helpa: rubyonrails989: Nope. No one. Ever. In the history of the world.
[12:22:16] kitsuneyo: thanks universa1
[12:22:25] quazimodo: has joined #RubyOnRails
[12:22:26] DanByc: has joined #RubyOnRails
[12:22:27] rubyonrails989: haha @universal
[12:22:29] quazimod1: has joined #RubyOnRails
[12:22:31] kitsuneyo: i guess i need to install openssl first
[12:22:55] rubyonrails989: I need help, I have a model and table(without-model)
[12:23:05] syndikate: universa1, thank you. I did already follow that method, that landed me in another problem though it did solve this
[12:23:41] universa1: syndikate: what other problem? if named paths land you in any problems, something is most likely wrong in your app.
[12:23:46] haaj: has joined #RubyOnRails
[12:23:55] rubyonrails989: How do I go about creating a relationship between a model and table(which has no model)
[12:24:06] universa1: rubyonrails989: create a model for the table.
[12:24:10] alfiemax: rubyonrails989, create a model
[12:24:20] rubyonrails989: but i don't need a model,
[12:24:31] universa1: rubyonrails989: you want a relationship, so you need one.
[12:24:35] alfiemax: do you need to have the relationship?
[12:24:37] rubyonrails989: I want to learn relationship
[12:24:40] alfiemax: if so you need one
[12:24:40] syndikate: universa1, I am using two rails apps and using active resource to talk to the next app. So if you look at the engagements_controller, you can see the first line where am taling to that app
[12:24:55] syndikate: unfortunately, the form_id is not being passed there
[12:25:05] rubyonrails989: yep, I want to get many_to_many relationship done for this table
[12:25:17] universa1: syndikate: no, i don't see that.
[12:25:29] universa1: rubyonrails989: !associations
[12:25:29] helpa: rubyonrails989: http://guides.rubyonrails.org/association_basics.html - Active Record Association Basics by Mike Gunderloy
[12:25:30] alfiemax: rubyonrails989, many to many what?
[12:26:06] syndikate: universa1, here - https://gist.github.com/anonymous/879f7c9f65c0fb1007e7c62da8712f7d
[12:26:10] rubyonrails989: universal, alfiemax : Model is User and Table is user_favorites
[12:26:22] universa1: syndikate: error trace!
[12:26:27] alfiemax: User favorites of what??
[12:26:39] rubyonrails989: alfiemax user favorites of user
[12:26:58] rubyonrails989: in simple, user has_many user_favorites
[12:27:07] alfiemax: not that simple
[12:27:09] rubyonrails989: but user_favorites is not a model tho
[12:27:22] rubyonrails989: yep, that's what I want to learn, @alfiemax
[12:27:33] universa1: rubyonrails989: look at the docs for has and belongs to many
[12:27:46] rubyonrails989: @universal, looked!
[12:27:50] universa1: rubyonrails989: http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html#method-i-has_and_belongs_to_many
[12:27:57] universa1: rubyonrails989: also there is a section on that in the guide.
[12:28:35] rubyonrails989: universal will give a try again and report!
[12:28:50] rubyonrails989: please be there, and I will keep you informed @universal!
[12:28:59] k3rn31: has joined #RubyOnRails
[12:29:08] alfiemax: just google for it.. i just did and there were many SO questions answered
[12:30:11] kitsuneyo: universa1, when i try to use bundle i get: "Unable to require openssl, install OpenSSL and rebuild ruby" ... i just reinstalled openssl with homebrew, do i need to rebuild ruby and how? (with rvm)
[12:30:48] alfiemax: kitsuneyo, google
[12:30:58] kitsuneyo: alfiemax, lol ok
[12:31:12] universa1: kitsuneyo: hmm, rvm usually takes care of installing stuff with homebrew...
[12:31:25] syndikate: Am not sure how to produce the required error trace universa1, could you please let me know how to?
[12:31:26] universa1: kitsuneyo: of the top of my head i don't know the command either.
[12:31:39] universa1: syndikate: how do you trigger the error?!
[12:31:48] kitsuneyo: universa1, i'm reinstalling it with rvm, hopefully no openssl flags this time
[12:32:15] universa1: syndikate: do that, then open the development.log and at the end of the file is the error trace.
[12:35:12] edwinvdgraaf: has joined #RubyOnRails
[12:35:14] flashpoint9: has joined #RubyOnRails
[12:41:22] artto_: has joined #RubyOnRails
[12:42:15] triptec: has joined #RubyOnRails
[12:43:45] rubyonrails989: universal, still there?
[12:44:29] idefine: has joined #RubyOnRails
[12:45:30] kitsuneyo: i got everything working i think, bundle is installing gems now... do i need to reinstall rails for this new version of ruby too?
[12:45:31] refinerysource: has joined #RubyOnRails
[12:46:05] universa1: kitsuneyo: bundle just did.
[12:47:02] kitsuneyo: heh oh yeah. if i'm on rails 4.2.0, is it worth upgrading or better to just wait for 5 to be officially released?
[12:47:20] universa1: kitsuneyo: you should upgrade to the latest point release, that is 4.2.6 iirc
[12:47:21] syndikate: People, I fixed it, thanks for all the help universa1 alfiemax tildes
[12:47:56] tildes: syndikate: great!
[12:48:11] diegoaguilar: has joined #RubyOnRails
[12:48:27] wd40s: has joined #RubyOnRails
[12:48:27] d0nn1e: has joined #RubyOnRails
[12:49:23] daguilaraguilar: has joined #RubyOnRails
[12:50:12] haaj: has joined #RubyOnRails
[12:53:20] idefine: has joined #RubyOnRails
[12:53:35] durexlw: has joined #RubyOnRails
[12:53:41] durexlw: afternoon all
[12:55:10] universa1: rubyonrails989: ?
[12:55:28] fmcgeough: has joined #RubyOnRails
[12:55:47] universa1: if you got a question, just send it to the channel... ...if someone is able to help you, he/she will.
[12:57:31] roamingdog: has joined #RubyOnRails
[12:58:11] rubyonrails989: I added this has_and_belongs_to_many :favorites, class_name: UserFavorites
[12:58:19] rubyonrails989: Am I doing right? universa1
[12:58:21] triptec: has joined #RubyOnRails
[12:58:27] durexlw: can anyone explain why if I write for example in the application.coffee a script "testFunction -> alert("test called")" and then write in a view "<script> $().ready(function() { testFunction(); }) </script>" why I then get "testFunction() not defined"?
[12:58:48] alfiemax: rubyonrails989, you don't have a class named UserFavorites, do you?
[12:58:55] alfiemax: so that's not correct
[12:59:17] dandaman: has joined #RubyOnRails
[12:59:31] rubyonrails989: Nope, I do have a class called UserFavorites
[12:59:32] sid_fules: has joined #RubyOnRails
[12:59:50] alfiemax: so you created the model for it then?
[13:00:01] universa1: rubyonrails989: didn't you say, you wanted a manay-to-many association between users and (favorited) users?
[13:00:05] rubyonrails989: Nope I did not create a model for it, just added a migration to create a table
[13:00:16] alfiemax: then how would you have the class?
[13:00:32] durexlw: you ran the migration?
[13:01:06] rubyonrails989: @universal I want to have one to many association
[13:01:06] patientj: has left #RubyOnRails: ()
[13:01:08] universa1: durexlw: scoping iirc.
[13:01:24] rubyonrails989: @alfiemax, migration class,
[13:01:32] jerematic: has joined #RubyOnRails
[13:01:37] rubyonrails989: @durexlw, Yes I did run the migrations!
[13:01:43] universa1: rubyonrails989: describe your association in plain words, not in code!
[13:01:50] universa1: rubyonrails989: what is the content of it?
[13:01:58] alfiemax: rubyonrails989, then you just need the model and you are done
[13:02:39] universa1: rubyonrails989: for example between cars and users, there could be a drivers association: one car is driven by one user.
[13:02:48] Pupeno_: has joined #RubyOnRails
[13:02:54] durexlw: universa1: yeah, I guess it's scoping indeed, I just don't really get why that happens. Makes it hard to tie asset-pipeline-js to specific views. I should be possible to write code in a coffescript and then call it from a view, no? What's the point of having those files otherwise.
[13:03:11] rubyonrails989: universa1, using your example. user can have many favorite cars
[13:03:17] durexlw: In fact I think it's possible, but I must be doing something wrong.... badly... :)
[13:03:50] Ragen: has joined #RubyOnRails
[13:04:06] rubyonrails989: @alfiemax, but I don't want to create a model to create a record
[13:04:16] durexlw: rubyonrails989: a car can be the favorite of many users and a user can have many cars as favorite, right?
[13:04:33] universa1: durexlw: you need to bind your funciton to something like window, or an "application object" containing your functions
[13:04:37] alfiemax: what is so wrong in having just one more class ?
[13:05:15] IFrank00: has joined #RubyOnRails
[13:05:15] universa1: rubyonrails989: so what classes do you have right now? just users ?
[13:05:17] durexlw: universa1: you happen know of a sample code somewhere?
[13:05:19] apeiros: durexlw: you should take a look at the code `testFunction -> alert("test called")` generates
[13:05:22] sevenseacat: has joined #RubyOnRails
[13:05:40] apeiros: durexlw: I think you forgot a =
[13:05:42] IFrank004: has joined #RubyOnRails
[13:05:45] universa1: durexlw: window.myFunctions = {}; myFunctions.testFunction = -> alert("test called")
[13:05:59] ramortegui: has joined #RubyOnRails
[13:06:11] universa1: what apeiros said is most likely the actual reason ;)
[13:06:19] rubyonrails989: universa1, I have user model class and migration class of user favorites
[13:06:43] durexlw: apeiros: it wraps it indeed in a kind of an anonimous function that is called directly
[13:07:08] universa1: rubyonrails989: so to stay in your world: One user can favorite many other users? and ONE user can be favorited by many other users?
[13:07:13] apeiros: durexlw: um, no? it passes an anonymous function to testFunction as argument
[13:07:33] rubyonrails989: @universa1, exactly right
[13:07:35] durexlw: apeiros: one sec...
[13:07:52] universa1: rubyonrails989: so you want a many-to-many association between users and (favorited) users
[13:08:03] rubyonrails989: yes @universal,
[13:08:11] durexlw: apeiros: yeah, type when I wrote it here, code says "testFunction = -> ..."
[13:08:12] universa1: rubyonrails989: so user habtm :favorites, class_name: "User"
[13:08:46] rubyonrails989: I did the other way around, universa1
[13:08:58] universa1: rubyonrails989: !code
[13:08:58] helpa: rubyonrails989: We cannot help you with your problem if you don't show us your code. Please put it on http://gist.github.com and give us the URL so we can see it.
[13:09:25] mikecmpbll: has joined #RubyOnRails
[13:09:28] universa1: rubyonrails989: class and table are two completely different things! you can not mix them at your will.
[13:09:42] apeiros: durexlw: with the =, it should IMO work
[13:09:55] rubyonrails989: @univera1 and @helpa will gist it
[13:10:00] durexlw: apeiros: I thought that too... one sec, I'll make a gist
[13:10:23] universa1: rubyonrails989: http://stackoverflow.com/questions/19770888/rails-self-join-scheme-with-has-and-belongs-to-many
[13:10:33] apeiros: btw., `var foo = 1` is equivalent to `window.foo = 1` (depends on the runtime, but in browsers it is)
[13:10:39] alfiemax: rubyonrails989, http://stackoverflow.com/questions/2168442/many-to-many-relationship-with-the-same-model-in-rails
[13:10:46] apeiros: (toplevel)
[13:11:15] tk: has joined #RubyOnRails
[13:11:36] durexlw: apeiros: let me see if that does it...
[13:12:19] durexlw: apeiros: https://gist.github.com/AndyCapiau/d1b83825764f6121620ef587aaa7609e
[13:12:35] haaj_: has joined #RubyOnRails
[13:12:48] apeiros: durexlw: are you sure you actually compile and load your coffee script?
[13:13:18] durexlw: apeiros: yes, cause I can call that function in the coffeescript normally
[13:13:37] apeiros: durexlw: then look at the generated code
[13:13:39] durexlw: well, the actual function is d3 stuff, but principple remains the same
[13:13:50] durexlw: apeiros: I'll post in the gist
[13:13:52] emachnic: has joined #RubyOnRails
[13:14:07] apeiros: another option is that you later override the variable
[13:14:30] emachnic: has joined #RubyOnRails
[13:14:51] durexlw: apeiros: https://gist.github.com/AndyCapiau/d1b83825764f6121620ef587aaa7609e
[13:15:07] apeiros: there you go
[13:15:20] apeiros: toplevel var is not the same as one within (function(){})()
[13:15:27] apeiros: you don't have access to that.
[13:15:45] durexlw: Sounds fair. How can I get access to it?
[13:15:53] apeiros: read a coffeescript tutorial?
[13:15:58] apeiros: I'd expect them to cover that
[13:16:04] apeiros: seems basic
[13:16:07] aegis3121: has joined #RubyOnRails
[13:16:25] apeiros: (I don't do coffeescript - I used an online converter to see what your code gets translated to)
[13:16:54] apeiros: probably by universa1's approach - set it directly on windows
[13:17:03] durexlw: apeiros: thanks, I'll do that. Makes sense now
[13:17:14] rubyonrails295: has joined #RubyOnRails
[13:17:33] rubyonrails295: thanks for all the help.
[13:17:37] rubyonrails295: I am going ahead to create a model
[13:17:52] durexlw: apeiros: setting it on window.testFunction, makes it work :)
[13:19:02] universa1: rubyonrails295: you don't need a model!
[13:19:10] universa1: rubyonrails989: http://stackoverflow.com/questions/19770888/rails-self-join-scheme-with-has-and-belongs-to-many
[13:19:16] universa1: rubyonrails295: http://stackoverflow.com/questions/2168442/many-to-many-relationship-with-the-same-model-in-rails
[13:19:17] durexlw: apeiros: works like a charm :)
[13:19:18] datanoise: has joined #RubyOnRails
[13:19:28] universa1: rubyonrails295: read those two links(!) spend some time on it.
[13:26:05] durexlw: sup flashpoint9
[13:26:54] Circuit8: has joined #RubyOnRails
[13:27:04] durexlw: apeiros: writing "@testFunction = -> ..." in coffeescript essentially makes it visible in the top level. Then it can be used in a view script just by calling "testFunction()"
[13:27:31] durexlw: Thanks for helping me out with this one
[13:29:12] srinidhi1: has joined #RubyOnRails
[13:29:15] srinidhi: has joined #RubyOnRails
[13:30:36] alfiemax: has joined #RubyOnRails
[13:31:27] JakFrist: has joined #RubyOnRails
[13:33:58] noobsu: has joined #RubyOnRails
[13:35:24] Macaveli_: has joined #RubyOnRails
[13:35:35] jas02: has joined #RubyOnRails
[13:35:39] dandaman: has joined #RubyOnRails
[13:36:00] k3rn31: has joined #RubyOnRails
[13:36:26] triptec: has joined #RubyOnRails
[13:36:27] allcentury: has joined #RubyOnRails
[13:36:49] flashpoint9: Im writing a custom rake task (first time ever) and it is based around reading a csv and grabbing the rows then importing them into the DB, my initial question is where should I store my csv? Should I store it in with the rake tasks? Whats the cleanest railiest way?
[13:38:23] durexlw: rake tasks in my opinion are dev or maintanance things. If this is something you need to do regularly for maintanance of your site or whatever, it's suitable to do that with a rake task
[13:39:03] durexlw: in other ways: a task related to your site, but not related to the app itself (although it could be)
[13:41:14] durexlw: flashpoint9: for example: if this csv is scraped data or something and it needs to be updated every first day of the week, rake task is a nice way to go. If the users of your app should be able to upload this csv, you should think if you want to do this with a rake task... you could, but it's becoming more doubtful if that 's the right way to go then... probably would only be valid if you need that very same task for maintanance
[13:42:03] gremly_: has joined #RubyOnRails
[13:42:42] mikecmpbll: has joined #RubyOnRails
[13:42:51] gremly: has joined #RubyOnRails
[13:42:54] hiennaj: has joined #RubyOnRails
[13:43:28] cabinB: has joined #RubyOnRails
[13:43:51] pawnbox: has joined #RubyOnRails
[13:43:55] Macaveli: has joined #RubyOnRails
[13:45:29] flashpoint9: durexlw: it's just a self learning task to become a better rails dev
[13:45:41] durexlw: fair enough
[13:45:46] flashpoint9: Ill only be running it once likely if the data import is solid
[13:45:46] durexlw: flashpoint9: storing the csv depends: if sensitive data you don't want it in the public folder. The libs/assets folder seems a fair option
[13:45:59] durexlw: there's an article about the libs and what they are intended for
[13:46:16] flashpoint9: awesome thanks for the advice, ill go read the guides for libs
[13:46:44] durexlw: flashpoint9: for seeding your db, you might consider looking into fixtures. They're pretty much made for that
[13:46:45] ddv: flashpoint9: store it in the database
[13:47:02] glm_glm_glm: has joined #RubyOnRails
[13:47:03] ChanServ: +b *!*@187.38.33.195
[13:47:03] ChanServ: ChanServ kicked glm_glm_glm: is banned from this channel
[13:47:18] durexlw: besides that, for the exercise: building a rake task is a nice exercise regardless if it's the best way to do it or not :)
[13:49:28] pontiki: i don't usually build rake tasks for application tasks. instead i build a runner. this makes it easier to test. i might call that runner with rake, or cron
[13:49:31] k3rn31_: has joined #RubyOnRails
[13:50:25] jokke: about dotenv: it seems that env vars passed via command line are overrided by the .env files. can this be prevented?
[13:50:26] artto: has joined #RubyOnRails
[13:50:44] flashpoint9: I'll probably redo csv importer in a runner as well for practice. Will also check out fixtures later
[13:52:07] acovrig: has joined #RubyOnRails
[13:52:58] durexlw: pontiki: you have my interest. You happen to know a good resource on runners? First time I hear about that
[13:53:35] sid_fules: has joined #RubyOnRails
[13:54:32] pontiki: not so much specifically runners; they're just one type of service object, really
[13:54:33] durexlw: guides are pretty short on it :) pontiki so a runner is just a ruby script, where the rails environment is available... basically same as "rails c"
[13:54:48] pontiki: no, it's a ruby class
[13:54:48] Jenzo: has joined #RubyOnRails
[13:55:15] Jenzo: I stumpped on this code. How do I do it correctly?
[13:55:16] Jenzo: unless = ("hungry")
[13:55:16] Jenzo: puts "I'm writing Ruby programs!"
[13:55:16] Jenzo: elsif 5 > 2
[13:55:16] Jenzo: puts "Time to eat!"
[13:55:19] pontiki: it's inside your rails app, and so, yes, can access what it needs
[13:55:22] crystal77: has joined #RubyOnRails
[13:55:57] pontiki: i wrote a post on it, i don't really know if it's "good" : http://swaac.tamouse.org/rails/2016/02/18/my-way-of-implementing-service-objects-in-rails/
[13:56:10] eljimmy: has joined #RubyOnRails
[13:56:15] yellow5: has joined #RubyOnRails
[13:56:37] agent_white: has joined #RubyOnRails
[13:56:41] cd83x: has joined #RubyOnRails
[13:56:58] Jenzo: Can someone help me?
[13:57:21] Jenzo: hi agent white
[13:57:38] Jenzo: I keep getting this error.
[13:57:39] Jenzo: (ruby): syntax error, unexpected '='
[13:57:39] Jenzo: unless = ("hungry")
[13:57:53] jokke: Jenzo: please use a pastebin
[13:58:25] jokke: Jenzo: what are you trying to do there
[13:58:34] jokke: Jenzo: unless is a reserved keyword
[13:58:38] Jenzo: I'm trying to the unless command
[13:58:43] jokke: also ("hungry") doesn't make any sense
[13:59:09] Jenzo: I am doing code academy
[13:59:18] Jenzo: and they want me to use the unless keyword
[13:59:27] jokke: Jenzo: what you're _actually_ doing is trying to assign ("hungry") to a variable called unless (which won't work, since unless is as i said a reserved keyword)
[14:00:07] Macaveli_: has joined #RubyOnRails
[14:00:08] jokke: also seems like you'd be better off in #ruby
[14:00:20] hiennaj: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[14:00:25] jokke: so unless is basically just a negated if
[14:00:50] Jenzo: How would use you unless if you were to program?
[14:00:56] Jenzo: I'm trying to learn Ruby on rails
[14:01:01] durexlw: pontiki: thanks
[14:01:07] acovrig: I’m having an issue with nested params (https://gist.github.com/acovrig/19bbdd855fc76f4efaf1e2b67b38b8f1) I bet it’s a simple fix, just not seeing it.
[14:01:12] jokke: something = [true, false].sample; puts 'foo' unless something
[14:01:51] jokke: or the longer version: unless something; puts 'foo; end
[14:02:03] jokke: (missing a ' there)
[14:02:11] durexlw: what jokke says :)
[14:02:44] jokke: so any ideas about that dotenv problem?
[14:02:52] Jenzo: I want to be a pro at this
[14:02:57] Jenzo: I want to make this my future profession
[14:03:12] jokke: good to hear
[14:03:20] Jenzo: Senior Engineer $130,000 a year check is too good
[14:03:32] jokke: long way to go man
[14:03:46] Jenzo: How many year's does it take to reach senior level?
[14:03:50] jokke: and you wont get that salary unless you've studied computer science
[14:04:01] Jenzo: Are you kidding?
[14:04:14] Jenzo: Maybe I should learn Citrix instead then
[14:04:16] wmoxam: Jenzo: depends on a lot of things
[14:04:17] Jenzo: Pays the same
[14:04:23] durexlw: acovrig: post the schema.rb for the related tables
[14:04:28] jokke: Jenzo: you're from the states?
[14:04:34] Jenzo: Tampa Florida
[14:04:58] durexlw: Can you add this data to those models manually through the console? My bet is you can't
[14:05:01] jokke: mhm. yeah the salaries in the states are way higher than here in europe for software engineers
[14:05:14] jokke: but then of course you have other expenses
[14:05:20] wmoxam: Jenzo I've heard that senior Sharepoint devs get paid even more
[14:05:43] jokke: Jenzo: don't do anything just for the money though]
[14:05:51] jokke: it's a bad motivator
[14:06:41] wmoxam: past performance is not an indicator of future
[14:06:47] acovrig: durexlw: schema.rb added to gist
[14:07:13] wmoxam: when I started Cold Fusion and Flash were hot
[14:07:16] nickenchuggets: has joined #RubyOnRails
[14:07:17] CornishPasty: jokke: US salaries may be higher, but I've heard it's a worse environment
[14:07:18] Jenzo: I have been doing Help Desk, Desktop for 15 years
[14:07:24] jokke: CornishPasty: yeah
[14:07:26] wmoxam: Rails was years away
[14:07:36] CornishPasty: I mean, I work 37.5h a week with the occasional callout
[14:07:53] jokke: that's an odd number
[14:08:09] pontiki: past performance is the best predictor of future performance, though, too, wmoxam :) it's just that awful :)
[14:08:11] durexlw: acovrig: I think you messed up the id... I hardly use has_one, but with a has_one, doesn't the id need to be in the adress in this case (in stead of in contacts)?
[14:08:12] CornishPasty: Dunno why, it's pretty standard nowadays :P
[14:08:27] jokke: CornishPasty: where're you from?
[14:08:27] wmoxam: pontiki: fair
[14:08:30] CornishPasty: But I've heard about USians working 60+h a week
[14:08:32] CornishPasty: jokke: england
[14:08:47] CornishPasty: I'm sure they're outliers
[14:08:48] acovrig: durexlw: should it be a has_many? I figure a contact has an address
[14:08:49] jokke: 60h is messed up
[14:09:05] wmoxam: Agencies are bad for that sort of thing
[14:09:10] CornishPasty: But that's illegal here
[14:09:15] pontiki: it's quite typical to work that many hours or more in a silicon valley startup
[14:09:17] CornishPasty: 48 is the most we can work per week
[14:09:23] jokke: CornishPasty: yeah
[14:09:31] jokke: CornishPasty: of course there's ways around that
[14:09:38] CornishPasty: Well, the most we can be forced to work
[14:09:40] CornishPasty: We can opt out
[14:09:44] jokke: that's right
[14:09:48] CornishPasty: But I haven't/won't
[14:09:57] CornishPasty: 48 is enough for me :P
[14:10:05] CornishPasty: I mean, I can do like 50+h in a week
[14:10:13] pontiki: i think companies that rely on their devs working that many hours a week are doomed
[14:10:13] CornishPasty: as long as it doesn't happen too often
[14:10:19] CornishPasty: pontiki: I agree
[14:10:27] CornishPasty: jokke: where are you from?
[14:10:28] jokke: pontiki: yup
[14:10:32] jokke: kills productivity
[14:10:36] jokke: CornishPasty: germany
[14:10:47] pontiki: increases the number of mistakes
[14:10:48] CornishPasty: What's the average hours there?
[14:11:20] pontiki: i personally like to work about 30 hours per week
[14:11:24] potbelly: has joined #RubyOnRails
[14:11:27] CornishPasty: I'd love to work that many
[14:11:39] jokke: pontiki: yeah that'd be cool
[14:11:55] jokke: pontiki: i tried making a deal for 32 hrs/week
[14:11:59] CornishPasty: I'm starting a new job soon so won't be using Rails in my job any more :(
[14:12:03] jokke: but no can doo
[14:12:13] |meta: has joined #RubyOnRails
[14:12:18] Ragen: I''m trying to setup ruby on rails.....I've used linuxbbrew to use rbenv install 2.3.1 but keep getting BUILD FAILED using ruby-build err
[14:12:21] acovrig: durexlw: see controller_idea.rb I just added, does it help in explaining what I’m trying to do?
[14:12:35] jokke: CornishPasty: what's the new job about then?
[14:12:38] durexlw: acovrig: a 'has_one pairs' with a 'belongs_to'... and you need to mind the placing of the id. Check: http://guides.rubyonrails.org/association_basics.html#the-has-one-association and definately read the paragraph 2.7
[14:12:44] ddv: Ragen: has nothing to do with Rails
[14:13:13] pontiki: getting ruby working has everything to do with rails
[14:13:15] jokke: CornishPasty: please don't say php
[14:13:20] JesseH: has joined #RubyOnRails
[14:13:34] ddv: pontiki: ?
[14:13:51] pontiki: ddv: i'd like to see you develop any rails app without a working ruby
[14:13:56] jokke: Ragen: please paste the log
[14:14:00] pontiki: Ragen: take a look at this: http://ryanbigg.com/2014/10/ubuntu-ruby-ruby-install-chruby-and-you/
[14:14:09] ddv: pontiki: his issues has nothing to do with Rails
[14:14:12] Jenzo: Why do the owners of this room look like cartoon characters?
[14:14:14] durexlw: acovrig: that controller code looks weird to me... i'd kinda expect you can read in the nested attributes in one go... what's the point otherwise?
[14:14:56] acovrig: durexlw: yea, I like the idea of using nested params, but if I can’t get it to work, I may use the controller_idea.rb code instead
[14:15:10] acovrig: durexlw: I figure it’ll *work* but be hideous…
[14:16:10] acovrig: durexlw: yay, it works, thanks; now to get update working :)
[14:16:24] jokke: hm i'm surprised no one has had similar problems with dotenv.. Shouldn't be that unusual overriding options from the command line...
[14:16:27] durexlw: acovrig: this article seems particularly suited for you: https://www.sitepoint.com/complex-rails-forms-with-nested-attributes/
[14:16:45] durexlw: not the "belongs_to" with the "has_one" there as well
[14:16:52] Jenzo: Anyone need to buy bandwidth? 150Mbps/150Mbps here
[14:17:19] acovrig: durexlw: thanks; it occurs to me I seem to have been trying to re-invent the weel
[14:17:19] jokke: acetoxy: imho you should try to avoid nested forms whenever possible
[14:17:34] jokke: * acovrig
[14:17:45] ddv: jokke: explain
[14:17:46] durexlw: acovrig: rails is nice in the way that when it hurts, you're probably doing it wrong :)
[14:17:50] jokke: nested forms are a mess
[14:18:02] ddv: jokke: not really?
[14:18:16] jokke: especially when you start adding form elements via js
[14:18:22] acetoxy: I remember we had some issues with nested forms in 2009
[14:18:44] acovrig: jokke: yea, this is basically just an API and the app dev sees a contact and an address as the same entity, so they’re going to create a contact and address at the same time
[14:18:58] acetoxy: but that was some time ago
[14:19:07] Ragen: rbenv install 2.3.1
[14:19:07] Ragen: Downloading ruby-2.3.1.tar.bz2...
[14:19:07] Ragen: -> https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.1.tar.bz2
[14:19:07] Ragen: Installing ruby-2.3.1...
[14:19:07] Ragen: BUILD FAILED (LinuxMint 17.3 using ruby-build 20160426-33-g3304f96)
[14:19:08] Ragen: Inspect or clean up the working tree at /tmp/ruby-build.20160602095424.3916
[14:19:10] Ragen: Results logged to /tmp/ruby-build.20160602095424.3916.log
[14:19:12] Ragen: Last 10 log lines:
[14:19:14] Ragen: from /tmp/ruby-build.20160602095424.3916/ruby-2.3.1/lib/rubygems/core_ext/kernel_require.rb:55:in `require'
[14:19:15] jokke: Ragen: dude
[14:19:17] Ragen: from /tmp/ruby-build.20160602095424.3916/ruby-2.3.1/lib/rubygems/package.rb:44:in `<top (required)>'
[14:19:19] jokke: Ragen: pastebin!
[14:19:20] Ragen: from /tmp/ruby-build.20160602095424.3916/ruby-2.3.1/lib/rubygems/core_ext/kernel_require.rb:55:in `require'
[14:19:23] Ragen: from /tmp/ruby-build.20160602095424.3916/ruby-2.3.1/lib/rubygems/core_ext/kernel_require.rb:55:in `require'
[14:19:26] Ragen: from /tmp/ruby-build.20160602095424.3916/ruby-2.3.1/lib/rubygems/installer.rb:10:in `<top (required)>'
[14:19:27] helpa: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[14:19:29] Ragen: from /tmp/ruby-build.20160602095424.3916/ruby-2.3.1/lib/rubygems/core_ext/kernel_require.rb:55:in `require'
[14:19:32] Ragen: from /tmp/ruby-build.20160602095424.3916/ruby-2.3.1/lib/rubygems/core_ext/kernel_require.rb:55:in `require'
[14:19:34] fedexo: has joined #RubyOnRails
[14:19:37] Ragen: from ./tool/rbinstall.rb:657:in `<module:RbInstall>'
[14:19:39] Ragen: from ./tool/rbinstall.rb:585:in `<main>'
[14:19:41] Ragen: make: *** [do-install-all] Error 1
[14:19:42] durexlw: lol... he'll keep going for a while there :)
[14:19:48] beingjohnm: I would like to select a record from a drop down list, click submit, and then go to the show action for that record. That seems to be described here: http://stackoverflow.com/questions/657629/rails-using-form-collection-select-to-call-show-action. Wondering if there is a path I can use in the form for that or should I create a custom show in the method in the controller?
[14:19:54] jokke: that gets you kicked in most channels
[14:20:03] durexlw: dude once posted here a base64 of an image, we kept staring at jibber for a while then :)
[14:20:19] ddv: lol @ durexlw
[14:21:33] jokke: in #archlinux.de we have a running gag using soft hyphens instead of spaces. (U+00AD) It breaks weechat.
[14:21:46] jokke: and most guys there use it as irc client
[14:22:28] durexlw: beingjohnm: not sure if this is a security issue ... I guess you could update 'where to post this to' based on the selection of the drop down with js... but that's setting yourself up for errors all over the place I guess... I'd post it to whatever controller makes sense, then redirect or render what you need
[14:22:59] edwinvdgraaf: has joined #RubyOnRails
[14:23:31] beingjohnm: durexlw: that makes sense. I figured it would be a common enough action that there was a built in way that I was missing.
[14:24:03] durexlw: beingjohnm: I don't think that's pretty common... but I'm not that experienced either... what are you trying to do?
[14:25:38] beingjohnm: durexlw: an example would be a school with a bunch of departments. Rather than have a list of department you can click on to go to the department you would select one from a drop-down list. Saves screen real estate.
[14:25:41] Ragen: jokke: I don't know how to paste bin
[14:25:50] sid_fules: has joined #RubyOnRails
[14:26:03] kgrz: has joined #RubyOnRails
[14:26:39] jokke: Ragen: https://gist.github.com
[14:26:52] jokke: not hard ;)
[14:27:13] durexlw: beingjohnm: you could also consider a css dropdown with anchortags... not sure if your case allows this, but that would save screen estate and still allow to directly link to something
[14:27:31] durexlw: easy to do with bootstrap
[14:29:19] beingjohnm: durexlw: that is an idea. What I'm actually doing is using selectize.js to create a combo box to select. Will look good to the company I'm doing a demo for in a few hours. I'll create a custom method in the controller as you recommended.
[14:30:16] durexlw: selectize? sounds easy enough to do with a simple collection_select, no?
[14:31:33] durexlw: never mind my remak, I see where you're going with this :)
[14:31:39] haaj: has joined #RubyOnRails
[14:31:49] durexlw: you probably have a lot of departments
[14:32:33] beingjohnm: durexlw: the path for the form is the problem.
[14:32:56] haaj__: has joined #RubyOnRails
[14:33:48] srinidhi: has joined #RubyOnRails
[14:34:07] durexlw: beingjohnm: you just need to post to a controller and a method, use form_tag - http://apidock.com/rails/ActionView/Helpers/FormTagHelper/form_tag
[14:34:07] haaj_: has joined #RubyOnRails
[14:34:10] mikecmpb_: has joined #RubyOnRails
[14:35:30] durexlw: you are probably on a page, so you came from a controller, I'd write a message in that controller "select_path" or whatever, then you post to that path. Since you need to add it to your routes.rb, you have a route to that controller action. Use that route in your form_tag and set post as method
[14:37:31] beingjohnm: durexlw: yeah, I can do that. Just figured there was a standard way without writing new methods but maybe not.
[14:37:48] haaj: has joined #RubyOnRails
[14:38:39] Ragen: jokke: I hope this is what you meant https://gist.github.com/anonymous/982857a46154a28aa0f3e37b9df8e986
[14:38:39] beingjohnm: trying to stay as close as possible to convention as someday I hope to hire somebody else to write the code
[14:38:55] CornishPasty: jokke: fortunately not :P
[14:39:43] sid_fules: has joined #RubyOnRails
[14:39:50] cd83x: has joined #RubyOnRails
[14:41:56] acovrig: OK, the create works, but the update doesn’t work and doesn’t give me a usable error: https://gist.github.com/acovrig/19bbdd855fc76f4efaf1e2b67b38b8f1
[14:42:40] JamieD: has joined #RubyOnRails
[14:43:00] jokke: CornishPasty: alright
[14:43:15] CornishPasty: At a relatively big company, who I shan't name
[14:43:22] jokke: Ragen: it is
[14:43:31] jokke: CornishPasty: you shant?
[14:43:49] jokke: yeah i know
[14:43:56] jokke: i just wondered why
[14:44:07] CornishPasty: Just don't want to sound like I'm advertising :P
[14:44:26] sid_fules: has joined #RubyOnRails
[14:45:32] durexlw: beingjohnm: sounds like a fair plan :)
[14:45:37] macsteps: has joined #RubyOnRails
[14:45:40] durexlw: laterz all!
[14:45:41] jokke: lol we got a phonecall to my company today where the caller requested to talk to me. Turned out it was a headhunter trying to recrute me for another relatively big company i shan't name :P Pretty bold. :D
[14:46:03] jokke: it's actually fairly standard here
[14:46:11] durexlw: nice jokke :)
[14:46:30] durexlw: it's not a big jigolo comany, right, we're talking rails here?
[14:46:38] durexlw: cya all :)
[14:47:01] Devalo: has joined #RubyOnRails
[14:47:12] jokke: most are registered on xing. headhunters use it as plattform to find suitable people for companies that hire them
[14:47:26] norc: has joined #RubyOnRails
[14:47:35] jokke: well it's a multinational company
[14:47:47] jokke: not more than 7k employees though
[14:48:29] CornishPasty: Yeah, the place I'm going has ~3k
[14:48:33] apeiros: jokke: such calls happen (sadly) quite regularly here :-/ (not just me)
[14:48:36] CornishPasty: My current place is 15.
[14:48:39] jokke: apeiros: yup
[14:48:39] CornishPasty: 15 people, not 15k
[14:48:53] jokke: CornishPasty: hehe
[14:49:00] jokke: yeah bout the same her
[14:49:22] CornishPasty: I'll be in a team twice the size of this company :o
[14:50:14] jokke: CornishPasty: it's funny that as soon as the company size scales up you're using erlang and go :D
[14:50:40] CornishPasty: Well, it's real-time critical stuff, so...
[14:50:52] CornishPasty: Not life/death, but money
[14:50:54] pontiki: that should be exciting
[14:51:35] CornishPasty: Oh cool, new company owns a football team
[14:52:19] pontiki: free tickets? :)
[14:54:39] artto: has joined #RubyOnRails
[14:56:24] sid_fules: has joined #RubyOnRails
[14:57:44] smathy: has joined #RubyOnRails
[15:00:26] datanoise: has joined #RubyOnRails
[15:01:24] chouhoulis: has joined #RubyOnRails
[15:01:59] chouhoulis: has joined #RubyOnRails
[15:02:08] frem_: has joined #RubyOnRails
[15:02:19] VeryBewitching: has joined #RubyOnRails
[15:02:37] hcnewsom: has joined #RubyOnRails
[15:02:47] hcnewsom: Is anyone in here an asset pipline expert?
[15:04:54] smathy: hcnewsom, just ask your question.
[15:05:36] Pupeno: has joined #RubyOnRails
[15:05:52] flashpoint9: hcnewsom: Im a rails nub, but I can say the guides are amazing when you actually read them line by line and don't scan (that's what I've been doing to try and level more) http://edgeguides.rubyonrails.org/asset_pipeline.html
[15:06:15] flashpoint9: Still ask your question
[15:06:27] hcnewsom: this might not be completely 100% related to Rails
[15:06:50] flashpoint9: I know its not awesome to hear "go read docs" but Im a nub and it has helped me level up a lot
[15:06:54] hcnewsom: I have an app that continues to cache a manifest file
[15:07:10] hcnewsom: (i.e an old javascript file with an old hash)
[15:07:13] hcnewsom: even after a deployment
[15:07:15] flashpoint9: arent minfests a docker thing?
[15:07:31] hcnewsom: no, you can use them to combine javascript
[15:07:54] flashpoint9: sorry to interupt please continue
[15:08:08] yfeldblum: has joined #RubyOnRails
[15:09:08] workmad3: hcnewsom: by 'cache' do you mean 'serves that file' or 'doesn't remove it from public/assets'?
[15:09:15] digitalfiz: has joined #RubyOnRails
[15:10:00] sid_fules: has joined #RubyOnRails
[15:10:43] workmad3: flashpoint9: 'manifest' is a fairly common term for a file that's in charge of assembling a package or system
[15:11:09] flashpoint9: workmad3: ah ok, thanks for calrifying
[15:14:54] hcnewsom: workmad3: the file name is manifest.foo-HASH.js
[15:16:07] hcnewsom: where HASH is the unique identifier for that deployment...
[15:16:20] artto: has joined #RubyOnRails
[15:16:35] sid_fules: has joined #RubyOnRails
[15:19:39] groatyoats: has joined #RubyOnRails
[15:20:27] k3rn31: has joined #RubyOnRails
[15:21:38] disgrntld: has joined #RubyOnRails
[15:22:09] smathy: flashpoint9, delete `edge` from that URL unless you're using Rails 5
[15:23:22] smathy: hcnewsom, are you saying that the hash doesn't change when you deploy new assets?
[15:24:11] hcnewsom: smathy: yes
[15:24:21] hcnewsom: it doesn’t change in the browser
[15:24:29] hcnewsom: only after a hard refresh
[15:24:33] polishdub: has joined #RubyOnRails
[15:24:35] aegis3121: has joined #RubyOnRails
[15:24:55] smathy: hcnewsom, heh, so it does change, but only on a hard reload in the browser?
[15:25:25] hcnewsom: smathy: right, yes, sorry for not being clear
[15:26:01] artto: has joined #RubyOnRails
[15:26:11] mello: has joined #RubyOnRails
[15:26:15] chorgi: has joined #RubyOnRails
[15:26:32] smathy: hcnewsom, copy/paste one of the lines from your layout template for one of the assets that's not refreshing.
[15:28:26] moeabdol: has joined #RubyOnRails
[15:29:32] hcnewsom: smathy: <%= javascript_include_tag 'manifest.stories_show' %>
[15:30:07] honeyroasted: has joined #RubyOnRails
[15:32:01] smathy: hcnewsom, right, so (a) why aren't you using the generated code that Rails made for you?, (b) flashpoint9 is right, this is covered in the assets guide, specifically in the "Coding Links to Assets" section (but read it all).
[15:32:41] Aherin_: has joined #RubyOnRails
[15:32:57] flashpoint9: hcnewsom: thanks for brining up the topic because I really needed to brush up on knowledge of the asset pipeline
[15:33:08] RegulationD: has joined #RubyOnRails
[15:33:23] hcnewsom: flashpoint9: sure
[15:38:34] darkxploit: has joined #RubyOnRails
[15:40:16] indianowl: has joined #RubyOnRails
[15:41:13] eljimmy: has joined #RubyOnRails
[15:42:50] rails690: has joined #RubyOnRails
[15:43:18] syndikate: has joined #RubyOnRails
[15:44:24] [Butch]: has joined #RubyOnRails
[15:44:31] sypheren: has joined #RubyOnRails
[15:45:34] k3rn31_: has joined #RubyOnRails
[15:46:19] marchelzo: has joined #RubyOnRails
[15:46:48] davidw: has joined #RubyOnRails
[15:46:57] sid_fules: has joined #RubyOnRails
[15:47:25] RegulationD: has joined #RubyOnRails
[15:50:24] SteenJobs: has joined #RubyOnRails
[15:50:38] kitsuneyo: has joined #RubyOnRails
[15:50:59] artto: has joined #RubyOnRails
[15:51:44] kitsuneyo: i'm trying to write a test in capybara. this is the line that doesn't work: "select('Roman', from: 'writing-system')". writing-system is the css class of the input, the name and id aren't usable
[15:52:05] sid_fules: has joined #RubyOnRails
[15:52:20] kitsuneyo: capybara says "Unable to find select box ".writing-system" even though it's there
[15:52:41] kitsuneyo: what alternative method could i use for finding that select box with capybara?
[15:56:51] sid_fules: has joined #RubyOnRails
[15:56:55] tildes_: has joined #RubyOnRails
[16:01:43] sid_fules: has joined #RubyOnRails
[16:03:38] jas02: has joined #RubyOnRails
[16:05:10] Pupeno: has joined #RubyOnRails
[16:07:37] Tref: has joined #RubyOnRails
[16:11:04] hiennaj: has joined #RubyOnRails
[16:11:42] kdough: has joined #RubyOnRails
[16:15:17] noobsu: has joined #RubyOnRails
[16:15:33] alfiemax: has joined #RubyOnRails
[16:15:33] dionysus70: has joined #RubyOnRails
[16:18:31] banister: has joined #RubyOnRails
[16:21:08] startupality: has joined #RubyOnRails
[16:23:38] manfrin: has joined #RubyOnRails
[16:25:36] Jasaka: has joined #RubyOnRails
[16:26:25] tubbo: anyone else trying to use spring, rails 5.0, and anything other than a ruby app in the same dir?
[16:26:30] tubbo: because BREAKING NEWS it doesn't work at all
[16:26:42] tubbo: it all comes down to the Listen gem
[16:27:27] tubbo: now that rails REQUIRES it, i apparently can't have a node_modules/electron-packager directory in my app
[16:27:41] tubbo: bceause listen will try to watch all the files in there and take a shit all over my logs
[16:29:35] Cohedrin: has joined #RubyOnRails
[16:30:17] jottr: has joined #RubyOnRails
[16:32:42] artto: has joined #RubyOnRails
[16:34:02] bruce_lee: has joined #RubyOnRails
[16:34:55] tildes_: has joined #RubyOnRails
[16:37:51] matthewd: tubbo: Err... rails doesn't *require* listen; it's in the default gemfile
[16:40:06] flashpoint9: has joined #RubyOnRails
[16:40:07] hcnewsom: has joined #RubyOnRails
[16:40:48] tubbo: matthewd: i tried to remove it and got '/Users/tscott/Code/tracklist/vendor/bundle/gems/activesupport-5.0.0.rc1/lib/active_support/dependencies.rb:293:in `require': Could not load the 'listen' gem. Add `gem 'listen'` to the development group of your Gemfile (LoadError)'
[16:40:59] tubbo: ohhh wait hold on
[16:41:08] tubbo: i have to change the file_watcher
[16:41:28] tubbo: it's pretty annoying that you can't just tell listen "hey man, ignore this directory"
[16:41:40] matthewd: Oh, yeah.. sucky that you have to turn it off twice :/
[16:41:40] tubbo: unless there's some kind of config in AS::FileWatcher i'm not aware of matthewd :)
[16:41:56] Malgorath: has joined #RubyOnRails
[16:42:14] tubbo: i'm a big Spring fan so having to turn it off kinda sucks
[16:42:24] matthewd: Doubt it.. I think we just ask listen to watch the app dir, and it (depending on OS, etc) runs off and does the crazy recursive thing by itself
[16:42:26] tubbo: but the only reason this is happening is because i have my ember app and electron bundled int he same repo
[16:42:36] matthewd: ... though it does seem fixable
[16:42:48] Malgorath: Can someone tell me what I'm getting an error with bundle exec rake db:migrate GIST => https://gist.github.com/malgorath/55f3ac514e235eedc9e588eca557c504 Error is in the description for more information, and thats the migration file
[16:43:06] matthewd: Surely we only actually need to be monitoring the directories we autoload from
[16:43:09] tubbo: yeah you'd have to pass the list of ignored dirs to Listen when you instantiate it, so it would have to be a config setting in rails to pass it all the way down. unfortunately, Listen doesn't have a nice little .configure method i can apply this myelf
[16:43:48] tubbo: yeah maybe if it was just limited to app/**/*, config/**/*, lib/**/*, Gemfile*, and vendor/**/*?
[16:45:34] fedexo: has joined #RubyOnRails
[16:47:54] wldcordeiro: has joined #RubyOnRails
[16:53:17] roamingdog: Malgorath: well, the error says an index already exists, which means you've run this or a very similar migration before. find that migration and compare it to the current one, remove duplicate lines wisely
[16:53:31] Ragen: jokke: so i get this errr --->> make: *** [do-install-all] Error 1
[16:53:31] Ragen: !!! Installation of ruby 2.3.0 failed!
[16:53:31] Ragen: fulll log is here https://gist.github.com/anonymous/aba1f3b68b1142ca3d9ad5a74194226a
[16:53:50] GodFather: has joined #RubyOnRails
[16:55:09] JamieD: has joined #RubyOnRails
[16:55:11] Malgorath: roamingdog: okay I'll look more but I don't have it anywhere else that I know of
[16:55:56] roamingdog: Malgorath: well that index didn't just pop into existence by itself
[16:56:57] sid_fules: has joined #RubyOnRails
[16:58:29] macsteps: has joined #RubyOnRails
[16:59:07] cyfr0n: has joined #RubyOnRails
[16:59:39] cyfr0n: has joined #RubyOnRails
[17:00:09] djbkd: has joined #RubyOnRails
[17:00:12] Malgorath: roamingdog: actually this issue seems to be the fact this is in an engine and the reference is only doing `tasklists` (`id`) when it needs to be `taskmaster_tasklists` (`id`) (Engines prepend enginename_tablename)
[17:00:56] Coldblackice: has joined #RubyOnRails
[17:00:56] marr123: has joined #RubyOnRails
[17:03:34] IT-Manager: has joined #RubyOnRails
[17:04:11] aegis3121: has joined #RubyOnRails
[17:04:36] [gmi]: has joined #RubyOnRails
[17:05:47] cd83x: has joined #RubyOnRails
[17:06:00] DoctorMonocular: has joined #RubyOnRails
[17:10:17] hahuang61: has joined #RubyOnRails
[17:10:49] michael_mbp: have you dealt with multiple search delta queues and async issues?
[17:11:26] cnk: has joined #RubyOnRails
[17:11:44] michael_mbp: "The race condition still exists if you have multiple worker processes (or multiple web processes enqueuing jobs), so I'm not sure this accomplishes its goal in most production situations."
[17:12:05] RegulationD: has joined #RubyOnRails
[17:13:11] ErhardtMundt: I'm using paperclip
[17:13:35] DoctorMonocular: has joined #RubyOnRails
[17:13:40] sharkman: has joined #RubyOnRails
[17:13:41] ErhardtMundt: is there any way to get the maximum defined file size for a given attachment?
[17:13:46] ErhardtMundt: I mean, class wise
[17:13:56] sharkman: how do i do this? FooTable.all[0].value_at(:my_key)
[17:14:15] sharkman: i know i can do FooTable.all[0].my_key but i want to pass the key as a variable...
[17:15:13] meoblast001: has joined #RubyOnRails
[17:16:21] rogue_koder: has joined #RubyOnRails
[17:17:38] workmad3: michael_mbp: what race condition?
[17:17:50] sneakerhax: has joined #RubyOnRails
[17:17:57] David_H_Smith: has joined #RubyOnRails
[17:18:21] cnk: sharkman: does FooTable.all[0][:my_key] work?
[17:18:33] michael_mbp: hey workmad3 o/
[17:18:42] sharkman: yes it does thanks workmad3
[17:18:51] workmad3: sharkman: you mean cnk
[17:18:53] sharkman: that was nnice of the rails developers to make that convention for us
[17:18:59] sharkman: yes i do :) thanks cnk
[17:19:50] michael_mbp: workmad3: https://github.com/ankane/searchkick/pull/651#issuecomment-223360289
[17:19:58] workmad3: sharkman: the other option would have been `FooTable.all[0].send(:my_key)` btw
[17:20:25] sharkman: ah right i have seen the "send" method used before but i havent used it get. good to know. thanks
[17:21:07] michael_mbp: workmad3: uh, my example isn't the best.
[17:21:24] michael_mbp: but at least that out-of-sync job would fail, but in this scenario it is OK.
[17:21:24] moeabdol: has joined #RubyOnRails
[17:22:07] workmad3: michael_mbp: ah, yeah, you're basically dealing with the unordered nature of such an async queue
[17:22:14] Wolland: has joined #RubyOnRails
[17:22:34] michael_mbp: ok refresh, my comment has a better example
[17:23:24] michael_mbp: I suppose the only way to get around this is to have a middle-man between all the compute instances and a single 'worker' pool
[17:23:29] workmad3: michael_mbp: the way I'd typically suggest doing that would be to throw something like `updated_at` into the job data as well, and check to see if it's changed since the time the job was queued (or if the item has vanished)
[17:23:46] eljimmy: has joined #RubyOnRails
[17:24:09] michael_mbp: that would achieve the same thing.
[17:25:14] workmad3: michael_mbp: that does require a DB check before reindexing though... so it could be you'd be better off just reloading the latest data in the background worker prior to reindexing
[17:25:39] swiftydev: has joined #RubyOnRails
[17:25:46] michael_mbp: ah but these aren't reindexing jobs
[17:25:52] michael_mbp: but callbacks (so state changes)
[17:26:15] michael_mbp: Do you mean that each time there's a worker update it reindexes first?
[17:26:36] startupality: has joined #RubyOnRails
[17:27:56] workmad3: michael_mbp: tbh, I'm no longer sure what's going on in the queue in the linked issue :)
[17:28:13] michael_mbp: I added your somment
[17:28:28] michael_mbp: linked issue is tad unrelated to my scenario but also semi-related
[17:28:42] michael_mbp: there's is more a case of having multiple workers and maintaining sync.
[17:29:02] michael_mbp: Your point though
[17:29:12] michael_mbp: "One approach would be to tweak the Searchkick job to also add updated_at which is then checked to see if it's changed since the time the job was queued (or if the item has vanished)?" sounds intriguing.
[17:29:21] workmad3: michael_mbp: yeah... btw, the strategy I mentioned wouldn't work in a split-brain scenario
[17:29:41] michael_mbp: ACTION has a split-brain
[17:30:14] michael_mbp: the job is still checked againts a singular DB (although I'm not thinking about transaction locks at this point)
[17:30:34] workmad3: in that scenario, you'd have the two workers processing their job, and there's a partition in the data storage cluster (hence 'split-brain'), so one worker is talking to one brain, the second worker to the other
[17:30:55] michael_mbp: I'm not going for the split-brain approach
[17:31:00] dionysus69: has joined #RubyOnRails
[17:31:04] michael_mbp: Gotcha, that is adding further complexity.
[17:31:08] workmad3: michael_mbp: if you've only got a single node in your data cluster, you can't get into a split-brain scenario :)
[17:31:14] Axilla: has joined #RubyOnRails
[17:31:22] DoctorMonocular: has joined #RubyOnRails
[17:31:25] Axilla: anyone have any expereince with mixpanel JS lib?
[17:31:33] workmad3: michael_mbp: but it's worth noting that edge-case anyway so you know to prep for the issue in the future
[17:31:36] Mia: has joined #RubyOnRails
[17:31:36] Mia: has joined #RubyOnRails
[17:31:37] michael_mbp: that's what I was aiming for with the 'middle-man' I suppose.
[17:31:41] choke: has joined #RubyOnRails
[17:31:50] artto: has joined #RubyOnRails
[17:31:57] michael_mbp: having a single worker per instance, would that also constitute as a split-brain?
[17:31:59] workmad3: michael_mbp: and welcome to the world of CAP :)
[17:32:19] michael_mbp: given that it's subject to traffic routed via a load-balancer.
[17:32:29] workmad3: michael_mbp: it's only split-brain if the thing in control of reads/writes gains a partition, afaik
[17:32:30] michael_mbp: and this would happen if when it transitions rapidly
[17:32:52] yfeldblum: has joined #RubyOnRails
[17:32:53] workmad3: michael_mbp: so multiple workers can't get into a split-brain if they're all talking to the same storage cluster that's in control of reads/writes
[17:33:05] michael_mbp: workmad3: ah...
[17:33:22] michael_mbp: that does make sense.
[17:33:46] workmad3: michael_mbp: basically, split-brain is a term for "We have a network partition in our database that means we have two things able to process reads and writes and they're no longer able to talk to each other"
[17:34:07] workmad3: (well, 2 or more)
[17:34:42] yfeldblum: has joined #RubyOnRails
[17:34:43] michael_mbp: well multiple nodes, but singular DB (backend), so that should be ok.
[17:34:53] workmad3: michael_mbp: the typical resolution is some form of quorum process that requires a majority of nodes, and if there's no quorum the cluster stops accepting data
[17:35:04] michael_mbp: and I don't really care if there are ES jobs to update something that's not in the index.
[17:35:16] SteenJobs: has joined #RubyOnRails
[17:35:37] workmad3: michael_mbp: but as said, none of this is relevant if you have a single database node... a single node is trivially CP in CAP terms :)
[17:35:53] ferr: has joined #RubyOnRails
[17:37:15] jottr_: has joined #RubyOnRails
[17:37:33] choke: hey that would mean my app is split-brain i guess... 15 app nodes independent of each other, singular db and a redis cluster
[17:37:39] sbarg: has joined #RubyOnRails
[17:37:46] sbarg: has left #RubyOnRails: ()
[17:37:56] hahuang61: has joined #RubyOnRails
[17:38:27] workmad3: choke: it's possible for your redis cluster to go split-brain, but not your database
[17:38:32] michael_mbp: thanks again David.
[17:38:51] michael_mbp: whenever I ask questions like this, I normally hope to see you around ;-)
[17:39:20] choke: the db itself isnt, but the app nodes would be correct? ( maybe i dont understand fully )
[17:39:26] workmad3: choke: at least, it may be... I think redis may have a quorum approach in partitions so one half of the split will become unavailable
[17:39:47] choke: the redis for sure isn't, seeing as how it'sa master-slave type thing for speed, reliability and redudancy
[17:39:52] workmad3: choke: the app nodes never need to communicate to each other in order to provide a consistent answer (because that's provided by the database) so no, there's no split-brain there
[17:40:08] choke: well, there we go
[17:41:46] workmad3: choke: basically, a network partition in your setup could only ever cause some proportion of your app servers to become unavailable, rather than them all to seem available but giving diverging answers :)
[17:42:12] choke: ahh, i understand a little better now
[17:42:36] workmad3: (distributed systems are a pain)
[17:42:37] Malgorath: in a has_many relationship, accessing the child after doing @table = Table.all is just @table.child ?
[17:42:53] choke: diverging answers is actually the main reason i moved redis off the app nodes; was a pain trying to keep them all even remotely in sync
[17:43:14] workmad3: Malgorath: no, because `Table.all` will give you a collection of tables
[17:43:32] Malgorath: workmad3: I used the name Table as just a generic for a table name
[17:43:39] workmad3: Malgorath: yes, I'm aware
[17:43:49] workmad3: Malgorath: but `.all` will give you a collection, not a single instance
[17:44:16] choke: what he means is Table.all will give you an array of Table objects....
[17:44:27] choke: but for each table object, table.child would be correct
[17:44:48] workmad3: (although with a has-many, the convention would be `table.children` rather than `table.child`
[17:44:53] jottr: has joined #RubyOnRails
[17:45:01] Malgorath: wierd it seems to not work that way for me(in an engine)
[17:45:26] workmad3: Malgorath: as in you did `@foobar = Foobar.all; @foobar.some_association`?
[17:45:34] workmad3: Malgorath: a.k.a. the thing I just said wouldn't work?
[17:45:38] tildes_: has joined #RubyOnRails
[17:46:34] kdough: has joined #RubyOnRails
[17:46:41] Malgorath: workmad3: at first I tred tha tbut I'm doing this: @task_lists = TaskList.where(project: params[:project_id])
[17:47:19] choke: find_by seems like a better choice, where will give you an array as well i believe ( at least with Mongo it does )
[17:47:21] workmad3: Malgorath: and then what?
[17:47:24] Malgorath: so inside a @task_lists.each I have another for loop to cycle through the todo_lists?
[17:47:38] choke: ahh but you want an array got it
[17:47:47] workmad3: Malgorath: !gist
[17:47:47] helpa: Malgorath: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[17:48:38] rockyroadster: has joined #RubyOnRails
[17:49:26] Malgorath: workmad3: yeah, I was gonna gist it but then with the ideas you guys said I was trying to make it work before I get into a gist
[17:49:31] rockyroadster: Hey, some of my rails app pages are slow to load. Chrome network profiler shows that the big bottle neck is time to first byte (1.5-2 seconds some times), could that be a rails issue?
[17:49:40] rockyroadster: issue regarding my code performance I mean
[17:50:02] cnk: perhaps what does the profiler in the rails logs indicate?
[17:50:13] cnk: and is that page always slow or is it intermittent?
[17:50:22] workmad3: rockyroadster: probably... most of the time, rails will render the entire page before it sends data down to the browser
[17:50:36] workmad3: rockyroadster: so the time-to-first-byte == your page render time + network latency
[17:50:52] rockyroadster: gotcha, so if I’m making too many database calls that would cause a high ttfb?
[17:51:20] Macaveli: has joined #RubyOnRails
[17:51:31] michael_mbp: cheers workmad3 o/
[17:53:16] Malgorath: workmad3: https://gist.github.com/malgorath/096a0abaded54b173e2b873245f0c7c6
[17:54:40] workmad3: Malgorath: that all looks fine except that you'd want `has_many :todo_lists` because your model is called `TodoList`
[17:54:58] workmad3: Malgorath: and then `task_list.todo_lists.each` in your view by extension
[17:55:56] Malgorath: Mysql2::Error: Unknown column 'taskmaster_todo_lists.task_list_id' in 'where clause': SELECT `taskmaster_todo_lists`.* FROM `taskmaster_todo_lists` WHERE `taskmaster_todo_lists`.`task_list_id` = 1
[17:56:24] workmad3: Malgorath: that means you've not actually added the foreign-key column to your todo_lists table
[17:56:35] flashpoint9: has joined #RubyOnRails
[17:56:42] Malgorath: yeah was gonna say the field is named tasklist_id
[17:57:10] workmad3: Malgorath: yeah... stop trying to ignore rails conventions :P
[17:57:41] workmad3: ACTION leaves for the night
[17:57:43] choke: and whats with the @todo_lists = TodoList.all -- that's just un-needed stuff...
[17:58:36] Malgorath: choke: yeah just a left over scrap I hadn't taken out yet from my first idea
[17:59:18] emachnic: has joined #RubyOnRails
[17:59:49] crystal77: has joined #RubyOnRails
[18:01:05] ferr: How would I sort taxes by driver full_name attribute? https://gist.github.com/Fercell/4bc3d5362e7590a267bcf2bc824e64b8
[18:05:58] workmad3: has joined #RubyOnRails
[18:08:25] roelof: has joined #RubyOnRails
[18:08:45] Pazician: has joined #RubyOnRails
[18:08:54] Pazician: has joined #RubyOnRails
[18:09:32] roelof: Why does rspec cannot find a file and server s does not load it. See https://gist.github.com/rwobben/91d8b49ae39a8da0b8fcec115a1eb990
[18:10:23] franzip: has joined #RubyOnRails
[18:10:42] choke: has joined #RubyOnRails
[18:12:32] franzip: has joined #RubyOnRails
[18:14:28] macsteps: has joined #RubyOnRails
[18:15:30] Dimik: has joined #RubyOnRails
[18:16:45] Wolland: has joined #RubyOnRails
[18:16:47] smathy_: has joined #RubyOnRails
[18:17:09] jcutrell: has joined #RubyOnRails
[18:17:30] nettoweb: has joined #RubyOnRails
[18:18:00] RegulationD: has joined #RubyOnRails
[18:18:10] jcutrell: Hi folks! I’m having a very strange issue where `response` is nil in a request spec I’m running. I use RSpec and Capybara. I’ve stripped the spec back to visit “/“, and response is still returning as nil in the test.
[18:18:15] jenrzzz: has joined #RubyOnRails
[18:18:40] alfiemax: has joined #RubyOnRails
[18:18:45] jcutrell: Has anyone seen this kind of issue in a request spec?
[18:19:16] sharkman: i havent sorry
[18:20:16] norc: jcutrell, show us some code first, and a full stack trace.
[18:20:27] norc: Then perhaps we can help you.
[18:22:29] jcutrell: http://pastie.org/10862003#9-10 - // norc sharkman
[18:22:54] norc: jcutrell, please also gist your stacktrace of the error you are getting.
[18:23:01] norc: Ideally of the entire rspec output for that spec.
[18:23:40] jcutrell: Okay. It’s not much - added the primary info in that pastie - one sec
[18:23:54] norc: jcutrell, still - gist it.
[18:24:51] edwinvdgraaf: has joined #RubyOnRails
[18:25:22] jcutrell: http://pastie.org/10862010
[18:25:30] jcutrell: There’s the output (some warnings, etc)
[18:28:58] edwinvdgraaf: has joined #RubyOnRails
[18:29:09] norc: jcutrell, can you also paste the rails log for testing?
[18:29:17] kgrz: has joined #RubyOnRails
[18:31:53] jcutrell: I think maybe Pastie doesn’t like the log output cause it’s sql-y
[18:31:57] edwinvdg_: has joined #RubyOnRails
[18:32:02] jcutrell: I’ll do a gist
[18:32:25] jcutrell: https://gist.github.com/jcutrell/51446efa40674ca7af8eb77756ffc9ef
[18:32:41] arup_r: has joined #RubyOnRails
[18:33:13] rubyonrails865: has joined #RubyOnRails
[18:33:20] norc: jcutrell, Im wondering whether the redirect has anything to do with it.
[18:33:21] arup_r: Hi, when running rspec, anybody met ever this issue? https://gist.github.com/aruprakshit/15b2ede7b84cb539088b6bb5fa7dc359 .. I have no idea how to fix it. Any idea please.
[18:33:54] jcutrell: norc - well, I would agree, but it is still present when I change the get request to the root “/”
[18:34:08] norc: jcutrell, please attach the log for that request then.
[18:34:09] jcutrell: Which does not have a redirect.
[18:34:16] universa1: arup_r: did you try the mentioned solution?
[18:34:23] choke: has joined #RubyOnRails
[18:34:30] arup_r: which solution?
[18:34:38] norc: jcutrell, my first instinct is to pry into that spec directly
[18:34:41] arup_r: I have no production server is running
[18:34:41] rubyonrails865: Can anyone help me figure out a simple logged in/out statement with devise? https://gist.github.com/rivacom/8df2e0041f4d5f44016289e016a7f0ec The logged in works, but if you logout, it doesn't seem to goto the else.
[18:34:43] norc: jcutrell, and poke around
[18:34:48] universa1: arup_r: https://gist.github.com/aruprakshit/15b2ede7b84cb539088b6bb5fa7dc359#file-spec_errors-txt-L6-L7 ?!
[18:34:54] groatyoats: has joined #RubyOnRails
[18:34:59] universa1: arup_r: you read your error messages, right?
[18:35:00] RegulationD: has joined #RubyOnRails
[18:35:16] davidheward: has joined #RubyOnRails
[18:35:21] arup_r: it is an engine, I am working.. I don't see any environments to be declared
[18:35:54] arup_r: universa1: I read error, but it is not just matching with the piece I have.. got me??
[18:36:06] universa1: ok. don't see where it talks about environments... ...config/initializers/assets.rb
[18:36:31] jcutrell: norc http://pastie.org/10862026
[18:36:34] arup_r: not I have that.. And I followed https://github.com/modeset/teaspoon/issues/443 .. but that is not my case, but error is same
[18:37:13] norc: jcutrell, the next time please use gist from github, and just add them as multiple files in the same gist.
[18:37:18] norc: jcutrell, greatly improves readability.
[18:37:38] universa1: arup_r: so you are using teaspoon now?
[18:37:52] arup_r: no. I don't .. I said error is same.
[18:37:58] norc: jcutrell, okay out of answers. Are you invoking rspec with bundle?
[18:38:13] aegis3121: has joined #RubyOnRails
[18:38:16] jcutrell: bundle exec rspec :path:
[18:38:18] universa1: arup_r: are you using sprockets-3 ?
[18:38:34] jcutrell: I’m in pry at the moment
[18:38:37] arup_r: https://gist.github.com/aruprakshit/15b2ede7b84cb539088b6bb5fa7dc359#file-spec_errors-txt-L11
[18:38:40] universa1: arup_r: ok. so what did you do to solve the error?
[18:38:53] jcutrell: Trying to figure out what is set and what isn't
[18:39:16] norc: jcutrell, start by looking at your user object, see what the path helper returns
[18:39:17] arup_r: Nothing, I was googling, and then came here to find someone met this error. I am not sure, I should assets.rb in engine.
[18:39:25] arup_r: as error message said
[18:39:27] norc: jcutrell, see what happens when you call get
[18:40:13] sir_mounts: has joined #RubyOnRails
[18:40:32] norc: jcutrell, the only other thing that comes to mind is that your rails_helper/spec_helper might have something funky in it so it doesnt prepare for request specs.
[18:40:37] Malgorath: anyone know if in a for loop in a view there is an internal counter for cycles? like display 4 if its on loop 4?
[18:40:40] norc: jcutrell, but that is really just random guessing.
[18:40:41] arup_r: I found http://stackoverflow.com/a/34344602/2767755 and that is not an option for me
[18:40:51] universa1: arup_r: is there a specific reason to use sprocket-rails 3?
[18:41:05] allcentury: has joined #RubyOnRails
[18:41:06] norc: Malgorath, use the modulo operator %
[18:41:34] arup_r: That idea I don't have,,, I have been assigned to fix some breaking tests.. and this last 2 made me crazy
[18:41:39] jcutrell: Looks like get returns response...
[18:41:44] choke: each_with_index would work too wouldn't it?
[18:41:51] arup_r: Malgorath: use each_with_index, you will hav access to that index
[18:41:58] norc: Malgorath, note that if you are already using an enumerator, you can chain Enumerable#with_index to inject a counter into your block arguments.
[18:42:09] arup_r: ^ will work too
[18:42:21] norc: Malgorath, like ary.select.with_index { |element, index| }
[18:42:52] jcutrell: That’s weird. if I set response = get path, that passes my test.
[18:42:56] choke: interesting... that one i didnt know
[18:43:01] norc: jcutrell, that is really bizarre.
[18:43:07] norc: jcutrell, which rspec version?
[18:43:08] universa1: arup_r: so what is preventing you from trying the solution the test mentions?
[18:43:25] jcutrell: core: 3.4.4
[18:43:32] arup_r: universa1: I read the PS, and it says doesn't work : http://stackoverflow.com/q/34344094/2767755
[18:43:36] jcutrell: rspec-rails: 3.4.2
[18:44:11] davidw: has joined #RubyOnRails
[18:44:16] norc: jcutrell, what does method(:request).source_location return?
[18:44:20] adavia: has joined #RubyOnRails
[18:44:21] universa1: arup_r: that is a somewhat different problem to yours.
[18:44:48] norc: jcutrell, or method(:request).owner at the very least
[18:44:53] Malgorath: norc and arup_r will that work with <% task_list.todo_lists.each do |t| %> also?
[18:44:58] norc: Malgorath, yes.
[18:45:05] arup_r: dunno.. looks like same issue..
[18:45:08] mikecmpbll: has joined #RubyOnRails
[18:45:18] arup_r: let me try, and I am 100% sure that wouldn't work
[18:45:18] jcutrell: undefined method response -
[18:45:39] norc: jcutrell, bah - I guess method_missing is used.
[18:45:55] jcutrell: norc - ruby-2.3.0/lib/ruby/2.3.0/forwardable.rb for `request`
[18:45:58] Malgorath: so i'd do <% task_list.todo_lists.each_with_index do |t, index| %>
[18:46:00] norc: Ah sweet.
[18:46:05] norc: So helpful.
[18:46:08] Malgorath: or do I need to enclose in {} ?
[18:46:14] arup_r: universa1: :) worked
[18:46:26] universa1: arup_r: good that you were 100% sure it didn't...
[18:46:27] arup_r: but why test env asking to put that in production
[18:46:35] yellow5: has joined #RubyOnRails
[18:46:39] norc: jcutrell, unless someone here has an idea, perhaps the folks from #rspec might know more.
[18:46:42] universa1: it does not ask you to put that into production.
[18:46:49] jcutrell: Super weird though, right?
[18:46:52] arup_r: yeah I mean .. yeah
[18:46:54] norc: jcutrell, yes.
[18:47:27] norc: jcutrell, Im thinking that rspec is not properly configured for requests somehow.
[18:47:34] norc: jcutrell, can you gist your entire rails_helper and rspec_helper?
[18:47:36] arup_r: I didn't know in engine, I have to put those..
[18:47:54] norc: jcutrell, and gist it in the other channel
[18:48:28] arup_r: anyway.. thanks. universa1
[18:49:30] sid_fules: has joined #RubyOnRails
[18:52:22] arup_r: git checkout -b bug-17885-broken-tests
[18:52:38] cd83x: has joined #RubyOnRails
[18:52:55] snowy: has joined #RubyOnRails
[18:55:57] dionysus69: in my app all I need is one admin user. after I create that user using devise, do i remove devise :registerable from model or is there prettier way to do that?
[18:57:28] nettoweb: has joined #RubyOnRails
[18:58:41] jottr: has joined #RubyOnRails
[19:00:42] swiftydev: I’m a bit new to RoR so I apologize for a rookie question. I currently have an app setup and have defined all of my endpoints. I’d like to start using Varnish to lighten server load and improve performance. I’m wondering if I’ll have to redo the endpoints for just redirect them to Varnish and let it do all of the heavy lifting.
[19:02:37] beneggett: has joined #RubyOnRails
[19:03:11] alfiemax: I've got two models, User and Admin, and i'm using devise got authentication.
[19:03:30] scepticulous: has joined #RubyOnRails
[19:03:52] choke: has joined #RubyOnRails
[19:04:17] alfiemax: i'd like to use lockable, but for obvious reasons the number of attempts before an account is locked would be different for both models. For admin it would be one incorrect attempt, for User it would be 5
[19:04:33] Pupeno: has joined #RubyOnRails
[19:04:52] alfiemax: but since these config are set in the devise initializer, how can i have different config for both the models?
[19:05:23] alfiemax: is there a way i can set the config in the model, instead of the initilizer?
[19:06:45] sandstrom: has joined #RubyOnRails
[19:07:01] cnk: alfiemax: you will probably have to read some source code in devise to figure out of that is possible
[19:07:18] cnk: Since a lot of devise is middleware, that might be a problem
[19:07:30] netzfisch: has joined #RubyOnRails
[19:07:30] GodFather: has joined #RubyOnRails
[19:07:31] cnk: or not a problem - but might take some doing
[19:08:33] cnk: dionysus69: when I need to seed just one user, I usually created it in seeds.rb
[19:10:35] alfiemax: cnk, ok.. will dig through :)
[19:11:25] cnk: The actual middleware for devise is warden so you might be able to set 2 warden contexts and have different rules in the 2 contexts. But that might be a total red herring
[19:11:41] Darmani: has joined #RubyOnRails
[19:13:11] Ragen: I get this errr --->> make: *** [do-install-all] Error 1
[19:13:11] Ragen: !!! Installation of ruby 2.3.0 failed!
[19:13:11] Ragen: fulll log is here https://gist.github.com/anonymous/aba1f3b68b1142ca3d9ad5a74194226a
[19:13:49] jenrzzz: has joined #RubyOnRails
[19:13:49] jenrzzz: has joined #RubyOnRails
[19:14:34] dionysus69: cnk: ok thanks for the offer =)
[19:14:56] dionysus69: yo alfiemax xD
[19:15:40] allcentury: has joined #RubyOnRails
[19:17:07] cnk: Ragen: if google can't help, I think the actual ruby channel might be a better place to ask
[19:17:41] clandry94: has joined #RubyOnRails
[19:18:20] jsrn: has joined #RubyOnRails
[19:19:18] roamingdog: has joined #RubyOnRails
[19:19:22] davidw: has joined #RubyOnRails
[19:19:56] sid_fules: has joined #RubyOnRails
[19:20:00] hahuang61: has joined #RubyOnRails
[19:20:07] jstransky: has joined #RubyOnRails
[19:20:17] clandry94: If I need to know current user information for a validation, should that validation be in the model or the controller? I have the custom validation in the model currently, but I'm having trouble getting the current user information because session info usually isn't available at that level.
[19:20:27] AmiMoench: has joined #RubyOnRails
[19:20:45] norc: clandry94, when you say "validation" do you really mean "authentication" ?
[19:21:28] hahuang65: has joined #RubyOnRails
[19:21:41] clandry94: validation, When users are logged in they have a role and certain roles can change values in a table only to other certain values depending on their role
[19:22:22] clandry94: e.g. someone with a 'developer' role could change state_id in a model from 0 to 1, but not from 1 to 2
[19:22:23] noobsu: has joined #RubyOnRails
[19:22:32] norc: clandry94, that is a third thing. Authorization.
[19:22:33] matthewd: clandry94: My recommendation would be to use validations to enforce data integrity rather than business rules
[19:22:34] norc: Not validation.
[19:23:26] clandry94: Okay, thank you. I thought I was going down the wrong path. Where do I handle authorizations, the controller?
[19:23:43] norc: clandry94, there are three different topics now: Validation (which is about data integrity/consistency), Authentication (is the user who he claims to be), and Authorization (Is the user allowed to do what he is trying)
[19:24:28] matthewd: Possibly involving the model to actually implement the rule, but yes, apply it from the controller
[19:24:34] norc: clandry94, authorization can happen in multiple levels. At routing, controller and model level.
[19:25:06] norc: clandry94, and even in views.
[19:29:31] pawnbox: has joined #RubyOnRails
[19:33:51] roelof: has joined #RubyOnRails
[19:34:17] adavia: any idea how to break long statements using haml?
[19:35:31] roelof: Why does rspec cannot find a file and server s does not load it. See https://gist.github.com/rwobben/91d8b49ae39a8da0b8fcec115a1eb990
[19:36:14] norc: adavia, long statements in haml is a code smell.
[19:36:20] tildes_: has joined #RubyOnRails
[19:36:31] norc: adavia, chances are you want decorators/presenters/helpers
[19:36:59] adavia: norc: i talking about something like - if (devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations')
[19:37:17] marchelzo: has joined #RubyOnRails
[19:38:05] hahuang65: has joined #RubyOnRails
[19:39:16] norc: adavia, even then
[19:39:33] adavia: well thats devise code.. not my code
[19:40:26] honeyroasted: has joined #RubyOnRails
[19:41:07] norc: adavia, you mean the templates devise ships with.
[19:41:17] norc: And there its fine because devise wont make assumptions about what pattern you use.
[19:41:36] norc: adavia, but devise allows you to copy these templates so you can modify them (which you should)
[19:41:51] adavia: I just want to break that if statement
[19:43:36] SteenJobs: has joined #RubyOnRails
[19:46:56] cd83x: has joined #RubyOnRails
[19:46:58] shinnya: has joined #RubyOnRails
[19:47:02] jottr_: has joined #RubyOnRails
[19:47:37] macsteps: has joined #RubyOnRails
[19:48:48] hahuang65: has joined #RubyOnRails
[19:48:57] jenrzzz: has joined #RubyOnRails
[19:49:18] roelof: someone who can help me ?
[19:49:59] netzfisch: has joined #RubyOnRails
[19:52:33] smathy: has joined #RubyOnRails
[19:55:28] srinidhi: has joined #RubyOnRails
[19:56:20] tbuehlmann: roelof: are you testing against a server you're starting first?
[19:57:19] Darmani: Hi guys! One of my RSpec tests seems to be failing, I think I'm writing it wrong.
[19:57:20] Darmani: https://gist.github.com/mfifth/5fed2c58bc0fd841be090b23526de109
[19:57:27] Darmani: Could someone take a look?
[19:58:11] roamingdog: has joined #RubyOnRails
[19:59:14] Darmani: https://gist.github.com/mfifth/5fed2c58bc0fd841be090b23526de109 - Updated with correct error msg lol
[20:00:06] roelof: tbuehlmann: nope, I only do rspec or only do rails s ?
[20:00:15] tbuehlmann: I don't understand
[20:00:26] roamingdog: has joined #RubyOnRails
[20:00:26] norc: Darmani, the spec is telling you exactly what the problem is.
[20:00:30] norc: Darmani, read your error message.
[20:01:27] roelof: tbuehlmann: the rspec is made with capabary and poltergeist. The other is with rails s
[20:03:26] Darmani: norc: Did you notice how all my files were named correctly? xP
[20:03:36] tbuehlmann: roelof: why are you starting up a rails server?
[20:04:24] norc: Darmani, please in your own words - what is the problem?
[20:05:07] Darmani: norc: Why doesn't my RSpec test see the topic link? :[
[20:05:11] Darmani: I don't know whyy.
[20:05:20] AmiMoench: has joined #RubyOnRails
[20:05:22] norc: Darmani, what is Capybara looking for?
[20:05:33] norc: (And note Capybara is complaining)
[20:05:42] Darmani: The title of the link... o.o
[20:05:47] norc: Darmani, No it is not.
[20:05:55] Darmani: norc: It's not?
[20:06:11] sharkman: has joined #RubyOnRails
[20:06:17] norc: Darmani, click_link topic.title
[20:06:24] norc: Darmani, it is looking for a link that is named topic.title
[20:06:28] norc: Which you do not have.
[20:06:32] roelof: because I wanted to look if the font is used then , tbuehlmann
[20:06:35] norc: Which is what capybara is telling you.
[20:06:47] Darmani: norc: ??????
[20:06:58] tbuehlmann: roelof: sorry, I can't help you
[20:07:28] norc: Darmani, without looking it up - what can you pass to click_link to find a link?
[20:07:53] Darmani: norc: umm a string?
[20:08:18] norc: Darmani, and how is that string interpreted by capybara?
[20:08:36] quazimodo: has joined #RubyOnRails
[20:08:38] Darmani: Uh... As a link?
[20:08:45] quazimod1: has joined #RubyOnRails
[20:08:49] norc: What do you mean with "link"
[20:08:57] norc: Is it looking for an HTML fragment?
[20:09:13] norc: Is it asking for an xpath expression?
[20:09:19] adamf: has joined #RubyOnRails
[20:09:20] Darmani: norc: That I don't know lol
[20:09:25] norc: Darmani, and that is the problem.
[20:09:38] norc: Darmani, go look up your capybara docs, look up how to use that method. :)
[20:09:55] roelof: tbuehlmann: NP, thanks for trying
[20:09:59] Darmani: ACTION hates reading docs
[20:10:04] norc: Darmani, that much is obvious.
[20:10:29] sir_mounts: I believe the string passed to click_link is going to be either the text of that link, or the ID of the element…
[20:10:32] Darmani: norc thinks he's sooooooo smart
[20:10:47] norc: Darmani, no - but I read docs of modules and methods before I use them.
[20:10:54] norc: It beats trying to guess how they should be used.
[20:13:42] ur5us: has joined #RubyOnRails
[20:14:33] roelof: I wonder if this css is right so the fonts can be found at /assests/fonts : https://gist.github.com/rwobben/4c3b548c509f3d1d558810cc5045232d
[20:14:51] Anubix: has joined #RubyOnRails
[20:15:15] Anubix: Don't u know how i can on SSL rails website show http iframe on external website?
[20:15:51] norc: Anubix, what is your problem?
[20:15:54] boboc: has joined #RubyOnRails
[20:16:09] joskei2: has joined #RubyOnRails
[20:16:35] boboc: i have a question, i've added puma gem, my nginx upstream looks like this: server unix:///home/rails/my_app/tmp/sockets/puma.sock fail_timeout=0; how can i start the puma server so nginx could forward the requests?
[20:16:51] Anubix: norc: I have website https://xy.com and in view i am using iframe on http:// website. It workc correctly on localhost, but when i push it on production there is blank space instead of iframe.
[20:17:43] norc: Anubix, Rails sends X-Frame-Options SAMEORIGIN by default.
[20:17:52] roelof: and must the require tree not be last here : https://gist.github.com/rwobben/6642ab2330584748e971612f1e9dc7c3
[20:17:54] dionysus69: has joined #RubyOnRails
[20:18:24] norc: Anubix, in effect it disallows your browser to render your rails website in an iframe, if the surrounding frame has a different host.
[20:19:31] Darmani: norc: The docs just say that it takes a string and you have to explicitly give it a name to click on.
[20:19:38] Darmani: Even when I do that the test still fails though..
[20:19:42] Anubix: norc: so i just use ALLOW-FROM http://website
[20:19:42] owenjones: has joined #RubyOnRails
[20:19:49] norc: Anubix, precisely.
[20:19:51] norc: Anubix, http://guides.rubyonrails.org/security.html#default-headers
[20:19:57] norc: Anubix, there it is explained how to send these headers.
[20:20:00] Anubix: norc: thank you
[20:20:45] pydave6367: has joined #RubyOnRails
[20:20:53] jenrzzz: has joined #RubyOnRails
[20:20:53] jenrzzz: has joined #RubyOnRails
[20:21:00] norc: Darmani, http://www.rubydoc.info/github/jnicklas/capybara/Capybara/Node/Actions#click_link-instance_method
[20:21:34] Darmani: norc: yeah I read that. Is there something I'm missing?
[20:21:44] norc: Darmani, you have no element that satisfies that locator.
[20:21:45] cd83x: has joined #RubyOnRails
[20:22:06] norc: Darmani, no link (<a>) with an id, text or title containing topic.title.
[20:22:16] Darmani: Okay I get that. But even when I specify the explicit text it doesn't see the link.
[20:22:27] Darmani: I'll update the gist hold on.
[20:23:23] Darmani: norc: https://gist.github.com/mfifth/5fed2c58bc0fd841be090b23526de109
[20:23:57] norc: Darmani, give me the line in your view where you think a link matching that locator is
[20:24:07] emilkarl: has joined #RubyOnRails
[20:25:00] pwnd_nsfw: has joined #RubyOnRails
[20:25:28] Darmani: norc: I just realized I linked the wrong show view. My apologies.
[20:25:31] Darmani: https://gist.github.com/mfifth/5fed2c58bc0fd841be090b23526de109
[20:25:34] Darmani: updated gist.
[20:25:36] Anubix: has joined #RubyOnRails
[20:25:54] Anubix: norc: Well so i change it, and it still blocked, but probably because of browser
[20:25:56] norc: Darmani, and still. Which line?
[20:26:06] norc: Anubix, open your developer tools of your browser
[20:26:19] norc: Anubix, go into the network view, reload and tell me what error message you see
[20:26:28] Darmani: norc: line 18
[20:26:37] jas02: has joined #RubyOnRails
[20:26:57] norc: Darmani, by which rule of the locator do you think capybara should match it?
[20:27:05] norc: by id? text? title?
[20:27:13] Anubix: norc: https://developer.mozilla.org/en-US/docs/Security/Mixed_content
[20:27:23] smathy: Darmani, your topic isn't being created until line 28.
[20:27:55] srinidhi1: has joined #RubyOnRails
[20:27:57] Darmani: norc: The title I assumed.
[20:28:04] Darmani: smathy: It is? Why?
[20:28:09] norc: Darmani, do you set the title attribute anywhere? Where?
[20:28:20] srinidhi: has joined #RubyOnRails
[20:28:23] norc: Darmani, when capybara says title it means <node title="foo">
[20:28:25] Anubix: norc: So that's probably because i use SSL website and try to load iframe non-ssl but how can i solve it?
[20:28:44] smathy: Darmani, the whole idea of `let` is that it's only actually executed when accessed, that's the first time you access `topic`
[20:28:47] Anubix: norc: page that i need to use in iframe doesn't have SSL
[20:28:49] norc: Anubix, the obvious solution would be to secure your rails application with TLS.
[20:29:13] smathy: norc, he means that `topic.title` is the text of the link from https://gist.github.com/mfifth/5fed2c58bc0fd841be090b23526de109#file-show-html-erb-L18
[20:29:15] Darmani: norc: I thought it was right there on line 18... o.o
[20:29:29] smathy: Darmani, it is, that's not your problem, your problem is that the topic doesn't exist yet.
[20:29:55] Darmani: smathy: I didn't know that's how let worked actually..
[20:29:56] hahuang65: has joined #RubyOnRails
[20:30:00] Darmani: I mean I kinda knew.
[20:30:05] Anubix: norc: i am using this in config - config.force_ssl = true
[20:30:08] norc: Darmani, and this would be the point, where you should also read rspec documentation.
[20:30:22] smathy: Darmani, ok, it is. `user` and `forum` are created because you're referencing them in your `before` block.
[20:30:45] Darmani: smathy: So do I have to reference the topic somehow before the test gets to the link part...?
[20:30:51] norc: Anubix, before I entertain ugly solutions, why not secure your rails app with TLS?
[20:31:11] norc: Anubix, by not securing it with TLS you allow anyone to intercept traffic, read it, play man in the middle
[20:31:21] smathy: Darmani, yeah, and FWIW the way I'd do that would be: `click_link topic.title`
[20:31:28] smathy: ...so you're not repeating that string in both places.
[20:31:44] norc: smathy, for what it is worth he had that before.
[20:31:58] Darmani: smathy: wat
[20:32:04] norc: But the whole tossing in the wrong view made me chase the wrong bug.
[20:32:12] smathy: Right, that might not work because of when capybara prepares the page, I'm not sure on that.
[20:32:26] Anubix: norc: I don't know what u mean :/
[20:32:33] cajone: has joined #RubyOnRails
[20:32:42] cajone: has left #RubyOnRails: ()
[20:32:49] norc: Anubix, secure your rails application with TLS/SSL.
[20:32:58] norc: Anubix, then you will not have mixed content.
[20:33:11] Darmani: smathy: I still don't get what I'm supposed to do.
[20:33:21] Anubix: norc: I am doing it with force_ssl = true or not?
[20:33:43] smathy: Darmani, you nailed it before, just refer to topic before you try to click the link.
[20:34:00] norc: Anubix, unless someone here can correct me if I am wrong, but Rails itself does not provide TLS capabilities.
[20:34:07] Darmani: smathy: But how?
[20:35:09] norc: Anubix, which webserver are you using?
[20:35:12] Anubix: norc: I have valid https website running for one year with certificate
[20:35:13] pkrnj: has joined #RubyOnRails
[20:35:29] SebastianThorn: has joined #RubyOnRails
[20:35:31] Anubix: norc: So its okey, problem is just i am trying to use iframe of non https website
[20:35:42] norc: Anubix, and Firefox wont let you do that.
[20:35:43] Darmani: WAIT I GOT IT
[20:35:49] Anubix: norc: yes, and probably any modern browser
[20:35:59] norc: Anubix, for good reasons.
[20:36:03] Darmani: "let!" allows the variable to be loaded in without having to be accessed first.
[20:36:18] Darmani: that's convenient.
[20:36:23] Anubix: norc: well thats true, but i really need to solve it somehow
[20:36:34] Darmani: thank you norc & smathy ^.^
[20:36:37] robbyoconnor: has joined #RubyOnRails
[20:36:52] norc: Anubix, secure your outer website with TLS.
[20:37:15] norc: Anubix, with good reasons browsers have started to force TLS onto people.
[20:37:26] Anubix: norc: i cant its not my website
[20:37:47] norc: Anubix, have the owner set up TLS.
[20:37:56] Jenzo: My internet is running slow today
[20:37:57] Jenzo: http://www.speedtest.net/my-result/5374348829
[20:38:48] norc: Anubix, the entire security model is bust if both arent using TLS. An attacker could play a MITM, inject malicious code and "clickjack" your iframe.
[20:39:54] Anubix: norc: I know the risc, but on my website are not any sign-up and other secure functions. Its just agregatore
[20:39:56] alaing: has joined #RubyOnRails
[20:40:13] Anubix: norc: So you are telling its not possible, right?
[20:40:23] crdpink: has joined #RubyOnRails
[20:40:24] norc: Anubix, browsers let you add exceptions
[20:40:32] norc: But that is ugly and really not recommended.
[20:40:44] Anubix: norc: hm it not good message :/
[20:41:04] norc: Anubix, consider it to be a good thing. Force the owner of the site to provide TLS.
[20:41:15] alaing: Hi I have a form that I want to have multiple records in to allow a user to add/edit/delete in one go. DO i have to set this up as a nested attributes or is there an easier way
[20:41:18] Anubix: norc: Heh i am small man on this
[20:41:20] norc: Anubix, if he is too retarded for it, chances are you don't want to have anything to do with him anyway.
[20:41:27] norc: Anubix, if its a big site, it should be TLS secured.
[20:41:58] alaing: the form is a single model and the records will be multipl records from this single model
[20:42:42] norc: alaing, this is not about nested attributes. Just accept an array of actions you want, have a service module apply it to your models and you are done.
[20:43:23] Anubix: norc: anyway thanks for help :)
[20:43:47] norc: Anubix, sorry I didnt have a better answer for you. :(
[20:44:03] norc: Anubix, the only other thing you could do is disable TLS entirely - but I doubt that will make things better either.
[20:44:22] Talltree: do you guys know how to remove the percent encoded brackets from ransack url params?
[20:44:33] alaing: norc what is a service module? so in my strong params I just need to set it up to accept array of values for each attribute
[20:44:53] norc: alaing, it is just a pattern. classes or modules in app/services
[20:44:56] Talltree: because http://localhost:3000/?utf8=%E2%9C%93&q%5Bname_cont%5D=&q%5Brole_cont%5D=&q%5Bhc_true%5D=&q%5Balive_true%5D=true&commit=search is really ugly..
[20:45:27] norc: Talltree, URLs are not meant to be pretty.
[20:45:36] norc: Talltree, browsers have in fact started to hide large portions of the URLs.
[20:45:46] SebastianThorn: if i wanna split up the file for a model, where do i place that file?
[20:46:04] norc: SebastianThorn, you cant really
[20:46:31] Anubix: norc: thanks :)
[20:46:35] Talltree: norc i get that, but still, other sites i see dont have those brackets, and i dont see why i should have them
[20:46:43] norc: SebastianThorn, due to the way autoloading works you can only split into classes and modules. but one file per class or module
[20:47:05] norc: SebastianThorn, and the naming depends on the name of the class/module, refer to this: http://guides.rubyonrails.org/autoloading_and_reloading_constants.html
[20:47:28] norc: Talltree, it is how rails serializes nested hashes.
[20:48:11] hahuang65: has joined #RubyOnRails
[20:48:27] Talltree: cant i call something like .unserialize on it? :D
[20:49:19] norc: Talltree, honestly just live with it.
[20:49:36] norc: Talltree, it is a useful feature because it solves certain naming problems.
[20:49:57] Devalo: has joined #RubyOnRails
[20:50:54] Talltree: okay, i'm doing the filtering with ajax anyway, so the user isnt even seeing the url if he's a noob. but still...
[20:51:06] norc: Talltree, just url unescape it and you see the pattern.
[20:51:23] norc: Talltree, its just q[name_cont]=abc ;-)
[20:51:34] jheathco: has joined #RubyOnRails
[20:52:11] Talltree: norc i know, those % things are encoded brackets
[20:52:28] Talltree: but its still ugly, doesnt change it, i think user stuff should be fast and easy human-readable
[20:52:32] jheathco: has left #RubyOnRails: ()
[20:52:47] Talltree: and this isnt anymore. from a design point of view i dont like it, i understand the tech
[20:52:50] norc: Talltree, the user shouldn't need to see URLs at all.
[20:52:56] norc: So it is a moot point.
[20:53:20] tgeeky: has joined #RubyOnRails
[20:53:41] Talltree: kinda yeah.^^
[20:55:42] sn1ff3r: has joined #RubyOnRails
[20:58:04] robbyoconnor: has joined #RubyOnRails
[21:00:06] snowy: has joined #RubyOnRails
[21:02:27] scepticulous: has joined #RubyOnRails
[21:03:29] beneggett: has joined #RubyOnRails
[21:04:55] boshhead: Hello, I'm using rails new --api because I'm using rails to generate a JSON API (consumed by Emberjs on the frontend). But I need rails to serve up index.html.erb and it's not doing that... it says "Processing by HomeController#index as HTML" -- ive tried it as index.html and that still doesn't work.
[21:05:20] boshhead: What do I need to do in my controller to render index.html.erb -- or does the --api option mean I cant do that?
[21:05:31] SteenJobs: hey guys - just deployed to our staging server…index works but all other routes are not. i’m getting an “******-puma.sock failed (2: No such file or directory) while connecting to upstream” error
[21:05:40] SteenJobs: *index menaing home page, sorry
[21:05:56] bruce_lee: has joined #RubyOnRails
[21:06:50] SteenJobs: ugh nvrm i think i might know the issue
[21:08:02] sid_fules: has joined #RubyOnRails
[21:09:53] boshhead: how do I add a controller to application_controller.rb? Specifically I want to load ActionView::Layouts
[21:11:17] smathy: Darmani, np, and yeah, I forgot about let! :)
[21:11:51] Darmani: smathy: Lol it's all good ^.^
[21:12:17] SteenJobs: how do I generate puma.rb inside of the shared directory? (using capistrano for deployment)
[21:12:19] boshhead: yeah that was the problem, i had to include ActionView::Layouts -- got it solved now, thanks :)
[21:12:45] SteenJobs: ha think i found that one too…sorry
[21:15:42] arBmind: has joined #RubyOnRails
[21:15:44] norc: boshhead, do you have a responder for html?
[21:16:16] norc: SteenJobs, use linked_files/linked_dir
[21:16:27] SteenJobs: norc: cap production puma:config ;)
[21:16:33] norc: Ah that you mean.
[21:16:51] SteenJobs: yea, needed to get puma.rb into shared/puma.rb instead of current/config/puma.rb
[21:16:56] boshhead: norc: i fixed it. the --api option didnt include ActionView::Layouts, so it couldnt respond with html
[21:17:09] boshhead: i keep needing to add things back in cuz of this --api option :P
[21:18:01] norc: boshhead, http://edgeguides.rubyonrails.org/api_app.html
[21:18:03] norc: might be a good read
[21:18:23] boshhead: yup i read that
[21:18:54] nettoweb: has joined #RubyOnRails
[21:19:32] SteenJobs: norc: do you think running cap prod puma:config will overwrite the puma.rb that’s already there? or if it’s already present, it aborts
[21:20:01] norc: SteenJobs, look at the task implementation.
[21:20:16] boshhead: norc: by default it doesnt have ActionController::RequestForgeryProtection either, had to add that in. cuz ember can take advantage of the CSRF tokens.
[21:20:22] scepticulous: has joined #RubyOnRails
[21:20:54] jas02: has joined #RubyOnRails
[21:22:14] norc: boshhead, yeah they really ripped out anything that wasnt needed.
[21:22:16] norc: really neat :)
[21:22:50] boshhead: yeah i like the concept, and you can add things back in if you're weird like me and need them :)
[21:25:29] SteenJobs: norc: still an issue. seems like puma.rb is being generated in shared/puma.rb, but puma is using config/puma.rb
[21:25:45] roamingdog: has joined #RubyOnRails
[21:25:51] norc: SteenJobs, yup. As I said, linked_dir/linked_files
[21:26:20] SteenJobs: norc: haven’t seen anything re that in the docs anywehre
[21:26:21] norc: SteenJobs, remember, capistrano will create a new directory for each deployment. linked_dir/linked_files will then symlink the specified directories and files from your shared, making them available to every deployed instance.
[21:26:53] norc: SteenJobs, https://github.com/runar/capistrano-linked-files
[21:26:59] SteenJobs: right - but here it’s an issue with puma - puma by default is looking in config, the wrong place. but yea i guess a workaround would be to link them
[21:27:14] norc: wait that is not the one
[21:27:32] SteenJobs: although right idea
[21:27:51] eljimmy: has joined #RubyOnRails
[21:27:58] Pupeno: has joined #RubyOnRails
[21:28:05] norc: SteenJobs, it is definitely built into capistrano
[21:28:26] SteenJobs: norc: check the bottom - i’m guessing this is what i’m hitting? https://github.com/seuros/capistrano-puma/issues/120
[21:29:33] SteenJobs: norc: my error is it can’t find my_app.sock but based on the thread i’m guessing this is it
[21:34:11] hahuang65: has joined #RubyOnRails
[21:34:55] pawnbox: has joined #RubyOnRails
[21:35:08] IFrank004: has joined #RubyOnRails
[21:35:09] IFrank00: has joined #RubyOnRails
[21:39:31] cnk: has joined #RubyOnRails
[21:39:36] marchelzo: has joined #RubyOnRails
[21:40:54] graft: has joined #RubyOnRails
[21:41:17] manfrin: has joined #RubyOnRails
[21:41:42] graft: hey all, how do i check if a class exists with rails autoloading? Kernel.const_defined? :MyClass doesn't work unless I try to use that class first
[21:42:15] graft: is there a way to check what classes might be autoloaded?
[21:42:39] jenrzzz: has joined #RubyOnRails
[21:42:39] jenrzzz: has joined #RubyOnRails
[21:45:43] artto: has joined #RubyOnRails
[21:47:01] workmad3: has joined #RubyOnRails
[21:48:17] Radar: graft: !xy
[21:48:17] helpa: graft: It seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
[21:52:10] emachnic: has joined #RubyOnRails
[21:53:14] SteenJobs: still getting “we’re sorry, but something went wrong” error but there are no logs on the server for some odd reason so i have no way of tracking down the issue
[21:54:20] matthewd: graft: 'MyClass'.safe_constantize
[21:57:15] sid_fules: has joined #RubyOnRails
[22:02:20] noobsu: has joined #RubyOnRails
[22:04:45] jenrzzz_: has joined #RubyOnRails
[22:06:22] sloggerkhan: If being able to assign a string column with something like model_instance.some_string_column = 'a', 'b', 'c' and have "[\"a\", \"b\", \"c\"]" come back out expected behavior?
[22:07:27] smathy: SloggerKhan, http://devdocs.io/rails~4.2/activerecord/attributemethods/serialization/classmethods#method-i-serialize
[22:07:33] am55: has joined #RubyOnRails
[22:07:33] am55: has joined #RubyOnRails
[22:08:23] sloggerkhan: (I had a bug caused by an accidental/erroneous comma and the behavior surprised me.)
[22:08:30] sloggerkhan: smathy: I haven't set anything to be serialized.
[22:08:39] Axilla: SteenJobs
[22:08:47] Axilla: just mv the puma.rb to shraed
[22:08:58] SteenJobs: yea, although i’d rather not have to do that for every deploy
[22:08:59] sloggerkhan: And if it were, I think the thing should deserialize when accessed, which it doesn't.
[22:09:06] SteenJobs: axilla: but let’s forget about that for a sec
[22:09:14] SteenJobs: axilla: right now, no my_app.sock is being created
[22:09:26] SteenJobs: which is why there are no puma logs…nginx can’t find the non existent .sock file
[22:09:28] Axilla: and then in your deploy.rb add it to the shared files
[22:09:33] Axilla: err linked_files
[22:09:43] emachnic: has joined #RubyOnRails
[22:09:43] Axilla: set :linked_files, %w{config/database.yml config/secrets.yml config/aws.yml ruby.rb}
[22:09:51] Axilla: something like that, or wherever you want it.
[22:09:57] emachnic: has joined #RubyOnRails
[22:10:15] SteenJobs: axilla: ok cool, will do
[22:10:21] SteenJobs: axilla: although first i have to get past this issue...
[22:10:34] Axilla: exact setup i have.. rails 4, puma, nginx, aws, cap deployments
[22:10:43] Axilla: and rails 5
[22:10:49] beneggett: has joined #RubyOnRails
[22:11:55] Axilla: in fact i'm working on a cap deployment now to a loadbalanced/autoscaled aws instance
[22:15:01] jas02: has joined #RubyOnRails
[22:15:24] SteenJobs: axilla: boom. fixed. although i still don’t get why capistrano isn’t auto doing it if i specify “set :puma_conf, "#{shared_path}/puma.rb””
[22:15:30] hahuang65: has joined #RubyOnRails
[22:15:41] SteenJobs: fixed meaning i just copied shared/puma.rb’s content into current/config/puma.rb
[22:15:55] SteenJobs: ah i guess it’s not capistrano’s responsiblity, and you need to link it as you’ve said
[22:16:07] alfiemax: has joined #RubyOnRails
[22:16:36] banister: has joined #RubyOnRails
[22:18:37] hcnewsom: has joined #RubyOnRails
[22:18:50] startupality: has joined #RubyOnRails
[22:19:06] davidw: has joined #RubyOnRails
[22:19:16] boshhead: hello, if anyone could offer help on this i'd appreciate it: http://stackoverflow.com/questions/37603066/new-project-with-rails-new-api-missing-actiondispatchrequest
[22:19:52] sid_fules: has joined #RubyOnRails
[22:20:40] jenrzzz: has joined #RubyOnRails
[22:20:40] jenrzzz: has joined #RubyOnRails
[22:21:59] tubbo: boshhead: add the actual error you were getting at first
[22:22:40] boshhead: tubbo: i did
[22:22:54] boshhead: comparison of String with 0 failed, highlighting the line logger.log "#{request}"
[22:23:13] boshhead: the error was comparison with String 0 failed, and it highlighted that line as the problem
[22:25:57] Darmani: Are there any good projects for practicing Rails?
[22:31:23] sandstrom: has joined #RubyOnRails
[22:31:36] Radar: Darmani: https://gist.github.com/radar/3037d4c5f8d3240afd43
[22:31:54] DZj091231kld: has joined #RubyOnRails
[22:31:59] Darmani: Radar: There it is. I was looking for that.
[22:32:44] Darmani: Radar: Btw I finished the other thing I was working on. If you have time could you take a look and tell me if I did it properly?
[22:32:54] Radar: Darmani: Got a link to the code?
[22:33:25] Darmani: Radar: yeah yeah. I just made a new commit to github this morning.
[22:33:28] Darmani: https://github.com/mfifth/forum/tree/latest_validations
[22:35:14] owenjones: has joined #RubyOnRails
[22:35:56] manfrin_: has joined #RubyOnRails
[22:35:59] Radar: Taking alook.
[22:36:18] Darmani: Radar: roger that
[22:36:59] sniff: has joined #RubyOnRails
[22:38:50] Radar: May 12th, 2016 - The infamous hacker known as Radar has once again infiltrated the website!
[22:39:18] Radar: I think the seeds should create a foru
[22:39:40] Pupeno: has joined #RubyOnRails
[22:40:03] Radar: Darmani: After creating a topic I get: No route matches {:action=>"show", :controller=>"topics", :forum_id=>"1", :id=>nil} missing required keys: [:id]
[22:40:48] Radar: Darmani: Why are you rendering the edit template when a create fails?
[22:40:59] phredus: has joined #RubyOnRails
[22:41:46] Darmani_: has joined #RubyOnRails
[22:41:55] Darmani_: Radar: Sorry my connection got reset.
[22:41:57] Darmani_: Let me check that.
[22:42:24] xlegoman: has joined #RubyOnRails
[22:42:32] Radar: Darmani_: You should also remove the test directory if you're not using it.
[22:42:43] Radar: Darmani_: And you should remove the README files if you're not going to be using them.
[22:43:01] Darmani_: Radar: Will do. What was the error you got again?
[22:43:06] Radar: Darmani_: Before you fix the topic issue, I would advise you to write a regression test for it.
[22:43:12] Radar: Darmani_: I think it was because my topic was invalid.
[22:43:44] Darmani_: Radar: A regression test? o.o
[22:44:09] hahuang65: has joined #RubyOnRails
[22:44:10] Radar: Darmani_: Yes. It's just a feature test which will reproduce the bug. The test will fail in the same way that my request failed. Then when that happens, you fix the bug. The test will then pass.
[22:44:36] Radar: Darmani_: It's called a regression test because if the test fails again then you know the code has "regressed"
[22:44:48] Darmani_: Radar: Ah I see. Okay.
[22:45:10] Radar: Can't find much else to pick on. Good job :)
[22:45:52] davidw: has joined #RubyOnRails
[22:45:56] Radar: https://git.io/vrhS4 When you've got a really long line like this...
[22:46:20] Darmani_: Radar: Wait really?? I did a good job?
[22:46:34] Radar: I split up long lines like that into littler lines like this: https://gist.github.com/radar/a65c70c0b51cef0d5bfd2383bf83ecd2
[22:46:35] VeryBewitching: Does Rails not normally generate tests when everything else is generated?
[22:47:00] Radar: Two reasons: 1) it's easier to read vertically than to read horizontally and 2) So that if you add / remove a key, the git diff is cleaner.
[22:47:09] Radar: VeryBewitching: It does normally generate tests unless you disable it.
[22:47:12] Radar: Darmani_: Yes, this is good code :)
[22:47:44] Darmani_: Radar: Okay I'll fix it. That's awesome!! I'm glad it's good.
[22:47:51] Darmani_: Thanks for looking at it ^.^
[22:49:03] Darmani_: Radar: Is it worth showing to anyone? Like as part of a portfolio?
[22:49:11] acovrig: has joined #RubyOnRails
[22:49:18] Radar: Darmani_: Yes I think this would be good to show as an app that you've built.
[22:50:03] Darmani_: Radar: Awesome (: Okay. Let me work on this bug really quick..
[22:50:11] roamingdog: has joined #RubyOnRails
[22:50:14] Radar: Darmani_: Take your time, no hurry.
[22:50:22] Radar: Darmani_: Having it deployed to Heroku would be good too.
[22:50:43] Darmani_: Radar: I don't know what that is o.o
[22:50:49] Radar: Time to learn :D
[22:51:06] Radar: https://devcenter.heroku.com/articles/getting-started-with-rails4
[22:51:27] Darmani_: Radar: Lol great. Let me fix this bug first xD
[22:52:18] webnanners: has joined #RubyOnRails
[22:53:40] webnanners: Anyone read the PragProg rails 5 book yet?
[22:54:04] sid_fules: has joined #RubyOnRails
[22:55:03] Radar: webnanners: I prefer Rails 4 in Action tbh
[22:55:13] Radar: mainly because I wrote it
[22:55:16] bmorrison: has joined #RubyOnRails
[22:55:19] dandaman: has joined #RubyOnRails
[22:55:34] alfiemax: has joined #RubyOnRails
[22:56:01] webnanners: Hey, I just got Elixir in Action today...not rails 4 though :/ at least you admitted your bias ;)
[22:56:46] DoctorMonocular: has joined #RubyOnRails
[22:58:10] owenjones: has joined #RubyOnRails
[22:58:17] Darmani_: Radar: Fixed. I was rendering the wrong view. Lemme put the revised code on github...
[22:59:08] Radar: Darmani_: Did you write a test for it first?
[22:59:25] Darmani_: Radar: Yes I did.
[23:00:06] jstransky: has joined #RubyOnRails
[23:00:26] tildes_: has joined #RubyOnRails
[23:00:35] SteenJobs: has joined #RubyOnRails
[23:00:45] SteenJobs: axilla: hey man
[23:00:48] David_H_Smith: has joined #RubyOnRails
[23:01:23] Darmani_: Radar: done.
[23:02:20] DragonPunch: has joined #RubyOnRails
[23:06:16] roamingdog: has joined #RubyOnRails
[23:06:44] neanderslob: has joined #RubyOnRails
[23:09:16] jas02: has joined #RubyOnRails
[23:09:25] tildes_: has joined #RubyOnRails
[23:10:47] noobsu: has joined #RubyOnRails
[23:10:55] Darmani_: Radar: Is it okay to just change databases like that? I mean I was using SQLite now I just change it to pg and it will be fine?
[23:12:09] roamingdog: has joined #RubyOnRails
[23:13:45] PlasmaStar: has joined #RubyOnRails
[23:14:01] macsteps: has joined #RubyOnRails
[23:15:29] startupality: has joined #RubyOnRails
[23:17:06] Radar: Darmani_: You'll lose whatever data you have locally, but yes your app should work fine as you do the switch.
[23:17:25] Radar: Darmani_: That's the benefit of AR. It provides a standard API across databases.
[23:17:46] Darmani_: Radar: AR stands for...?
[23:17:54] webnanners: Action Record
[23:17:57] Radar: Active Record.
[23:18:00] webnanners: Active Record
[23:18:31] webnanners: Action cable messing up my brain
[23:18:59] roamingdog: has joined #RubyOnRails
[23:21:16] Axilla: so, i have a question about deploying an app to AWS that's going to be autoscaled..
[23:21:47] Axilla: once i have an instance running, updated, all my prereqs installed, and my capistrano shared configs on the server? or after I deploy my code?
[23:22:00] Axilla: err when should i create my AMI?
[23:22:14] Axilla: seems weird to have code on it
[23:22:15] edwinvdgraaf: has joined #RubyOnRails
[23:22:21] Axilla: seems like it would be outdated.
[23:22:34] kies: has joined #RubyOnRails
[23:23:34] Darmani_: Radar: https://gist.github.com/mfifth/e145567ad4230bff33dc057bae4318b6
[23:23:39] Darmani_: how do you edit this file? o.o
[23:23:51] Radar: Darmani_: With a text editor.
[23:24:09] SteenJobs: anyone know why adding in deploy.rb, “set :puma_conf, “#{shared_path}/puma.rb”” isn’t working, and instead puma is still using config/puma.rb?
[23:24:29] Darmani_: Radar: The instructions aren't really clear on the tutorial you sent me.
[23:24:58] Radar: "The development section of your config/database.yml file should look something like this"
[23:25:00] Radar: Seems clear to me?
[23:25:07] Axilla: i had the channel on ignore ><
[23:25:10] Axilla: missed any comments.
[23:25:12] Radar: axilla: Smart.
[23:25:16] Radar: axilla: Why?
[23:25:27] Axilla: new PC was trying to ignore joins parts quits and nicks
[23:25:33] Radar: axilla: !enternotspace
[23:25:33] helpa: axilla: The enter key should not be used as a space bar. Lines on IRC can be up to 400 characters long.
[23:25:46] Darmani_: Radar: Alright I'll just roll with it.
[23:25:50] Radar: SteenJobs: My guess is how you're invoking the puma command. There's a command line option to pass it the path to the puma config and it's likely you're not specifying it.
[23:26:26] SteenJobs: Radar: fair point - i’m using capistrano though (i guess that wasn’t self evident from the deploy.rb file)
[23:26:35] Axilla: SteenJobs: what are you trying to configure w/ puma?
[23:26:36] SteenJobs: i know with pumactl you can specify a path
[23:26:38] Radar: SteenJobs: Right, but something has to be invoking the puma command to run the server.
[23:26:42] Axilla: i deploy with cap and puma and there isn't all that much to do
[23:26:51] SteenJobs: Radar: Upstart. etc/init/puma.conf i presume
[23:27:22] Axilla: at the bottom of your deploy.rb you should have a block
[23:27:25] Axilla: that does all that for you
[23:27:36] SteenJobs: Radar: https://gist.github.com/jesiegel1/607eda84d7c9d0a00e84b1c33d9dad21#file-puma-conf-L27
[23:28:03] SteenJobs: well that’s what Upstart does
[23:28:10] Radar: SteenJobs: Yes, that looks like the configuration option I mean.
[23:28:22] Radar: SteenJobs: So what is set :puma_conf supposed to be doing?
[23:28:56] Axilla: https://gist.github.com/travisdmathis/108b930c854b6294252044a774cb9304
[23:29:07] SteenJobs: good question - seems like someone else online had a similar question, but from looking at the source code:
[23:29:10] SteenJobs: Radar: https://github.com/seuros/capistrano-puma/blob/963e8f946681d7c4c7bcbeb948abebdb5a15e978/lib/capistrano/tasks/puma.rake#L42
[23:29:21] Axilla: SteenJobs: is there a reason you're doing it that way?
[23:29:28] Axilla: seems like you're doing it the hard way
[23:29:33] SteenJobs: axilla: what’s “that” referring to?
[23:29:58] SteenJobs: it’s a linux server with ubuntu installed, running nginx + puma + capistrano. the recommended setup is using Upstart to handle all services, like Puma
[23:30:14] Axilla: uh, i run the exact same setup
[23:30:29] Axilla: and i never use scripts like that
[23:30:32] Axilla: its so much easier than that.
[23:30:42] Axilla: look at that gist
[23:31:54] SteenJobs: yea i did. i have a similar setup as well. and Upstart is a good thing, check out Digital Ocean’s guide - it’s actually excellent.
[23:32:18] Axilla: its really not, i worked of DO's guide for a couple hours and had issues
[23:32:29] SteenJobs: i liked it. odd.
[23:32:30] alfiemax: has joined #RubyOnRails
[23:32:34] Axilla: ive done this 3x's this month
[23:32:36] hahuang65: has joined #RubyOnRails
[23:32:36] Axilla: setting up this app
[23:32:39] Axilla: one second..
[23:33:04] Axilla: https://www.sitepoint.com/deploy-your-rails-app-to-aws/
[23:33:04] SteenJobs: Radar: maybe they’re just not playing nice together, and while cap is listening to :puma_conf, puma isn’t bec of the Upstart service?
[23:33:17] Axilla: that's the best guide i've found and it has a couple issues in it as well i had to work through.
[23:33:19] SteenJobs: we’re hosting on digital ocean btw
[23:33:27] Axilla: shouldn't make much of a difference
[23:33:35] Radar: SteenJobs: Yeah, I don't know what's going on here. I'd need to fiddle with it.
[23:34:00] SteenJobs: axilla: i’m definitely gonna read thru it and keep it handy. knowing how to deploy on aws is a good thing to know anyway.
[23:34:22] SteenJobs: Radar: aright cool. makes sense. not the easiest of questions ha
[23:34:25] Axilla: SteenJobs: that puma deploy.rb gist i posted works everytime for me.
[23:34:36] SteenJobs: it works for me too, that’s not the issue
[23:34:42] SteenJobs: puma.rb is being created in shared/
[23:34:53] Axilla: so just add it to your linked files
[23:34:54] SteenJobs: but puma insists on using config/puma.rb instead of shared/puma.rb
[23:35:05] sid_fules: has joined #RubyOnRails
[23:35:05] Axilla: add it to deploy.rb linked_files
[23:35:11] SteenJobs: don’t believe that would work
[23:35:34] Axilla: set :linked_files, %w{config/database.yml config/secrets.yml config/aws.yml config/puma.rb}
[23:35:40] SteenJobs: because i want cap to use the generated puma.rb, not the config/puma.rb that i wrote. it’s not an issue of the file not being generated…simply the wrong file is being referenced
[23:35:57] SteenJobs: config/puma.rb won’t be the cap generated puma.rb, it’ll be the one cap is using to generate puma.rb
[23:36:38] SteenJobs: it’s fine, honestly i can just change the Upstart script and my guess is it will work
[23:36:47] SteenJobs: i’ll do a test deploy and see if it works off the bat
[23:36:50] SteenJobs: if it does, we’re all good
[23:36:54] Axilla: mines in shared too
[23:37:09] Axilla: and i don't need to reference it
[23:37:19] Axilla: but i'm not trying to change it
[23:37:27] SteenJobs: right - so the qeustion is, where in your code is puma told where puma.rb is, and what does it look like?
[23:37:54] Axilla: i use the custom deploy hooks
[23:38:07] Axilla: to start, restart puma on deploy.. that's the best way i think.
[23:38:21] Axilla: i don't touch puma.rb
[23:38:31] Darmani_: Radar: Since I changed db's my RSpec tests aren't running.. I guess that's normal for now right?
[23:38:46] Radar: Darmani_: "aren't running"?
[23:38:50] Radar: Darmani_: !didntwork
[23:38:50] helpa: Darmani_: What "didn't work"? Did your server not start? Did your computer explode? Did your webpage turn bright pink? Did your client not pay your bill on time? You may have to be more specific. A Gist (http://gist.github.com) of the code that doesn't work (and the error you are getting) will be helpful.
[23:38:53] Axilla: https://gist.github.com/travisdmathis/295003a90cb0e89834178c37ec434732 -- this is what i use at the bottom of deploy.rb that restart/starts/cleansup my deploys
[23:39:03] Darmani_: Radar: Ah right. hang on lol
[23:39:45] Darmani_: Radar: https://gist.github.com/mfifth/7774c4b8f9ec460aedec41c9d551f051
[23:40:00] SteenJobs: axilla: same
[23:43:12] flashpoint9: has joined #RubyOnRails
[23:46:31] Radar: Darmani_: Do you not have postgresql installed already?
[23:46:57] Darmani_: Radar: I installed the gem and updated the gemfile...
[23:47:25] roamingdog: has joined #RubyOnRails
[23:47:44] cnk: Darmani_: the gem is for the postgres client - but where is your database server
[23:48:00] dalbuschat: has joined #RubyOnRails
[23:48:26] Darmani_: cnk: I'm not sure..
[23:48:31] SteenJobs: Darmani_: did you install it with homebrew or the postgres app?
[23:48:34] SteenJobs: or neither?
[23:48:53] Darmani_: I just typed gem 'pg' install into the gemfile lol
[23:49:12] flashpoint9: Darmani_: you will need to setup postgresql locally
[23:49:16] cnk: that is ruby - you need actual postgres database server
[23:49:22] SteenJobs: as cnk said, that’s for the postgres client…not the server
[23:49:27] flashpoint9: create a table and link it up to your app
[23:49:37] cnk: what OS? and how have you been installing software?
[23:49:59] Darmani_: cnk: Umm I have Linux.. v14.x I think..
[23:50:06] cnk: you probably want something like brew install postgres or apt-get install postgres
[23:50:23] SteenJobs: Darmani_: http://postgresapp.com/
[23:50:30] flashpoint9: if its linux im pretty sure there isnt any homebrew available
[23:50:33] Darmani_: Well I've actually been using a cloud ide to make my Rails apps >.<
[23:50:35] cnk: so use your package manager to install the postgres server - not just the client
[23:50:48] SteenJobs: oh he didn’t say mac. awk
[23:51:22] flashpoint9: Darmani_: after you install postgres run this command `psql --username=postgres`
[23:51:27] cnk: Darmani_: you will need to read the docs for your cloud IDE to figure out how they get you pg
[23:51:28] flashpoint9: should log you into the postgres server
[23:51:35] Pupeno: has joined #RubyOnRails
[23:51:38] flashpoint9: there you can run postgres commmands etc
[23:51:38] RegulationD: has left #RubyOnRails: ()
[23:51:54] Darmani_: cnk: I only switched to postgres to deploy my app on heroku o.o
[23:52:04] flashpoint9: Darmani_: check out https://www.postgresql.org/docs/8.4/static/index.html
[23:52:24] flashpoint9: postgres is a valuable db to know and understand in the rails world
[23:52:44] Darmani_: flashpoint9: looks that way. Thanks I'll read that.
[23:52:59] cnk: You may need to put the postgres gem in the production group and NOT change your db in dev
[23:53:50] flashpoint9: cnk: really? I thought putting the postgres gem outside of production meant you didnt need it in any of the groups
[23:53:51] Darmani_: cnk: yeah I need to read up on this a little more... I shouldn't have just started changing stuff lol
[23:54:23] flashpoint9: Darmani_: definitely worth switching to a different git branch and backing up any db pre and post
[23:54:26] cnk: flashpoint9: I don't know what you mean
[23:54:52] Darmani_: flashpoint9: will do.
[23:54:54] flashpoint9: cnk: I thought it was ok to place the PG gem outside of the production group
[23:54:55] cnk: what I was suggesting is that if you only want PG on Heroku (aka production env) then you only try to install it in the production setup
[23:55:02] flashpoint9: ah you are correct
[23:55:09] cnk: it is - if you have the postgres client libs on your machine
[23:55:13] Darmani_: I need to eat something I'll be back.
[23:55:17] flashpoint9: then dev would default to sqlite
[23:55:25] flashpoint9: Darmani_: later!
[23:56:21] cnk: dev should load (or try ot load) whatever adapter you configured in the database.yml development stanza
[23:59:04] flashpoint9: Question, Im creating an api and rendering the json which looks like https://gist.github.com/JosephLeon/931be330ec08da2d524ac216e47735ed and I want to wrap them in a larger json object like https://gist.github.com/JosephLeon/84b5adb0e110423a96dcf308a1ec5dc5,
[23:59:36] flashpoint9: I tried with Active Model Serilizer but still cant get it wrapped