« Back to channel list

#RubyOnRails - 26 February 2016

« Back 1 day Forward 1 day »
[00:03:07] codepete: has joined #RubyOnRails
[00:03:30] uglybandersnatch: has joined #RubyOnRails
[00:04:13] wxdk2: has joined #RubyOnRails
[00:05:37] _djbkd: has joined #RubyOnRails
[00:05:52] fox_mulder_cp: has joined #RubyOnRails
[00:07:18] ppinkerton: has joined #RubyOnRails
[00:08:27] one_zero: has joined #RubyOnRails
[00:10:35] raunicolae: has joined #RubyOnRails
[00:10:52] raunicolae: has left #RubyOnRails: ()
[00:12:34] uglybandersnatch: has left #RubyOnRails: ()
[00:13:16] ensyde_: has joined #RubyOnRails
[00:13:18] pawnbox: has joined #RubyOnRails
[00:14:03] blackmes1: has joined #RubyOnRails
[00:14:51] lemur: has joined #RubyOnRails
[00:14:58] cnk: has joined #RubyOnRails
[00:18:51] Ropeney: has joined #RubyOnRails
[00:19:14] kirillzh: has joined #RubyOnRails
[00:19:18] ppinkerton: has joined #RubyOnRails
[00:19:30] trinaldi: has joined #RubyOnRails
[00:19:40] jgpawletko: has joined #RubyOnRails
[00:22:11] godzillaenlacasa: has joined #RubyOnRails
[00:22:40] Surt_Q: has joined #RubyOnRails
[00:22:40] herminiotorres: has joined #RubyOnRails
[00:24:25] samiux: has joined #RubyOnRails
[00:26:17] stannard: has joined #RubyOnRails
[00:28:13] drbayer: has joined #RubyOnRails
[00:29:14] sdwrage: has joined #RubyOnRails
[00:30:11] bronson: has joined #RubyOnRails
[00:33:46] Jon30: having a major problem here. I am running Apache/2.2.31, Passenger 4 and RVM. I am running 10+ RoR websites, and they constantly keep writing into each other's tmp/cache folder. So /home/app1/website/current/tmp/cache/7CD would end up belonging to user app1 but group app2, and then app1 crashes because it can't access the tmp/cache/7CD directory until I do chown -R app1:app1 7CD. Any
[00:33:46] Jon30: ideas? Apache config: https://gist.github.com/anonymous/9295cadfd204f7b3664c
[00:34:49] greghoggard: has joined #RubyOnRails
[00:35:39] timdotrb: has joined #RubyOnRails
[00:36:14] Radar: Jon30: hi again
[00:36:29] Radar: Jon30: Are you configuring all the apps to write to the same shared/tmp directory in your Capistrano configuration?
[00:36:54] pixelhandler: has joined #RubyOnRails
[00:37:04] quazimodo: noon, whatever
[00:37:20] Radar: quazimodo: factually incorrect
[00:37:24] ewnd9_: has joined #RubyOnRails
[00:37:24] Radar: quazimodo: 10 points from gryffindor
[00:38:47] Jon30: Radar: I didn't setup any config for tmp folder. Each app has a separete tmp folder: /home/app1/current/tmp/, /home/app2/current/tmp/, etc...
[00:39:00] Radar: Jon30: But isn't current/tmp symlinked?
[00:39:07] Radar: Jon30: to /home/app1/shared/tmp?
[00:39:07] Jon30: 10+ apps are writing cache into random app's tmp folder
[00:39:17] Jon30: Radar: it's not
[00:39:31] Radar: Then I can't think of any reason why it would do that.
[00:39:47] Radar: I would recommend hiring a consultant who can work with you to look at your servers. I don't think IRC is the best place to get help with this.
[00:39:59] Coldblackice: has joined #RubyOnRails
[00:40:25] Jon30: is it because Passenger is installed in /usr/local/rvm/gems? does it need to go into ~/.rvm/ of each user?
[00:40:43] Jon30: Perhaps upgrading Passenger to the latest 4.x would help? or even 5?
[00:41:13] Jon30: Radar: is there a way to force a tmp folder path for each app?
[00:41:44] Radar: Jon30: Each app will write to its own Rails.root + '/tmp' path.
[00:41:56] Radar: Jon30: it's nothing to do with passenger (afaics) or RVM.
[00:42:12] Radar: It's a misconfiguration issue probably within your apache config or capistrano config
[00:42:20] Radar: But I can't tell because I can't see either of those.
[00:42:27] Radar: So: hire a consultant. Get them to look it over with you.
[00:42:30] wldcordeiro: has joined #RubyOnRails
[00:43:07] pawnbox: has joined #RubyOnRails
[00:43:08] _Tariq: has joined #RubyOnRails
[00:43:39] Jon30: I see thanks. I guess I will skip upgrading Passenger and dig into the Apache config. Do you think it's Passenger related config in Apache?
[00:44:53] Radar: Jon30: Do you realise that you're asking me to make a completely uneducated guess which could led you astray?
[00:45:03] Radar: Jon30: You're actually asking me to do something incredibly dumb and I have, so far, refused.
[00:45:18] Radar: Jon30: I have near _zero_ information to go on
[00:45:18] ppinkerton: has joined #RubyOnRails
[00:45:29] Radar: You claim things are happening but I have no data to support your claims. Only anecdotes.
[00:45:43] Jon30: Radar: https://gist.github.com/anonymous/8f2e67b190c2f103376f -- the very basic deploy.rb that I am using
[00:46:01] Radar: Which is probably paired with a config/deploy/production.rb?
[00:46:21] Radar: https://gist.github.com/anonymous/8f2e67b190c2f103376f#file-deploy-rb-L39
[00:46:26] Radar: Make sure this isn't the same value across all the apps.
[00:47:51] Jon30: Indeed: https://gist.github.com/anonymous/4113863a1fcdb9a6b37a
[00:49:33] Jon30: Radar: current_path is certainly different per each app.
[00:50:00] ppinkerton: has joined #RubyOnRails
[00:51:30] bricker: has joined #RubyOnRails
[00:51:55] Jon30: Radar: disregard the last link of production.rb, I changed too much to try to conceal sensitive data. This is less confusing: https://gist.github.com/anonymous/8ce41ff0a17a388de9a4 --
[00:52:05] Radar: Jon30: Ok, I'm still out of ideas.
[00:53:23] Jon30: very strange problem. Thanks Radar
[00:54:42] lemur: has joined #RubyOnRails
[00:55:01] _Tariq_: has joined #RubyOnRails
[00:56:28] cajone: has joined #RubyOnRails
[00:56:52] lemur: has joined #RubyOnRails
[00:57:07] siaW: has joined #RubyOnRails
[00:57:51] bronson: has joined #RubyOnRails
[01:02:03] deur-: has joined #RubyOnRails
[01:03:15] nettoweb: has joined #RubyOnRails
[01:04:01] hekin: has joined #RubyOnRails
[01:04:03] chucky: has joined #RubyOnRails
[01:04:58] Olipro: has joined #RubyOnRails
[01:05:31] steffes: has joined #RubyOnRails
[01:08:21] manfrin: has joined #RubyOnRails
[01:10:58] codesoda: has joined #RubyOnRails
[01:11:36] superlou: has joined #RubyOnRails
[01:14:04] siaW: has joined #RubyOnRails
[01:20:00] msyvich: has joined #RubyOnRails
[01:20:12] Devalo: has joined #RubyOnRails
[01:20:19] Jeremy1023: has joined #RubyOnRails
[01:20:25] dopamean_: has joined #RubyOnRails
[01:22:11] Guest28: has joined #RubyOnRails
[01:23:05] pawnbox: has joined #RubyOnRails
[01:23:54] mjfox: has joined #RubyOnRails
[01:27:02] alexishuard: has joined #RubyOnRails
[01:30:58] timdotrb: has joined #RubyOnRails
[01:31:05] Rodya_: has joined #RubyOnRails
[01:31:52] dopie: has joined #RubyOnRails
[01:32:37] bricker: has joined #RubyOnRails
[01:32:42] Hans267: has joined #RubyOnRails
[01:33:27] nettoweb: has joined #RubyOnRails
[01:36:35] kirillzh: has joined #RubyOnRails
[01:36:48] DonOtreply: has joined #RubyOnRails
[01:37:19] ppinkerton: has joined #RubyOnRails
[01:38:04] sleungcy: has joined #RubyOnRails
[01:39:04] Emily: has joined #RubyOnRails
[01:41:50] alexhartley: has joined #RubyOnRails
[01:42:22] Graphettion: has joined #RubyOnRails
[01:43:20] drbayer: has joined #RubyOnRails
[01:43:40] Pazician: has joined #RubyOnRails
[01:46:28] rakm: has joined #RubyOnRails
[01:47:47] jenrzzz: has joined #RubyOnRails
[01:49:55] nettoweb: has joined #RubyOnRails
[01:50:48] lessless: has joined #RubyOnRails
[01:53:00] pawnbox: has joined #RubyOnRails
[01:53:20] foli_: has joined #RubyOnRails
[01:55:54] foli_: has joined #RubyOnRails
[01:58:06] arBmind: has joined #RubyOnRails
[02:03:11] quazimodo: has joined #RubyOnRails
[02:04:17] IFrank00: has joined #RubyOnRails
[02:07:22] arthurl: has joined #RubyOnRails
[02:08:09] Guest34101: has joined #RubyOnRails
[02:09:09] _Tariq: has joined #RubyOnRails
[02:09:33] rubyonrailed: has joined #RubyOnRails
[02:10:07] Rodya_: has joined #RubyOnRails
[02:11:04] rubyonra_: has joined #RubyOnRails
[02:12:09] steffes: has joined #RubyOnRails
[02:14:01] _djbkd: has joined #RubyOnRails
[02:14:18] _bogus_: hey, i'm using nested_form to add objects to my form , but how can i discriminate them? like an id, but there's no id set when creating it
[02:16:00] baweaver: has joined #RubyOnRails
[02:18:33] greengriminal: has joined #RubyOnRails
[02:18:51] mhenrixon: has joined #RubyOnRails
[02:19:20] jetpack_joe: has joined #RubyOnRails
[02:19:22] bonhoeffer: has joined #RubyOnRails
[02:20:51] augcesar: has joined #RubyOnRails
[02:21:52] bronson: has joined #RubyOnRails
[02:22:39] chagel: has joined #RubyOnRails
[02:23:09] greengriminal: Having an issue reinitialising owlCarousel after clicking a bootstrap tab that goes off does an ajax request and on success I am calling #owlCarousel. My issue is that it works on the first tab but not any other subsequent tabs. This is a recordIt to demonstrate: http://recordit.co/x829jKANur
[02:23:21] greengriminal: and along with that here is what I have currently: https://gist.github.com/davidpatters0n/808fbb65cbfc417b9ef3
[02:23:34] greengriminal: Does anything look out of place?
[02:24:59] DLSteve: has joined #RubyOnRails
[02:25:17] ppinkerton: has joined #RubyOnRails
[02:25:44] greengriminal: Also when clicking the other tabs i can see in the response for that request with the appropriate html.
[02:26:37] underplank: has joined #RubyOnRails
[02:26:37] diegoviola: has joined #RubyOnRails
[02:27:33] neilfse: has joined #RubyOnRails
[02:30:16] _djbkd: has joined #RubyOnRails
[02:30:33] Chagel_: has joined #RubyOnRails
[02:33:23] jottr: Hi all. I am observing some strange behavior in our application which is hosted on heroku. When accessing the following resource: https://mge-rails.herokuapp.com/api/winners the request is served just fine, and you will get a .json file back.
[02:34:33] jottr: But, as soon as you try and request the same resource from the subdomain of http://heroku.mein-grundeinkommen.de/api/winners which has cloudflare in front of it, I get a HTTP 500 error
[02:34:41] Technodrome: Radar you were sorta right maybe, a static site generator would have worked pretty well
[02:34:41] twilling: has joined #RubyOnRails
[02:34:50] Technodrome: really the whole rails app is just high voltage
[02:34:53] jottr: The logs leave me even more confused: https://gist.github.com/jottr/6dfd3ea402fcc18375d9
[02:35:27] chagel: has joined #RubyOnRails
[02:36:11] jottr: Sorry wrong log. This is the correct one: https://gist.github.com/jottr/8451ae033503802b6116
[02:36:42] wxdk: has joined #RubyOnRails
[02:37:39] Papierkorb: has joined #RubyOnRails
[02:38:45] baweaver: has joined #RubyOnRails
[02:38:55] rickmasta: has joined #RubyOnRails
[02:41:51] sevenseacat: has joined #RubyOnRails
[02:41:58] flashpoint9: has joined #RubyOnRails
[02:42:55] pawnbox: has joined #RubyOnRails
[02:43:30] jottr: So strangely, the exact same request results in an immediate 500 internal server error, when requested via the cloudfront managed domain. Does someone maybe have an idea what could cause this?
[02:43:52] chipotle: has joined #RubyOnRails
[02:43:59] kies^: has joined #RubyOnRails
[02:45:28] _Tariq: has joined #RubyOnRails
[02:45:34] Radar: Technodrome: Thank you. I enjoy being right.
[02:45:50] Radar: Technodrome: what do you mean by "high voltage"?
[02:46:56] dEPy: has joined #RubyOnRails
[02:52:05] blackmes1: has joined #RubyOnRails
[02:53:19] goodcodeguy: has joined #RubyOnRails
[02:54:49] creature: Radar: There's a gem called 'high voltage' for dealing with static content, so probably that.
[02:56:39] siaW: has left #RubyOnRails: ()
[02:58:48] johnflux: has joined #RubyOnRails
[02:58:48] johnflux: has joined #RubyOnRails
[03:00:12] jenrzzz: has joined #RubyOnRails
[03:04:17] bronson: has joined #RubyOnRails
[03:05:17] yfeldblum: has joined #RubyOnRails
[03:06:26] slash_nick: bronson: what breakage have you seen?
[03:06:35] slash_nick: crap. scrolled _way_ up, i was.
[03:06:43] bronson: what, rails5?
[03:07:00] slash_nick: beta3, you said
[03:07:37] wxdk2: has joined #RubyOnRails
[03:07:41] bronson: https://github.com/rails/rails/issues/23881
[03:08:46] DmitryBochkarev: has joined #RubyOnRails
[03:09:36] slash_nick: bronson: nice... are you having a go at it?
[03:09:46] underplank: has joined #RubyOnRails
[03:10:15] bronson: no time alas. I can probably do it next week if it's still open.
[03:10:22] Jeremy1023: has joined #RubyOnRails
[03:11:19] Kulo: has joined #RubyOnRails
[03:12:41] pawnbox: has joined #RubyOnRails
[03:13:01] arthurl: has joined #RubyOnRails
[03:13:02] slash_nick: > i dont know why the tests are using a different resolver... ### there seems to be a good bit of that. code responsible for a thing is different code than is responsible for doing the thing in test
[03:17:27] null__: has joined #RubyOnRails
[03:17:27] null__: has joined #RubyOnRails
[03:19:22] chagel: has joined #RubyOnRails
[03:20:37] krzkrzkrz: has joined #RubyOnRails
[03:21:43] Devalo: has joined #RubyOnRails
[03:22:24] TheMoonMaster: has joined #RubyOnRails
[03:22:39] zenergi: has joined #RubyOnRails
[03:23:22] Rodya_: has joined #RubyOnRails
[03:24:33] chagel: has joined #RubyOnRails
[03:24:59] steffes: has joined #RubyOnRails
[03:26:57] Technodrome: Radar the high voltage gem
[03:27:15] Radar: Technodrome: Do you have any dynamic pieces at all?
[03:30:47] chipotle: has joined #RubyOnRails
[03:34:59] underplank: has joined #RubyOnRails
[03:37:44] chipotle: has joined #RubyOnRails
[03:39:24] kdough: has joined #RubyOnRails
[03:40:02] Kryptonical: has joined #RubyOnRails
[03:44:33] Pazician: has joined #RubyOnRails
[03:45:09] wethu: has joined #RubyOnRails
[03:45:58] fedexo: has joined #RubyOnRails
[03:50:01] jgpawletko: has joined #RubyOnRails
[03:52:39] pawnbox: has joined #RubyOnRails
[03:53:45] ensyde_: has joined #RubyOnRails
[03:55:08] blackmes1: has joined #RubyOnRails
[03:55:25] _djbkd: has joined #RubyOnRails
[03:55:31] jonee: has joined #RubyOnRails
[03:59:57] underplank: has joined #RubyOnRails
[04:02:54] The_Phoenix: has joined #RubyOnRails
[04:03:37] chagel: has joined #RubyOnRails
[04:03:45] arup_r: has joined #RubyOnRails
[04:04:22] IFrank00: has joined #RubyOnRails
[04:07:09] johnflux: has joined #RubyOnRails
[04:07:09] johnflux: has joined #RubyOnRails
[04:08:36] chagel: has joined #RubyOnRails
[04:10:39] uglybandersnatch: has joined #RubyOnRails
[04:14:01] DmitryBochkarev: has joined #RubyOnRails
[04:16:29] braincrash: has joined #RubyOnRails
[04:17:12] DmitryBochkarev: has joined #RubyOnRails
[04:18:46] sp1rs: has joined #RubyOnRails
[04:20:19] chagel: has joined #RubyOnRails
[04:20:50] flashpoint9: has joined #RubyOnRails
[04:21:54] bronson: has joined #RubyOnRails
[04:21:58] rafaelfranca: has joined #RubyOnRails
[04:27:46] baweaver: has joined #RubyOnRails
[04:30:13] DEA7TH: has joined #RubyOnRails
[04:30:26] arup_r: has joined #RubyOnRails
[04:32:47] pawnbox: has joined #RubyOnRails
[04:32:48] uglybandersnatc-: has joined #RubyOnRails
[04:33:39] smolny: has left #RubyOnRails: ()
[04:34:17] jenrzzz: has joined #RubyOnRails
[04:34:31] underplank: has joined #RubyOnRails
[04:38:53] underplank: has joined #RubyOnRails
[04:40:58] IFrank00: has joined #RubyOnRails
[04:41:09] ppinkerton: has joined #RubyOnRails
[04:42:46] chouhoul_: has joined #RubyOnRails
[04:42:51] underplank: has joined #RubyOnRails
[04:43:32] kirillzh: has joined #RubyOnRails
[04:47:38] stannard: has joined #RubyOnRails
[04:47:52] chagel: has joined #RubyOnRails
[04:53:06] mjfox: has joined #RubyOnRails
[04:54:17] pawnbox: has joined #RubyOnRails
[04:58:09] blackmes1: has joined #RubyOnRails
[05:01:11] underplank: has joined #RubyOnRails
[05:01:27] pawnbox: has joined #RubyOnRails
[05:03:37] fedorov5432: has joined #RubyOnRails
[05:03:48] underplank: has joined #RubyOnRails
[05:04:24] mib_mib: has joined #RubyOnRails
[05:06:21] Guest28: has joined #RubyOnRails
[05:06:23] mib_mib: hi all - i have a class in lib/services/map_service.rb - i have added config.autoload_paths += %W(#{Rails.root}/lib/services) to application.rb, however i still get the Rails "NameError uninitialized constant" error - what gives here?
[05:06:43] Chagel_: has joined #RubyOnRails
[05:07:35] mib_mib: i'm not sure why it can't find it? in console it loads fine
[05:10:22] sevenseacat: restarted app/spring/etc. since adding that autoload line?
[05:10:29] sevenseacat: where can't it be foind?
[05:11:45] pawnbox: has joined #RubyOnRails
[05:12:28] arup_r1: has joined #RubyOnRails
[05:13:38] mib_mib: yes have restarted everything
[05:14:54] slash_nick: mib_mib: whole error please? might ask for the class too
[05:14:56] mib_mib: It is happening in a resque worker, if that helps at all
[05:15:44] czerasz: has joined #RubyOnRails
[05:16:59] sevenseacat: has joined #RubyOnRails
[05:17:18] mib_mib: slash_nick: http://pastebin.com/tH4Jr6v5
[05:17:35] neanderslob_: has joined #RubyOnRails
[05:18:14] ppinkerton: has joined #RubyOnRails
[05:18:32] matthewd: BingMapService != map_service.rb
[05:18:34] slash_nick: mib_mib: was it not called MapService?
[05:18:40] chi6rag: has joined #RubyOnRails
[05:18:45] mib_mib: sorry i abbreviated it before
[05:18:47] slash_nick: or Location::MapService for that matter
[05:18:53] mib_mib: BingMapService
[05:19:01] mib_mib: and so is the file
[05:19:04] mib_mib: everything works properly in console
[05:19:17] mib_mib: i have restarted the resque workers numerous times
[05:20:11] slash_nick: mib_mib: so the file is not in lib/services/? it's in lib/services/location/?
[05:20:23] mib_mib: no, its in lib/services
[05:20:33] codesoda_: has joined #RubyOnRails
[05:20:34] mib_mib: BingMapService is being called in a Location model
[05:20:58] mib_mib: i see this: https://github.com/resque/resque/wiki/FAQ#how-do-i-ensure-my-rails-classesenvironment-is-loaded
[05:21:00] uglybandersnatch: has joined #RubyOnRails
[05:21:01] mib_mib: maybe something ishould try
[05:21:37] matthewd: Oh, is this production?
[05:21:49] RegulationD: has joined #RubyOnRails
[05:22:11] slash_nick: load order problem?
[05:22:16] matthewd: Do you really have autoloading enabled in production?
[05:22:50] matthewd: autoload_paths != eager_load_paths
[05:22:54] bronson: has joined #RubyOnRails
[05:23:16] Devalo: has joined #RubyOnRails
[05:23:18] yfeldblum: has joined #RubyOnRails
[05:23:28] bungoman: has joined #RubyOnRails
[05:23:34] mib_mib: is autoloading not good in prod? why?
[05:24:30] matthewd: It's fine if you have it enabled.. but it's not by default
[05:25:36] mib_mib: how else would i load paths in like lib/services or what not?
[05:25:59] mib_mib: if i want to eager load, should i put both an autoload and an eager load for 'lib/services/' ?
[05:26:22] mib_mib: or, what is recommended then for prod?
[05:27:47] neanderslob: has joined #RubyOnRails
[05:28:40] mib_mib: hmmmm this doesn't seem to have solved it
[05:29:01] mib_mib: let me try eager loading instead
[05:30:38] pawnbox: has joined #RubyOnRails
[05:30:39] mib_mib: i guess the resque link wouldn't solve it since its just loading activerecord descendents anyway
[05:33:42] chagel: has joined #RubyOnRails
[05:37:18] uglybandersnatch: has joined #RubyOnRails
[05:37:53] chouhoulis: has joined #RubyOnRails
[05:41:02] Deck`: has joined #RubyOnRails
[05:43:32] alexhartley: has joined #RubyOnRails
[05:46:23] _bogus_: has anybody used prawn ?
[05:46:46] _bogus_: is it able to generate images besides pdf ?
[05:46:47] helpa: Nope. No one. Ever. In the history of the world.
[05:47:02] roamingdog: has joined #RubyOnRails
[05:48:56] chipotle: has joined #RubyOnRails
[05:49:10] dEPy: has joined #RubyOnRails
[05:49:13] arup_r: has joined #RubyOnRails
[05:50:07] KnownSyntax: has joined #RubyOnRails
[05:50:29] rafaelfranca: has joined #RubyOnRails
[05:53:03] Rodya_: has joined #RubyOnRails
[05:53:18] ppinkerton: has joined #RubyOnRails
[05:54:40] rvanlieshout: has joined #RubyOnRails
[05:58:17] AntiSpamMeta: has joined #RubyOnRails
[06:00:23] chagel: has joined #RubyOnRails
[06:01:04] blackmes1: has joined #RubyOnRails
[06:01:55] cajone: has joined #RubyOnRails
[06:02:31] dEPy: has joined #RubyOnRails
[06:03:37] tvw: has joined #RubyOnRails
[06:03:59] trosborn: has joined #RubyOnRails
[06:04:19] statelesscode: has joined #RubyOnRails
[06:05:03] bricker: has joined #RubyOnRails
[06:05:18] ppinkerton: has joined #RubyOnRails
[06:08:06] emachnic: has joined #RubyOnRails
[06:10:28] chagel: has joined #RubyOnRails
[06:13:44] mib_mib: hmmmm this is odd - if i only have one resque worker it seems to work proplery, otherwise, if i have 2, the second one isn't eager loading the models properly and just errors
[06:13:48] bios: has joined #RubyOnRails
[06:17:20] Devalo: has joined #RubyOnRails
[06:17:29] rvanlieshout: mib_mib: what exactly fails?
[06:17:36] jonee: has joined #RubyOnRails
[06:18:43] mib_mib: rvanlieshout: I have a model called Location that uses a class from lib/services/bing_map_service.rb, and i get "uninitialized constant Location::BingMapService" - in one of the workers, but not the other
[06:18:59] DoctorMonocular: has joined #RubyOnRails
[06:19:45] rvanlieshout: could it be the other worker just didn't had to use it yet?
[06:19:49] mib_mib: rvanlieshout: i tried setting eager load paths, calling the model from resque:setup, running Rails.eager_load! , nothing seems to work
[06:20:23] mib_mib: rvanlieshout: sure, but it should have eager loaded it, or if it didn't, then at least load it when it needed it, instead of just erroring out
[06:20:52] rvanlieshout: how did you start this worker? What if you access Location::BingMapService directly in resque:setup?
[06:22:01] bronson: has joined #RubyOnRails
[06:22:31] bePolite: has joined #RubyOnRails
[06:22:51] DoctorMonocular: has joined #RubyOnRails
[06:24:38] sohel: has joined #RubyOnRails
[06:26:06] mib_mib: rvanlieshout: yah tried that, not working
[06:26:28] mib_mib: rvanlieshout: i am doing binding.pry in the rake task, before its referenced, and it is not defined, even though its supposed to be eager loading...
[06:26:39] mib_mib: defined?(Location) -> nil
[06:27:13] rvanlieshout: are you sure that the location where you telling it to eager load gets triggered when starting this worker?
[06:28:10] mib_mib: hmmm it appears that rails doesn't eager load fully in rake tasks i see
[06:28:13] mib_mib: I need to call
[06:28:16] mib_mib: Rails.application.eager_load!
[06:28:19] mib_mib: let me try that
[06:28:30] rvanlieshout: your rake task loads environment first?
[06:28:55] mib_mib: doing Rails.application.eager_load! didn't work before in the resque:setup task
[06:29:04] mib_mib: will try directly now in the rake task and see
[06:32:41] mib_mib: this is such odd behavior, the rake task is supposed to load a resque with like 20 different tasks, and 19 will fail and 1 will be taken by the single worker
[06:33:42] KensoDev: has joined #RubyOnRails
[06:34:06] agent008: has joined #RubyOnRails
[06:37:17] apotry: has joined #RubyOnRails
[06:38:00] aganov: has joined #RubyOnRails
[06:39:42] DoctorMo_: has joined #RubyOnRails
[06:40:31] chagel: has joined #RubyOnRails
[06:42:12] intrigueD: has joined #RubyOnRails
[06:43:37] ppinkerton: has joined #RubyOnRails
[06:43:46] Cohedrin: has joined #RubyOnRails
[06:44:27] Guest28: has joined #RubyOnRails
[06:48:32] codesoda: has joined #RubyOnRails
[06:52:57] rafaelfranca: has joined #RubyOnRails
[06:53:28] mib_mib: this is odd - since even in the capistrano messages, it says that its being loaded, and is loaded, but then when you put a job on the queue, it errors
[06:54:25] Azrathud: has joined #RubyOnRails
[06:55:37] slash_me: mib_mib: we could probably help better if you provided code... not just the quoted text from the exception that you think is important... the full exception, and where it was raised. from there we'd ask for the file where the exception is thrown and the class you intend to utilize...
[06:55:50] slash_me: mib_mib: did you ever say whether the problem was prod only?
[06:55:51] _djbkd: has joined #RubyOnRails
[06:58:10] mib_mib: it appears to be a prod only issue
[07:00:17] _djbkd: has joined #RubyOnRails
[07:01:15] Irikos: has joined #RubyOnRails
[07:02:32] wxdk: has joined #RubyOnRails
[07:02:38] slash_me: mib_mib: do you think the relevant files and backtrace might help someone answer your question?
[07:03:01] DoctorMonocular: has joined #RubyOnRails
[07:03:19] yardenbar: has joined #RubyOnRails
[07:04:21] blackmes1: has joined #RubyOnRails
[07:04:38] mib_mib: slash_me: i think the files themselves are sort of irrelevant
[07:04:40] mib_mib: just their locations
[07:04:57] slash_me: ACTION nods
[07:05:12] sp1rs: has joined #RubyOnRails
[07:05:48] slash_nick: have you tried requiring the file where you need it, rather than relying on autoload/eager_load?
[07:05:55] mjfox: has joined #RubyOnRails
[07:06:39] slash_nick: mib_mib: honestly, when you started asking about this you used fake information...
[07:06:42] helpa: Please do not use fake values, as they can be confusing or misleading. Sometimes both.
[07:06:55] slash_nick: or you chose to call it "foo" instead of what it really was
[07:06:57] helpa: Please do not use fake variables for your name such as "foo", "bar" or "x". Use the real names, as if it makes sense to you it probably will make sense to the people helping you.
[07:07:29] mib_mib: app/models/location.rb, app/services/bing_map_service.rb, and app/jobs/geocode_locations_job.rb
[07:07:33] slash_nick: anyway... i'd try requiring the file where you need it, rather than relying on autoload/eager_load... i'm thinking there's a chance that load order is a problem
[07:07:57] sandstrom: has joined #RubyOnRails
[07:08:05] mib_mib: slash_nick: i have tried adding require 'bing_map_service' at the top of all the files, to no avail....
[07:08:27] sevenseacat: we were talking about files in lib/ before
[07:08:33] jas02: has joined #RubyOnRails
[07:08:45] slash_nick: sevenseacat: that's right. we were.
[07:08:51] mib_mib: errr yah sorry i meant lib/services/bing_map_service.rb ! My bad...
[07:09:11] mib_mib: the other two are under app/
[07:09:23] sevenseacat: and the error is? and the code is?
[07:09:36] DoubleMalt: has joined #RubyOnRails
[07:09:40] slash_nick: mib_mib: you're so confirming the things i've just stated... and the need for the things i've requested...
[07:09:51] mhoungbo: has joined #RubyOnRails
[07:09:58] htmldrum: has joined #RubyOnRails
[07:10:02] slash_nick: mib_mib: !koans trust me...
[07:10:02] helpa: mib_mib: http://github.com/neo/ruby_koans
[07:10:18] mib_mib: The error is: http://pastie.org/private/mia6kiuar0lytfocclugq
[07:11:02] ppinkerton: has joined #RubyOnRails
[07:11:10] chucky: has joined #RubyOnRails
[07:11:11] sevenseacat: so your bing_map_service file isnt in a locations folder?
[07:11:12] mib_mib: slash_nick: http://pastie.org/private/8lyny1xi6lhsrslay9fhxq
[07:11:14] slash_nick: mib_mib: this code is being called from a rake task? i seem to recall that
[07:11:43] mib_mib: yah, but calling it from the rails console also has a problem
[07:12:07] mib_mib: The jobs get added to the queue perfectly
[07:12:18] sevenseacat: teeeeeeasing information piece by piece
[07:12:21] mib_mib: but when the worker touches them, it has that error and the jobs fail
[07:12:29] slash_nick: is that stack trace from the console or the rake task? or is it the same both? how do you _want_ to call this code?
[07:12:36] sevenseacat: mib_mib: let's gist the code from the job and the model.
[07:12:38] slash_nick: sevenseacat: ikr
[07:13:06] sevenseacat: and the BingMapService.
[07:13:11] adavia: has joined #RubyOnRails
[07:13:12] mib_mib: its in the link
[07:13:28] mib_mib: you need the entire model?
[07:13:44] mib_mib: there are a ton of irrelevant methods
[07:14:05] mib_mib: the second pastie link i sent
[07:14:09] sevenseacat: ok, so how are you loading this bing_map_service file?
[07:14:23] mib_mib: autoload_paths
[07:14:28] sevenseacat: show us, don't tell us
[07:14:29] slash_nick: should we see the rake task?
[07:15:07] sled: has joined #RubyOnRails
[07:15:34] mib_mib: http://pastie.org/private/jxf5re8slenguygn8sklba
[07:15:53] mib_mib: this is how it currently is - i dont think i need to load everything in lib/services explicitly but was something i was trying
[07:16:19] ur5us: has joined #RubyOnRails
[07:17:11] sevenseacat: true, the eager load stuff isnt necessary
[07:17:53] mib_mib: something is up with resque / the workers
[07:18:04] sevenseacat: wait, resque now? i thought we were taking about a rails consol
[07:18:10] mib_mib: even though i'm only running 1 worker, it takes a job
[07:18:17] mib_mib: oh well, nm
[07:18:21] mib_mib: ill just keep digging
[07:18:45] ensyde_: has joined #RubyOnRails
[07:18:47] mib_mib: maybe some workers are still running in the background or something
[07:18:50] slash_nick: mib_mib: is your BingMapService namespaced under the module "Location"?
[07:18:57] sevenseacat: its nothing to do with resque if "mib_mib: yah, but calling it from the rails console also has a problem"
[07:19:02] mib_mib: slash_nick: no
[07:19:09] solars: has joined #RubyOnRails
[07:19:10] slash_nick: i see uninitialized constant Location::BingMapService....
[07:19:16] sevenseacat: though you didnt specify what "it" is, so
[07:19:16] slash_nick: that implies a module of Location...
[07:19:19] slash_nick: did you intend that?
[07:19:34] mib_mib: sevenseacat: I mean, calling Resque.enqueue(GeoLocationsJob, ['some location']) also errors
[07:19:48] sevenseacat: right. ditch that. try running the geocode from the console directly.
[07:19:52] nocontrol: has joined #RubyOnRails
[07:19:58] mib_mib: slash_nick: If you look at the code, i'm simply calling BingMapService.new inside of Location.geocode!
[07:20:32] slash_nick: mib_mib: and your exception says it's looking for something namespaced under Location
[07:20:53] slash_nick: mib_mib: why'd you choose to prefix BingMapService with "::"?
[07:20:59] sevenseacat: i dont think thats too relevant tbh, by default Rails will look in a namespace of the current class
[07:21:03] mib_mib: sevenseacat: yah Location.first.geocode! works fine
[07:21:19] Pazician: has joined #RubyOnRails
[07:21:26] sevenseacat: okay, so how have you been restarting resque after making all of these changes?
[07:21:32] mib_mib: slash_nick: it was formerly without the two ::, i just added that recently to see if it mattered or not
[07:21:41] mib_mib: slash_nick: which, of course, had no effect =D
[07:22:25] mib_mib: sevenseacat: restarting the workers?
[07:22:26] slash_nick: have you tried `require 'services/bing_map_service'` in your location model?
[07:22:32] comrad: has joined #RubyOnRails
[07:22:32] mib_mib: i'm using capistrano-resque
[07:22:40] sevenseacat: mib_mib: yes, what are you doing, what are you running
[07:22:43] mib_mib: i.e. cap production resque:stop / start
[07:22:57] mib_mib: sevenseacat: also, i created a task to unregister all workers explicity
[07:23:09] mib_mib: that runs this: Resque.workers.select{|worker| worker.id.split(':').first}.each(&:unregister_worker)
[07:23:24] mib_mib: it seems to work properly, resque-web shows no workers
[07:23:28] mib_mib: i also restarted redis-server
[07:23:30] sevenseacat: personally I'd go to your server and manually stop and start the workers, see if that fixes it
[07:23:34] sevenseacat: redis is irrelevant
[07:24:27] mib_mib: sevenseacat: after stopping the workers, ps aux | grep resque shows the workers going away
[07:24:28] sevenseacat: also, does this happen anywhere else other than production?
[07:24:52] sevenseacat: do they actually *go* away?
[07:24:52] mib_mib: ah i see a hung worker
[07:25:07] mib_mib: let me just kill him
[07:25:13] mib_mib: sigh... that could have been it!
[07:25:16] mib_mib: hopefully....
[07:26:37] mib_mib: not sure hwo he escaped me last 5 times lol
[07:26:47] mib_mib: lets see if he was the problem
[07:28:53] roamingdog: has joined #RubyOnRails
[07:29:08] ur5us: has joined #RubyOnRails
[07:29:11] mib_mib: slash_nick: sevenseacat 'she' was it!
[07:29:23] nocontrol: I am saving objects to a postgreSQL db like this https://gist.github.com/chrisvel/47e7a63d41472f7fe849. They are about 25-26k entries and I am running a sidekiq/clockwork job every night to do this. Unfortunately the iteration/persist takes 10 minutes. Is there any other way?
[07:29:29] mib_mib: all that work, just a hung worker hiding in process space.... thanks a lot!
[07:29:42] nocontrol: I read about transactions and may be a way to break them down to 500-in-once chunks but I am not sure If it makes sense
[07:29:43] Cohedrin: has joined #RubyOnRails
[07:29:56] slash_nick: mib_mib: nice!
[07:30:04] slash_nick: thanks sevenseacat!
[07:30:10] sevenseacat: nocontrol: might want to look into https://github.com/zdennis/activerecord-import
[07:30:52] wxdk2: has joined #RubyOnRails
[07:31:23] nocontrol: sevenseacat: thanks
[07:33:35] nocontrol: Just another question: The data I fetch to persist to the DB could be either checked one by one to find If the specific object has been changed or truncate the table and re-write all of them. Does it make sense?
[07:34:11] sevenseacat: the options make sense, yes.
[07:34:34] sevenseacat: but i suspect that wasn't the real question
[07:34:44] nocontrol: does it matter to reset the auto incremental id ?
[07:34:56] nocontrol: or just wipe and rewrite ?
[07:35:07] sevenseacat: i wouldn't do either, but then again I don't have much context.
[07:35:20] nocontrol: sevenseacat: do you have anything to suggest ?
[07:35:28] sevenseacat: nocontrol: providing more context?
[07:35:35] nocontrol: what would help ?
[07:35:53] slash_nick: nocontrol: the primary key sequence is important... if you run into problems, you'll want to kick the primary key sequence so that the sequence starts at the max id...
[07:35:55] sevenseacat: telling us what this data is, how its being used, why does it matter which option you pick
[07:36:02] smoitra_: has joined #RubyOnRails
[07:37:06] nocontrol: there are 26000 rows containing Contacts data which are being fetched from a third party vendor's REST API and attributes as (contact_id, firstname, lastname, email)
[07:37:17] slash_nick: sevenseacat: if you use something like psql's copy command to get your rows into your db, then your primary key sequence will be left at "1" on a new table, even though you may have inserted rows 1-1million
[07:37:29] slash_nick: ActiveRecord::Base.connection.execute(%Q[ select setval('#{model}_id_seq', max(id)) from #{model}])
[07:37:42] smoitra: has joined #RubyOnRails
[07:37:42] nocontrol: there is a very light use of them for now from the users of the application, but I just need to keep them updated
[07:38:02] sevenseacat: right, so they have associations to other data you need to maintain
[07:38:12] nocontrol: I had them all written to a .json file each night and then I was able to read the file and process
[07:38:13] sevenseacat: so just truncating the table will leave you with all kinds of stale crap
[07:38:33] trosborn: has joined #RubyOnRails
[07:38:33] nocontrol: and I now I am moving them to postgres
[07:38:51] nocontrol: sevenseacat: They are dump contacts for now, no associations
[07:39:02] sevenseacat: how are they being used then?
[07:39:07] sevenseacat: why are they in a database at all?
[07:39:25] nocontrol: in a select box on a form, you select which contact you eant
[07:39:41] nocontrol: and those contacts are the ones I fetch every night
[07:40:14] sevenseacat: so there is an association between whatever this form is for, and the contact?
[07:40:27] sevenseacat: so what does selecting it do?
[07:40:34] nocontrol: there is with the contact's id
[07:40:42] nocontrol: which remails the same
[07:40:50] sevenseacat: right, so if you wipe the table, that dangling reference will be stuck
[07:40:55] sevenseacat: how can you guarantee it will be the same?
[07:41:47] nocontrol: because the id of the third party item is the same e.g. (name: Someone, account_id: 12345) then the other day becomes (name: Someone else, account_id: 12345)
[07:42:22] nocontrol: so the contact id of the third party is the same, the id of psql doesn't matter because there's no reference to it
[07:42:25] sevenseacat: okay, so you're using the account_id, not the contacts id?
[07:42:53] sevenseacat: right. so what happens when records get removed from the third party API?
[07:43:16] nocontrol: nice question
[07:43:19] jxs_: has joined #RubyOnRails
[07:43:26] sevenseacat: thats why they don't pay me any bucks.
[07:43:37] nocontrol: I guess they are clients
[07:43:46] nocontrol: so they will remain forever in the client base
[07:43:50] nocontrol: just get deactivated
[07:44:37] roamingdog: enjoying a bit of popcorn
[07:44:43] nocontrol: so actually there is no problem, If you write 26k rows to a .json file it will take 2 seconds
[07:44:54] nocontrol: If you write them to psql it takes 10 minutes
[07:45:13] nocontrol: it makes sense and it's not a major/critical issue but it bother me because it's not right implementation
[07:45:41] sevenseacat: it wont take 10 minutes
[07:45:42] ppinkerton: has joined #RubyOnRails
[07:45:47] sevenseacat: thats inordinately slow for 26k records
[07:46:00] nocontrol: 10 minutes in my vagrant ubuntu server
[07:46:10] nocontrol: haven't tested to production yet
[07:46:20] sevenseacat: so profile where the slowness is
[07:46:29] sevenseacat: because thats ridiculously slow
[07:46:54] nocontrol: well, do you believe it's right to write 26k rows at once ? by .each iteration ?
[07:47:04] nocontrol: it seems like a self ddos attack to me
[07:47:09] sevenseacat: not enough context
[07:47:24] nocontrol: as a matter of performance
[07:47:32] nocontrol: for this process ?
[07:47:38] sevenseacat: it would be totally fine.
[07:47:47] nocontrol: what about transactions ?
[07:48:00] sevenseacat: what about them
[07:48:03] nocontrol: break them down to 1000 each and persist as a transaction ?
[07:48:13] nocontrol: 26 times for example
[07:48:19] nocontrol: might be a bit faster
[07:48:26] sevenseacat: profile where the problem is before you start looking at solutions
[07:48:30] sevenseacat: find the bottleneck
[07:48:38] sevenseacat: otherwise you're just guessing
[07:48:46] nocontrol: you are right
[07:49:20] sevenseacat: for all you know, it takes 10 minutes because the external server takes 9.5 minutes to return you the data
[07:49:26] sevenseacat: investigate it :)
[07:49:43] nocontrol: no I first append them to an array
[07:49:55] nocontrol: and then iterate the array and do a .create for each one
[07:50:48] sevenseacat: not sure how thats related
[07:51:00] wxdk: has joined #RubyOnRails
[07:51:07] nocontrol: If I decise to destroy_all each time on this table
[07:51:24] nocontrol: does it make sense to reset the auto increment id ?
[07:51:34] nocontrol: to zero each time ?
[07:51:41] nocontrol: or is it just my OCD ?
[07:52:01] sevenseacat: i will not offer any more advice when you have ignored the advice i have given so far.
[07:52:24] roamingdog: my display dims dramatically...
[07:52:48] nocontrol: this is another question :P
[07:54:17] nocontrol: slash_nick: I have fixed that, because it actually depends on a "Second" id integer, so the model's id is just for Rails/psql use
[07:54:35] rafaelfranca: has joined #RubyOnRails
[07:55:14] chipotle: has joined #RubyOnRails
[07:56:30] emachnic: has joined #RubyOnRails
[07:56:44] fox_mulder_cp: has joined #RubyOnRails
[07:59:46] pyemkey: has joined #RubyOnRails
[08:01:42] chagel: has joined #RubyOnRails
[08:02:20] Deck`: has joined #RubyOnRails
[08:04:40] ferr: has joined #RubyOnRails
[08:06:21] blackmes1: has joined #RubyOnRails
[08:06:41] uglybandersnatch: has joined #RubyOnRails
[08:07:44] bePolite: has joined #RubyOnRails
[08:08:35] mark1: has joined #RubyOnRails
[08:14:26] darutoko: has joined #RubyOnRails
[08:16:02] C0r3: has joined #RubyOnRails
[08:16:46] sp1rs: has joined #RubyOnRails
[08:16:56] srinidhi: has joined #RubyOnRails
[08:18:13] cajone: has joined #RubyOnRails
[08:19:04] Devalo: has joined #RubyOnRails
[08:20:10] Pazician: has joined #RubyOnRails
[08:21:18] sandstrom: has joined #RubyOnRails
[08:22:16] Pumukel: has joined #RubyOnRails
[08:23:33] kerunaru: has joined #RubyOnRails
[08:23:51] jarray52: has joined #RubyOnRails
[08:24:00] bronson: has joined #RubyOnRails
[08:25:26] scepticulous: has joined #RubyOnRails
[08:28:02] Macaveli: has joined #RubyOnRails
[08:28:05] scepticulous: I wonder if there is an easy way to setup attributes for controller requests based on a factory girl created object without violating strong parameters. using model.attributes will includes lots of rejected attributes. turning off strong parameter exceptions in testing feels wrong... Is there anything besides hard coding all permitted attributes for the tests again?
[08:28:38] rvanlieshout: imo hard coding is the valid way in testing it
[08:30:44] scepticulous: I think thats true, but that will hard to add to a big existing project. however I gree, that this feels right. The duplication could be removed by defining the strong parameter permitted keys at a central place, but I wonder if this is really the way people go.
[08:33:25] rvanlieshout: we have them defined in the pundit policies
[08:36:26] sandstrom: has joined #RubyOnRails
[08:38:35] wxdk2: has joined #RubyOnRails
[08:41:23] defsdoor: has joined #RubyOnRails
[08:42:26] edwinvdgraaf: has joined #RubyOnRails
[08:43:13] pawnbox: has joined #RubyOnRails
[08:46:44] mikecmpbll: has joined #RubyOnRails
[08:48:44] granden: has joined #RubyOnRails
[08:49:32] lightheaded: has joined #RubyOnRails
[08:50:37] emachnic: has joined #RubyOnRails
[08:50:44] DoctorMo_: has joined #RubyOnRails
[08:51:39] DoctorMonocular: has joined #RubyOnRails
[08:53:51] roamingdog: has joined #RubyOnRails
[08:55:11] baweaver: has joined #RubyOnRails
[08:56:05] rafaelfranca: has joined #RubyOnRails
[08:58:28] arup_r: has joined #RubyOnRails
[09:01:34] mikecmpbll: has joined #RubyOnRails
[09:09:20] blackmes1: has joined #RubyOnRails
[09:10:12] kirillzh: has joined #RubyOnRails
[09:10:46] chagel: has joined #RubyOnRails
[09:13:43] wxdk: has joined #RubyOnRails
[09:14:19] artto: has joined #RubyOnRails
[09:15:43] chagel: has joined #RubyOnRails
[09:19:39] Devalo: has joined #RubyOnRails
[09:22:56] Spami: has joined #RubyOnRails
[09:23:21] laith: has joined #RubyOnRails
[09:26:46] eljimmy: has joined #RubyOnRails
[09:28:11] jarray52: has left #RubyOnRails: ()
[09:28:56] ranchodev: has joined #RubyOnRails
[09:29:22] FooMunki: has joined #RubyOnRails
[09:30:29] Nuck: has joined #RubyOnRails
[09:33:44] helpa: has joined #RubyOnRails
[09:35:03] sinkensabe: has joined #RubyOnRails
[09:35:03] eljimador: has joined #RubyOnRails
[09:35:03] Dreamer3_: has joined #RubyOnRails
[09:35:03] arBmind1: has joined #RubyOnRails
[09:35:04] mhenrixon_: has joined #RubyOnRails
[09:35:04] jsrn_: has joined #RubyOnRails
[09:35:14] Guest34101: has joined #RubyOnRails
[09:36:30] sevenseacat: has joined #RubyOnRails
[09:38:48] czerasz: has joined #RubyOnRails
[09:39:38] Cervajz: has joined #RubyOnRails
[09:39:43] DoctorMonocular: has joined #RubyOnRails
[09:40:17] blackmes1: has joined #RubyOnRails
[09:42:27] laith: has joined #RubyOnRails
[09:43:49] FooMunki: has joined #RubyOnRails
[09:45:00] alexhartley: has joined #RubyOnRails
[09:46:37] marr: has joined #RubyOnRails
[09:48:20] jeanlinux: has joined #RubyOnRails
[09:51:49] trosborn: has joined #RubyOnRails
[09:56:01] snowy: has joined #RubyOnRails
[09:56:30] ziyadb: has joined #RubyOnRails
[09:57:35] rafaelfranca: has joined #RubyOnRails
[09:58:52] quazimodo: has joined #RubyOnRails
[09:59:46] kirillzh: has joined #RubyOnRails
[09:59:50] htmldrum: has joined #RubyOnRails
[10:03:21] Palsson: has joined #RubyOnRails
[10:04:28] chipotle: has joined #RubyOnRails
[10:05:05] Coldblackice: has joined #RubyOnRails
[10:06:41] arup_r: has joined #RubyOnRails
[10:07:21] artto: has joined #RubyOnRails
[10:10:12] uglybandersnatch: has joined #RubyOnRails
[10:11:22] bePolite: has joined #RubyOnRails
[10:13:33] rubyonrails931: has joined #RubyOnRails
[10:13:47] Hates_: scepticulous: you could always just select the attributes you want out of the FactoryGirl attributes
[10:14:45] blackmes1: has joined #RubyOnRails
[10:14:54] dubalubdub: has joined #RubyOnRails
[10:15:40] ur5us: has joined #RubyOnRails
[10:15:51] sp1rs: has joined #RubyOnRails
[10:16:36] wxdk: has joined #RubyOnRails
[10:18:14] rubyonrails210: has joined #RubyOnRails
[10:19:00] blackmesa: has joined #RubyOnRails
[10:23:17] ElFerna_: has joined #RubyOnRails
[10:23:53] htmldrum: has joined #RubyOnRails
[10:27:02] jvanbaarsen: has joined #RubyOnRails
[10:28:28] baweaver: has joined #RubyOnRails
[10:29:02] _djbkd: has joined #RubyOnRails
[10:29:39] Abhijit: has joined #RubyOnRails
[10:30:08] Abhijit: can i have jobs references:skills through array column?
[10:30:14] Abhijit: i mean from rails.
[10:30:24] htmldrum: has joined #RubyOnRails
[10:30:27] Abhijit: association. instead of just postgresql.
[10:31:22] rvanlieshout: why would you want to use an array column as a relation?
[10:31:23] moeabdol: has joined #RubyOnRails
[10:31:29] rvanlieshout: that's not really how relational databases work
[10:31:45] mjfox: has joined #RubyOnRails
[10:32:19] Abhijit: rvanlieshout, so that i can access job.skills.each
[10:32:29] Abhijit: from that array column.
[10:32:33] Abhijit: for each job.
[10:32:36] rvanlieshout: what is a 'skill'?
[10:32:43] Abhijit: another model.
[10:32:53] rvanlieshout: that's just not how relational databases work
[10:33:00] rvanlieshout: that's just plain bad db design
[10:33:33] Abhijit: then what can i do to make each job has many skills and then able to access those skills
[10:34:11] Abhijit: rvanlieshout, ^
[10:34:33] rvanlieshout: read about has_and_belongs_to_many or has_many :through
[10:35:40] blackmesa: has joined #RubyOnRails
[10:36:04] Abhijit: rvanlieshout, can i store the info of all the skills that job has in single row in those methods?
[10:36:23] Abhijit: how will it work in the backend?
[10:36:31] rvanlieshout: you shouldn't
[10:36:35] rvanlieshout: not when using a relational database
[10:36:42] vedu: Abhijit: you need to learn the concept of join tables.
[10:37:10] Abhijit: rvanlieshout, ok so it will be stored in that :through table
[10:37:28] vedu: read about them first, then you will be able to better questions
[10:37:35] rvanlieshout: yes, but has_and_belongs_to_many might be easier if you don't need other data included in the relationship
[10:37:38] Abhijit: vedu, i am not good in dbs and not interested in going deep in it!
[10:37:41] emachnic: has joined #RubyOnRails
[10:37:50] Abhijit: rvanlieshout, ok
[10:42:12] Abhijit: shall i use this? https://github.com/zealot128/ruby-habtm-generator
[10:42:33] lipoqil: has joined #RubyOnRails
[10:42:57] chipotle: has joined #RubyOnRails
[10:43:44] rvanlieshout: there is really no need to use any gem for such an reasy relationship
[10:43:51] Abhijit: for migrations.
[10:44:10] rvanlieshout: you didn't read about them in de guides did you?
[10:46:31] jenrzzz: has joined #RubyOnRails
[10:47:00] ur5us: has joined #RubyOnRails
[10:57:59] mdw: has joined #RubyOnRails
[10:58:34] rubyonrails549: has joined #RubyOnRails
[10:58:43] ElFerna_: has joined #RubyOnRails
[10:58:44] rafaelfranca: has joined #RubyOnRails
[10:58:57] Flex: has joined #RubyOnRails
[10:59:01] trinaldi: has joined #RubyOnRails
[10:59:31] rafaelfranca: has joined #RubyOnRails
[11:00:17] artto: has joined #RubyOnRails
[11:00:37] stuarta: has joined #RubyOnRails
[11:01:31] lapide_viridi: has joined #RubyOnRails
[11:03:12] arBmind: has joined #RubyOnRails
[11:03:20] Deck`: has joined #RubyOnRails
[11:03:29] arup_r: has joined #RubyOnRails
[11:03:34] htmldrum: has joined #RubyOnRails
[11:04:18] kirillzh: has joined #RubyOnRails
[11:06:43] nettoweb: has joined #RubyOnRails
[11:07:02] bronson: has joined #RubyOnRails
[11:11:27] edwinvdgraaf: has joined #RubyOnRails
[11:16:15] edwinvdgraaf: has joined #RubyOnRails
[11:17:46] dubalubdub: has joined #RubyOnRails
[11:18:27] kirillzh: has joined #RubyOnRails
[11:22:16] Devalo: has joined #RubyOnRails
[11:26:06] mjfox: has joined #RubyOnRails
[11:27:23] sevenseacat: has joined #RubyOnRails
[11:31:03] CustosLimen: has joined #RubyOnRails
[11:31:29] ldnunes: has joined #RubyOnRails
[11:31:42] abhishekvasisht: has joined #RubyOnRails
[11:33:17] MrDoctor: has joined #RubyOnRails
[11:36:04] Macaveli: has joined #RubyOnRails
[11:38:43] dionysus69: has joined #RubyOnRails
[11:39:47] defsdoor: has joined #RubyOnRails
[11:39:47] jenrzzz: has joined #RubyOnRails
[11:45:54] laith: has joined #RubyOnRails
[11:46:37] agit0: has joined #RubyOnRails
[11:51:16] bricker: has joined #RubyOnRails
[11:51:33] augcesar: has joined #RubyOnRails
[11:53:01] artto: has joined #RubyOnRails
[11:54:06] wxdk2: has joined #RubyOnRails
[11:55:03] solars: hi, I've got ugly controller code that tries to find an object in the app controller and if not found renders an error - the problem is I need to use return twice (once from application controller, afterwards in the action) to avoid double rendering - can anyone tell me how to cleanup this? maybe using a filter, or exceptions? https://gist.github.com/solars/c7d355d55173fb5e7269
[11:56:29] ElFerna_: has joined #RubyOnRails
[11:56:36] DoctorMonocular: has joined #RubyOnRails
[11:57:04] roshanavand: has joined #RubyOnRails
[12:00:33] sevenseacat: solars: Property.find will raise an exception if no property is found
[12:00:42] roamingdog: has joined #RubyOnRails
[12:00:46] sevenseacat: so none of your returns are necessary
[12:01:46] sandstrom: has joined #RubyOnRails
[12:02:01] augcesar: has joined #RubyOnRails
[12:03:49] Macaveli: has joined #RubyOnRails
[12:04:32] solars: sevenseacat, of course, that's a bad example - I'm more referring to this in general, e.g. if you have other methods calls that do not raise an exception
[12:04:42] sevenseacat: let's not talk about bad examples.
[12:04:47] sevenseacat: let's talk about real code.
[12:05:19] solars: it is real code, but my problem is on the conceptual level
[12:05:46] solars: i can replace .find with anything that does not raise an exception, the question remains the same
[12:05:58] nettoweb: hey guys, my entire is based in a suburl called portal ever always. Now I can start to remove this but do it slowly. Maybe each section by time. So here is my nginx config for RoR app (https://gist.github.com/osnysantos/fe707d7c918c1e64876a) is there a way to create another blog to allow access in a /articles url? I've actually done it but when I restart nginx it fails to load app.
[12:06:35] sevenseacat: solars: in that case, i would write down what you want your code to do, then delete that code and start again.
[12:06:55] sevenseacat: because none of it makes sense
[12:07:17] solars: sevenseacat, why?
[12:07:30] augcesar: has joined #RubyOnRails
[12:07:56] sevenseacat: solars: given you've asked how to rewrite it, i think you can see why
[12:08:28] solars: sevenseacat, so in order to give an answer, what do you want me to do?
[12:08:39] sevenseacat: tell me what that code is supposed to do , in simple terms
[12:09:58] Macaveli: has joined #RubyOnRails
[12:10:58] solars: well, I've abstracted out parts of that controller to fetch something, and if it is not there, render an appropriate response. to avoid double rendering I need to return a) from that method and b) in the controller if the method does not return anything in order to halt. This is ugly and this is what I want to avoid
[12:11:20] solars: is that understandable?
[12:11:55] sevenseacat: sigh, we're still using the same "bad example"
[12:12:21] solars: let me change the code
[12:13:03] solars: I've changed it
[12:13:11] solars: it does not return an exception now
[12:13:29] sevenseacat: and it still should
[12:13:36] sevenseacat: so you've made the code worse
[12:13:46] Jeremy1023: has joined #RubyOnRails
[12:13:49] solars: I'm trying to get an answer on the conceptual level
[12:14:05] solars: and I backed my question with working code to illustrate it
[12:14:11] Palsson: has joined #RubyOnRails
[12:14:31] solars: we have scenarios like this, that are more difficult to understand, but they are there
[12:14:58] sevenseacat: honestly, I would not write a single line of that code, so
[12:15:11] solars: so I'ld like to ask people about their practices, how they solve such situations. if raising a custom exception is the best way, or if there are other ways to do it
[12:15:27] solars: sevenseacat, you would not write a single line of that code because of what?
[12:15:33] sevenseacat: because its all bad code
[12:15:49] solars: you did not tell me why, and you did not tell me how to improve it
[12:15:56] solars: so why not start there?
[12:16:56] jonee: has joined #RubyOnRails
[12:17:04] sevenseacat: https://gist.github.com/sevenseacat/24896ee2a0c83eba66af
[12:17:06] ppinkerton: has joined #RubyOnRails
[12:17:48] chipotle: has joined #RubyOnRails
[12:19:04] htmldrum: has joined #RubyOnRails
[12:19:55] solars: and if it's more than a simple find, I assume your suggestion is to use a custom exception and raise it in the application controller method
[12:20:00] solars: that's what I meant
[12:20:09] mjfox: has joined #RubyOnRails
[12:21:03] sevenseacat: what is it then?
[12:21:10] sevenseacat: this is why i told you not to use a bad example
[12:21:26] sevenseacat: because my response changes based on what the code is supposed to do
[12:21:27] solars: I still don't get it
[12:21:29] moeabdol1: has joined #RubyOnRails
[12:21:29] solars: it's not an example
[12:21:36] sevenseacat: then you've got my answer
[12:21:36] abhishekvasisht: has joined #RubyOnRails
[12:21:42] solars: it's an example that is looking for a solution, and you provided a solution
[12:21:50] solars: if I would already know the solution, there is no reason to ask
[12:21:59] solars: which is what you are referring to with bad example
[12:22:53] Macaveli: has joined #RubyOnRails
[12:25:35] ur5us: has joined #RubyOnRails
[12:28:11] mhoungbo: has joined #RubyOnRails
[12:30:35] artto: has joined #RubyOnRails
[12:31:03] jinetix: has joined #RubyOnRails
[12:31:11] hamed_r: has joined #RubyOnRails
[12:32:47] wxdk: has joined #RubyOnRails
[12:33:15] chagel: has joined #RubyOnRails
[12:33:25] jsrn_: has joined #RubyOnRails
[12:33:49] Deck`: has joined #RubyOnRails
[12:36:09] pawnbox: has joined #RubyOnRails
[12:36:23] sashman: has joined #RubyOnRails
[12:37:03] ppinkerton: has joined #RubyOnRails
[12:38:16] akkmaxon: has joined #RubyOnRails
[12:42:45] jenrzzz: has joined #RubyOnRails
[12:42:49] godzillaenlacasa: has joined #RubyOnRails
[12:44:07] hcnewsom: has joined #RubyOnRails
[12:46:21] artto: has joined #RubyOnRails
[12:47:19] Palsson: has joined #RubyOnRails
[12:48:13] lightheaded: has joined #RubyOnRails
[12:48:26] tetraktys: has joined #RubyOnRails
[12:49:22] roamingdog: has joined #RubyOnRails
[12:49:57] roamingdog: has joined #RubyOnRails
[12:53:53] lightheaded: has joined #RubyOnRails
[12:55:23] sp1rs: has joined #RubyOnRails
[12:56:18] artto: has joined #RubyOnRails
[12:56:29] krzkrzkrz: has joined #RubyOnRails
[12:57:11] laith: has joined #RubyOnRails
[12:59:03] ppinkerton: has joined #RubyOnRails
[12:59:48] arup_r: solars: + sevenseacat occupied the whole IRC .. :D
[13:00:21] lightheaded: has joined #RubyOnRails
[13:01:04] flashpoint9: has joined #RubyOnRails
[13:01:08] solars: of course :)
[13:02:00] embasbm: has joined #RubyOnRails
[13:04:07] jeanlinux: has joined #RubyOnRails
[13:04:25] johnflux: has joined #RubyOnRails
[13:04:25] johnflux: has joined #RubyOnRails
[13:04:53] nettoweb: guys here is my nginx.conf which give me an refused connection trying to access my website. (https://gist.github.com/osnysantos/6d00408c886b049f7e4d) I tried to get help in nginx channel but they hate passenger. hehe
[13:06:08] anagha_: has joined #RubyOnRails
[13:06:19] rvanlieshout: i don't tink passenger is related when you get a connection refused
[13:06:34] moeabdol: has joined #RubyOnRails
[13:06:35] rvanlieshout: and include logs
[13:07:56] jottr: has joined #RubyOnRails
[13:09:30] bronson: has joined #RubyOnRails
[13:09:54] scepticulous: Hates_: but that would be a manual process and it would duplicate the strong parameters definition, wouldnt it ?
[13:10:23] uglybandersnatch: has joined #RubyOnRails
[13:10:39] scepticulous: rvanlieshout: the fact that they are part of the pundit policies sounds interesting and similar to what I have thought of.
[13:11:21] bruce_lee: has joined #RubyOnRails
[13:11:26] Guest34101: has joined #RubyOnRails
[13:11:55] blackmesa: has joined #RubyOnRails
[13:12:22] nettoweb: rvanlieshout with refusion connection "access" and error.log dont log nothing
[13:12:51] nettoweb: dont know how to get a log in this case
[13:13:00] rvanlieshout: netstat -rn shows you it's listening?
[13:13:04] rvanlieshout: and to what are you trying to connect?
[13:13:06] rvanlieshout: system firewall enabled?
[13:13:15] bePolite: has joined #RubyOnRails
[13:14:03] Macaveli: has joined #RubyOnRails
[13:14:20] mjfox: has joined #RubyOnRails
[13:14:22] workmad3: nettoweb: and is nginx definitely running? connection refused can also mean nothing is listening on the port
[13:16:01] sp1rs: has joined #RubyOnRails
[13:16:22] nettoweb: I didnt checked. because I just included a new location block and things stop work after restart ngingx. I'll check
[13:16:34] scepticulous: nginx -t is sometimes helpful to make sure the config works. in addition to that, I would also go with netstat or local telnet
[13:17:43] B1n4r10: has joined #RubyOnRails
[13:18:04] nettoweb: I checked and nginx havnt started after my restar, event restart command showing a OK for me
[13:19:06] scepticulous: nettoweb: did you try 'nginx -t', in addition to that, just issue a stop and a start and check if a clean start works
[13:19:28] scepticulous: restart happends to be unreliable on some projects. especially when the cli issues commands to a running process
[13:20:03] nettoweb: nginx -t just show all the commands avalable, right?
[13:20:18] nettoweb: I'll try a stop and start
[13:20:56] uglybandersnatch: has joined #RubyOnRails
[13:21:03] scepticulous: -t should validate your configuration
[13:23:20] nettoweb: Usage: /etc/init.d/nginx {start|stop|status|restart|condrestart|try-restart|reload|force-reload|configtest}
[13:23:43] stuarta: nettoweb: just `nginx -t`
[13:23:50] nettoweb: bash: nginx: command not found
[13:23:50] scepticulous: nettoweb: i didnt say /etc/init ... just 'nginx -t' with no nothing
[13:23:52] Devalo: has joined #RubyOnRails
[13:24:02] nettoweb: bash: nginx: command not found
[13:24:10] stuarta: so add the full path
[13:24:18] nettoweb: I installed nginx from passenger module
[13:24:20] scepticulous: well maybe /usr/sbin/nginx -t ;D or so
[13:24:27] scepticulous: oh well, than the other path
[13:25:34] nettoweb: nginx: the configuration file /opt/nginx/conf/nginx.conf syntax is ok
[13:25:34] nettoweb: nginx: configuration file /opt/nginx/conf/nginx.conf test is successful
[13:28:08] workmad3: nettoweb: now how about something like `sudo service nginx start`?
[13:29:28] artto: has joined #RubyOnRails
[13:30:00] Ropeney: has joined #RubyOnRails
[13:31:25] nettoweb: but the command is working, because after the error and edit again, comment the code, restart ad works instantly
[13:31:51] nettoweb: here is my config
[13:31:52] nettoweb: https://gist.github.com/osnysantos/6d00408c886b049f7e4d
[13:32:11] scepticulous: workmad3: were you able to start nginx with the new location enabled via regular start and not restart ?
[13:32:16] yardenbar: has joined #RubyOnRails
[13:32:28] Ergo: has joined #RubyOnRails
[13:32:38] workmad3: scepticulous: you mean nettoweb right? :)
[13:33:28] nettoweb: scepticulous yes... I restarted but still giving my conection refused
[13:35:15] RTG`: has joined #RubyOnRails
[13:35:25] sonOfRa: has joined #RubyOnRails
[13:40:24] krzkrzkrz: has joined #RubyOnRails
[13:42:12] _Tariq: has joined #RubyOnRails
[13:43:26] roamingdog: has joined #RubyOnRails
[13:44:11] sp1rs: has joined #RubyOnRails
[13:44:57] ornerymoose: has joined #RubyOnRails
[13:46:24] ornerymoose: has left #RubyOnRails: ()
[13:46:54] nettoweb: can you just take a look a my nginx.conf? I think the sintax is correct
[13:46:55] alexhartley: has joined #RubyOnRails
[13:47:35] ornerymoose_: has joined #RubyOnRails
[13:47:54] ornerymoose_: has left #RubyOnRails: ()
[13:48:12] davidpardy: has joined #RubyOnRails
[13:48:19] davidpardy: has left #RubyOnRails: ()
[13:49:21] stuarta: nettoweb: connection refused is either firewall or nginx not started
[13:49:40] ornerymoose: has joined #RubyOnRails
[13:49:54] ornerymoose: has left #RubyOnRails: ()
[13:49:58] stuarta: `netstat -tanp | grep :80` will show you if something is running and listening on port 80
[13:50:06] ornerymoose_: has joined #RubyOnRails
[13:50:09] ornerymoose_: has left #RubyOnRails: ()
[13:50:26] nettoweb: netstat -tanp | grep :80 give me a huge list
[13:51:00] stuarta: | grep LISTEN
[13:52:06] davidpardy: has joined #RubyOnRails
[13:52:17] lightheaded: has joined #RubyOnRails
[13:52:24] eljimmy: has joined #RubyOnRails
[13:52:48] nettoweb: I just update my gist to spot the part that I comment: https://gist.github.com/osnysantos/6d00408c886b049f7e4d
[13:53:05] davidpardy: has left #RubyOnRails: ()
[13:53:17] akshat: has joined #RubyOnRails
[13:55:18] nettoweb: stuarta ok... with the location /foobar {...} the list is empty, commenting it then go back to work
[13:55:30] nettoweb: so... nginx is not listening and not started for some reason
[13:55:44] stuarta: so if you updated the location to `location ~ ^/(articles|portal)(/.*|$)` and change $1 -> $2 in alias and change the passenger_base_uri to $i, in theory it should work
[13:55:49] goodcodeguy: has joined #RubyOnRails
[13:55:55] stuarta: ie. merge the two stanzas
[13:57:00] erry: has joined #RubyOnRails
[13:57:15] stuarta: i say in theory, because i have no way to test it
[13:57:19] erry: hai, stupid question time
[13:57:21] erry: <%= link_to raw("<i class=\"fa fa-chevron-down\"></i>"), { controller: :cart, action: :update, quantity: cart_item.quantity - 1, product_id: cart_item.item_id }, { method: :patch, class: 'reduce-quantity' } if cart_item.quantity > 1 %>
[13:57:27] erry: why is gthat applying neither the method nor the class?
[13:59:20] ramortegui: has joined #RubyOnRails
[14:00:36] deur-: erry: your if statement near the end is ambiguous
[14:00:46] ornerymoose: has joined #RubyOnRails
[14:01:09] ornerymoose: Hi, I’m trying to understand how to understand submitting a blank form in regards to this exception block: https://gist.github.com/ornerymoose/5fb0caba047d0df4b21b . It works ok for invalid phone numbers, but I can’t submit a blank phone_number (it’s like the allow_blank: true in line 8 does nothing).
[14:01:26] deur-: erry: if that conditional is supposed to be applied to the entire link_to, try and use link_to() with parenthesis
[14:01:45] rvanlieshout: ornerymoose: allow_blank is part of the numericality
[14:01:49] deur-: erry: ie. link_to(...) if cart_item.quantity > 1
[14:01:51] rvanlieshout: include it in it's options
[14:03:01] mdw: has joined #RubyOnRails
[14:03:17] deur-: erry: also, you can use html_safe on the icon markup instead of raw(), since that string will never be nil
[14:03:32] arup_r: erry: <%= link_to_if cart_item.quantity > 1, { controller: :cart, action: :update, quantity: cart_item.quantity - 1, product_id: cart_item.item_id }, { method: :patch, class: 'reduce-quantity' } do %> <i class=\"fa fa-chevron-down\"></i> <% end %>
[14:03:47] rvanlieshout: you shouldn't have to use html_safe
[14:03:52] rvanlieshout: use safe_join
[14:04:01] yellow5: has joined #RubyOnRails
[14:04:05] rvanlieshout: or the font awesome helpers
[14:04:07] ornerymoose: rvanlieshout: same behavior though…even though allow_blank is in the numericality options, the behavior ‘defaults’ to the rescue block…ie, submitting a blank phone_number will return “That phone number is not valid.”
[14:04:09] rvanlieshout: fa_icon('chevron-down')
[14:04:26] rvanlieshout: ornerymoose: unless you allow blank?
[14:04:38] arup_r: erry: <%= link_to_if cart_item.quantity > 1, { controller: :cart, action: :update, quantity: cart_item.quantity - 1, product_id: cart_item.item_id }, { method: :patch, class: 'reduce-quantity' } do %> <i class="fa fa-chevron-down"></i> <% end %>
[14:04:47] ornerymoose: sorry yes let me specify: users should be ALLOWED to submit a blank phone number
[14:04:48] erry: arup_r, just tried that
[14:04:50] arup_r: there was a typo in last one
[14:04:55] CornishPasty: wait is it really erry?
[14:04:58] rvanlieshout: ornerymoose: so a allow_blank: true in that hash doesn't work?
[14:05:18] erry: arup_r, http://paste.scsys.co.uk/506306 is what it generates
[14:05:21] rvanlieshout: erry: link_to_if cart_item.quantity > 1, fa_icon('chevron-down'), { controller...
[14:05:23] erry: CornishPasty, no, i'm a figment of your imagination
[14:05:34] erry: rvanlieshout, yeah just tried that
[14:05:42] rvanlieshout: that's exactly what is should produce
[14:05:43] ornerymoose: rvanlieshout: correct. validates :phone_number, numericality: {only_integer: true, allow_blank: true} …if i submit a blank phone number in the form, I’ll get back ‘That phone number is not valid.’
[14:05:43] rvanlieshout: what would you expect?
[14:05:52] erry: wait something's off with iut
[14:06:03] rvanlieshout: ornerymoose: oh that's weird
[14:06:21] ornerymoose: Maybe. I’m a noob with begin/rescue so I’m not fully understanding that aspect really
[14:06:25] rvanlieshout: ornerymoose: ah
[14:06:26] rvanlieshout: it's allow_nil
[14:06:31] rvanlieshout: http://api.rubyonrails.org/classes/ActiveModel/Validations/HelperMethods.html#method-i-validates_numericality_of
[14:07:40] erry: the reduce-quantity class isn't being applied
[14:08:04] erry: tejh button's class is just update_quantityu
[14:08:08] arup_r: erry: yeah.. that is how link_to_if works. so you need link_to with a vaniall if check
[14:08:27] mjfox: has joined #RubyOnRails
[14:08:32] arup_r: Creates a link tag of the given name using a URL created by the set of options if condition is true, *otherwise only the name is returned.*
[14:08:42] arup_r: that is why you got the font icon there..
[14:08:56] arup_r: so use `link_to` .. not the one I said earlier
[14:09:02] erry: sorry my rails knowledge is well0
[14:09:21] erry: supposed to be doing frontend work on this thing but i need to change this class name
[14:09:44] rvanlieshout: the class of what? there is no link
[14:09:51] erry: the button
[14:09:52] rvanlieshout: the class of that <i>-thing?
[14:10:08] erry: <button class="update-quantity">
[14:10:17] IFrank00: has joined #RubyOnRails
[14:10:18] rvanlieshout: that's the only html that line produces
[14:10:19] erry: unless i'm miunderstanding how this thing works?
[14:10:47] erry: http://paste.scsys.co.uk/506307
[14:10:52] SeanLazer: has joined #RubyOnRails
[14:10:53] rvanlieshout: you shouldn't be using link_to if you want to generate a button tag
[14:10:59] erry: http://paste.scsys.co.uk/506307?wr=on&submit=Format+it%21
[14:11:12] erry: why is that generating a button tag then
[14:11:20] rvanlieshout: because of the method
[14:11:27] flashpoint9: has joined #RubyOnRails
[14:11:31] rvanlieshout: but. have to go now
[14:11:40] erry: should i use button_to?
[14:11:56] erry: It was link_to to begin with!
[14:12:01] erry: maybe i need to ask the backend dev what's going on xD
[14:12:14] rvanlieshout: and what they really expect
[14:12:17] rvanlieshout: but. back monday
[14:12:23] ornerymoose: rvanlieshout: This is a bit strange…https://gist.github.com/ornerymoose/5fb0caba047d0df4b21b so if I comment out line 4 and the mobile_phone_number method, I can submit a blank phone_number using allow_blank. But if leave the gist as is (no code uncommented), the validates_numericality_of gets overwritten. Why would that be?
[14:12:24] erry: thanks for your help anyway
[14:12:32] sp1rs: has joined #RubyOnRails
[14:12:42] rvanlieshout: ornerymoose: allow_nil
[14:12:50] ornerymoose: Right I tried that. No go though
[14:13:23] rvanlieshout: ok. that sucks then. you might want to check something in validates_numericality-method and see if that works
[14:13:40] ornerymoose: for sure. Appreciate your time
[14:14:20] ppnlo: has joined #RubyOnRails
[14:14:24] ppnlo: has left #RubyOnRails: ()
[14:14:52] robbyoconnor: has joined #RubyOnRails
[14:15:26] ppinkerton: has joined #RubyOnRails
[14:15:45] artto: has joined #RubyOnRails
[14:16:54] jetpack_joe: has joined #RubyOnRails
[14:17:14] vedu: Hello. I am getting an error while trying to implement a before_filter in a controller/concern. Full code and error: https://gist.github.com/vedant1811/b47e1eaba86861af4624#file-concern-rb-L5
[14:17:25] vedu: The method is right there, can
[14:17:41] vedu: ...can't understand why rails can't find it
[14:18:56] tetraktys: has joined #RubyOnRails
[14:22:05] sinkensabe: has joined #RubyOnRails
[14:25:36] openstruct: has joined #RubyOnRails
[14:27:15] sankaber: has joined #RubyOnRails
[14:28:26] jottr: has joined #RubyOnRails
[14:28:58] adre: has joined #RubyOnRails
[14:30:58] bronson: has joined #RubyOnRails
[14:30:59] baweaver: has joined #RubyOnRails
[14:31:34] arup_r: vedu: try my comment
[14:32:18] artto: has joined #RubyOnRails
[14:32:38] vedu: arup_r: yes I just did that. but then I get an error: undefined local variable or method `request' for SessionsController:Class
[14:33:07] lightheaded: has joined #RubyOnRails
[14:33:28] sashman: has joined #RubyOnRails
[14:33:47] CodaBrink: has joined #RubyOnRails
[14:34:00] yardenbar: has joined #RubyOnRails
[14:34:02] arup_r: show the code now,, from where that error pops up? line number. But you made a progress now, as the error is changed..
[14:34:07] vedu: arup_r: I updated the gist: https://gist.github.com/vedant1811/b47e1eaba86861af4624
[14:34:33] CodaBrink: What's the best way to sanitize an interpolated SQL string?
[14:34:50] CodaBrink: I'm on Rails 5
[14:34:53] neohunter: has joined #RubyOnRails
[14:34:54] sandstrom: has joined #RubyOnRails
[14:35:13] workmad3: codabrink: don't interpolate SQL
[14:35:44] CodaBrink: workmad3 do you have an example of the best way to build an sql string?
[14:35:48] workmad3: codabrink: also, once it's interpolated, you can't sanitize... you *must* sanitize before interpolation, and if you're having to ask how to do it, you *will* get it wrong
[14:35:51] arup_r: ok.. vedu, seems `request` method is not visible inside the concerns.
[14:36:17] workmad3: codabrink: use the AR mechanisms to build a query
[14:36:50] vedu: arup_r: yeah naturally. The variable is initialized when an actual request is being processed. Its an instance variable rather than a class variable
[14:37:06] CodaBrink: It's not a simple query.
[14:37:15] workmad3: codabrink: AR can handle pretty complicated queries
[14:37:16] arup_r: no, I am wrong.. let me see it again
[14:37:31] polishdub: has joined #RubyOnRails
[14:37:58] fedorov5432: has joined #RubyOnRails
[14:38:45] workmad3: vedu: why are you making `authorize_client!` a class method in your concern?
[14:39:16] arup_r: because his previous attempted reported no such method exist
[14:39:26] workmad3: arup_r: right, because he didn't pass a symbol to `before_filter` ;)
[14:39:51] workmad3: he's trying to pass the result of calling `authorize_client!` to `before_filter` when the concern is included
[14:39:55] nettoweb: has joined #RubyOnRails
[14:40:04] workmad3: vedu: ^ do you follow that?
[14:40:06] arup_r: I overlooked
[14:40:15] vedu: workmad3: yes :)
[14:40:19] arup_r: vedu: fallback to old code
[14:40:28] arup_r: add the symbol
[14:40:33] CodaBrink: Thanks workmad3
[14:40:41] arup_r: OMG!.. what happened to my eyes..
[14:41:12] vedu: workmad3: wow some eyesight you have ;-)
[14:41:24] vedu: both me and arup_r overlooked it
[14:41:52] workmad3: vedu: I trust github's syntax highlighting... and the colour of `authorize_client!` was wrong ;)
[14:42:12] workmad3: (also, your stacktrace was coming from `include`)
[14:42:19] arup_r: ACTION considered vedu is ok on that part.. :)
[14:42:55] arup_r: ACTION need a good eye test
[14:42:58] vedu: workmad3: true. I am using ruby mine that has syntax highlighting as well. But still missed it
[14:43:19] vedu: arup_r: I think we just had our eyes tested ;-)
[14:43:46] arup_r: yes.. that was the start
[14:43:49] workmad3: vedu: heh :) I also spent a good chunk of my first 2 years coding professionally trying to track down memory leaks in symbian programs... you get good at spotting these things when you're doing it all day
[14:44:42] vedu: workmad3: By the trace, I was so sure that I missed spelt something. but then the spelling was correct so I dropped the idea
[14:45:20] sashman_: has joined #RubyOnRails
[14:46:02] sankaber: has joined #RubyOnRails
[14:46:03] workmad3: vedu: it happens ;) only thing I can recommend is if something seems confusing, try to notice and figure out why, rather than starting to change code straight away
[14:46:28] silverdust: How can I log the value of a variable in my server console while debugging in controller or model?
[14:46:38] workmad3: and making a before_filter a class method rang my 'wait, what?' confusion bell majorly ;)
[14:47:25] arup_r: silverdust: logger.debug "here we go"
[14:47:25] vedu: workmad3: I do do it. I had a similar model concern that was working perfect. I was comparing this with that one but I still missed the fact that I missed a colon and the colors are incorrect :D
[14:47:35] scope: has joined #RubyOnRails
[14:49:31] scope: hi i have a question how come rails wont automatically add the controller_test.rb files ???
[14:50:43] sevenseacat: scope: add them where?
[14:50:44] scope: when i use generate controller static_pages home help
[14:50:55] ferr: Why none of these work? Both values does not change https://gist.github.com/Fercell/adf36d156e8ce8f67d80
[14:51:25] sevenseacat: how can Accident.count change Accident.count?
[14:52:03] pawnbox: has joined #RubyOnRails
[14:52:08] arup_r: what do you mean /
[14:52:11] scope: im trying to find the test page but its not in the test file or the app/controller file
[14:52:41] jottr: has joined #RubyOnRails
[14:52:46] pawnbox: has joined #RubyOnRails
[14:52:59] Peteykun: has joined #RubyOnRails
[14:54:16] underplank: has joined #RubyOnRails
[14:55:01] mary5030: has joined #RubyOnRails
[14:55:24] sashman: has joined #RubyOnRails
[14:55:32] Frem: has joined #RubyOnRails
[14:55:33] ferr: sevenseacat: so how should I do it lol
[14:56:33] sevenseacat: ferr: https://relishapp.com/rspec/rspec-expectations/v/3-4/docs/built-in-matchers/change-matcher
[14:56:45] FooMunki: has joined #RubyOnRails
[14:57:20] herminiotorres: has joined #RubyOnRails
[14:57:58] drbayer: has joined #RubyOnRails
[14:59:47] dideler: has joined #RubyOnRails
[15:00:50] dideler: i'm unable to get a link to be rendered in a flash message. using rails 4.2.5.1 and have tried every method i've come across online
[15:01:05] stannard: has joined #RubyOnRails
[15:01:43] mary5030_: has joined #RubyOnRails
[15:02:34] mjfox: has joined #RubyOnRails
[15:02:51] dideler: my last attempt was `flash[:success] = "foo #{view_context.link_to('Tokens', tokens_path)}".html_safe`
[15:03:12] dideler: which results in a flash message of "foo <a href="/tokens">Tokens</a>"
[15:04:12] sevenseacat: you need to mark it safe when you render it, not when you store it
[15:04:37] dideler: sevenseacat: thanks, that works!
[15:04:39] sevenseacat: however, make sure you're never ever going to put anything user-provided in it if you're going to do that
[15:04:56] stannard: has joined #RubyOnRails
[15:04:56] sevenseacat: becuase that would open up a decent security hole
[15:04:56] bricker: has joined #RubyOnRails
[15:07:46] reckoner: has joined #RubyOnRails
[15:09:07] godzillaenlacasa: has joined #RubyOnRails
[15:10:49] Earthnail: has joined #RubyOnRails
[15:12:41] mary5030: has joined #RubyOnRails
[15:14:11] Earthnail: Hi there. I have a use case where different users put objects in my database, and they choose the ID. IDs are unique within a users' objects, but different uses can choose the same IDs. Because my users don't need to know that detail, I want to simply serve them JSON that looks like { object: { id: 'usergeneratedid', foo: 'bar', ... } }. One option is to always map the id to a model field like Model.user_generated_id, but that's cumbe
[15:14:11] Earthnail: rsome, as a lot of Rails magic relies on naming conventions (like using Model.create(model_params)). The other option is to rename the internal primary key, as it is never shown to the outside. I found http://api.rubyonrails.org/classes/ActiveRecord/AttributeMethods/PrimaryKey/ClassMethods.html#method-i-primary_key-3D , but I was wondering whether using it is frowned upon?
[15:14:37] polishdub: has joined #RubyOnRails
[15:16:24] czerasz: has joined #RubyOnRails
[15:16:58] CodaBrink: Earthnail You allow the users to set the ID?
[15:17:28] sevenseacat: what can possibly go wrong
[15:17:43] Earthnail: codabrink: basically, "users" are content providers. They all provide content, and they all have their own internal ID system to index that content, and I would like them to be able to keep their internal IDs when operating with my API
[15:17:54] Earthnail: (B2B use case)
[15:18:09] sevenseacat: they can do that, but that should not be your primary key
[15:18:20] Earthnail: sevenseacat: agreed.
[15:18:48] pipework: I often call that some kind of 'ref'
[15:18:58] pipework: Either customer_ref, ref, or something like that.
[15:19:19] CodaBrink: Just create an indexed alternate_id column and scope the items by organization when querying.
[15:19:29] Earthnail: codabrink: yes, absolutely
[15:19:36] sevenseacat: i like that, i always struggle to name those fields, usually i call it 'external_id' or something
[15:19:47] Earthnail: pipework: I like ref, too. I'll think about it.
[15:19:52] ddv: I named mine 'key'
[15:19:56] pipework: It's somewhat HTTP friendly.
[15:20:02] ddv: naming things is hard
[15:20:33] Earthnail: Nevertheless, what if I wanted to call the outside ID "id"? I could create an internal primary key called "uid", for example, and then say Model.primary_key = :uid. I just wonder whether that's good practice.
[15:20:45] sevenseacat: Earthnail: don't.
[15:20:48] pipework: Earthnail: Yeah then your routes would need to rename the param :id to something else.
[15:20:57] sevenseacat: you can present the ref to the outside world as id.
[15:21:08] sevenseacat: when generating the API responses
[15:21:10] Earthnail: pipework: my routes take the `ref`
[15:21:38] Earthnail: sevenseacat: that's what I'm currently doing, but the attribute renaming breaks a lot of rails magic
[15:21:44] pipework: If you're just using the ref as the param rather than the ID, you can change the routes to use ref instead of ID, but it only matters when you're doing neat stuff like find_by with strong params/
[15:21:53] sevenseacat: huh? renaming what breaks what?
[15:22:01] Earthnail: well, find_by with strong params, for example :D
[15:22:15] adre: has joined #RubyOnRails
[15:22:49] pipework: Earthnail: You're already good on renaming the param, right?
[15:22:52] pipework: I woke up recently.
[15:23:02] pipework: Been watching a gif loop for about 1.25 hours
[15:23:24] pipework: Renaming in the routes from id to ref, that is.
[15:23:57] sevenseacat: ACTION not sure what problem is going on now
[15:24:26] pipework: sevenseacat: I think he's getting requests where `id: ref` where ref is the ref, but he wants `ref: ref` in the params.
[15:24:34] sevenseacat: thats easy to do
[15:25:30] Devalo: has joined #RubyOnRails
[15:25:34] KensoDev: has joined #RubyOnRails
[15:25:53] Earthnail: Well, everytime I serialize something from and to JSON, I also have to rename id<->ref.
[15:26:05] pipework: Serializers.
[15:26:14] Earthnail: It's not particularly complicated, it just didn't seem exactly right.
[15:26:29] B1n4r10: has joined #RubyOnRails
[15:26:52] Earthnail: most things, like ActiveModel::Serializer's nice methods, rely on the names being identical.
[15:26:57] diegoviola: has joined #RubyOnRails
[15:28:18] Deck`: has joined #RubyOnRails
[15:28:46] lacrymology: has joined #RubyOnRails
[15:29:01] pipework: Earthnail: which names being identical?
[15:29:14] pipework: They don't depend on anything, they just have some extra easy cheap fun magic for you.
[15:29:26] pipework: You can use any serializer with any object that duck types according to the serializer's need.
[15:30:08] snowy: has joined #RubyOnRails
[15:30:15] pipework: If the automagic hooking up of model and serializer isn't working quite right, there's always just the normal interface. https://github.com/rails-api/active_model_serializers/tree/0-9-stable#render-independently
[15:30:51] pipework: It's just a number of small tweaks, I've done similar things myself.
[15:31:14] Earthnail: pipework: yes, indeed. I know I can do everything manually, but I'd love to have the magic working
[15:31:26] pipework: Earthnail: That's possible, I've had it all working fine.
[15:31:45] pipework: You can too, but we can't help with code we haven't seen yet!
[15:32:50] kies^: has joined #RubyOnRails
[15:33:09] bePolite: has joined #RubyOnRails
[15:34:52] alevy: has joined #RubyOnRails
[15:37:52] sandstrom: has joined #RubyOnRails
[15:38:27] pawnbox: has joined #RubyOnRails
[15:39:23] jas02: has joined #RubyOnRails
[15:39:48] bricker: has joined #RubyOnRails
[15:40:32] arthurix: has joined #RubyOnRails
[15:42:43] snowy: has joined #RubyOnRails
[15:43:55] norc: has joined #RubyOnRails
[15:44:00] norc_: has joined #RubyOnRails
[15:44:33] goodcodeguy: has joined #RubyOnRails
[15:45:28] B1n4r10: has joined #RubyOnRails
[15:45:50] humbledaisy: has joined #RubyOnRails
[15:47:16] DEA7TH: If I need shared state for the current server only, is it better to write it to a file or to use dollar sign variables?
[15:47:51] DEA7TH: (across different requests)
[15:49:52] moeabdol: has joined #RubyOnRails
[15:51:50] Jon30: Radar: Passenger's Changelog: Fixed a race condition while determining what user an application should be executed as. This bug could lead to applications being run as the wrong user. Closes GH-1241.
[15:51:58] alex88: has joined #RubyOnRails
[15:52:54] Devalo: has joined #RubyOnRails
[15:52:58] pawnbox: has joined #RubyOnRails
[15:53:13] dopamean_: has joined #RubyOnRails
[15:53:18] arup_r: has joined #RubyOnRails
[15:55:34] Rodya_: has joined #RubyOnRails
[15:56:00] pinkerton: has joined #RubyOnRails
[16:00:48] beingjohnm: total n00b question but how exactly do I use this method (http://www.rubydoc.info/gems/thinreports/Thinreports/Core/Shape/List/Manager#overflow_with%3F-instance_method)? I need to be able to tell if my list has overflowed one page and thus automatically created another as there are some things I only one to show on page one of the report.
[16:01:23] chouhoulis: has joined #RubyOnRails
[16:02:03] beingjohnm: I think I'm getting lost on it being an instance method
[16:02:08] mbreedlove: has joined #RubyOnRails
[16:03:04] CodaBrink: beingjohnm Do you know the difference between instance and class methods?
[16:03:15] bricker: has joined #RubyOnRails
[16:04:28] flashpoint9: has joined #RubyOnRails
[16:04:38] beingjohnm: codabrink: maybe. An instance method is when you create a new instanc eof something then you can use it. So, report.new.instance_method
[16:06:50] CodaBrink: Right, creating an instance of a class gives you access to all of the instance methods. Class methods can be called straight on the class.
[16:06:54] beingjohnm: I'm trying to do something like this: "report.list.overflow_with?(:header): false do |list|"
[16:08:27] CodaBrink: What error does it give when you try?
[16:09:18] beingjohnm: "unexpected ':', expecting keyword_end report.list.overflow_with?(:header): false do |list| "
[16:10:16] nogic: has joined #RubyOnRails
[16:10:25] CodaBrink: the ':' on the end of 'header):' shouldn't be there.
[16:11:31] beingjohnm: "unexpected keyword false"
[16:12:14] CodaBrink: Ha, yes. The whole end of that line seems weird syntactically. Can I see your code?
[16:13:34] beingjohnm: I was thinking I was supposed to use seomthing like this "report.layout.config.list(:advanced_list) do" and then put the "overflow_with?(:header) => false" inside of that but that isn't working either. https://gist.github.com/hidakatsuya/1150970
[16:14:28] nettoweb: has joined #RubyOnRails
[16:14:29] beingjohnm: codabrink: code is messy from trying so many things: https://gist.github.com/willjohnson/a3c505ef4a1e5d24baba
[16:14:44] Rodya_: has joined #RubyOnRails
[16:15:33] beingjohnm: the page_count thing doesn't work
[16:16:34] DoctorMonocular: has joined #RubyOnRails
[16:16:42] alexishuard: has joined #RubyOnRails
[16:16:42] CodaBrink: Why not just do an `if !report.list.overflow_with?(:header)`?
[16:18:19] beingjohnm: codabrink: so it is a test rather than something I can set?
[16:18:39] beingjohnm: that might explain some things...
[16:18:54] disgrntld: has joined #RubyOnRails
[16:20:11] safetypin: has joined #RubyOnRails
[16:21:16] CodaBrink: overflow_with? returns a boolean. What you were trying to do was something completely different. After you fix that, give this a read: http://mixandgo.com/blog/mastering-ruby-blocks-in-less-than-5-minutes
[16:22:21] Rodya_: has joined #RubyOnRails
[16:22:25] beingjohnm: will do. The limited examples on this don't seem to include anything on instance methods.
[16:22:28] beingjohnm: codabrink: thanks
[16:23:33] rubyonrailed: has joined #RubyOnRails
[16:27:03] Scient: why on earth did cap v3 change the server definitions to where you need to set the user on every single host
[16:27:06] Scient: that is so retarded...
[16:27:35] baweaver: has joined #RubyOnRails
[16:28:25] mag42c: has joined #RubyOnRails
[16:31:22] codepete: has joined #RubyOnRails
[16:31:53] sonofdirt: has joined #RubyOnRails
[16:35:17] emachnic: has joined #RubyOnRails
[16:36:04] 16WAAFFZ3: has joined #RubyOnRails
[16:36:24] joshkovach: has joined #RubyOnRails
[16:36:29] IrishGringo: has joined #RubyOnRails
[16:37:40] wldcordeiro: has joined #RubyOnRails
[16:37:54] jhn: has joined #RubyOnRails
[16:39:02] syf-revk: has joined #RubyOnRails
[16:39:56] cac: has joined #RubyOnRails
[16:41:08] underplank: has joined #RubyOnRails
[16:42:38] fluxsource: has joined #RubyOnRails
[16:43:28] wxdk2: has joined #RubyOnRails
[16:44:09] herminiotorres: has joined #RubyOnRails
[16:45:39] Macaveli: has joined #RubyOnRails
[16:47:35] Hans267: has joined #RubyOnRails
[16:48:17] qejk: has joined #RubyOnRails
[16:48:47] rogue_koder: has joined #RubyOnRails
[16:48:57] dionysus69: has joined #RubyOnRails
[16:49:34] fedexo: has joined #RubyOnRails
[16:51:14] mbreedlove: has joined #RubyOnRails
[16:54:35] rafaelfranca: has joined #RubyOnRails
[16:55:30] banister: has joined #RubyOnRails
[16:57:52] jenrzzz: has joined #RubyOnRails
[16:58:25] NeoHamled: has joined #RubyOnRails
[16:58:49] Deck`: has joined #RubyOnRails
[17:00:10] DoctorMonocular: has joined #RubyOnRails
[17:00:11] ferr: Rails in production not loading some of js files, what could be the issue?
[17:00:15] diegoviola: has joined #RubyOnRails
[17:00:35] pixelhandler: has joined #RubyOnRails
[17:01:06] safety_cut: has joined #RubyOnRails
[17:02:25] safety_cut: has joined #RubyOnRails
[17:03:39] darkxploit: has joined #RubyOnRails
[17:04:47] beingjohnm: ferr: you precompiled them? and they are inluded them in initializers/assets.rb?
[17:05:16] DoctorMonocular: has joined #RubyOnRails
[17:06:01] Pazician_: has joined #RubyOnRails
[17:06:10] godzillaenlacasa: Anyone know what to do with this error: PG::ConnectionBad: FATAL: remaining connection slots are reserved for non-replication superuser connections
[17:06:18] godzillaenlacasa: using Amazon RDS
[17:06:22] ql6wlld: has joined #RubyOnRails
[17:09:22] jottr: has joined #RubyOnRails
[17:09:58] fryguy: godzillaenlacasa: increase number of connections allowed
[17:10:31] godzillaenlacasa: @fryguy where, on RDS?
[17:11:28] Deck-: has joined #RubyOnRails
[17:11:30] chouhoul_: has joined #RubyOnRails
[17:12:18] bbrowning_: has joined #RubyOnRails
[17:12:23] iamvery_: has joined #RubyOnRails
[17:13:01] waseem__: has joined #RubyOnRails
[17:13:11] rickmasta: has joined #RubyOnRails
[17:13:21] deavidsedice: has joined #RubyOnRails
[17:13:33] jtdowney_: has joined #RubyOnRails
[17:13:47] joeytwiddle_: has joined #RubyOnRails
[17:14:15] Lorn_: has joined #RubyOnRails
[17:14:16] gbailey-: has joined #RubyOnRails
[17:14:23] anirban: has joined #RubyOnRails
[17:14:28] neanderslob_: has joined #RubyOnRails
[17:14:51] workmad3: godzillaenlacasa: or reduce the number of connections you're using
[17:15:10] tw1sted_: has joined #RubyOnRails
[17:15:16] a1fa_: has joined #RubyOnRails
[17:15:30] siksi: has joined #RubyOnRails
[17:15:38] ereslibre: has joined #RubyOnRails
[17:15:38] ereslibre: has joined #RubyOnRails
[17:15:48] PaulePan1er: has joined #RubyOnRails
[17:15:50] cfloare_: has joined #RubyOnRails
[17:15:51] fluxsour1e: has joined #RubyOnRails
[17:15:55] janno_: has joined #RubyOnRails
[17:15:55] mc_fail_: has joined #RubyOnRails
[17:15:56] hendrici1s: has joined #RubyOnRails
[17:16:02] sunya7a__: has joined #RubyOnRails
[17:16:06] kaspergr1bbe: has joined #RubyOnRails
[17:16:06] mbreedlove: has joined #RubyOnRails
[17:16:29] jbermudes_: has joined #RubyOnRails
[17:16:30] Guest12896_: has joined #RubyOnRails
[17:16:58] Pro|_: has joined #RubyOnRails
[17:17:22] arup_r: has joined #RubyOnRails
[17:17:40] Mch1: has joined #RubyOnRails
[17:17:52] thorgi_: has joined #RubyOnRails
[17:17:53] eyck_: has joined #RubyOnRails
[17:18:39] AntiSpamMeta: has joined #RubyOnRails
[17:19:07] aujt74_: has joined #RubyOnRails
[17:19:11] AzaToth: has joined #RubyOnRails
[17:19:33] pragmatism_: has joined #RubyOnRails
[17:19:46] USvER: has joined #RubyOnRails
[17:19:54] kies^: has joined #RubyOnRails
[17:20:03] sudoubuntu: has joined #RubyOnRails
[17:20:19] USvER: how to get current rack "app" that we have in midleware from a controller?
[17:20:25] martinbjeldbak_: has joined #RubyOnRails
[17:20:26] urkle-: has joined #RubyOnRails
[17:20:30] _fortis_: has joined #RubyOnRails
[17:20:31] Sigma01: has joined #RubyOnRails
[17:20:33] DoctorMonocular: has joined #RubyOnRails
[17:20:49] swistak35_: has joined #RubyOnRails
[17:20:50] teaearlgraycold: has joined #RubyOnRails
[17:20:51] webdestroyaz: has joined #RubyOnRails
[17:21:13] Zackio: has joined #RubyOnRails
[17:21:23] Haydos: has joined #RubyOnRails
[17:21:25] segy: has joined #RubyOnRails
[17:21:30] dcope: has joined #RubyOnRails
[17:21:32] maxmanders: has joined #RubyOnRails
[17:21:36] Denarii: has joined #RubyOnRails
[17:21:42] USvER: like current app we are in?
[17:21:47] kitallis: has joined #RubyOnRails
[17:21:53] philtr: has joined #RubyOnRails
[17:22:11] USvER: basicaly the rails app... =)
[17:22:20] queequeg1: has joined #RubyOnRails
[17:22:26] eduardodeoh: has joined #RubyOnRails
[17:22:28] workmad3: USvER: when you're in a controller, the current rack app *is* the controller
[17:22:43] enkristoffer: has joined #RubyOnRails
[17:22:45] Brando753: has joined #RubyOnRails
[17:23:16] workmad3: USvER: or do you mean you want to peek at the entire middleware stack while in a controller?
[17:23:24] USvER: So self.call(env) will run this request again?
[17:23:48] arthurnn: has joined #RubyOnRails
[17:23:56] USvER: Recursively ofc
[17:24:04] CodaBrink: That sounds like something that you don't want to do.
[17:24:09] cpruitt: has joined #RubyOnRails
[17:24:25] USvER: But that will work? Nice )
[17:24:40] apeiros: has joined #RubyOnRails
[17:24:59] CodaBrink: Not that I'm aware
[17:25:28] adaedra: Maybe if you try to explain what you're trying to do that ended in such an idea, we can help find a solution?
[17:25:56] adaedra: Because what you're describing sounds wrong from all sides
[17:25:58] USvER: Spawn "virtual" request to the curent rails app
[17:26:10] USvER: From a controller...
[17:26:16] CodaBrink: Are you testing?
[17:26:22] CodaBrink: Are you writing tests?
[17:26:33] uglybandersnatch: has joined #RubyOnRails
[17:26:42] djellemah: has joined #RubyOnRails
[17:26:51] USvER: But if i do? Is there helper i can learn from?
[17:26:52] Bugson: has joined #RubyOnRails
[17:26:58] cpruitt: Starting a new project that will deal with MLS data. I have an early concern that the total data set for each record is going to be larger than Postgres can store in a single row. Does anyone have any thoughts / experience with similar and can you point me to the right material to read up on a strategy to work with that much data?
[17:27:31] embasbm_: has joined #RubyOnRails
[17:27:31] Veejay: has joined #RubyOnRails
[17:27:34] USvER: cpruitt, do you work with Shawn Whitaker?
[17:27:41] arup_r: has joined #RubyOnRails
[17:27:44] kies: has joined #RubyOnRails
[17:27:57] USvER: cpruitt, i mean do you know him?
[17:28:09] cpruitt: USvER: No, sorry I do not.
[17:28:40] USvER: cpruitt, ok, sr
[17:28:52] CodaBrink: Short answer is controller methods should _not_ be calling public controller methods..
[17:29:00] ErhardtMundt: has joined #RubyOnRails
[17:29:49] sekrit: has joined #RubyOnRails
[17:29:54] agit0: has joined #RubyOnRails
[17:30:05] USvER: codabrink, but if i want... Controller.new.dispatch is not working for me
[17:30:51] USvER: Manualy instatiating controller does not geve me what i want
[17:31:18] CodaBrink: Issue a get request on the route mapped to the controller method?
[17:31:58] goku`: has joined #RubyOnRails
[17:32:26] USvER: Like a proxy? It's an idea, but then i need to pass session with all cookies etc... alot of pain
[17:32:29] CodaBrink: The answer to your question isn't simple for a reason
[17:32:41] bronson: has joined #RubyOnRails
[17:33:11] Maletor: has joined #RubyOnRails
[17:33:12] USvER: God does not love me =\
[17:33:32] adaedra: Why are you doing this?
[17:34:30] USvER: Basicaly to draw controller actions as a windgets and not standalone pages
[17:35:06] ornerymoose: has joined #RubyOnRails
[17:35:12] CodaBrink: You mean you want to make a single page app?
[17:35:28] USvER: serverside :D
[17:35:49] CodaBrink: A server side single page app?
[17:35:50] USvER: I wan a controller that is able to compose other controllers actions
[17:36:26] USvER: Now you will ask why i cant render their views )
[17:36:28] netzfisch: has joined #RubyOnRails
[17:37:01] replay: has joined #RubyOnRails
[17:37:43] replay: has joined #RubyOnRails
[17:37:45] USvER: Ofc i can make my Widgets as really thick Templates and render them... but it's not what i want...
[17:37:49] emachnic: has joined #RubyOnRails
[17:38:26] USvER: Or i can duplicate code all over the place in different controllers or extract it to utility class
[17:38:43] USvER: Yeah alot of ways...
[17:39:00] herminiotorres: has joined #RubyOnRails
[17:39:33] CodaBrink: What's the supposed advantage of trying to program your app this way?
[17:40:22] IFrank00: Im having this problem with test https://gist.github.com/Frank004/cff05dfca49ede8c9831 I add it a DatabaseCleaner.clean_with :truncation in the wrong place and then got this stuck test and now can't run test
[17:40:29] USvER: Make my app DRY?
[17:40:47] ElFerna_: has joined #RubyOnRails
[17:40:52] emachnic: has joined #RubyOnRails
[17:41:17] USvER: Right now im just duplicating things from action to action
[17:41:23] CodaBrink: You can make a DRY app without doing whatever you're trying to do..
[17:41:35] DoctorMonocular: has joined #RubyOnRails
[17:42:28] CodaBrink: Rails is inherently designed to be DRY.
[17:42:44] USvER: Ok will try to explain, maybe i'm just missing something =\
[17:44:09] rubyonrailed: has joined #RubyOnRails
[17:44:10] DoctorMonocular: has joined #RubyOnRails
[17:44:50] DoctorMonocular: has joined #RubyOnRails
[17:44:56] wxdk: has joined #RubyOnRails
[17:45:25] arBmind: has joined #RubyOnRails
[17:45:48] kdough: has joined #RubyOnRails
[17:48:14] alexhartley: has joined #RubyOnRails
[17:48:21] blackmesa: has joined #RubyOnRails
[17:48:37] benlieb: has joined #RubyOnRails
[17:49:04] benlieb: I'm trying to stub an attr_reader in active record with rspec: expect_any_instance_of(PaypalIpn).to receive(:postback_response).and_return('VERIFIED')
[17:49:11] benlieb: PaypalIpn does not implement #postback_response
[17:49:17] benlieb: but it DOES
[17:49:45] netzfisch: has joined #RubyOnRails
[17:50:06] benlieb: an rspec stub attributes?
[17:50:43] marr: has joined #RubyOnRails
[17:50:44] USvER: codabrink, Let's say we have two models that have One-To-Many relation, and i want to manage this relation the same way i see them on their respective controler index actions...
[17:51:07] KensoDev: has joined #RubyOnRails
[17:51:43] USvER: codabrink, On the index action of model i have alot of filtering\sorting\ACL handling etc
[17:52:20] USvER: codabrink, and i dont want to reuse this
[17:52:37] USvER: codabrink, i want* to reuse it
[17:54:14] USvER: codabrink, i don't see how i can elegantly abstract "filtering\sorting\ACL handling" from controller to another entity, because than controller is empty and do nothing, just rendering a view
[17:54:41] USvER: so maybe i'm missing something...
[17:55:11] uris: has joined #RubyOnRails
[17:55:17] adavia: has joined #RubyOnRails
[17:55:36] dopamean_: has joined #RubyOnRails
[17:56:06] USvER: One possible solution is to make "thick" views with all the filtering etc...
[17:56:41] USvER: Logic in views... nice :D
[17:57:22] CodaBrink: USvER http://railscasts.com/episodes/228-sortable-table-columns
[17:57:41] USvER: Another way is to make utility classes... alot better...
[17:58:06] USvER: But still controller will be empty and will not server the purpose
[17:58:09] benlieb: can anyone help?
[17:59:03] VeryBewitching: has joined #RubyOnRails
[17:59:36] codepete: has joined #RubyOnRails
[17:59:46] alexishuard: has joined #RubyOnRails
[18:00:51] USvER: codabrink, my question is how i can render those table with sorting in different controller?
[18:01:29] ferr: I have 6 checkboxes which should be remember for user, what would be the most easiest way to solve this issue? Cookies?
[18:01:52] CodaBrink: benlieb reopen the class and def postback_response 'VERIFIED' end
[18:02:24] benlieb: codabrink: that's a good idea.
[18:02:42] dopamean_: has joined #RubyOnRails
[18:02:46] benlieb: codabrink: I'm a bit surprised that rspec doesn't do this for attributes internally in the stub
[18:02:53] sleungcy: has joined #RubyOnRails
[18:03:34] CodaBrink: It's not good practice to modify behavior during testing
[18:04:18] benlieb: codabrink: this is stubbing out a network call
[18:05:29] uris: has joined #RubyOnRails
[18:06:22] jottr: has joined #RubyOnRails
[18:06:56] josephkokenge: has joined #RubyOnRails
[18:07:15] reckoner: has left #RubyOnRails: ()
[18:08:33] manfrin: has joined #RubyOnRails
[18:11:54] bePolite: has joined #RubyOnRails
[18:13:22] goodcodeguy: has joined #RubyOnRails
[18:14:44] blackmesa: has joined #RubyOnRails
[18:14:50] emachnic: has joined #RubyOnRails
[18:15:49] goodcodeguy: has joined #RubyOnRails
[18:17:17] USvER: adaedra, i didn't understood your message about Cells... what do you mean?
[18:19:51] bga57: has joined #RubyOnRails
[18:20:12] Jon30: has joined #RubyOnRails
[18:20:12] Jon30: has joined #RubyOnRails
[18:29:21] Deck-: has joined #RubyOnRails
[18:29:31] sandstrom: has joined #RubyOnRails
[18:30:40] wxdk2: has joined #RubyOnRails
[18:33:43] puff: has joined #RubyOnRails
[18:33:46] bronson: has joined #RubyOnRails
[18:33:48] goodcodeguy: has joined #RubyOnRails
[18:33:58] slash_nick: USvER: i'm guessing https://github.com/celluloid/celluloid
[18:34:17] slash_nick: could be wrong :)
[18:34:55] USvER: slash_nick: i think more likely this https://github.com/apotonick/cells
[18:35:06] USvER: slash_nick: investigating options
[18:37:19] kirillzh: has joined #RubyOnRails
[18:37:42] cnk: has joined #RubyOnRails
[18:39:33] bronson: has joined #RubyOnRails
[18:39:35] kirillzh: has joined #RubyOnRails
[18:42:46] baweaver: has joined #RubyOnRails
[18:43:04] intrigue_: has joined #RubyOnRails
[18:43:12] Irikos: has joined #RubyOnRails
[18:44:33] trosborn: has joined #RubyOnRails
[18:47:00] wxdk: has joined #RubyOnRails
[18:47:15] B1n4r10: has joined #RubyOnRails
[18:47:38] istrasci: has joined #RubyOnRails
[18:48:50] istrasci: This is probably a n00b question, but if I have Author has_many :posts, and I delete a Post, why isn't removed from the author.posts collection?
[18:49:19] tubbo: istrasci: it should be
[18:49:37] istrasci: tubbo: (-_____-) Hmmm, it's not.....
[18:49:48] alexishuard: has joined #RubyOnRails
[18:49:52] workmad3: istrasci: it will be, but you'll need to reload the author most likely
[18:50:01] tubbo: istrasci: did you remember to do `author.reload` after you deleted the Post? it's possible that your Author just had cached data in memory
[18:50:13] codesoda: has joined #RubyOnRails
[18:50:18] istrasci: Ah, didn't know about reload. I'll try it. Thanks.
[18:50:44] pinkerton: has joined #RubyOnRails
[18:50:58] arup_r: and with inverse_of option set both side, I think reload is also needed..
[18:51:14] ElFerna_: has joined #RubyOnRails
[18:51:18] tubbo: reload would be needed regardless if you had called `author.posts` before
[18:51:51] tubbo: so if your code looks like this: `author.posts; post = Post.find(author.posts.first.id); post.destroy; author.posts.include?(post)`, that would return true
[18:52:05] tubbo: because author.posts already got called so the query was made to fetch that data
[18:53:01] workmad3: tubbo: similarly, I don't think `author.posts.find(some_id).destroy` removes it from the posts collection until a reload :)
[18:53:19] tubbo: definitely not
[18:53:33] tubbo: it's the same thing as doing Post.find(some_id), i mean...it returns a Post object back to you.
[18:53:36] tubbo: and nothing more
[18:55:50] arup_r: workmad3: author.posts.destroy Post.find(some_id) will work
[18:59:51] jenrzzz: has joined #RubyOnRails
[19:01:10] moeabdol: has joined #RubyOnRails
[19:01:13] kirillzh: How can I exclude specific keys from json response on rendering?
[19:02:10] dopie: heres the gist https://gist.github.com/92d907dd7b14c3cb16bc and the accompanying video http://www.screencast.com/t/JnRwNcudRPhw how can i get user_id into each document?
[19:02:43] tubbo: kirillzh: there are a few ways to do it. how are you rendering json?
[19:03:44] pawnbox: has joined #RubyOnRails
[19:03:59] baweaver: has joined #RubyOnRails
[19:04:09] tubbo: dopie: i honestly don't understand what you're doing there at all
[19:04:26] dopie: Im creating a new document
[19:04:35] dopie: dynamically
[19:04:45] Sigma01: has left #RubyOnRails: ()
[19:05:00] Sigma00: has joined #RubyOnRails
[19:05:14] dopie: the file uploads and works perfectly and all i want to do is have the user_id info inserted with the attributes
[19:08:39] tubbo: dopie: oh ok, so each one of the set_documents is iterated over and you figure out what the key should be based on the document name
[19:08:54] puff: Is there any easy rails equiv to apache mod_dumpio?
[19:09:04] dopie: tubbo: yes
[19:09:30] dopie: how would i add a user_id: current_user.id to that loop?
[19:09:37] puff: E.g. if I want to log every http request and response out to a log file?
[19:10:05] tubbo: dopie: ah, you might have to tack it onto the end of the strong_params call at the end of that method
[19:10:14] baweaver: has joined #RubyOnRails
[19:10:24] sinkensabe: has joined #RubyOnRails
[19:11:19] tubbo: so e.g. strong_params = params.require(:user).permit(hash); strong_params[:disclosure_document_attributes.merge! user_id: current_user.id
[19:11:20] dopie: can yo utype an example of that?
[19:11:34] Azrathud: has joined #RubyOnRails
[19:11:38] tubbo: there's a typo in there so you get the idea
[19:11:44] tubbo: dopie: the important part is the `merge!`
[19:14:04] codepete: has joined #RubyOnRails
[19:14:24] dopie: tubbo: so I would need to iterate over the strong params hash to insert in each attributes?
[19:14:32] tubbo: yeah i think so
[19:15:29] tubbo: dopie: there might be a simpler way to attack this though, like are you actually updating a User record herE?
[19:15:31] nogic: has joined #RubyOnRails
[19:16:14] cnk: puff: you could probably add a Rack middleware to log all payloads in and out - or just have apache do it
[19:16:19] emachnic: has joined #RubyOnRails
[19:16:31] nogic: has joined #RubyOnRails
[19:16:40] dopie: tubbo: yes
[19:17:10] tubbo: dopie: and the documents that are attached to a user, they're not necessarily owned by that user?
[19:17:23] puff: cnk: So nothing in rails itself? I'd have to front-end it with apache, or set up some sort of logging proxy server.
[19:17:33] nogic: has joined #RubyOnRails
[19:18:03] tubbo: dopie: because if you change user_id on Document to current_user.id, it will no longer be associated with the original User. it will be associated with the User who is the current_user.
[19:18:06] cnk: Rails uses Rack for it's request processing so a rack middleware would be 'within rails' for some definitions of 'within'
[19:18:11] tubbo: dopie: is that what you want?
[19:18:20] cnk: but there isn't a config option to do what you want
[19:18:24] tubbo: this API doesn't make much sense if that's the case...
[19:18:37] puff: cnk: Ah, okay.
[19:18:54] Azrathud: has left #RubyOnRails: ("Konversation terminated!")
[19:19:07] anirban: has joined #RubyOnRails
[19:19:37] puff: cnk: So google on rack middleware?
[19:19:52] dopie: tubbo: the files attached to the user are owned by the user correct
[19:20:10] dopie: and only by that user
[19:20:27] tubbo: dopie: then allowing someone to customize the user_id will break that link,
[19:20:32] cabargas: has joined #RubyOnRails
[19:21:03] safety_cut: has joined #RubyOnRails
[19:22:01] tubbo: dopie: do you understand kind-of why this doesn't make sense though?
[19:22:16] tubbo: like if i do dopie = User.new name: 'dopie'
[19:23:26] kirillzh: tubbo render json: response
[19:24:01] dopie: tubbo: ok so what should I change?
[19:24:16] pinkerton: has joined #RubyOnRails
[19:25:30] istrasci: has left #RubyOnRails: ()
[19:26:11] puff: cnk: Hm, like this? http://stackoverflow.com/questions/1697104/in-rails-how-can-one-log-the-entirety-of-each-incoming-http-request
[19:26:38] puff: cnk: Or maybe this might be better: https://github.com/hx/rack-traffic-logger
[19:26:43] cnk: dev mode logs all of the incoming
[19:26:50] cnk: it's the outgoing that isn't usually logged
[19:27:24] puff: cnk: Ideally I'd like to log everything.
[19:27:29] dopie: tubbo: or explain to me why doesnt it make sense?
[19:28:22] safety_cut: has joined #RubyOnRails
[19:28:26] goodcodeguy: has joined #RubyOnRails
[19:28:33] _djbkd: has joined #RubyOnRails
[19:28:53] tubbo: then, dopie.documents.create(title\\\
[19:29:00] tubbo: sorry my keyboard exploded haha
[19:29:13] tubbo: dopie: then, if i did doc = dopie.documents.create(title: 'hello')
[19:29:29] tubbo: and doc.user_id = some_other_user_id, doc.user won't equal dopie anymore
[19:29:54] dopie: but as of right now.... the user_id isn't being set in the document file
[19:30:15] tubbo: but i digress, if you do actually want to set user_id: current_user.id, what i said should work
[19:30:31] sinkensabe: has joined #RubyOnRails
[19:30:50] baweaver: has joined #RubyOnRails
[19:31:25] aegis3121: has joined #RubyOnRails
[19:33:23] pinkerton: has joined #RubyOnRails
[19:33:30] alexishuard: has joined #RubyOnRails
[19:34:37] cnk: puff: The traffic logger looks promising. You may need to fool with what it logs but you could fork that project and edit what gets written to logs
[19:34:57] cnk: I hope this is for something low traffic so writing to the log file isn't a bottleneck
[19:35:17] sandstrom: has joined #RubyOnRails
[19:35:18] michael_mbp: has joined #RubyOnRails
[19:36:55] nogic: has joined #RubyOnRails
[19:39:14] allcentury: has joined #RubyOnRails
[19:39:23] sinkensabe: has joined #RubyOnRails
[19:41:08] n1lo: has joined #RubyOnRails
[19:42:00] netzfisch: has joined #RubyOnRails
[19:42:16] mdw: has joined #RubyOnRails
[19:44:01] Aherin: has joined #RubyOnRails
[19:44:20] jenrzzz: has joined #RubyOnRails
[19:46:41] NeoHamled: has joined #RubyOnRails
[19:47:28] pixelhandler: has joined #RubyOnRails
[19:50:16] solars: has joined #RubyOnRails
[19:50:55] melter: has left #RubyOnRails: ("Client exiting")
[19:54:33] prgmmr: has joined #RubyOnRails
[19:55:18] arup_r: has joined #RubyOnRails
[19:55:59] moeabdol: has joined #RubyOnRails
[19:57:16] benlieb: can I get a checkbox to have no extra default hidden input field?
[19:57:28] benlieb: this didn't work: = f.check_box :session_id_present, unchecked_value: nil
[19:59:15] emachnic: has joined #RubyOnRails
[19:59:24] cnk: benlieb: Rails adds the default so it can tell if you uncheck a previously checked element
[19:59:44] cnk: why are you trying to not have the hidden input field?
[19:59:49] benlieb: cnk: I understand that, but in this situation this is the behavior I need
[19:59:52] Deck-: has joined #RubyOnRails
[20:00:01] arup_r: then pass include_hidden: false
[20:00:36] Jeremy1023: has joined #RubyOnRails
[20:01:11] aegis3121: has joined #RubyOnRails
[20:01:13] benlieb: arup_r: that did it!
[20:01:21] benlieb: I didn't see that in the docs
[20:02:15] arup_r: benlieb: Gotcha: http://api.rubyonrails.org/classes/ActionView/Helpers/FormOptionsHelper.html
[20:03:03] benlieb: cool. I was looking here: http://apidock.com/rails/ActionView/Helpers/FormHelper/check_box
[20:03:09] benlieb: that's awesome tho!
[20:03:40] prgmmr: Isn't Parse more powerful/scalable now that anyone can out it on there own server? (Besides knowing that the API isn't going to get updated with new things)
[20:05:05] baweaver: has joined #RubyOnRails
[20:06:57] wldcordeiro: has joined #RubyOnRails
[20:07:06] kirillzh: has joined #RubyOnRails
[20:08:02] fox_mulder_cp: wow. old school floppy as card reader...
[20:11:22] mdw: has joined #RubyOnRails
[20:11:38] defsdoor: has joined #RubyOnRails
[20:11:45] wxdk2: has joined #RubyOnRails
[20:12:12] Coldblackice: has joined #RubyOnRails
[20:12:31] CodaBrink: fox_mulder_cp ?
[20:12:39] RegulationD: has joined #RubyOnRails
[20:13:11] fox_mulder_cp: codabrink: modder's
[20:13:45] fox_mulder_cp: http://itc.ua/news/retro-modder-sdelal-iz-floppi-diskovoda-1995-goda-sovremennyiy-kardrider/
[20:13:45] CodaBrink: Oh, are you talking about that popular mod where someone puts an SD card in a floopy disk?
[20:13:52] fox_mulder_cp: codabrink: yep
[20:14:19] CodaBrink: The funny thing is.. can you think of a single use for that?
[20:14:32] CodaBrink: Getting the SD card in and out of the floppy disk looks tough.
[20:14:48] nogic: has joined #RubyOnRails
[20:14:57] CodaBrink: Cool though
[20:15:21] fox_mulder_cp: i have a zip 100 ide ))
[20:15:28] fox_mulder_cp: and some floppyes
[20:16:09] _djbkd: has joined #RubyOnRails
[20:16:56] yfeldblum: has joined #RubyOnRails
[20:18:25] Devalo: has joined #RubyOnRails
[20:19:19] ElFerna_: has joined #RubyOnRails
[20:20:43] futilegames: has joined #RubyOnRails
[20:21:04] MrDoctor: has joined #RubyOnRails
[20:22:06] hugoangelo: has joined #RubyOnRails
[20:22:56] maddtech: has joined #RubyOnRails
[20:23:01] wxdk: has joined #RubyOnRails
[20:23:28] Cohedrin: has joined #RubyOnRails
[20:24:19] benlieb: has joined #RubyOnRails
[20:28:37] emachnic: has joined #RubyOnRails
[20:29:03] alexishuard: has joined #RubyOnRails
[20:30:49] Pumukel: has joined #RubyOnRails
[20:31:45] Nuck: has joined #RubyOnRails
[20:31:55] benlieb: has joined #RubyOnRails
[20:32:55] Spami: has joined #RubyOnRails
[20:37:09] fschuindt: has joined #RubyOnRails
[20:37:49] nogic: has joined #RubyOnRails
[20:39:17] baweaver: has joined #RubyOnRails
[20:39:38] sinkensa_: has joined #RubyOnRails
[20:40:38] safety_cut: has joined #RubyOnRails
[20:45:14] pekosi_: has joined #RubyOnRails
[20:45:26] emachnic: has joined #RubyOnRails
[20:46:17] emachnic: has joined #RubyOnRails
[20:47:52] pekosi_: Anyone knows of a gem for adding/editing posts (including images) and then showing them - basically like Wordpress posts but can be much simpler.
[20:48:07] teaearlgraycold: When I do a Model.all.includes(:foos) each |model|; model.foo - it seems that model.foo is creating a new query even though I preloaded foos
[20:48:34] teaearlgraycold: Is there a way to get |model| to retain its foo through the each block?
[20:48:50] Maletor: has joined #RubyOnRails
[20:49:07] safety_cut: has joined #RubyOnRails
[20:49:29] drale2k: anyone knows about a gem which allows me to assign a uniq color to a username in a chat room? Does not have to be server synced, can just be client side per session
[20:49:32] fox_mulder_cp: pekosi_: i make simple blog engine based on default official blog manual
[20:49:37] Jasaka: has joined #RubyOnRails
[20:49:53] teaearlgraycold: drale2k: that's pretty trivial
[20:50:10] fox_mulder_cp: pekosi_: see here https://github.com/foxmuldercp/blogapp
[20:50:16] wxdk: has joined #RubyOnRails
[20:50:25] teaearlgraycold: Just use the username to seed an RNG then get three 0-255 numbers from it in sequence
[20:50:42] baweaver: has joined #RubyOnRails
[20:50:52] drale2k: teaearlgraycold: it has to be from a present color array because the colors have to work well on a white bg
[20:51:05] teaearlgraycold: drale2k: how many colors do you have?
[20:51:21] drale2k: teaearlgraycold: idk but let's say about 5-10
[20:52:06] DonOtreply: has joined #RubyOnRails
[20:52:13] blackmesa: has joined #RubyOnRails
[20:52:45] teaearlgraycold: drale2k: one sec while I post to pastebin
[20:52:57] drale2k: teaearlgraycold: thanks
[20:53:36] maikovicii: has joined #RubyOnRails
[20:54:13] rubyonrails807: has joined #RubyOnRails
[20:54:27] hinbody: has joined #RubyOnRails
[20:54:35] pekosi_: fox_mulder_cp: Hmm thanks, I might be using this if I don't get an alternative. I guess I'll need to add support for images though.
[20:54:37] teaearlgraycold: http://pastie.org/private/29wkitugpmiihud8d6vabg
[20:55:11] alexishuard: has joined #RubyOnRails
[20:55:40] pawnbox: has joined #RubyOnRails
[20:56:33] fox_mulder_cp: pekosi_: pekosi_ it use js wisywig editor such use wordpress
[21:01:09] jottr: has joined #RubyOnRails
[21:01:17] mikevoets: has joined #RubyOnRails
[21:01:57] netzfisch: has joined #RubyOnRails
[21:02:23] chipotle: has joined #RubyOnRails
[21:02:27] jenrzzz: has joined #RubyOnRails
[21:03:21] mikevoets: is it possible to get help with rails related questions here?
[21:03:52] drale2k: teaearlgraycold: thanks, i just found this https://randomcolor.llllll.li
[21:04:01] drale2k: think this is better suited on the client side anyway
[21:04:44] teaearlgraycold: Well that won't select from a set, will just give you a random 24bit color
[21:05:02] teaearlgraycold: And doesn't use a username as a hash so it won't be consistent
[21:05:16] pekosi_: fox_mulder_cp: Ok, I'll try it tomorrow.
[21:05:22] teaearlgraycold: If you need it in JS the idea is pretty simple and portable
[21:06:29] ferr: has joined #RubyOnRails
[21:06:48] DmitryBochkarev: has joined #RubyOnRails
[21:07:05] teaearlgraycold: Oh I suppose you're not referring to ''#' + Math.floor(Math.random()*16777215).toString(16);' and instead referring to the github thing
[21:09:47] fox_mulder_cp: pekosi_: i start my demo blog now
[21:10:35] fox_mulder_cp: pekosi_: http://dev.blog.mulder.kiev.ua/
[21:10:53] CodaBrink: mikevoets what is ur q?
[21:10:57] stuarta: has left #RubyOnRails: ()
[21:11:12] sinkensabe: has joined #RubyOnRails
[21:12:43] baweaver: has joined #RubyOnRails
[21:16:31] mostlybadfly: has joined #RubyOnRails
[21:17:01] mikevoets: my question is placed on stackoverflow: http://stackoverflow.com/questions/35659809/rails-4-nested-content-tag-in-methods-and-blocks
[21:17:14] bronson: has joined #RubyOnRails
[21:20:05] Devalo: has joined #RubyOnRails
[21:20:25] pekosi_: fox_mulder_cp: It gives 502 Bad Gateway response.
[21:22:38] frggmo: has joined #RubyOnRails
[21:23:30] ElFerna_: has joined #RubyOnRails
[21:23:39] frggmo: Hey there. Is Rails really adequate for developing an API with? I've heard a lot about how I should use Node instead but I like the full package part of Rails.
[21:23:49] dagen: has joined #RubyOnRails
[21:25:02] CodaBrink: frggmo If you want to use Rails just as an API, you can pass in the --api argument when generating a new app on Rails 5..
[21:25:04] sinkensabe: has joined #RubyOnRails
[21:25:35] CodaBrink: Both Node and Rails have their pros/cons, but it depends on what you need.
[21:26:45] jsrn_: has joined #RubyOnRails
[21:27:34] uris: has joined #RubyOnRails
[21:27:46] adre: has joined #RubyOnRails
[21:27:59] CodaBrink: mikevoets remove the = on your tl.tab_content do line
[21:28:15] dagen: has joined #RubyOnRails
[21:28:19] CodaBrink: and put an = on each of your tl.tab_panel lines
[21:29:21] mikevoets: i think i tried before, let me try again :)
[21:30:26] Deck-: has joined #RubyOnRails
[21:32:01] codesoda: has joined #RubyOnRails
[21:32:17] frggmo: codabrink: what's so great about node if rails does it all?
[21:32:45] theunraveler: has joined #RubyOnRails
[21:32:56] dagen: has joined #RubyOnRails
[21:32:57] mikevoets: codabrink that gave me this: http://pastebin.com/duf5aqDB
[21:33:03] CodaBrink: Preference. And node performs faster. Rails is a better programming environment and the speed gap can be closed with a caching layer.
[21:33:18] ElFerna_: has joined #RubyOnRails
[21:33:51] josephkokenge: has joined #RubyOnRails
[21:33:57] sandstrom: has joined #RubyOnRails
[21:36:05] halcyonicstorm1: has joined #RubyOnRails
[21:36:33] mikevoets: has left #RubyOnRails: ()
[21:36:46] mikevoets: has joined #RubyOnRails
[21:36:52] CodaBrink: mikevoets updating my comment on stackoverflow..
[21:37:02] mikevoets: ill go to the store real quick
[21:37:24] rakm: has joined #RubyOnRails
[21:40:01] Andr3as: has joined #RubyOnRails
[21:41:22] intrigue_: has joined #RubyOnRails
[21:42:38] Radar: Jon30: So were you running an older version of Passenger then? It's been fixed for a while now.
[21:42:46] Radar: https://github.com/phusion/passenger/issues/1241
[21:42:52] Radar: July 15th 2014 is when it was reported.
[21:43:16] pawnbox: has joined #RubyOnRails
[21:43:49] fox_mulder_cp: pekosi_: hm. thanks. i killed it with main tmux (
[21:43:58] Jon30: Radar: indeed
[21:44:54] Synthead: is it possible to use Rails.logger in an initializer and see the output in the console in "rails server"
[21:45:04] frggmo: codabrink: the performance part makes sense. I think i'd rather stick with rails and just scale out, even if it costs a little more
[21:47:04] CodaBrink: mikevoets updated
[21:47:28] jenrzzz: has joined #RubyOnRails
[21:47:54] CodaBrink: frggmo Personally, if I were to do something new, I'd go with Phoenix (with elixir). But that's just me.
[21:47:57] matthias_: has joined #RubyOnRails
[21:48:08] CodaBrink: ACTION ducks fireballs
[21:48:23] frggmo: codabrink: really? how come?
[21:48:42] CodaBrink: Elixir byte compiles. ;D
[21:49:27] Andr3as: has joined #RubyOnRails
[21:49:45] fox_mulder_cp: i restart my http://dev.blog.mulder.kiev.ua/
[21:49:46] CodaBrink: And it's a nice language
[21:50:13] alexhartley: has joined #RubyOnRails
[21:51:04] CodaBrink: Unlike Javascript..
[21:51:19] mikevoets: frggmo even my software engineering professor recommended phoenix w/ elixir
[21:51:50] mikevoets: codabrink thnx, ill look at it in a sec
[21:51:53] frggmo: hmm ok i'll check it out
[21:52:11] hugoangelo: has joined #RubyOnRails
[21:53:59] kirillzh: has joined #RubyOnRails
[21:54:30] hangelo: has joined #RubyOnRails
[21:55:15] Jasaka: has joined #RubyOnRails
[21:55:41] rafaelfranca: has joined #RubyOnRails
[21:57:34] sinkensa_: has joined #RubyOnRails
[21:58:02] fox_mulder_cp: good night. have a midnight
[21:58:21] theunraveler: has joined #RubyOnRails
[21:58:26] ur5us: has joined #RubyOnRails
[21:58:36] SteenJobs: has joined #RubyOnRails
[21:59:02] CodaBrink: Heading out. Goodnight
[21:59:26] mjfox: has joined #RubyOnRails
[22:02:30] mikevoets: codabrink it unfortunately did not work, good night
[22:04:38] jivemeat: has joined #RubyOnRails
[22:04:59] jivemeat: hey guys, I used rails installer but got this error when rails new
[22:04:59] jivemeat: app - "Checksum of /versions does not match the checksum provided
[22:04:59] jivemeat: by the server! Something is wrong"
[22:05:13] jivemeat: sorry about that, tried to copy and paste from #Ruby
[22:06:25] chipotle: has joined #RubyOnRails
[22:06:51] rubyonrailed: has joined #RubyOnRails
[22:08:53] lacrymology: has joined #RubyOnRails
[22:09:19] wxdk2: has joined #RubyOnRails
[22:10:38] cac: has joined #RubyOnRails
[22:11:47] openstruct: has joined #RubyOnRails
[22:12:00] sinkensabe: has joined #RubyOnRails
[22:12:00] wxdk: has joined #RubyOnRails
[22:12:06] ElFerna_: has joined #RubyOnRails
[22:12:21] joshkovach: has joined #RubyOnRails
[22:12:42] FooMunki: has joined #RubyOnRails
[22:14:07] SteenJobs: has joined #RubyOnRails
[22:15:04] dionysus69: has joined #RubyOnRails
[22:15:19] tfitts: has joined #RubyOnRails
[22:17:20] FCser: has joined #RubyOnRails
[22:18:03] bronson: has joined #RubyOnRails
[22:18:44] sonofdirt: has joined #RubyOnRails
[22:19:42] qejk: has joined #RubyOnRails
[22:20:31] trinaldi: has joined #RubyOnRails
[22:22:32] Devalo: has joined #RubyOnRails
[22:23:05] nogic: has joined #RubyOnRails
[22:23:11] nfk: has joined #RubyOnRails
[22:23:37] ur5us: has joined #RubyOnRails
[22:24:12] nogic: has joined #RubyOnRails
[22:24:53] sonofdirt: has joined #RubyOnRails
[22:25:04] nogic: has joined #RubyOnRails
[22:26:12] nogic: has joined #RubyOnRails
[22:26:13] superlou: has joined #RubyOnRails
[22:26:40] qejk: has joined #RubyOnRails
[22:27:09] nogic: has joined #RubyOnRails
[22:27:50] baweaver: has joined #RubyOnRails
[22:28:20] sinkensabe: has joined #RubyOnRails
[22:29:56] flashpoint9: has joined #RubyOnRails
[22:30:01] wxdk: has joined #RubyOnRails
[22:31:47] mikevoets: does anyone here have time to answer a rails related q?
[22:32:34] Papierkorb: mikevoets: Don't ask to ask, just ask your question and wait for someone to answer it
[22:32:47] safety_cut: has joined #RubyOnRails
[22:33:10] kirillzh: has joined #RubyOnRails
[22:34:03] mikevoets: could anyone attempt an answer on this one?: http://stackoverflow.com/questions/35659809/rails-4-nested-content-tag-in-methods-and-blocks
[22:34:09] Devalo: has joined #RubyOnRails
[22:34:25] gaffo: has joined #RubyOnRails
[22:35:11] emax: has joined #RubyOnRails
[22:36:26] nettoweb: has joined #RubyOnRails
[22:36:45] DonOtreply: has joined #RubyOnRails
[22:37:20] josephkokenge: has joined #RubyOnRails
[22:39:13] quazimodo: has joined #RubyOnRails
[22:41:07] rdavila: has joined #RubyOnRails
[22:47:24] sinkensabe: has joined #RubyOnRails
[22:47:26] blackmesa: has joined #RubyOnRails
[22:47:29] nettoweb: has joined #RubyOnRails
[22:47:46] TBAA: has joined #RubyOnRails
[22:49:06] cnk: So, for folks who do single page apps or API-heavy stuff... how do you keep track of what code is using which parts of your api?
[22:49:36] ferr: I have PDF file in assets/ directory, I've also added Rails.application.config.assets.precompile += %w( SPA-Levandos-dovanu-kupono-pavyzdys.pdf ), but it is not accessible through asset_path("pdf_name.pdf")
[22:49:42] cnk: Do you have a tool? or a convention about reusing (or not reusing) endpoints from different parts of the app?
[22:49:58] openstruct: has joined #RubyOnRails
[22:50:17] hitsu_: has joined #RubyOnRails
[22:50:55] mikeiniowa: has joined #RubyOnRails
[22:51:24] hitsu88: has joined #RubyOnRails
[22:52:05] maciejkowalski: has joined #RubyOnRails
[22:52:07] cnk: ferr is the output for asset_path look reasonable?
[22:52:47] ferr: It links to localhost:3000/pdf_name.pdf
[22:53:06] ferr: I run rake assets:precompile and pdf file was not precompiled
[22:53:13] ferr: it's not at public directory
[22:54:14] cnk: I am wondering if it is not matching because it is a pdf
[22:54:37] cnk: what happens if you put a JS or CSS file in the same location and try to refer to it with asset_path?
[22:55:28] cnk: ferr: actually, never mind, it should pick up other types of files per http://guides.rubyonrails.org/asset_pipeline.html#precompiling-assets
[22:56:43] cnk: ferr: and you did restart your dev server after changing the precompile config option?
[22:57:52] maciejkowalski: difficult question: where I can find file (I am talking about ActiveRecord) that is responsible for putting single quotes "around" string
[22:57:55] yfeldblum: has joined #RubyOnRails
[22:58:00] maciejkowalski: I need to generate something like this (postgresql)
[22:58:03] maciejkowalski: (val, 'string val', JSON_VAL),
[23:00:42] maciejkowalski: OR which part of the AR generate 'rows' for 'insert'
[23:03:25] qejk: has joined #RubyOnRails
[23:05:22] BhavyaM: has joined #RubyOnRails
[23:07:19] Terens: has joined #RubyOnRails
[23:07:32] mdw: has joined #RubyOnRails
[23:07:54] baweaver: has joined #RubyOnRails
[23:09:18] adavia: has joined #RubyOnRails
[23:13:16] nettoweb: has joined #RubyOnRails
[23:13:24] pawnbox: has joined #RubyOnRails
[23:16:09] qejk: has joined #RubyOnRails
[23:16:58] cac: has joined #RubyOnRails
[23:17:25] bronson: has joined #RubyOnRails
[23:18:44] y2mq37: has joined #RubyOnRails
[23:18:50] srinidhi: has joined #RubyOnRails
[23:21:11] cac: has joined #RubyOnRails
[23:22:21] pika_pika: has joined #RubyOnRails
[23:25:09] drale2k: out of nothing, without any changes, my "received" method in my channels chat.js file is no longer called
[23:25:27] drale2k: anyone had a bug like this? Not sure if bug or on my side caused my not sure what
[23:25:54] kdough: has joined #RubyOnRails
[23:26:05] evenix: has joined #RubyOnRails
[23:26:10] evenix: happy friday
[23:27:03] evenix: I'm making a Net:HTTP request to `url = URI("https://accounts.google.com/o/oauth2/token")` but when I get the response its irreadable and my json parser fail because it cannot understand the parse
[23:28:01] evenix: any idea? i thought that could be the encoding
[23:28:03] evenix: but its utf-8
[23:28:17] evenix: I'm getting something like this \x1F\x8B\b\x00\x00\x00\x00\x"...
[23:29:01] Thouren: has joined #RubyOnRails
[23:29:01] evenix: its looks like binary data instead of html
[23:29:24] uglybandersnatch: has joined #RubyOnRails
[23:30:42] snowy: has joined #RubyOnRails
[23:32:04] mikevoets: that is probably utf8 and you need to encode it :)
[23:33:14] evenix: @mikevoets : encode it to?
[23:33:22] Wolland: has joined #RubyOnRails
[23:34:16] evenix: "#{response.body}".encoding => #<Encoding:ASCII-8BIT>
[23:34:27] pvertenten: has joined #RubyOnRails
[23:36:43] DoctorMonocular: has joined #RubyOnRails
[23:40:49] foli_: has joined #RubyOnRails
[23:41:03] B1n4r10: has joined #RubyOnRails
[23:41:22] evenix: and response.body.encode('UTF-8') => Encoding::UndefinedConversionError: ""\x8B"" from ASCII-8BIT to UTF-8 from org/jruby/RubyString.java:7573:in `encode'
[23:41:35] evenix: ^ @mikevoets any suggestions?
[23:41:48] jottr: has joined #RubyOnRails
[23:42:13] Megamos: has joined #RubyOnRails
[23:42:58] defsdoor: has joined #RubyOnRails
[23:43:06] drale2k: oh wow, debugging ActionCable sucks
[23:43:50] ElFerna_: has joined #RubyOnRails
[23:43:53] drale2k: had a undefined var in a partial which was returned by ActionCable and it just stopped working because of that. No error message what so ever in the terminal logs
[23:44:31] drale2k: are there any actioncable logs at all?
[23:48:50] enitiz: has joined #RubyOnRails
[23:49:27] noodman: has joined #RubyOnRails
[23:50:24] abolishme: has joined #RubyOnRails
[23:50:41] one_zero: has joined #RubyOnRails
[23:52:34] felltir: has joined #RubyOnRails
[23:52:44] kirillzh: has joined #RubyOnRails
[23:53:59] nettoweb: has joined #RubyOnRails
[23:54:37] ferr: Is there by any chance I can track if mail was sent successfully without any errors using ApplicationMailer with GMAIL?
[23:56:39] nettoweb: has joined #RubyOnRails
[23:56:48] _Tariq: has joined #RubyOnRails
[23:56:58] johnr38: has joined #RubyOnRails
[23:59:27] jinetix: has joined #RubyOnRails