« Back to channel list

#RubyOnRails - 22 January 2016

« Back 1 day Forward 1 day »
[00:00:49] Radar: roller546: what version of the aws-sdk gem are you using?
[00:01:18] Radar: Or fog, for that matter
[00:03:09] roller546: was-sdk gem did not get installed as a dependency, when I installed rubber
[00:03:17] Radar: That's ok.
[00:03:26] Radar: I think it's a rubber issue. Wait for the maintainers to reply.
[00:03:53] waka: has joined #RubyOnRails
[00:06:00] cajone: has left #RubyOnRails: ()
[00:06:35] Limix: has joined #RubyOnRails
[00:07:22] safety_cut: has joined #RubyOnRails
[00:08:23] hannelita: has joined #RubyOnRails
[00:08:29] pwnd_nsfw: has joined #RubyOnRails
[00:10:39] herbst: has joined #RubyOnRails
[00:14:54] kies^: has joined #RubyOnRails
[00:15:26] northfurr: has joined #RubyOnRails
[00:16:08] pulgalipe: has joined #RubyOnRails
[00:17:45] Quintasan: Radar, matthewd: lol, it appears what I found is dead code and this thing is supposed to work. I'm back at step one.
[00:20:39] yfeldblum: has joined #RubyOnRails
[00:21:32] Quintin: has joined #RubyOnRails
[00:23:12] nonmadden: has joined #RubyOnRails
[00:23:27] nertzy2: has joined #RubyOnRails
[00:24:07] pulgalipe: has joined #RubyOnRails
[00:25:04] d0nn1e: has joined #RubyOnRails
[00:25:21] guacamole: has joined #RubyOnRails
[00:25:42] baweaver: has joined #RubyOnRails
[00:26:19] matthias: has joined #RubyOnRails
[00:26:37] lemur: has joined #RubyOnRails
[00:27:36] alex88: has joined #RubyOnRails
[00:31:46] guacamole: has joined #RubyOnRails
[00:34:02] Ropeney: has joined #RubyOnRails
[00:42:22] k13nox: has joined #RubyOnRails
[00:43:52] hannelita: has joined #RubyOnRails
[00:44:14] mices: when i generate an uploader does it create a controller too?
[00:46:31] chipotle: has joined #RubyOnRails
[00:50:24] Scripore: has joined #RubyOnRails
[00:52:47] helpa: has joined #RubyOnRails
[00:53:02] tfitts: FailBit: ded how?
[00:53:15] tfitts: oh, just offline
[00:53:36] ekem: has joined #RubyOnRails
[00:54:35] k13nox: has joined #RubyOnRails
[00:54:46] chouhoulis: has joined #RubyOnRails
[00:54:55] bamorim: has joined #RubyOnRails
[00:56:17] FailBit: this is what you get when you do agile development
[00:56:28] lyoshajapan: has joined #RubyOnRails
[00:56:41] baweaver: Okta recently pushed a build to prod that had debugger flags on
[00:56:48] baweaver: so it filled your web console with garbage
[00:56:55] fn2187_: has joined #RubyOnRails
[00:57:26] FailBit: poorly written frontend-heavy apps with 750ms average response times that break constantly
[00:57:37] tweeeaks: new relic down?
[00:58:21] erichmenge: has joined #RubyOnRails
[00:58:35] tweeeaks: i like them
[00:59:27] Radar: has joined #RubyOnRails
[00:59:44] lyoshajapan: has joined #RubyOnRails
[00:59:45] lessless: has joined #RubyOnRails
[00:59:48] guacamole: has joined #RubyOnRails
[01:00:38] manfrin: has joined #RubyOnRails
[01:02:09] fgo: has joined #RubyOnRails
[01:02:39] jpterry: has joined #RubyOnRails
[01:05:16] jaequery: has joined #RubyOnRails
[01:05:17] Z00t: has joined #RubyOnRails
[01:06:11] AntiSpamMeta: has joined #RubyOnRails
[01:06:15] jschoolcraft: has joined #RubyOnRails
[01:06:33] choke: don't you hate the times where your tests pass, and you don't know why...
[01:07:26] csmb: has joined #RubyOnRails
[01:08:50] twilling: has joined #RubyOnRails
[01:10:17] choke: have an edit test that's passing, but the method on the controller doesn't exist so i'm frustrated as to why its passing
[01:10:23] shibabu: has joined #RubyOnRails
[01:10:30] baweaver: has joined #RubyOnRails
[01:10:39] Sawbones: has joined #RubyOnRails
[01:11:43] jottr_: has joined #RubyOnRails
[01:11:52] tweeeaks: looks like nr is back
[01:12:02] cnk: choke: show the test?
[01:12:27] johnflux_: has joined #RubyOnRails
[01:12:28] johnflux_: has joined #RubyOnRails
[01:13:33] choke: cnk: https://gist.github.com/ch0ke/181f463f9ca8fa2ccfae
[01:14:09] hardtail: has joined #RubyOnRails
[01:14:17] jdev: has joined #RubyOnRails
[01:15:25] cnk: I think you can try adding: puts page --- or perhaps puts page.body at the top of one of your scenarios and see what is actually on the page
[01:15:42] cnk: and then gain aafter the click button
[01:16:09] cnk: it does seem odd that you could have a feature spec pass with no method defined
[01:18:18] choke: and i just updated it with the full controller and html specs too
[01:18:39] blackmes1: has joined #RubyOnRails
[01:19:47] cnk: you don't need an edit method - you have an update
[01:19:54] lyoshaja_: has joined #RubyOnRails
[01:20:16] cnk: In rails stock controllers, if all the method does is render a page, you dn't have to define it explicitly
[01:20:39] FailBit: no, you do
[01:20:44] FailBit: it just doesn't have to do anything
[01:20:46] guacamole: has joined #RubyOnRails
[01:20:58] cnk: your before_action (line 3) set up the @issue variable. And then rails rendered the edit template
[01:21:03] mwlang: has joined #RubyOnRails
[01:21:27] cnk: choke: What Rails version? 4.2 or ??
[01:21:31] choke: apparently cnk is right, in that i removed both my index and show methods ( that do nothing ) and it works
[01:21:49] shmilan: has joined #RubyOnRails
[01:21:57] cnk: Ya rails magic.
[01:22:13] cnk: If you remove your update, your tests will fail - because nothing will get saved
[01:22:30] mwlang: Can someone point me to a good tutorial on building a basic API using Rails? I particularly am looking for some coverage on security (authenticating and getting an API key which is then used for all further communication).
[01:23:07] choke: yeah i figured it'd fail because it couldn't find the edit method ( like i've seen before -- perhaps because it was run before i added in the update method ) i was confused
[01:24:21] choke: i can deal with the rails magic though.. thanks for that info cnk
[01:24:37] FailBit: TIL http://linux.die.net/man/3/wordexp
[01:25:59] ericdykstra: has joined #RubyOnRails
[01:26:45] choke: mwlang the Rails 4 in action book has a little about api's -- and covers the user authentication with api keys....
[01:26:58] Scripore: has joined #RubyOnRails
[01:27:20] Palsson: has joined #RubyOnRails
[01:27:48] choke: our current api we're using devise, with simple_token_authentication, which i like and dislike at the same time ( 'cause it requires an email address be sent across the wire -- so we actually have a fake email for each user stored and their real email stored separately )
[01:27:56] guacamole: has joined #RubyOnRails
[01:30:33] atomical: has joined #RubyOnRails
[01:31:27] guacamole: has joined #RubyOnRails
[01:31:34] eljimmy: has joined #RubyOnRails
[01:32:48] ewnd9_: has joined #RubyOnRails
[01:34:37] hanneli: has joined #RubyOnRails
[01:34:50] AntiSpamMeta: has joined #RubyOnRails
[01:35:15] guacamole: has joined #RubyOnRails
[01:37:09] superlou: has joined #RubyOnRails
[01:38:41] guacamole: has joined #RubyOnRails
[01:41:44] atomical_: has joined #RubyOnRails
[01:44:36] atomical_: has joined #RubyOnRails
[01:45:40] ss_much: has joined #RubyOnRails
[01:47:51] onlyme_: has joined #RubyOnRails
[01:50:36] pulgalipe: has joined #RubyOnRails
[01:53:21] Sawbones: has joined #RubyOnRails
[01:53:22] atomical: has joined #RubyOnRails
[01:54:33] moei: has joined #RubyOnRails
[01:57:49] K_r3aPeR: has joined #RubyOnRails
[01:58:30] bronson: has joined #RubyOnRails
[01:58:48] K_r3aPeR: has joined #RubyOnRails
[01:59:24] rakm: has joined #RubyOnRails
[01:59:34] K_r3aPeR: has joined #RubyOnRails
[02:00:28] Pazician: has joined #RubyOnRails
[02:00:29] K_r3aPeR: has joined #RubyOnRails
[02:01:01] K_r3aPeR: has joined #RubyOnRails
[02:03:49] guacamole: has joined #RubyOnRails
[02:04:34] Guest64350: has left #RubyOnRails: ()
[02:04:43] Radar: has joined #RubyOnRails
[02:05:24] shmilan: has joined #RubyOnRails
[02:06:07] choke: has joined #RubyOnRails
[02:08:44] pwnd_nsfw: https://gist.github.com/SirUncleCid/78e65a1518671a9c6243 I'm attempting to test pages that have an uploaded image on them, but it doesn't seem to be persisting. Error and factory in gist
[02:08:59] ziggy: has joined #RubyOnRails
[02:08:59] ziggy: has joined #RubyOnRails
[02:09:15] Radar: ACTION rubs eyes
[02:09:30] Radar: A question which includes a Gist link which contains all the right information and is formatted neatly?
[02:09:36] Radar: ACTION checks date; not Christmas or April Fools
[02:09:39] pwnd_nsfw: Bro, I've been here
[02:09:48] pwnd_nsfw: and have put up with that shit myself. :P I understand
[02:09:49] Radar: The club. You must join it.
[02:10:02] pwnd_nsfw: ACTION does a, hopefully, club friendly jig
[02:10:21] Radar: https://gist.github.com/SirUncleCid/78e65a1518671a9c6243#file-picture_factory-rb-L3 fixture_file_upload is short hand for Rack::Test::UploadedFile
[02:10:31] Radar: And that'll pull from spec/fixtures too
[02:10:40] Radar: fixture_file_upload("small.gif") should be all you need there
[02:10:45] sevenseacat: has joined #RubyOnRails
[02:10:48] Radar: Doesn't explain why it's broken.
[02:10:53] matthias_: has joined #RubyOnRails
[02:11:01] Radar: Oh, the Gist is missing the Picture model
[02:11:16] pwnd_nsfw: OH COME ON,
[02:11:26] Radar: 9/10 plz try again ;)
[02:11:44] pwnd_nsfw: ty for no flame o mastr
[02:12:08] Radar: Rightio, standard Carrierwave uploader. Setting the image on the factory should be calling the uploader. Silly question, but does it work in the rails console?
[02:12:14] herbst: has joined #RubyOnRails
[02:12:32] Radar: Actually, now looking at the actual error using more than just a quick glance: @picture is nil.
[02:12:42] Radar: So I guess it's not being set in PicturesController#show?
[02:12:50] eljimmy: has joined #RubyOnRails
[02:13:36] pwnd_nsfw: https://gist.github.com/SirUncleCid/78e65a1518671a9c6243#file-pictures_controller-rb
[02:14:00] pwnd_nsfw: brb routes file
[02:14:03] Radar: https://gist.github.com/SirUncleCid/78e65a1518671a9c6243#file-pictures_controller-rb-L18 This'll return `nil` if it can't find it. Perhaps do `find_by!`.
[02:14:24] creature: has joined #RubyOnRails
[02:14:24] creature: has joined #RubyOnRails
[02:15:26] pwnd_nsfw: So, yeah, record not found
[02:15:57] Radar: https://gist.github.com/SirUncleCid/78e65a1518671a9c6243#file-picture-rb-L13 link_hash is set there
[02:16:02] pwnd_nsfw: also, fixture_file_upload does not seem to work for FactoryGirl
[02:16:04] Radar: But not used in https://gist.github.com/SirUncleCid/78e65a1518671a9c6243#file-butts_spec-rb-L8?
[02:16:35] Radar: syntax for that FG line would be image { fixture_file_upload("small.gif") }
[02:17:12] pwnd_nsfw: Good eye on the link_hash bit
[02:17:15] pwnd_nsfw: Much appreciated
[02:18:04] pwnd_nsfw: https://gist.github.com/SirUncleCid/6366ebacf0f5ffa755ac is what I get from fixture_file_upload
[02:18:29] pwnd_nsfw: refresh if you didn't catch my factory code
[02:20:41] smathy: has joined #RubyOnRails
[02:22:00] pwnd_nsfw: include ActionDispatch::TestProcess got it to pass, but I have to pass the entire path
[02:24:48] Radar: stepped away for a moment
[02:24:56] Radar: Hm, I wonder how it works in our codebase thn
[02:24:58] Radar: pwnd_nsfw: All good now?
[02:25:03] pwnd_nsfw: Yes sir, thanks again
[02:25:21] pwnd_nsfw: That's actually like.. huge lump of a problem when I get to testing code
[02:25:30] Radar: Aha, at the top of one of our factories: include ActionDispatch::TestProcess
[02:25:55] pwnd_nsfw: does yours look straight at the fixtures dir?
[02:26:01] The_Phoenix: has joined #RubyOnRails
[02:27:09] alex88: has joined #RubyOnRails
[02:28:07] rhizome: mine starts at the app dir
[02:28:46] rhizome: image {fixture_file_upload('./test/support/assets/LJ_FunPack_2014-b.jpg', 'image/jpg')}
[02:28:47] ericdykstra: has joined #RubyOnRails
[02:29:24] Rodya_: has joined #RubyOnRails
[02:30:41] pwnd_nsfw: Thanks rhizome
[02:31:13] rhizome: i have the ActionDispatch thing too
[02:32:23] Radar: Weird. We might have some configuration that makes it look in the right dir.
[02:33:11] doctorly: has joined #RubyOnRails
[02:33:42] jottr: has joined #RubyOnRails
[02:34:02] doctorly: I ran `rake assets:precompile` and now rails isn't automatically precompiling my assets every time a change my css. How can I fix this?
[02:34:32] Radar: doctorly: It won't precompile them if there's assets in public/assets. Remove these assets.
[02:34:50] doctorly: Radar: Thank you.
[02:36:15] doctorly: Yeah, that was perfect.
[02:37:52] bamorim: has joined #RubyOnRails
[02:42:36] northfurr: has joined #RubyOnRails
[02:44:40] choke: has joined #RubyOnRails
[02:44:56] DonOtreply: has joined #RubyOnRails
[02:47:03] guacamole: has joined #RubyOnRails
[02:48:42] norc_: has joined #RubyOnRails
[02:52:58] jdev: has joined #RubyOnRails
[02:54:31] eggoez: has joined #RubyOnRails
[02:55:26] yfeldblum: has joined #RubyOnRails
[02:56:18] yfeldblum: has joined #RubyOnRails
[03:03:36] alexhartley: has joined #RubyOnRails
[03:04:04] ericdykstra: has left #RubyOnRails: ()
[03:05:14] A124: has joined #RubyOnRails
[03:05:41] ddv: has joined #RubyOnRails
[03:11:37] northfurr: has joined #RubyOnRails
[03:20:07] Encapsulation: has joined #RubyOnRails
[03:20:31] Sawbones: has joined #RubyOnRails
[03:22:23] duderonomy: has joined #RubyOnRails
[03:23:10] herbst: has joined #RubyOnRails
[03:27:50] k13nox: has joined #RubyOnRails
[03:28:48] shmilan: has joined #RubyOnRails
[03:29:11] Sawbones: has joined #RubyOnRails
[03:29:43] Sawbones: has joined #RubyOnRails
[03:30:57] workmad3: has joined #RubyOnRails
[03:32:28] Z00t: has joined #RubyOnRails
[03:32:38] User458764: has joined #RubyOnRails
[03:36:21] rakm: has joined #RubyOnRails
[03:36:48] elben: has joined #RubyOnRails
[03:36:51] ericdykstra: has joined #RubyOnRails
[03:41:06] K_r3aPeR: has joined #RubyOnRails
[03:41:46] djbkd: has joined #RubyOnRails
[03:42:47] djbkd: has joined #RubyOnRails
[03:43:28] baweaver: has joined #RubyOnRails
[03:45:24] fryguy: is there an easy way to see if a rake task exists from the command line?
[03:45:47] iateadonut: has joined #RubyOnRails
[03:46:18] adam_: has left #RubyOnRails: ()
[03:46:29] adam12: has joined #RubyOnRails
[03:46:39] adam12: fryguy: rake -T
[03:46:47] adam12: unless someone told you while I was nickserv registering. lol
[03:47:12] fryguy: yah, i see that, trying to programmatically do it though. i guess i can grep the results and check the response code of grep
[03:47:53] fryguy: the return code of rake -T doesn't change depending on whether it finds a match or not
[03:47:56] djbkd: has joined #RubyOnRails
[03:49:55] adam12: fryguy: Could you make a new instance of Rake::Application?
[03:50:10] adam12: Could try over in #ruby too.
[03:50:13] fryguy: adam12: i'm in a separate codebase and/or on a different machine, so no
[03:50:20] ericdykstra: has left #RubyOnRails: ()
[03:51:54] someish: has joined #RubyOnRails
[03:53:03] pawnbox: has joined #RubyOnRails
[03:53:47] adam12: fryguy: Hacky but maybe just `rake -T`.split.grep(/your:task/)
[03:57:48] RTG`: has joined #RubyOnRails
[04:03:29] tjbiddle: has joined #RubyOnRails
[04:06:28] Radar: very hacky
[04:06:34] Radar: There's probably a Rake way to do it
[04:08:41] Radar: fryguy: Rake::Application.new["foobar"]
[04:09:11] Radar: Might be more to it than that, but it's a strat.
[04:13:51] braincrash: has joined #RubyOnRails
[04:18:59] lethjakman-l: has joined #RubyOnRails
[04:19:45] Sawbones: has joined #RubyOnRails
[04:21:03] NinetyNineTails: has joined #RubyOnRails
[04:26:16] xor_id: has joined #RubyOnRails
[04:28:03] Contigi: has joined #RubyOnRails
[04:31:11] xor_id: has left #RubyOnRails: ()
[04:31:30] dextertzu: has joined #RubyOnRails
[04:31:46] Sawbones: has joined #RubyOnRails
[04:32:03] codedmart: has joined #RubyOnRails
[04:32:35] shibabu: has joined #RubyOnRails
[04:35:33] baweaver: has joined #RubyOnRails
[04:36:52] choke: has joined #RubyOnRails
[04:37:51] dextertzu: has joined #RubyOnRails
[04:38:18] choke: I have a model, and want the entries in the model ( not that many ) to be part of my navigation ( dropdown ).. What would be the most efficient way to handle that?
[04:38:51] konsolebox: has joined #RubyOnRails
[04:40:50] rickmasta: has joined #RubyOnRails
[04:41:50] dextertzu: has joined #RubyOnRails
[04:49:02] arBmind: has joined #RubyOnRails
[04:50:06] cicloid: has joined #RubyOnRails
[04:52:09] steve__: has joined #RubyOnRails
[04:54:05] corioliss: has joined #RubyOnRails
[04:56:10] dextertzu: has joined #RubyOnRails
[04:58:25] konsolebox: has joined #RubyOnRails
[05:00:49] bronson: has joined #RubyOnRails
[05:02:37] altaircg: has joined #RubyOnRails
[05:06:27] harly: has joined #RubyOnRails
[05:06:42] sakix: has joined #RubyOnRails
[05:07:48] darkxploit: has joined #RubyOnRails
[05:08:07] Sawbones: has joined #RubyOnRails
[05:10:42] pawnbox: has joined #RubyOnRails
[05:15:53] NinetyNineTails: has joined #RubyOnRails
[05:16:06] Graphettion: has joined #RubyOnRails
[05:22:18] CrazyHorse18: has joined #RubyOnRails
[05:23:09] tjbiddle: has joined #RubyOnRails
[05:24:43] herbst: has joined #RubyOnRails
[05:25:36] lethjakman-l: has joined #RubyOnRails
[05:26:08] pawnbox_: has joined #RubyOnRails
[05:26:22] k13nox: has joined #RubyOnRails
[05:27:03] pawnbox__: has joined #RubyOnRails
[05:33:55] _djbkd: has joined #RubyOnRails
[05:35:55] tjbiddle: has joined #RubyOnRails
[05:40:28] pulgalip1: has joined #RubyOnRails
[05:41:09] rvanlieshout: has joined #RubyOnRails
[05:41:15] craigp: has joined #RubyOnRails
[05:42:38] arup_r: has joined #RubyOnRails
[05:43:49] nocontrol: has joined #RubyOnRails
[05:43:51] Klumben: has joined #RubyOnRails
[05:44:11] pontiki: has joined #RubyOnRails
[05:50:57] Spa_Ins: has joined #RubyOnRails
[05:54:37] yfeldblum: has joined #RubyOnRails
[05:57:02] yfeldblum: has joined #RubyOnRails
[05:57:18] wethu: afternoon
[05:59:53] qejk: has joined #RubyOnRails
[06:01:56] Pazician: has joined #RubyOnRails
[06:02:22] threeminutemonta: has joined #RubyOnRails
[06:07:32] wethu: Working on integrations with accounting software, all the fun stuff, you ?
[06:09:00] rvanlieshout: getting ready for another day.. reviewing what others have been doing yesterday
[06:09:06] VaibhavRajput: has joined #RubyOnRails
[06:09:06] rvanlieshout: then some fun programming. so all good
[06:09:25] wethu: yeah I'm doing fun coding when I'm home or on the train :)
[06:11:18] VaibhavRajput: has left #RubyOnRails: ()
[06:11:48] rickmasta: has joined #RubyOnRails
[06:12:49] onlyme_: has joined #RubyOnRails
[06:16:19] smoitra: has joined #RubyOnRails
[06:16:19] krz: has joined #RubyOnRails
[06:17:52] JohnT: has joined #RubyOnRails
[06:22:15] melonstorm: has joined #RubyOnRails
[06:22:25] altaircg: has joined #RubyOnRails
[06:28:34] aganov: has joined #RubyOnRails
[06:29:16] altaircg: has joined #RubyOnRails
[06:31:36] altair118: has joined #RubyOnRails
[06:32:18] chouhoul_: has joined #RubyOnRails
[06:33:01] shibabu: has joined #RubyOnRails
[06:39:02] fedexo: has joined #RubyOnRails
[06:40:23] altair118: has joined #RubyOnRails
[06:42:25] altair118: has joined #RubyOnRails
[06:47:42] jamto11: has joined #RubyOnRails
[06:47:57] Jameser: has joined #RubyOnRails
[06:49:08] mdw: has joined #RubyOnRails
[06:51:31] jas02: has joined #RubyOnRails
[06:52:01] netzfisch: has joined #RubyOnRails
[06:54:10] sarink: has joined #RubyOnRails
[06:54:36] dionysus69: has joined #RubyOnRails
[06:55:16] krz: has joined #RubyOnRails
[07:02:41] beast_: has joined #RubyOnRails
[07:03:40] bronson: has joined #RubyOnRails
[07:05:16] alexhartley: has joined #RubyOnRails
[07:08:48] krz: has joined #RubyOnRails
[07:09:42] n00bDev: has joined #RubyOnRails
[07:11:40] CaptainAl: has joined #RubyOnRails
[07:11:56] solars: has joined #RubyOnRails
[07:12:01] dexter-tzu: has joined #RubyOnRails
[07:15:33] DoubleMalt: has joined #RubyOnRails
[07:16:29] herbst: has joined #RubyOnRails
[07:16:29] herbst: has joined #RubyOnRails
[07:18:48] juddey: has joined #RubyOnRails
[07:25:49] herbst: has joined #RubyOnRails
[07:27:00] wvgates: has joined #RubyOnRails
[07:27:17] Pazician: has joined #RubyOnRails
[07:29:36] pendekar_langit: has joined #RubyOnRails
[07:30:01] hnanon: has joined #RubyOnRails
[07:30:43] hnanon: How can I change my app root when a user is logged in?
[07:30:50] hnanon: I'm using the Sorcery gem.
[07:34:45] shibabu: has joined #RubyOnRails
[07:35:50] sandstrom: has joined #RubyOnRails
[07:40:27] pendekar_langit: how to fix Connection refused - connect(2) for "localhost" port 9200
[07:40:43] altair118: has joined #RubyOnRails
[07:40:46] pendekar_langit: i try install and run elasticsearch, but port 9200 cant open
[07:43:20] pendekar_langit: has joined #RubyOnRails
[07:43:39] pendekar_langit: how to fix Connection refused - connect(2) for "localhost" port 9200
[07:43:43] dopie: has joined #RubyOnRails
[07:43:56] dionysus69: I have some.js file in assets/javascript dir, shouldn't it be imported automatically?
[07:44:37] pendekar_langit: i use active admin
[07:45:42] pendekar_langit: and i place in folder vendor/assets/javascript
[07:46:25] krz: has joined #RubyOnRails
[07:48:28] kp666: has joined #RubyOnRails
[07:48:34] puria: has joined #RubyOnRails
[07:49:07] kp666: has joined #RubyOnRails
[07:49:39] agit0: has joined #RubyOnRails
[07:49:44] lethjakman-l: has joined #RubyOnRails
[07:50:45] Radar: Radar is drunk. Radar has the answers.
[07:50:53] Radar: pendekar_langit: You need to start your elasticsearch server.
[07:50:56] jamto11_: has joined #RubyOnRails
[07:51:33] arup_r: dionysus69: depends on the how you organized the appplication.js manifest file
[07:51:33] Radar: dionysus69: no it's not imported unless you have require_tree in application.js
[07:51:41] Radar: dionysus69: tl;dr code plz
[07:52:05] dionysus69: --- //= require_tree . this is included in appjs
[07:52:14] Radar: dionysus69: Steps to reproduce in a new app plzkthx
[07:52:59] dionysus69: https://gist.github.com/webzorg/29d5ecae4a426a6f06e8
[07:53:19] dionysus69: first part of the code is some file in js dir
[07:53:37] dionysus69: and calling from view doesn't have access to it
[07:53:47] Radar: dionysus69: So I should be able to create new app and put that into /app/assets/javascripts/dion.js and it should break?
[07:54:13] dionysus69: no haha one sek
[07:54:29] Radar: that is the weirdest spelling of sec I've seen
[07:54:38] Radar: I mean the c and the key aren't even that close to each other
[07:54:56] Radar: and I should know because I'm having a real hard time typing properly
[07:55:49] dionysus69: ok thats better https://gist.github.com/webzorg/86e808062380ab4999bc
[07:56:32] dionysus69: sek is just a slang form of sec, its on purpose ^.^ its like kk for okay :D
[07:56:50] titeiko: has joined #RubyOnRails
[07:56:52] pendekar_langit: <Radar> yeah i start elasticsearch
[07:57:02] Radar: pendekar_langit: did you though? Did you REALLY?
[07:57:05] Radar: pendekar_langit: What command did you use?
[07:57:23] Radar: dionysus69: Seems to be missing some critical components
[07:57:24] pendekar_langit: service elasticsearch start
[07:57:42] Radar: pendekar_langit: Are you sure it's still running?
[07:58:03] Radar: dionysus69: like application.js
[07:58:55] Radar: pendekar_langit: run "service elasticsearch status" plzkthx
[07:59:05] pendekar_langit: elasticsearch.service - LSB: Starts elasticsearch
[07:59:05] pendekar_langit: Loaded: loaded (/etc/init.d/elasticsearch)
[07:59:05] pendekar_langit: Active: active (exited) since Fri 2016-01-22 15:23:34 BNT; 2s ago
[07:59:05] pendekar_langit: Process: 24665 ExecStart=/etc/init.d/elasticsearch start (code=exited, status=0/SUCCESS)
[07:59:17] Radar: Why did it exit
[07:59:21] Radar: Seems bad
[07:59:28] Radar: ps aux | grep elasticsearch
[07:59:30] Radar: any processes?
[07:59:51] dionysus69: Radar: where am I missing application.js??
[07:59:52] pendekar_langit: root 25654 0.0 0.0 4472 1484 pts/6 S+ 15:59 0:00 grep elasticsearch
[08:00:00] Radar: dionysus69: in the gist
[08:00:02] Radar: pendekar_langit: is that it?
[08:00:10] Radar: pendekar_langit: Seems to indicate that it's not running to me
[08:00:27] neanderslob: has joined #RubyOnRails
[08:00:38] dionysus69: ok https://gist.github.com/webzorg/1ec2255a96afd677a9f7 didnt post it because it's pretty much stock
[08:00:47] pendekar_langit: <Radar> how to fix run
[08:01:06] Radar: pendekar_langit: *shrug* look at what /etc/init.d/elasticsearch is doing
[08:01:27] Radar: dionysus69: yeah totes mah goats it's fine. Your code works for me in a new app. What's happening in your app?
[08:01:42] dionysus69: nothing alert isn't poping
[08:02:40] Radar: dionysus69: remind me again where you're putting this JS file?
[08:02:45] Radar: not application.js, the other one
[08:02:47] Radar: the exact path please
[08:03:01] Jameser`: has joined #RubyOnRails
[08:03:08] pendekar_langit: <Radar> [ ok ] Starting elasticsearch (via systemctl): elasticsearch.service.
[08:03:17] pendekar_langit: this start service is ok
[08:03:22] Radar: pendekar_langit: Ok, I don't think I can help you in the state I am in.
[08:03:23] dionysus69: *** Radar /home/webgen/www/kwc/app/assets/javascripts/some.js
[08:03:32] Radar: dionysus69: so far so good
[08:03:35] fox_mulder_cp: good morning, all
[08:03:42] pyemkey: has joined #RubyOnRails
[08:03:50] Radar: dionysus69: no JS errors in your browser's console?
[08:03:58] pendekar_langit: <Radar> ok tanks
[08:04:22] fox_mulder_cp: Radar: thanks for your book, i take some very fine hints how to make my app
[08:04:49] Radar: fox_mulder_cp: np :D
[08:05:00] fox_mulder_cp: Radar: and start write preview version of m own hosting panel :)
[08:05:51] dionysus69: Radar: yes I found something, but totally unexpected says application.js 404 not found ? :D
[08:06:57] fox_mulder_cp: Radar: but have a some q - i need a statical list of services (mail, app, dns, domain) with attached to it templates (exim/postfix configuration etc) for use this templates when apply new service for client
[08:08:03] pawnbox: has joined #RubyOnRails
[08:08:32] nocontrol: has joined #RubyOnRails
[08:10:07] fn2187: has joined #RubyOnRails
[08:12:38] darutoko: has joined #RubyOnRails
[08:17:18] r0bby_: has joined #RubyOnRails
[08:18:08] alexhartley: has joined #RubyOnRails
[08:18:37] krzkrz: has joined #RubyOnRails
[08:18:40] iateadonut: has joined #RubyOnRails
[08:18:41] r0bby_: has joined #RubyOnRails
[08:23:25] jgt: has joined #RubyOnRails
[08:23:51] puria: has joined #RubyOnRails
[08:29:19] dionysus69: is application js requiring vendor asset files also automatically or it needs configuration?
[08:29:28] rhizome: i wonder if there's a way to make an app that works without error on rails 4 and rails 2
[08:30:05] rhizome: dionysus69: some libs will have hardcoded assets, others don't
[08:31:09] rhizome: also i wonder what rake rails:upgrade does if you downgrade
[08:31:58] antgel: has joined #RubyOnRails
[08:32:07] herbst: has joined #RubyOnRails
[08:32:34] Ergo: has joined #RubyOnRails
[08:34:27] zpe: has joined #RubyOnRails
[08:34:31] User458764: has joined #RubyOnRails
[08:35:48] futilegames: has joined #RubyOnRails
[08:37:21] dionysus69: * is including the following proper way of including vendor items ? //= require_tree ../../../vendor/assets/javascripts/. including
[08:37:32] darutoko: has joined #RubyOnRails
[08:38:19] dionysus69: it works its just I never heard of this way before
[08:38:52] srinidhi: has joined #RubyOnRails
[08:41:56] rhizome: ew what is that
[08:42:53] rhizome: for that, you use require_tree . [period, this directory]
[08:45:48] artto: has joined #RubyOnRails
[08:46:12] twilling: has joined #RubyOnRails
[08:46:22] wvgates: Hello all! This is my first time in IRC. Is there anyone who can help me with spree
[08:46:42] sandstrom: has joined #RubyOnRails
[08:46:47] rvanlieshout: has joined #RubyOnRails
[08:47:16] tbuehlmann: wvgates, welcome! best is to simply ask your specific question
[08:47:18] rhizome: i think #spree is a channel that might be better
[08:47:26] tbuehlmann: also, that's a very good tip
[08:47:28] lycaonian: has joined #RubyOnRails
[08:47:38] wvgates: is there a spree channel @rhizome
[08:47:49] ecmacoder: has joined #RubyOnRails
[08:48:04] twilling: has joined #RubyOnRails
[08:48:11] rhizome: has joined #RubyOnRails
[08:48:16] ecmacoder: has joined #RubyOnRails
[08:48:38] pawnbox: has joined #RubyOnRails
[08:51:32] wvgates: changing database .. does not load seed data in spree
[08:51:34] wvgates: https://gist.github.com/vamsipavanmahesh/9c441a0f8eeae3de1ff9
[08:52:45] dionysus69: rhizome: yes I have this require_tree . too, I just added that ugly line to add vendor assets to the asset pipeline too doesn't make sense?
[08:53:07] dionysus69: so it includes both app and vendor assets
[08:53:09] rhizome: wvgates: you just changed database sources and you're asking how data gets seeded? same way you did it in sqlite3 probably
[08:53:30] rhizome: dionysus69: the better way is to add vendor to the asset pipeline
[08:53:57] dionysus69: like this ? //= require_tree ../../../vendor/ .
[08:54:25] rhizome: no, you shouldn't need that many periods
[08:54:48] rhizome: google 'rails vendor asset pipeline"
[08:56:01] wvgates: rhizome: but that is the default app, that comes when you when you install spree ..
[08:56:25] wvgates: unfortunately this is my first project in rails, So I am looking stupid ..
[08:56:51] srinidhi: has joined #RubyOnRails
[08:57:25] tvw: has joined #RubyOnRails
[08:58:44] AzaToth: has joined #RubyOnRails
[08:59:58] defsdoor: has joined #RubyOnRails
[09:00:35] mikecmpbll: has joined #RubyOnRails
[09:00:45] yos7ph: has joined #RubyOnRails
[09:02:31] dionysus69: rhizome: haha ok thanks :)
[09:02:51] rromanchuk: has joined #RubyOnRails
[09:04:33] yfeldblum: has joined #RubyOnRails
[09:06:04] bronson: has joined #RubyOnRails
[09:06:47] blackhuey: has joined #RubyOnRails
[09:06:56] dionysus69: could I combine angular js and rails? lets say angular js would handle the view and rails would handle admin panel of the website?
[09:06:59] ferr: has joined #RubyOnRails
[09:07:15] djellemah: has joined #RubyOnRails
[09:07:24] dionysus69: given that I am trying to design single page app
[09:09:10] drptbl: has joined #RubyOnRails
[09:09:31] theod: has joined #RubyOnRails
[09:09:50] mark1: has joined #RubyOnRails
[09:10:55] k13nox: has joined #RubyOnRails
[09:11:03] nhhagen: has joined #RubyOnRails
[09:11:46] Isthar: has joined #RubyOnRails
[09:13:19] arcanemethods: has joined #RubyOnRails
[09:13:21] rvanlieshout: has joined #RubyOnRails
[09:13:31] dopie: has joined #RubyOnRails
[09:15:11] jsrn_: has joined #RubyOnRails
[09:23:58] arcane-methods: has joined #RubyOnRails
[09:25:32] Jasaka: has joined #RubyOnRails
[09:28:24] dopie: has joined #RubyOnRails
[09:31:55] yaewa: has joined #RubyOnRails
[09:35:42] lycaonian: has joined #RubyOnRails
[09:36:41] shibabu: has joined #RubyOnRails
[09:38:15] PedramT: has joined #RubyOnRails
[09:38:46] lethjakman-l: has joined #RubyOnRails
[09:39:11] PedramT_: has joined #RubyOnRails
[09:39:41] snowy: has joined #RubyOnRails
[09:39:48] PedramT_: has joined #RubyOnRails
[09:40:28] arcane-methods: has joined #RubyOnRails
[09:42:22] arcane-methods: has joined #RubyOnRails
[09:42:54] User458764: has joined #RubyOnRails
[09:44:14] arcane-methods: has joined #RubyOnRails
[09:44:34] DeXterbed: has joined #RubyOnRails
[09:47:00] PedramT: has joined #RubyOnRails
[09:47:06] arcane-methods: has joined #RubyOnRails
[09:47:07] ql6wlld: has joined #RubyOnRails
[09:48:44] PedramT: has joined #RubyOnRails
[09:49:00] lenndaddy: has joined #RubyOnRails
[09:49:19] lenndaddy: is it possible to have an api in a rails app accompanied by a view layer that makes use of that api's controllers? i want to have both an api and a dashboard for my app that do the same things
[09:52:12] rodfersou: has joined #RubyOnRails
[09:52:37] kp666: has joined #RubyOnRails
[09:52:39] rvanlieshout: lenndaddy: you have your single controller either respond with html or json or whatever
[09:53:15] PedramT_: has joined #RubyOnRails
[09:53:31] joy4u: has joined #RubyOnRails
[09:53:34] joy4u: has left #RubyOnRails: ()
[09:53:48] lenndaddy: rvanlieshout: ah, responds_to?
[09:53:56] kp666: has joined #RubyOnRails
[09:55:14] kp666: has joined #RubyOnRails
[09:55:48] ecmacoder: has joined #RubyOnRails
[09:56:01] PedramT__: has joined #RubyOnRails
[09:56:31] kp666: has joined #RubyOnRails
[09:57:43] kp666: has joined #RubyOnRails
[09:59:04] kp666: has joined #RubyOnRails
[09:59:54] baweaver: has joined #RubyOnRails
[10:03:46] rvanlieshout: lenndaddy: yes
[10:05:24] arcane-methods: has joined #RubyOnRails
[10:07:40] quazimodo: has joined #RubyOnRails
[10:10:36] PedramT: has joined #RubyOnRails
[10:14:14] drptbl: has joined #RubyOnRails
[10:14:25] alexhart_: has joined #RubyOnRails
[10:15:33] PedramT: has joined #RubyOnRails
[10:17:32] PedramT_: has joined #RubyOnRails
[10:17:40] arup_r: has joined #RubyOnRails
[10:18:38] PedramT__: has joined #RubyOnRails
[10:18:47] DirtyFInn: has joined #RubyOnRails
[10:20:33] alexhartley: has joined #RubyOnRails
[10:20:45] tens0r: has joined #RubyOnRails
[10:22:47] PedramT: has joined #RubyOnRails
[10:23:55] PedramT_: has joined #RubyOnRails
[10:24:03] zpe: has joined #RubyOnRails
[10:25:24] darkxploit: has joined #RubyOnRails
[10:28:49] workmad3: has joined #RubyOnRails
[10:31:46] PedramT_: has joined #RubyOnRails
[10:33:09] ldnunes: has joined #RubyOnRails
[10:36:50] moei: has joined #RubyOnRails
[10:44:20] User458764: has joined #RubyOnRails
[10:44:43] mdw: has joined #RubyOnRails
[10:45:16] wethu: has joined #RubyOnRails
[10:47:29] mrtomme: has joined #RubyOnRails
[10:51:52] gbgdev: has joined #RubyOnRails
[10:55:10] renanoronfle: has joined #RubyOnRails
[10:56:51] lacrymology: has joined #RubyOnRails
[10:57:21] hannelita: has joined #RubyOnRails
[10:57:30] big|bad|wolf: has joined #RubyOnRails
[10:57:58] PedramT: has joined #RubyOnRails
[10:58:25] herbst: has joined #RubyOnRails
[10:58:25] herbst: has joined #RubyOnRails
[11:03:49] lacrymology: has joined #RubyOnRails
[11:08:21] PedramT: has joined #RubyOnRails
[11:08:24] marr: has joined #RubyOnRails
[11:09:41] n00bDev: has joined #RubyOnRails
[11:09:56] tjbiddle: Anyone know if there's a way to execute a Capistrano task one server at a time? Capistrano room is dead
[11:10:40] arBmind: has joined #RubyOnRails
[11:14:05] sarink: has joined #RubyOnRails
[11:18:03] akkmaxon: has joined #RubyOnRails
[11:20:07] ziyadb: has joined #RubyOnRails
[11:22:57] djellemah_: has joined #RubyOnRails
[11:23:31] shibabu: has joined #RubyOnRails
[11:24:39] tetraktys: has joined #RubyOnRails
[11:27:36] lethjakman-l: has joined #RubyOnRails
[11:27:59] FooMunki: has joined #RubyOnRails
[11:32:25] futilegames: has joined #RubyOnRails
[11:34:21] PedramT: has joined #RubyOnRails
[11:36:28] artto: has joined #RubyOnRails
[11:38:18] User458764: has joined #RubyOnRails
[11:39:12] shibly: has joined #RubyOnRails
[11:39:39] jamto11: has joined #RubyOnRails
[11:41:57] fox_mulder_cp: for docker devops/admins fine app https://github.com/weaveworks/scope
[11:42:10] jottr: has joined #RubyOnRails
[11:42:18] PedramT: has joined #RubyOnRails
[11:45:43] k13nox: has joined #RubyOnRails
[11:46:39] shibly: has left #RubyOnRails: ()
[11:47:37] PedramT: has joined #RubyOnRails
[11:48:38] mdw: has joined #RubyOnRails
[11:48:47] blackmes1: has joined #RubyOnRails
[11:49:12] atmosx: has left #RubyOnRails: ("WeeChat 0.4.4-dev")
[11:52:35] PedramT: has joined #RubyOnRails
[11:52:40] KorriX: has joined #RubyOnRails
[11:54:23] lexileo: has joined #RubyOnRails
[11:55:14] lexiMon: has joined #RubyOnRails
[11:55:28] tetraktys: has joined #RubyOnRails
[11:55:44] k13nox: has joined #RubyOnRails
[11:58:12] big|bad|wolf: has joined #RubyOnRails
[11:59:17] lexileo: has joined #RubyOnRails
[12:06:30] srinidhi: has joined #RubyOnRails
[12:08:03] c355E3B: has joined #RubyOnRails
[12:08:17] efy: has joined #RubyOnRails
[12:08:27] codedmart: has joined #RubyOnRails
[12:08:51] tetraktys: has joined #RubyOnRails
[12:10:28] n00bDev: has joined #RubyOnRails
[12:14:51] sarink: has joined #RubyOnRails
[12:15:27] PedramT: has joined #RubyOnRails
[12:15:32] JDeen: has joined #RubyOnRails
[12:15:38] big|bad|wolf: has joined #RubyOnRails
[12:19:24] tetraktys: has joined #RubyOnRails
[12:20:56] rhizome: in my head i pronounce "dtordable" like a drunk person saying "door table"
[12:26:26] ferr: has joined #RubyOnRails
[12:28:35] herbst: has joined #RubyOnRails
[12:31:07] Scripore: has joined #RubyOnRails
[12:31:40] Mession: has left #RubyOnRails: ()
[12:32:04] jsrn_: has joined #RubyOnRails
[12:32:24] krzkrz: has joined #RubyOnRails
[12:34:01] IanV0rn2341: has joined #RubyOnRails
[12:34:30] futilegames: has joined #RubyOnRails
[12:35:05] arup_r: has joined #RubyOnRails
[12:37:48] nocontrol: has joined #RubyOnRails
[12:39:01] mdw: has joined #RubyOnRails
[12:39:32] sandstrom: has joined #RubyOnRails
[12:40:42] DEA7TH: has joined #RubyOnRails
[12:42:45] big|bad|wolf: has joined #RubyOnRails
[12:45:15] lexiMon: has joined #RubyOnRails
[12:45:18] DeXterbed: has joined #RubyOnRails
[12:46:03] FooMunki: has joined #RubyOnRails
[12:46:34] herbst: has joined #RubyOnRails
[12:47:49] k13nox: has joined #RubyOnRails
[12:50:03] dionysus69: has joined #RubyOnRails
[12:52:21] pawnbox: has joined #RubyOnRails
[12:55:49] arup_r: has joined #RubyOnRails
[12:58:38] mdw: has joined #RubyOnRails
[12:58:52] lessless: has joined #RubyOnRails
[13:02:40] User458764: has joined #RubyOnRails
[13:06:50] DEA7TH: Is it possible to assert the contents of a group select box? expect(page).to have_select('id', options: ...) -- I tried passing a hash for options, but it didn't get it.
[13:06:52] blackmes1: has joined #RubyOnRails
[13:10:55] pendekar_langit: has joined #RubyOnRails
[13:11:11] n00bDev: has joined #RubyOnRails
[13:11:29] mark_slight: has joined #RubyOnRails
[13:14:35] drptbl: has joined #RubyOnRails
[13:16:08] Z00t: has joined #RubyOnRails
[13:16:20] DEA7TH: I suppose I should use have_selector instead
[13:16:46] sevenseacat: has joined #RubyOnRails
[13:17:04] sarink: has joined #RubyOnRails
[13:17:08] lethjakman-l: has joined #RubyOnRails
[13:17:14] artto: has joined #RubyOnRails
[13:19:12] mdw: has joined #RubyOnRails
[13:21:22] matthias_: has joined #RubyOnRails
[13:24:16] someish: has joined #RubyOnRails
[13:25:23] mrgreenfur: has joined #RubyOnRails
[13:26:25] chipotle: has joined #RubyOnRails
[13:29:43] beast_: has joined #RubyOnRails
[13:34:33] herbst: has joined #RubyOnRails
[13:35:12] treaki: has joined #RubyOnRails
[13:36:48] JDeen: has joined #RubyOnRails
[13:37:59] rickmasta: has joined #RubyOnRails
[13:38:46] chipotle: has joined #RubyOnRails
[13:41:36] HarshVardhanKuma: has joined #RubyOnRails
[13:45:07] Craigimus: has joined #RubyOnRails
[13:47:29] blackmes1: has joined #RubyOnRails
[13:49:32] chipotle: has joined #RubyOnRails
[13:49:51] bbrowning: has joined #RubyOnRails
[13:50:40] IanV0rn2341: has joined #RubyOnRails
[13:52:39] shibabu: has joined #RubyOnRails
[13:53:03] chipotle: has joined #RubyOnRails
[13:55:18] HarshVardhanKuma: has left #RubyOnRails: ()
[13:56:05] shinnya: has joined #RubyOnRails
[13:58:13] lexileo: has joined #RubyOnRails
[13:59:12] ramortegui: has joined #RubyOnRails
[14:01:03] bmalum: has joined #RubyOnRails
[14:04:05] iFrey: has joined #RubyOnRails
[14:04:20] rclanan: has joined #RubyOnRails
[14:05:37] lexiMon: has joined #RubyOnRails
[14:06:18] Almoullim: has joined #RubyOnRails
[14:08:16] Scripore: has joined #RubyOnRails
[14:09:13] drptbl: has joined #RubyOnRails
[14:10:18] mdw: has joined #RubyOnRails
[14:10:31] tildes: has joined #RubyOnRails
[14:11:57] n00bDev: has joined #RubyOnRails
[14:14:40] FailBit: Devise 3.5.4 fucked up session rememberable everywhere
[14:15:06] FailBit: everyone on my site is getting logged out after a few hours regardless of what their "remember me" thing is set to
[14:15:22] nertzy2: has joined #RubyOnRails
[14:15:36] treehug88: has joined #RubyOnRails
[14:16:37] B1n4r10: has joined #RubyOnRails
[14:17:43] bensarz: has joined #RubyOnRails
[14:17:56] sarink: has joined #RubyOnRails
[14:18:46] tetraktys: has joined #RubyOnRails
[14:23:44] JohnT: has joined #RubyOnRails
[14:24:52] DoubleMalt: has joined #RubyOnRails
[14:25:33] krzkrz: has joined #RubyOnRails
[14:25:36] fmcgeough: has joined #RubyOnRails
[14:27:15] fox_mulder_cp: rails5 beta don't work at chrome - after submit btn pressed it says that token fail's
[14:27:34] sevenseacat: unlikely to be anything specific to chrome.
[14:27:52] quazimodo: has joined #RubyOnRails
[14:28:23] adgtl_: has joined #RubyOnRails
[14:28:27] tildes: has joined #RubyOnRails
[14:29:57] VeryBewitching: has joined #RubyOnRails
[14:30:55] FailBit: good afternoon
[14:30:58] VeryBewitching: Well fine pendekar_langit
[14:30:58] hahuang65: has joined #RubyOnRails
[14:31:23] VeryBewitching: The project manager I'm working with doesn't understand HTTP timeouts.
[14:31:47] greengriminal: has joined #RubyOnRails
[14:32:03] mdw: has joined #RubyOnRails
[14:32:45] Moeh: has joined #RubyOnRails
[14:33:48] Moeh: How can I make rails 5 accept JSON formatted according to JSONAPI (http://jsonapi.org/format/)? I have active model serializers installed and data served by rails already complies to this standard. However I would like to accept POSTs that are formatted this way.
[14:35:02] peeja: has joined #RubyOnRails
[14:35:33] lexileo: has joined #RubyOnRails
[14:35:44] DEA7TH: has joined #RubyOnRails
[14:36:17] aegis3121: has joined #RubyOnRails
[14:38:15] JohnT: has joined #RubyOnRails
[14:44:55] Frem: has joined #RubyOnRails
[14:47:25] lexiMon: has joined #RubyOnRails
[14:48:02] mdw7: has joined #RubyOnRails
[14:48:19] chipotle: has joined #RubyOnRails
[14:52:55] nertzy2: has joined #RubyOnRails
[14:53:57] eyck: has joined #RubyOnRails
[14:55:49] alexhartley: has joined #RubyOnRails
[14:56:47] Craigimus: has joined #RubyOnRails
[14:58:45] pawnbox_: has joined #RubyOnRails
[15:00:45] craigp: has joined #RubyOnRails
[15:01:02] craigp: has joined #RubyOnRails
[15:01:43] eljimmy: has joined #RubyOnRails
[15:03:21] lexileo: has joined #RubyOnRails
[15:05:28] hannelita: has joined #RubyOnRails
[15:06:05] lethjakman-l: has joined #RubyOnRails
[15:07:51] mordof_work: has joined #RubyOnRails
[15:09:35] effebi: has joined #RubyOnRails
[15:09:43] effebi: hi to all
[15:11:46] effebi: i'm submitting a form for insert data in db, but i need to add a string in a field definited from a SecureRandom.hex value. I know i can add an hidden field in form, but is there a method for define this field in controller?
[15:11:59] bensarz: has joined #RubyOnRails
[15:11:59] bronson: has joined #RubyOnRails
[15:14:03] n00bDev: has joined #RubyOnRails
[15:15:36] lexileo: has joined #RubyOnRails
[15:15:44] effebi: anyone can help me?
[15:16:32] lexiMon: has joined #RubyOnRails
[15:17:52] lacrymology: has joined #RubyOnRails
[15:17:57] helpa: effebi: How to ask good questions and get great answers: http://www.mikeash.com/getting_answers.html
[15:18:02] rvanlieshout: hmm. that's not what i mean
[15:18:07] rvanlieshout: effebi: !ask2ask
[15:18:07] helpa: effebi: Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
[15:18:27] effebi: ok i solved from stackoverflow !!!
[15:18:31] ferr: has joined #RubyOnRails
[15:18:45] effebi: thanks ;)
[15:18:51] sarink: has joined #RubyOnRails
[15:19:15] mark_slight: has left #RubyOnRails: ()
[15:20:27] gheegh: has joined #RubyOnRails
[15:22:19] drptbl: has joined #RubyOnRails
[15:24:08] chipotle: has joined #RubyOnRails
[15:24:59] sonofdirt: has joined #RubyOnRails
[15:29:16] N3sh108: has joined #RubyOnRails
[15:29:36] N3sh108: hello there! I am having some troubles with RoR. I just created a model and I would like to generate a controller for it. How do I do it? If I do 'db:migrate' I get an error concerning the role not being present
[15:31:07] nertzy2: has joined #RubyOnRails
[15:32:10] smathy: has joined #RubyOnRails
[15:33:26] kies^: has joined #RubyOnRails
[15:35:02] ellen_: has joined #RubyOnRails
[15:35:47] boboc: has joined #RubyOnRails
[15:36:38] FailBit: you haven't set up your database (which I'm assuming is postgres, because it calls database users roles until 9.2)
[15:37:33] FailBit: sudo -u postgres createuser -d $(whoami)
[15:37:54] sevenseacat: how can you say things like that without even seeing the error message???
[15:37:58] sevenseacat: like wtf, seriously
[15:38:34] parus: has joined #RubyOnRails
[15:38:35] N3sh108: I fixed it, FailBit. I just had to use rails g name new
[15:38:37] momomomomo: has joined #RubyOnRails
[15:38:41] FailBit: experience
[15:38:49] sevenseacat: FailBit: no. knock it off.
[15:39:22] FailBit: has left #RubyOnRails: ("WeeChat 0.4.2")
[15:42:46] momomomomo: has joined #RubyOnRails
[15:42:47] reckoner: has joined #RubyOnRails
[15:42:56] reckoner: what's new?
[15:43:30] reckoner: i'm migrating an application from cancancan to pundit.
[15:43:31] n1lo: has joined #RubyOnRails
[15:43:54] reckoner: pundit says, "include" in base application controller.
[15:44:09] reckoner: does anyone know if i can just add it to a specific controller as i go?
[15:44:23] mdw: has joined #RubyOnRails
[15:44:42] momomomomo: reckoner: !try
[15:44:42] helpa: reckoner: Why don't you try it and find out for yourself?
[15:45:09] reckoner: i am trying. i'm asking so i don't waste time incase someone knows.
[15:45:55] Ergo: has joined #RubyOnRails
[15:47:00] gbgdev: has joined #RubyOnRails
[15:47:23] matthias: has joined #RubyOnRails
[15:50:06] sunya7a: how do i grab data from the session object while setting a default value in case the key doesn't exist? I tried #fetch but it seems session doesn't respond to it...I'm on RoR 3.0.20
[15:51:42] Papierkorb: sunya7a: I'd handle it like a hash: session[:foo] ||= 'bar'
[15:51:53] PedramT: has joined #RubyOnRails
[15:52:20] dcope: i have a dalli / memcached cache store. whenever i call Rails.cache.fetch(key) (with no expiration or options) the cache does not seem to live indefinitely
[15:52:28] dcope: it's almost like it's being auto purged after time. why is this?
[15:52:52] sunya7a: Papierkorb: thank you.
[15:53:04] shibabu: has joined #RubyOnRails
[15:53:15] mag42c: has joined #RubyOnRails
[15:54:24] sunya7a: Papierkorb: do you know why #fetch doesn't work on session? i always thought it is a Hash
[15:54:39] N3sh108: I am trying to connect to postgreSQL with RoR but I setup the username to be different than my own. How can I specify that in 'db:migrate'?
[15:55:13] sevenseacat: N3sh108: you don't, you specify it in your database.yml
[15:55:15] Papierkorb: sunya7a: if it doesn't work it probably doesn't exist. And session is like a Hash, but not quiet
[15:55:16] Moeh: has joined #RubyOnRails
[15:55:53] N3sh108: sevenseacat: it says this: ActiveRecord::NoDatabaseError: FATAL: role "<myuser>" does not exist
[15:56:13] N3sh108: in the database.yml there is username/password that I setup on psql
[15:56:42] sevenseacat: seems like you didnt set up that username correctly
[15:56:43] Moeh: If I use active model serializers with the JSONAPI adapter, rails correctly serializes objects in the JSONAPI format. However, it seems it cannot accept calls with this format. Anyone knows if that is solved with https://github.com/cerebris/jsonapi-resources? Which should I use?
[15:56:59] N3sh108: sevenseacat: very unlikely
[15:57:23] sevenseacat: N3sh108: very likely actually
[15:57:26] sunya7a: Papierkorb: Okay...ill try to find the source code for it to see what exactly session is...thank you
[15:57:53] N3sh108: sevenseacat: how can I check that? But I am quite sure that the username/password are correct. I took note while setting up the DB
[15:58:20] sevenseacat: can you connect to the database via the command line with those same credentials?
[15:58:36] blackmes1: has joined #RubyOnRails
[15:59:14] disgrntld: has joined #RubyOnRails
[15:59:40] PedramT: has joined #RubyOnRails
[16:00:41] lessless: has joined #RubyOnRails
[16:00:51] dionysus69: has joined #RubyOnRails
[16:02:12] Pupeno: has joined #RubyOnRails
[16:02:12] Pupeno: has joined #RubyOnRails
[16:04:24] rclanan: has joined #RubyOnRails
[16:04:47] cschneid_: has joined #RubyOnRails
[16:05:25] sunya7a: Papierkorb: ahh...turns out that it does respond to fetch...only fetch is not able to automatically convert a symbol into string...while session[:a] does. I guess that is added behavior by RoR to session
[16:05:42] tubbo: Moeh: what do you mean by "accept calls"?
[16:05:50] hannelita: has joined #RubyOnRails
[16:05:52] Papierkorb: sunya7a: interesting, did not know that
[16:06:07] sunya7a: Papierkorb: cool...thanks again for your time...that clears things up for me
[16:06:13] Moeh: I want to make POST calls containing a jsonapi payload to the rails app
[16:06:33] pawnbox: has joined #RubyOnRails
[16:07:03] tubbo: Moeh: oh, well you can still do that can't you? you'd just have to get the params out of there yourself.
[16:07:44] tubbo: Moeh: so yeah, i suppose jsonapi-resources does what you're looking for. but it also seems to make you buy into their system of presenting models as resources
[16:08:10] tubbo: like i don't think you'd want to use both jsonapi-resources and active_model_serializers
[16:08:16] Moeh: tubbo: That is definitely possible. I was just wondering if there is a way around that. It feels somehow strange that with AMS I can serialize an object in JSON in the jsonapi format but not deserialize.
[16:08:39] akshat: has joined #RubyOnRails
[16:08:40] Moeh: Jeah, I would not want to use both at the same time
[16:09:20] sonofdirt: has joined #RubyOnRails
[16:09:44] tubbo: Moeh: well that's not really in AMS' domain. it's more like a presenter object for your models. however you want to take in params in your controllers is up to you.
[16:09:46] mdw: has joined #RubyOnRails
[16:09:50] N3sh108: sevenseacat: I just fixed it by running the migration with sudo and adding the credentials to development and test (I did it only for production :/ )
[16:09:54] krzkrz: has joined #RubyOnRails
[16:11:16] bmb330: has joined #RubyOnRails
[16:11:44] Moeh: Well, I would like to build a rails api that conforms with the JSONAPI spec. It would be kind of strange data from api -> client has a different format than client -> api, don't you think?
[16:12:24] N3sh108: I am trying to access a controller for my DB from a rake task. Is this sufficient? -> session = ActionDispatch::Integration::Session.new(Rails.application)
[16:12:32] N3sh108: and then calling session.post ....
[16:12:57] bmb330: has left #RubyOnRails: ()
[16:13:44] goodcodeguy: has joined #RubyOnRails
[16:14:03] tubbo: Moeh: yeah i mean, AMS was designed back before JSON API was a thing, so the params coming in via a form for example would be the same as the params coming in via json
[16:14:10] tubbo: like they would follow the same structure.
[16:14:23] reckoner: is there a methodology behind using 'interactors' on collections? eg. - index action
[16:14:28] tubbo: Moeh: so maybe jsonapi-resources is overall a better fit for your application
[16:14:34] Moeh: tubbo: Yes, I see what you mean.
[16:14:48] n00bDev: has joined #RubyOnRails
[16:14:52] reckoner: Or should i just use a presenter?
[16:14:59] tubbo: i personally haven't built a lot of apps that use the JSON API spec because i haven't needed to
[16:15:12] tubbo: but i'm about to overhaul my company's API to use that spec and this is all interesting stuff :)
[16:17:03] DonOtreply: has joined #RubyOnRails
[16:18:28] livcd: has joined #RubyOnRails
[16:18:36] livcd: how can i install rails with a specific version of nokogiri ?
[16:19:10] lethjakman-l: has joined #RubyOnRails
[16:19:37] sarink: has joined #RubyOnRails
[16:20:45] VeryBewitching: livcd: The Rails version is going to determine your version of nokogiri I'm pretty sure.
[16:21:21] livcd: VeryBewitching: it installs the stable one but i'd like to install rc2
[16:22:26] Moeh: tubbo: Jeah, I would like to divert from the standards as little as possible. Which is why I am so sad that there isn't already a "rails way" to do it :)
[16:22:44] matthias: has joined #RubyOnRails
[16:24:14] njero: has joined #RubyOnRails
[16:24:23] maxx88: moeh: not sure it helps but, i read a good book on api???s called restful rails development by silvia puglisi, it was published in 2015 so fairly current
[16:25:21] Moeh: maxx88: Thanks! Will have a look!
[16:28:49] N3sh108: I can't seem to be able to call a simple create from my rake task
[16:28:52] chouhoulis: has joined #RubyOnRails
[16:29:03] livcd: so can i install rails and its dependencies from a Gemfile ?
[16:29:51] N3sh108: shouldn't this be enough for creating an entry? @mm = MyModel.new("name", "surname")
[16:31:40] hahuang65: has joined #RubyOnRails
[16:34:33] pwnd_nsfw: https://gist.github.com/SirUncleCid/27222830bfc2eec5c814 Test fails, but works live :/
[16:36:59] antgel: has joined #RubyOnRails
[16:38:54] wldcordeiro: has joined #RubyOnRails
[16:40:09] lexileo: has joined #RubyOnRails
[16:40:13] RTG`: has joined #RubyOnRails
[16:42:41] N3sh108: how can I create a new object from a Model from a Rake task?
[16:42:52] N3sh108: I have tried for an hour and I can't seem to be able to make it work...
[16:46:27] herbst: has joined #RubyOnRails
[16:46:29] sarink: has joined #RubyOnRails
[16:46:51] matthias: has joined #RubyOnRails
[16:46:57] lexiMon: has joined #RubyOnRails
[16:47:08] qejk: has joined #RubyOnRails
[16:47:29] tbuehlmann: N3sh108, can you show us what you've tried?
[16:49:13] evo: has joined #RubyOnRails
[16:49:25] N3sh108: tbuehlmann: first of all, my problem: I am trying to save a CSV into my database.
[16:49:54] N3sh108: tbuehlmann: if I tried to use new("somestring",0.0), I get this: ArgumentError: When assigning attributes, you must pass a hash as an argument.
[16:50:07] PedramT: has joined #RubyOnRails
[16:50:29] N3sh108: that is the last update. I managed to use environment so that I don't have to use a controller for creating the object
[16:50:43] tbuehlmann: N3sh108, right, that doesn't look right. what attributes are you trying to set? what are their names in the database?
[16:51:35] N3sh108: tbuehlmann: I just have 'date' and 'rate'
[16:51:45] N3sh108: and I am passing them exactly the same
[16:51:58] N3sh108: @rate = Rate.new(:date, :rate) @rate.save
[16:52:29] tbuehlmann: try YourModel.new(date: 'your date', rate: 'your rate')
[16:53:32] lexileo: has joined #RubyOnRails
[16:53:39] mostlybadfly: has joined #RubyOnRails
[16:54:37] livcd: how can i install rails with pre-specified versions of gems ?
[16:54:48] N3sh108: tbuehlmann: no error but not saved :/
[16:54:55] arup_r: has joined #RubyOnRails
[16:55:08] tbuehlmann: N3sh108, show us your actual code
[16:55:13] tubbo: livcd: use bundler
[16:55:42] ecmacoder: has joined #RubyOnRails
[16:55:53] Quintin: has joined #RubyOnRails
[16:56:00] N3sh108: here you go: http://pastebin.com/PeNvVrY6
[16:56:25] livcd: tubbo: i can do that. But how would i go for Rails and just a different version of nokogiri ?
[16:56:28] N3sh108: http://pastie.org/private/e1k7xkc8h9nj4vap8ldyq
[16:56:32] tbuehlmann: N3sh108, do you have any validations on the Rate model?
[16:56:40] N3sh108: validations?
[16:56:57] N3sh108: where would I see that?
[16:57:08] tbuehlmann: in the app/models/rate.rb file
[16:57:21] N3sh108: class Rate < ActiveRecord::Base end
[16:57:21] tubbo: livcd: http://bundler.io/ has information on how to create your Gemfile
[16:57:27] N3sh108: as empty as it could be
[16:57:42] tubbo: livcd: more specifically, http://bundler.io/gemfile.html
[16:58:07] tubbo: livcd: if you specify `gem 'nokogiri', 'some version'` in your Gemfile, it will override whatever rails is bundled with
[16:58:21] rakm: has joined #RubyOnRails
[16:58:22] livcd: tubbo: i am reading that...but does order matter ?
[16:58:24] tubbo: for example if you wanted to install a specific version due to some kind of internal library bug
[16:58:25] tbuehlmann: N3sh108, date and rate are set in your example? also, try `puts @rate.errors.inspect` after trying to save
[16:58:33] livcd: tubbo: so if i specifiy nokogiri first and then rails
[16:58:42] livcd: will rails override the previous nokogiri version ?
[16:58:53] tubbo: livcd: as i said, order doesn't matter.
[16:58:59] N3sh108: tbuehlmann: #<ActiveModel::Errors:0x00000005147c38 @base=#<Rate id: 2, date: "2016-01-22", rate: 1.0808, created_at: "2016-01-22 16:58:42", updated_at: "2016-01-22 16:58:42">, @messages={}>
[16:59:15] tubbo: if you specify nokogiri in your gemfile at all, it will try to install that version of nokogiri
[16:59:40] tbuehlmann: N3sh108, looks good, the object even got an id, so it's saved to the database
[16:59:48] N3sh108: but I can't see it
[16:59:50] tubbo: livcd: it's a little complicated and based on what other gems are dependent on nokogiri. for example, if capybara depends on nokogiri 3 and rails depends on nokogiri 2 (and doesn't allow upgrading to 3), you have a dependency conflict.
[16:59:53] tbuehlmann: how do you check?
[17:00:00] N3sh108: I am using a psql db
[17:00:08] N3sh108: so I got in and queried the DB
[17:00:18] N3sh108: I couldn't make the 'list' route work
[17:00:24] N3sh108: so this is my way for now
[17:00:29] livcd: tubbo: ok without considering conflicts Rails should not override the specified nokogiri version
[17:00:32] livcd: the question is
[17:00:42] tbuehlmann: N3sh108, hit `bin/rails console` in your terminal and try `Rate.count`
[17:00:42] dcope: i have a dalli / memcached cache store. whenever i call Rails.cache.fetch(key) (with no expiration or options) the cache does not seem to live indefinitely
[17:00:44] livcd: will it try to build its own version regardless but skip on using it ?
[17:00:45] tbuehlmann: let's see what that returns
[17:00:52] ecmacoder: has joined #RubyOnRails
[17:00:54] FLeiXiuS: "`<module:Logging>': uninitialized constant Thin::Logging::Logger (NameError)" any ideas?
[17:01:10] tubbo: livcd: no, you can only have one version of nokogiri active at any time. because in the Ruby universe, when you do `require 'nokogiri'`, it can only look it up in one place.
[17:01:11] N3sh108: tbuehlmann: 2
[17:01:15] DEA7TH: Do I need a gem to run my specs in parallel?
[17:01:20] adavia: has joined #RubyOnRails
[17:01:22] polishdub: has joined #RubyOnRails
[17:01:29] N3sh108: tbuehlmann: ok, so they are saved. I have another 2 questions :P
[17:01:35] peeja: has joined #RubyOnRails
[17:01:39] tubbo: livcd: and unlike NPM, bundler doesn't support recursive dependencies. you have to resolve all version conflicts in the host app.
[17:01:55] N3sh108: 1. I want the schema to be exactly date: primary key, rate: float
[17:01:59] N3sh108: no extra ID or else
[17:02:08] N3sh108: do I just change the schema.rb?
[17:02:27] tbuehlmann: N3sh108, why do you want that?
[17:02:39] N3sh108: I want the date to be unique
[17:02:46] arup_r: has joined #RubyOnRails
[17:02:52] N3sh108: and replace the value of rate whenever someone tries to add
[17:03:21] tbuehlmann: N3sh108, add a unique constraint for date then
[17:03:37] livcd: tubbo: kk going to try that
[17:03:40] mdw: Has anyone here made an 'Apple Push Notification Server' in Ruby? I'm more familiar with Ruby, there's a node-apn server which looks good but it's JavaScript.
[17:03:42] N3sh108: ok, I will look into that :)
[17:04:10] N3sh108: tbuehlmann: another question, how do I list every object in the DB? I couldn't add list to the routes, only show[:id]
[17:04:33] tubbo: mdw: no, but if i were i'd probably use this library https://github.com/nomad/Houston
[17:04:40] tubbo: mdw: not sure why you need a "server" for that
[17:04:44] tbuehlmann: N3sh108, you probably want to have `resources :rates` in your routes file and then have a rates_controller with an index action
[17:05:07] mdw: thanks tubbo, this looks good - excellent Author!
[17:05:08] tbuehlmann: that's a pretty vanilla resource, you can look that stuff up in the getting started guide: http://guides.rubyonrails.org/getting_started.html
[17:05:23] N3sh108: tbuehlmann: I have this now: resources :rate_controller, :only => [:new, :create]
[17:05:31] mdw: Matt Thompson is well known in the iOS world
[17:05:35] tubbo: N3sh108: have you read http://rubyonrails.org/doctrine/#convention-over-configuration?
[17:05:35] tbuehlmann: make it `resources :rates`
[17:05:36] N3sh108: if I add :list, it doesn't get shows
[17:05:40] ecmacoder: has joined #RubyOnRails
[17:06:00] tbuehlmann: read the stuff tubbo and I just pasted, you'll learn about how to do that the rails way
[17:06:58] AntiSpamMeta: has joined #RubyOnRails
[17:07:20] tubbo: imho rails is pretty awful to use unless you're down with its philosophy
[17:07:55] sandstrom: has joined #RubyOnRails
[17:07:59] N3sh108: tbuehlmann: I really can't find a way to update a value on conflict... Google isn't my friend with RoR
[17:08:26] tbuehlmann: I recommend getting familiar with the things in the guides
[17:08:32] livcd: tubbo: it worked ! eureka
[17:08:38] N3sh108: I just need this working for now :;/
[17:08:38] tbuehlmann: if the question stays, just ask again
[17:09:49] tubbo: N3sh108: you need to learn how to do what you're doing, and we're not going to just write the code for you. it's pretty clear you don't know the first thing about this stuff and you're just throwing out wild guesses.
[17:10:51] ecmacoder: has joined #RubyOnRails
[17:11:04] N3sh108: tubbo: the first thing about this stuff 'in ruby on rails'. I know how to do them in dozens of other languages just need to find the RoR version
[17:12:15] creature: The conventions/material in the guides is what's going to lead you to the RoR version. :)
[17:13:30] Z00t: has joined #RubyOnRails
[17:14:04] ss_much: has joined #RubyOnRails
[17:14:15] bronson: has joined #RubyOnRails
[17:14:39] mordof_work: has joined #RubyOnRails
[17:14:52] ecmacoder: has joined #RubyOnRails
[17:15:34] n00bDev: has joined #RubyOnRails
[17:17:23] _djbkd: has joined #RubyOnRails
[17:17:44] safety_cut: has joined #RubyOnRails
[17:18:40] jxs_: has joined #RubyOnRails
[17:20:52] ls: has joined #RubyOnRails
[17:25:21] B1n4r10: has joined #RubyOnRails
[17:25:42] User458764: has joined #RubyOnRails
[17:26:10] blackmesa: has joined #RubyOnRails
[17:28:44] n00bDev: has joined #RubyOnRails
[17:28:51] goodcodeguy: has joined #RubyOnRails
[17:31:04] Pazician_: has joined #RubyOnRails
[17:31:45] Pazician_: has joined #RubyOnRails
[17:32:03] alex88: has joined #RubyOnRails
[17:32:43] user083: has joined #RubyOnRails
[17:33:00] _djbkd: has joined #RubyOnRails
[17:36:17] Limix: has joined #RubyOnRails
[17:36:33] eljimbo: has joined #RubyOnRails
[17:36:56] k13nox: has joined #RubyOnRails
[17:37:50] Moeh: tubbo: It is actually so simple: http://stackoverflow.com/questions/32491360/deserializing-json-api-with-rails-strong-parameters
[17:38:00] _djbkd: has joined #RubyOnRails
[17:38:06] Moeh: I have it now working, GET and POST requests in jsonapi format.
[17:38:23] tubbo: Moeh: told ya ;)
[17:38:50] tubbo: Moeh: it might even behoove you to create a method called `api_params` and have it return `params.require(:data).require(:attributes)`
[17:39:05] tubbo: so you can just call api_params.permit :your, :attributes, :and, :stuff in your strong parameters method(s)
[17:39:52] Moeh: That is a very good idea! Where would you put it?
[17:43:55] _djbkd: has joined #RubyOnRails
[17:50:34] ferr: has joined #RubyOnRails
[17:51:34] [flying_high]: has joined #RubyOnRails
[17:52:11] baweaver: has joined #RubyOnRails
[17:52:57] tubbo: Moeh: maybe a protected method in ApplicationController?
[17:54:11] craigp: has joined #RubyOnRails
[17:55:36] shibabu: has joined #RubyOnRails
[17:56:04] PedramT: has joined #RubyOnRails
[18:01:02] HowardStark: has joined #RubyOnRails
[18:01:22] netzfisch: has joined #RubyOnRails
[18:02:03] lethjakman-l: has joined #RubyOnRails
[18:02:07] HowardStark: has left #RubyOnRails: ()
[18:02:15] HowardStark: has joined #RubyOnRails
[18:03:46] agit0: has joined #RubyOnRails
[18:03:46] LiquidCocaine: has joined #RubyOnRails
[18:04:37] kitsuneyo: has joined #RubyOnRails
[18:04:43] goodcodeguy: has joined #RubyOnRails
[18:05:06] LiquidCocaine: How's it going?
[18:06:50] PedramT: has joined #RubyOnRails
[18:06:56] mikecmpbll: has joined #RubyOnRails
[18:07:11] ekem: if i use rsync to pull uploaded files from a production server to use in a local copy of the app, that is `rsync . a@b.com:/public` should i keep the compiled assets with the transfer? Or should i pull the images and rebuild the assets locally
[18:08:43] arup_r: LiquidCocaine: it is going good...
[18:09:15] sundhell: has joined #RubyOnRails
[18:09:29] ekem: er, other way around on rsync there rsync <source> <dest?
[18:09:58] soahccc: ekem: which OS are you on?
[18:10:09] PedramT_: has joined #RubyOnRails
[18:10:12] dtordable: hello, anyone
[18:10:16] f3ttX]: has joined #RubyOnRails
[18:10:17] ekem: the production server is a linux server
[18:10:28] soahccc: and your dev env?
[18:10:29] ekem: and its pulled into a vagrant that is the same
[18:10:30] User458764: has joined #RubyOnRails
[18:10:44] ekem: so i can choose to use a webbrick or setup nginx to do it
[18:10:55] ekem: i havent quite made the decision/dev'd environment
[18:11:20] ekem: i would like to go after a setup that is easy to maintain, so im using puppet etc etc
[18:11:22] guacamole: has joined #RubyOnRails
[18:11:33] soahccc: Hmm because what I do is mounting our product assets via sshfs in readonly... We also do this for our staging server
[18:11:36] ekem: i have not put in capistrano yet, trying to figure out what to do with assets
[18:11:41] Oog: has joined #RubyOnRails
[18:11:47] Axy: has joined #RubyOnRails
[18:11:52] ekem: so have the local application pull from a 'cloud' source
[18:11:54] ekem: or a remote source?
[18:12:34] ekem: oh so wait,
[18:12:44] ekem: do you sshfs the assets folder straight to the dev assets
[18:12:49] ekem: and call it a day?
[18:13:24] Oog: i have a UserAddress model with default_scope { where(:deleted => false) }. on another model i have - has_many :exact_user_addresses, -> { where(:deleted => false) }, :class_name => 'UserAddress'. the default scope of UserAddress is nto carrying over. Think this is a bug or expected?
[18:13:26] ekem: ohhh i see, you can mount with sshfs, so you mount the folder, sorry i missed that bit
[18:14:17] soahccc: ekem: https://gist.github.com/2called-chaos/018ac1de391d6539e300
[18:15:04] ekem: ok that helps me understand what i can do with this. rsync lets you preserve groups and owners, so essentially its just fine to make exact copies
[18:15:14] kitsuneyo: hi LiquidCocaine
[18:15:34] ekem: i dont know how something like the assets pipeline can get so little attention in blog posts :P
[18:15:40] soahccc: Oog: what do you mean exactly? You define the same constraint on both ends?
[18:16:03] guacamole: has joined #RubyOnRails
[18:16:25] soahccc: ekem: what do you mean? It's quite simple to grasp and quite effective in what it does :>
[18:17:03] Hans267: has joined #RubyOnRails
[18:17:47] goodcodeguy: has joined #RubyOnRails
[18:17:56] ekem: soahccc, uh i guess i missed the train on that one :P
[18:18:24] ekem: i still dont have things setup to use a cdn etc, even though thats desireable, there are some things that are ambigous to me
[18:19:45] tubbo: ekem: it used to have more attention when it first came out.
[18:19:57] ecmacoder: has joined #RubyOnRails
[18:20:04] soahccc: ekem: we have quite a big site I guess and we don't use CDNs... We use multiple asset domains to server the assets but unless you are very big CDNs are overrated imho :>
[18:20:25] tubbo: soahccc: your "asset domains" aren't behind a CDN? how are you serving the files?
[18:20:36] tubbo: like where are they coming from
[18:20:55] lessless: has joined #RubyOnRails
[18:21:13] soahccc: tubbo: we have two server one of which is pure failover and serves statics.. They also load balance to two web servers
[18:21:29] tubbo: soahccc: oh so they're just static web servers?
[18:21:43] tubbo: soahccc: congratulations, you just built the world's shittiest CDN ;)
[18:21:43] soahccc: tubbo: no the web servers server rails
[18:21:45] atomical: has joined #RubyOnRails
[18:22:20] ekem: its about cost
[18:22:23] tubbo: soahccc: depending on how many images you're serving, having to render all that from a ruby app could cost you a shit ton
[18:22:31] ekem: i mean if you can meet your needs at the right cost, its fine
[18:22:38] tubbo: eventually
[18:22:43] soahccc: tubbo: I didn't intend to build a CDN :) What I'm saying is that we are not even remotely in the need of a CDN. Our site is blazing fast (if you believe some test faster than 95% of the websites)
[18:22:53] tubbo: soahccc: link? :)
[18:23:19] soahccc: tubbo: https://de.gamesplanet.com/ (no advertising intended) :D
[18:23:20] tubbo: CDNs are kind-of a sledgehammer solution to a few different problems, but if you have all those problems then it really works out
[18:23:31] soahccc: tubbo: maybe uk. suits you better
[18:23:56] tubbo: soahccc: so i just deployed this... https://www.estuyo.com/ it loads in <3s, which is actually quite slow for most apps.
[18:24:03] tubbo: soahccc: your app came back in around 10 seconds.
[18:24:05] NinetyNineTails: has joined #RubyOnRails
[18:24:31] tubbo: now clearly, the two sites have different income levels
[18:24:44] soahccc: tubbo: 10 seconds? over landline or what
[18:24:47] tubbo: i built estuyo for a client, they paid for it, people spend money on that site
[18:24:56] ecmacoder: has joined #RubyOnRails
[18:25:01] tubbo: soahccc: dude it's slow
[18:25:19] tubbo: that said, CDNs are expensive sometmes
[18:27:00] soahccc: tubbo: JS based analytics show that our average page load time is 0.68s with 3.3 actions average. No idea what is slow there
[18:27:58] tubbo: soahccc: ah i see what you're doing, ok
[18:28:00] PedramT: has joined #RubyOnRails
[18:28:37] tubbo: soahccc: gpstatic.com is your static domain, might be coming from rails but since it's all static assets being served from that app the ruby servers aren't really getting hit. you actually don't have to launch the rails app on those servers unless you're processing an image on the fly.
[18:28:43] arcane-methods: has joined #RubyOnRails
[18:29:17] tubbo: the CDN just basically allows you to have 1 server in operation, and it takes care of serving the assets to edge locations (which currently you aren't doing)
[18:29:19] iliketurtles: has joined #RubyOnRails
[18:29:26] manfrin: has joined #RubyOnRails
[18:29:42] soahccc: tubbo: statics of course don't hit the rails app, why should they? They get served by nginx as I would consider it being the standard
[18:29:55] ecmacoder: has joined #RubyOnRails
[18:30:06] PedramT_: has joined #RubyOnRails
[18:30:26] tubbo: soahccc: you said one of your servers is "pure failover and serves statics", but most of your assets are coming from the gpstatic servers.
[18:30:53] tubbo: soahccc: and when i asked you if they're just static web servers, you said the web servers serve rails.
[18:30:59] tubbo: i'm just going by what you tell me man
[18:31:06] soahccc: tubbo: except that we only have one server in one location which you could consider a CDN by definition but it's not what one normally would understand under a CDN
[18:31:07] brycesenz: has joined #RubyOnRails
[18:31:25] tubbo: soahccc: so all the gpstatic domains point to the same server?
[18:31:41] soahccc: tubbo: gpstatic, everything, goes through a single server (load balancer/static server)
[18:32:24] hahuang65: has joined #RubyOnRails
[18:32:32] ekem: well the app from my perspective would have lots of global connections
[18:32:33] soahccc: basically 3 servers in operation. one is pure failover for the other load server and does literally nothing unless the other server dies
[18:32:46] ekem: so i think a cdn would be ideal, if even it costs
[18:32:47] ur5us: has joined #RubyOnRails
[18:32:59] ekem: but, uh, yeah not there yet
[18:33:07] tubbo: ekem: the CDN is pretty much a drop-in thing anyway
[18:33:09] N3sh108: how do I access a model from an helper?
[18:33:25] tubbo: N3sh108: find it, Model.find
[18:33:26] soahccc: ekem: we have customers around the world and if any voices are there they say that our site is (perceived) as being fast
[18:33:29] ekem: tubbo, i started along the process of cloudflare
[18:33:54] Cervajz: has joined #RubyOnRails
[18:33:56] ekem: soahccc, im not smart enough to test it
[18:34:01] kitsuneyo: anyone know a good guide for carrierwave and minimagick? it's kind of hard to trawl through all the different possibilities
[18:34:05] N3sh108: tubbo: nono, is there a way to include the 'Model' itself in the helper? In the rake task, I just had to add ':environment"
[18:34:07] soahccc: ekem: test what?
[18:34:08] ekem: soahccc, not yet anyway, so i cant build anything to complex for myself
[18:34:21] ekem: like response times and performance and if im making the right decision
[18:34:35] ekem: i have no stats to generate a pie chart with in R :(
[18:34:39] tubbo: ekem: it really doesn't matter until you get to prod and actually have problems.
[18:34:47] tubbo: right now you're just masturbating
[18:34:57] ekem: im not really
[18:35:00] ecmacoder: has joined #RubyOnRails
[18:35:04] ekem: i do have something in production
[18:35:11] tubbo: oh well then, wear a condom
[18:35:12] ekem: an im dragging my feet
[18:35:22] ekem: id hate to break something at this point ;)
[18:35:37] ekem: i have ngnix setup to do some cacheing, but i know its not fast
[18:35:42] meoblast001: has joined #RubyOnRails
[18:35:43] soahccc: ekem: I guess you have some sort of analytics in place?
[18:35:49] ekem: i have piwik running
[18:36:12] ekem: so yes, if that defines analytics
[18:36:13] soahccc: that should give you enough data unless you have no users :D
[18:36:23] ekem: i think its 500-1000 uniques a day
[18:36:25] soahccc: ekem: imho the best solution to stalk users :D
[18:36:36] tubbo: wroooooooooong
[18:36:46] tubbo: you have no idea what's going on until you're monitoring your app from all angles
[18:36:49] ekem: even better is running unbiased tested
[18:36:55] N3sh108: tubbo: so?
[18:36:57] tubbo: on the server, inside your rails app, in javascript
[18:37:02] ekem: tubbo, you got guides though?
[18:37:07] N3sh108: I tried including the model but it didn't work
[18:37:09] ekem: i mean you can do all sorts of stress tests and thigns
[18:37:21] Graphettion: has joined #RubyOnRails
[18:37:24] tubbo: N3sh108: not sure what you're asking...what do you mean "include the model"?
[18:37:32] soahccc: tubbo: true but we can per-session use data from piwik e.g. in fraud prevention. you can't do that with GA
[18:37:34] tubbo: ekem: well i use new relic, and there's also skylight.
[18:37:42] tubbo: soahccc: analytics != monitoring
[18:37:51] tubbo: they're (supposed to be) used for different purposes
[18:37:52] ekem: ux is part of monitoring
[18:37:55] ekem: in an odd way
[18:37:55] N3sh108: tubbo: I have a model "User" and I want to be able to do User.find(...) inside a helper module
[18:38:06] ekem: you can enumerate that information and relate it to performance
[18:38:08] tubbo: N3sh108: yeah you can do that.
[18:38:10] N3sh108: tubbo: right now, when I do User.find, it says: cannot find User
[18:38:16] tubbo: N3sh108: oh that's weird :)
[18:38:28] tubbo: N3sh108: !xy
[18:38:28] helpa: N3sh108: It seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
[18:38:29] syngularity: has joined #RubyOnRails
[18:38:33] ekem: tubbo, thank you for this
[18:38:40] N3sh108: tubbo: NameError: uninitialized constant ExchangeRateConverter::Rate
[18:38:40] ekem: the skylight and new relic info
[18:38:56] syngularity: If I update my RoR code, do I need to restart delayed_job for it to read the changes?
[18:39:03] tubbo: N3sh108: just for future reference...anyway, you just described two different errors that are somewhat unrelated.
[18:39:11] ekem: https://www.skylight.io/
[18:39:13] N3sh108: same tubbo
[18:39:27] N3sh108: tubbo: NameError: uninitialized constant ExchangeRateConverter::User <== not Rate
[18:39:44] tubbo: N3sh108: ah, ok. so is there a User model somewhere?
[18:39:50] N3sh108: yeah, tubbo
[18:39:52] N3sh108: in the app/models
[18:39:54] ecmacoder: has joined #RubyOnRails
[18:39:54] tubbo: N3sh108: !gist it
[18:39:54] helpa: N3sh108: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[18:40:00] tubbo: N3sh108: the model and the helper plzzzz
[18:40:13] tubbo: ekem: no problem. it's really helped me see what my rails app was doing
[18:40:25] tubbo: i wouldn't tune performance without it
[18:40:34] arcane-methods: has joined #RubyOnRails
[18:40:59] N3sh108: tubbo: https://gist.github.com/Nesh108/00d42327e4ce4ff4e2a6
[18:41:04] sandstrom: has joined #RubyOnRails
[18:42:18] tubbo: N3sh108: looks good to me. are you running Spring? type `bin/spring stop` to find out...if it says "Spring stopped.", you were running Spring. if it says "Spring is not running.", you were not running Spring.
[18:42:53] N3sh108: tubbo: Im just using rake tasks for now
[18:43:13] jgpawletko: has joined #RubyOnRails
[18:43:15] tubbo: N3sh108: spring affects rake tasks
[18:43:18] N3sh108: tubbo: from the task itself, I can add => :environment and the Rate.new works
[18:43:33] N3sh108: tubbo: from the helper, I couldn't add the :environment
[18:43:54] tubbo: N3sh108: oh yeah, because the :environment task loads the rails environment so your code gets loaded.
[18:44:09] tubbo: N3sh108: but helpers will already have the rails environment loaded. your code will be available.
[18:44:21] tubbo: N3sh108: ahh wait a sec i see your problem :P
[18:44:29] Limix: has joined #RubyOnRails
[18:44:32] tubbo: helper methods probably shouldn't be class methods
[18:44:55] ecmacoder: has joined #RubyOnRails
[18:45:09] tubbo: N3sh108: can you try turning `self.convert` into just `convert`? then you'd be able to call it from your view like <%= convert Time.current, 1.00 %>
[18:45:22] N3sh108: tubbo: I had to add self.
[18:45:25] tubbo: i wasn't aware that was actually an issue
[18:45:30] N3sh108: tubbo: it wouldn't work in the task
[18:45:35] N3sh108: I am using it in a task
[18:45:38] tubbo: N3sh108: you're not really supposed to use helpers in a task.
[18:45:55] N3sh108: I just needed a utility task -_-
[18:46:15] N3sh108: where should I create it?
[18:46:22] tubbo: N3sh108: well helpers have all kinds of other dependencies in ActionView, they're a view-level concern and pretty much can't be used in the Rake tasks.
[18:46:28] sarink: has joined #RubyOnRails
[18:46:31] N3sh108: \me is being driven crazy by RoR
[18:46:35] N3sh108: ACTION is being driven crazy by RoR
[18:46:35] tubbo: N3sh108: add your rake task to the gist
[18:47:04] baweaver: has joined #RubyOnRails
[18:47:42] gniquil: has joined #RubyOnRails
[18:48:05] N3sh108: tubbo: it's at the end
[18:48:20] herbst: has joined #RubyOnRails
[18:48:37] tubbo: N3sh108: that task doesn't load the rails environment either :)
[18:48:59] tubbo: N3sh108: you'd need to depend on the :environment task in that Rake task to load the stuff you want to load
[18:49:03] N3sh108: oh yeah, I couldn't do it
[18:49:11] N3sh108: how can I add it there?
[18:49:13] tubbo: i still think it's a terrible idea because helpers are for the view
[18:49:39] N3sh108: I just need a simple utility class
[18:49:42] tubbo: you can just as easily build a module in lib/exchange_rate_converter.rb, then require 'exchange_rate_converter' in your Rake task and not have to worry about that shit. you still need the :environment task
[18:49:45] sar1nk: has joined #RubyOnRails
[18:49:48] N3sh108: but RoR makes everything complicated as sht
[18:49:57] ecmacoder: has joined #RubyOnRails
[18:50:26] tubbo: N3sh108: it's really not as complicated as you're making it out to be. you're just reading some guides and think this is the right way to do things, when in reality it's much more simple.
[18:50:40] N3sh108: yeah, I guess
[18:50:44] tubbo: N3sh108: if you want to just create a utility class, you can throw it in lib/ and then require it within the Rake task file.
[18:50:47] N3sh108: how can I add the environment to that task?
[18:50:53] N3sh108: I did that now :)
[18:51:21] NBarnes: has joined #RubyOnRails
[18:51:30] NBarnes: Side question: If helpers are there for the view, where do you put code that you want to use in the controller but is longer / more complex than you want to stick into the controller?
[18:51:43] soahccc: nbarnes: concerns?
[18:51:56] NBarnes: I'm not familiar with the use of concerns.
[18:52:09] tubbo: i think it's the same as regular old tasks, `task :convert => :environment, [:usd, :date] do |t, args|`
[18:52:13] tubbo: N3sh108: ^
[18:52:13] guacamole: has joined #RubyOnRails
[18:52:23] tubbo: rake's syntax is admittedly a little esoteric
[18:52:30] tubbo: rake != rails though so my point still stands haha
[18:52:43] N3sh108: tubbo: it seems to work, thanks ;)
[18:52:55] soahccc: nbarnes: concerns are more for sharing code between controllers (and projects). We also put stuff in lib/. E.g. our controller which redirects based on IP is short and calls an "API class" in lib/ which does the heavy lifting
[18:52:57] tubbo: nbarnes: check out ActiveSupport::Concern in the api.rubyonrails.org docs
[18:53:18] JohnT: has joined #RubyOnRails
[18:53:18] tubbo: you can use concerns for anything really, they're a DSL built on top of the existing module interface
[18:53:19] NBarnes: Shall, thank you.
[18:53:29] tubbo: but you shouldn't use them for everything haha
[18:54:35] craigp: has joined #RubyOnRails
[18:54:55] ecmacoder: has joined #RubyOnRails
[18:56:32] baweaver: has joined #RubyOnRails
[18:57:06] mordof_work: has joined #RubyOnRails
[18:57:13] alexhartley: has joined #RubyOnRails
[18:59:23] Craigimus: has joined #RubyOnRails
[18:59:28] mustmodify: has joined #RubyOnRails
[18:59:53] ecmacoder: has joined #RubyOnRails
[18:59:59] mustmodify: I'm having a weird issue where resource_url(...) includes the domain twice. Has anyone seen this before?
[19:00:27] dragonkh: has joined #RubyOnRails
[19:00:42] Craigimus: has joined #RubyOnRails
[19:00:54] soahccc: mustmodify: nope, I guess it uses ENV host? or in the config. sounds weird
[19:01:31] ekem: thank you soahccc, thats alllll going to work fine
[19:01:48] ekem: i have things like this: config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
[19:01:57] ekem: in config/env/prod.rb
[19:02:00] ekem: that trip me up
[19:02:08] ekem: oh for copying assets from production
[19:02:35] lethjakman-l: has joined #RubyOnRails
[19:03:19] sonofdirt: has joined #RubyOnRails
[19:03:21] Scripore: has joined #RubyOnRails
[19:03:26] LiquidCocaine: has joined #RubyOnRails
[19:04:37] LiquidCocaine: Can someone with some experience with Activerecord give me a hand with enums?
[19:04:44] LiquidCocaine: I am trying to use the activerecord enums
[19:04:56] ecmacoder: has joined #RubyOnRails
[19:05:13] LiquidCocaine: but when I use them in a create, the create doesn't show that I've passed it at all
[19:05:33] soahccc: LiquidCocaine: what are you talking about?
[19:05:52] LiquidCocaine: When I run this: TeamUser.create(user: user, team: newTeam, id: SecureRandom.hex(3), status: "JOINED")
[19:06:05] soahccc: then it returns true or false
[19:06:14] LiquidCocaine: It says: TeamUser.create(:status => "JOINED", :user_id => "69", :team_id => "0", :id => "19038") ActiveRecord::StatementInvalid: Mysql2::Error: Field 'status' doesn't have a default value: INSERT INTO `team_users` (`user_id`, `team_id`, `created_at`, `updated_at`) VALUES ('19038', '0', '2016-01-22 17:55:39', '2016-01-22 17:55:39')
[19:06:18] LiquidCocaine: In the console
[19:06:37] LiquidCocaine: The status doesn't even show in the insert query
[19:06:53] LiquidCocaine: Sorry, I am pretty new to ActiveRecord
[19:08:19] soahccc: LiquidCocaine: that create doesn't match the query at all, sure that this is it?
[19:08:40] ferr: has joined #RubyOnRails
[19:09:00] soahccc: LiquidCocaine: also why do you set a `id` there? That is usually done by the database.
[19:09:17] LiquidCocaine: Oh, actually give me a second, that might have been a previous error. It looks similar, but give me one second
[19:09:37] craigp: has joined #RubyOnRails
[19:09:56] ecmacoder: has joined #RubyOnRails
[19:10:41] safety_cut: has joined #RubyOnRails
[19:10:52] enape_101: has joined #RubyOnRails
[19:11:27] LiquidCocaine: soahccc: Here's the create: TeamUser.create(:user_id => "57", :team_id => "42", :status => "JOINED", :id => "63be49")
[19:11:34] LiquidCocaine: ActiveRecord::StatementInvalid: Mysql2::Error: Field 'status' doesn't have a default value: INSERT INTO `team_users` (`user_id`, `team_id`, `created_at`, `updated_at`) VALUES ('63be49', '42', '2016-01-22 19:11:02', '2016-01-22 19:11:02')
[19:11:36] LiquidCocaine: That's the error
[19:11:52] LiquidCocaine: status doesn't even show up in the insert
[19:11:59] soahccc: LiquidCocaine: your id there is very weird and may be the cause for everything, even world hunger
[19:12:40] Limix: has joined #RubyOnRails
[19:12:50] baweaver: has joined #RubyOnRails
[19:13:43] sonofdirt: has joined #RubyOnRails
[19:14:00] soahccc: LiquidCocaine: I don't know what your DB layout is but `id' is somewhat sensible. you are deviating from the default/recommended behaviour or you are doing it wrong
[19:14:14] LiquidCocaine: soahccc: Yeah, I guess I can rename that to token
[19:14:31] soahccc: LiquidCocaine: good name for some generic identifier :) we use the term token a lot
[19:14:32] LiquidCocaine: soahccc: Okay, let me change that and get back to you
[19:14:36] IrishGringo: has joined #RubyOnRails
[19:14:39] LiquidCocaine: soahccc: Thanks so much!
[19:14:55] ecmacoder: has joined #RubyOnRails
[19:15:17] soahccc: LiquidCocaine: I gonna leave now but I guess that should fix something. The error is weird though, never seen that one before
[19:15:41] mordof_work: has joined #RubyOnRails
[19:16:44] bronson: has joined #RubyOnRails
[19:16:46] lexiMon: has joined #RubyOnRails
[19:16:51] craigp: has joined #RubyOnRails
[19:16:55] LiquidCocaine: soahccc: Thanks so much, have a good one.
[19:17:21] soahccc: LiquidCocaine: you too ;)
[19:17:56] lexileo: has joined #RubyOnRails
[19:18:45] brycesenz: has joined #RubyOnRails
[19:18:49] hahuang65: has joined #RubyOnRails
[19:19:55] ecmacoder: has joined #RubyOnRails
[19:20:47] LiquidCocaine: Damn, the change of the id didn't fix. Does anyone have any ideas? :/
[19:20:58] mdw: has joined #RubyOnRails
[19:21:17] chancy: has joined #RubyOnRails
[19:21:39] joy4u: has joined #RubyOnRails
[19:21:45] joy4u: has left #RubyOnRails: ()
[19:22:03] Martyn: has joined #RubyOnRails
[19:22:08] lexiMon: has joined #RubyOnRails
[19:22:09] blackmesa: has joined #RubyOnRails
[19:22:28] maletor_: has joined #RubyOnRails
[19:24:54] ecmacoder: has joined #RubyOnRails
[19:26:52] Pazician: has joined #RubyOnRails
[19:27:28] Cohedrin: has joined #RubyOnRails
[19:28:51] cicloid: has joined #RubyOnRails
[19:29:19] Cohedrin: has joined #RubyOnRails
[19:29:56] ecmacoder: has joined #RubyOnRails
[19:30:06] ur5us: has joined #RubyOnRails
[19:32:29] baweaver: has joined #RubyOnRails
[19:34:58] ecmacoder: has joined #RubyOnRails
[19:39:21] tubbo: ssh isok.bby
[19:39:56] ecmacoder: has joined #RubyOnRails
[19:42:29] arup_r: has joined #RubyOnRails
[19:42:55] Puffball: has joined #RubyOnRails
[19:43:26] mordof_work: has joined #RubyOnRails
[19:43:51] hormicahel: has joined #RubyOnRails
[19:44:39] pyemkey: has joined #RubyOnRails
[19:44:57] ecmacoder: has joined #RubyOnRails
[19:44:57] zpe: has joined #RubyOnRails
[19:45:05] hormicahel: Hello. Is there any reason not to use rails as an API server? I've been reading so much stuff about how node is better suited and I'm having a very hard time making up my mind. Any strong opinions?
[19:45:12] B1n4r10: has joined #RubyOnRails
[19:45:47] brycesenz: has joined #RubyOnRails
[19:49:53] ecmacoder: has joined #RubyOnRails
[19:50:51] tfitts: I'm trying to setup capybara with webkit to do a test that uses javascript. When I add js: :true I get SQLite3::BusyException: database is locked: UPDATE "users" SET "current_sign_in_at" = ?, "current_sign_in_ip" = ?, "last_sign_in_at" = ?, "last_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 1
[19:53:00] lemur: has joined #RubyOnRails
[19:54:37] arBmind: has joined #RubyOnRails
[19:54:55] ecmacoder: has joined #RubyOnRails
[19:56:05] codepete: has joined #RubyOnRails
[19:56:25] fox_mulder_cp: hormicahel: if u knows js - use nodejs for api. if u knows ruby/rails - just use it
[19:57:55] IrishGringo: has joined #RubyOnRails
[19:58:14] kadoppe: has joined #RubyOnRails
[19:58:18] shibabu: has joined #RubyOnRails
[19:58:41] Arlantir: has joined #RubyOnRails
[19:59:25] kies^: has joined #RubyOnRails
[19:59:52] DonOtreply: has joined #RubyOnRails
[19:59:55] ecmacoder: has joined #RubyOnRails
[20:00:16] creyes: has joined #RubyOnRails
[20:01:02] blackmesa: has joined #RubyOnRails
[20:01:30] mdw: has joined #RubyOnRails
[20:01:33] Cohedrin: has joined #RubyOnRails
[20:01:49] creyes: Writing some easy goal-tracking stuff and have a modeling question. Goals have milestones, when all the milestones are done the goal is completed. Should "completed?" be a function on the model or an attribute in the db?
[20:02:22] Salve: has joined #RubyOnRails
[20:02:33] mustmodify: creyes: my rule of thumb is that state should either be calculated or stored, not both.
[20:02:46] mustmodify: In this case, you can't calculate it without something in the database. So you must store it.
[20:03:14] neanderslob: has joined #RubyOnRails
[20:03:38] mordof_work: hormicahel: the primary reasoning (as far as i'm aware) - is that node is better suited to handling many small requests at once, compared to rails. since API calls are generally fairly small, this fits node well. with that said - since my work uses rails, we also use rails for our API. only if you anticipate the load being too much for rails to handle is it really worth going to another language if you're already using rails
[20:04:02] creyes: Hmm, either way there has to be a function though yeah? cause I have to write a "def completed?" to calculate it, or a "def set_completed" when all the @milestones are done
[20:04:35] Salve: Anyone know how I can find the number of people online using ActionCable?
[20:04:38] hormicahel: mordof_work: i'm a little more comfortable with javascript but i am familiar with both. it seems like rails is a lot more well rounded and will let me get away with writing a lot less code.
[20:04:58] ecmacoder: has joined #RubyOnRails
[20:04:59] creyes: If I'm rendering all completed goals will there be a noticable performance differences between querying stored vs caluclated?
[20:05:00] mustmodify: creyes: sorry. You're storing the state of goals, and calculating the state of milestones
[20:05:09] mordof_work: hormicahel: well.. rails does have packages for doing APIs.. but i'm sure node does as well.
[20:05:59] mordof_work: hormicahel: even if it's 'less code' - it probably wouldn't be too much different in the long run between the two, so it's more up to what fits your environment, as well as other devs involved, etc
[20:07:46] juddey: has joined #RubyOnRails
[20:09:55] ecmacoder: has joined #RubyOnRails
[20:10:16] creyes: mustmodify: do you have any good resources for reading up on stored vs calculated values? My google skills are failing me
[20:11:17] RTG`: has joined #RubyOnRails
[20:12:28] mustmodify: creyes: Oh geez I had that backwards. I just didn't think Goal was bigger than Milestone.
[20:12:40] chouhoul_: has joined #RubyOnRails
[20:12:47] mustmodify: So you'd have Milestone#completed (or actually I'd have completed_at but whatever)
[20:13:23] hannelita: has joined #RubyOnRails
[20:13:26] mustmodify: and then Goal#complete? would be def complete?;milestones.all?{|m| m.complete?};end
[20:14:15] aegis3121: has joined #RubyOnRails
[20:15:01] ecmacoder: has joined #RubyOnRails
[20:15:47] momomomomo: has joined #RubyOnRails
[20:15:52] creyes: mustmodify: hmm ok that makes sense. Store a "completed_at" variable in the db for Milestone, calculate "completed" for Goals based on stored value of milestone.
[20:16:24] creyes: mustmodify: but if I'm doing something like "Goals.where(completed?: true)" wouldn't that render slowing cause it has to calculate all of them?
[20:16:57] alevy: has joined #RubyOnRails
[20:17:06] srinidhi: has joined #RubyOnRails
[20:17:10] FernandoBasso: has joined #RubyOnRails
[20:17:11] hannelita: has joined #RubyOnRails
[20:17:36] goodcodeguy: has joined #RubyOnRails
[20:17:40] bronson: has joined #RubyOnRails
[20:17:51] jottr: has joined #RubyOnRails
[20:18:39] mustmodify: creyes: That's one thing I still don't know how to handle in Rails. See, if you have already loaded them, it's faster to use the fetched values. If you have NOT prefetched them, it's faster to make a database query. I don't know how to ask Rails whether it has already fetched a collection.
[20:18:46] hannelita: has joined #RubyOnRails
[20:18:47] mustmodify: So it really depends on how you typically use it.
[20:19:14] mustmodify: SmallerThing.where(completed_at: nil).any?
[20:19:55] ecmacoder: has joined #RubyOnRails
[20:20:12] Papierkorb: mustmodify: if you do the exact same SELECT query multiple times in a request, it'll usually use the cached result
[20:20:25] mustmodify: Papierkorb: that's true.
[20:20:30] mustmodify: that's not my question.
[20:20:44] Arlantir|2: has joined #RubyOnRails
[20:20:44] mustmodify: Say you have Category.has_many :products
[20:20:51] craysiii: has joined #RubyOnRails
[20:21:04] Arlantir|2: has left #RubyOnRails: ()
[20:21:06] mustmodify: and you want to know something about the products collection... like ... uh ... highest price.
[20:21:26] mustmodify: If I already have the products collection loaded, then I want to calculate that in Ruby.
[20:21:32] mustmodify: If not, I want to issue a SQL query.
[20:21:39] craysiii: has joined #RubyOnRails
[20:21:46] mustmodify: But I don't think Rails will tell me whether a collection has been fetched or not.
[20:21:52] Arlantir: has joined #RubyOnRails
[20:22:17] EasyCo: has joined #RubyOnRails
[20:22:41] Arlantir: has left #RubyOnRails: ()
[20:22:44] Papierkorb: mustmodify: well you could cache the fetch result in a @instance_variable, and check if it's nil?
[20:22:52] Arlantir|2: has joined #RubyOnRails
[20:23:16] NBarnes: has joined #RubyOnRails
[20:23:24] Papierkorb: Asking rails' cache, if that's even easily possible, sounds more hackish to me
[20:24:56] ecmacoder: has joined #RubyOnRails
[20:25:10] havenwood: has joined #RubyOnRails
[20:25:13] Arlantir|2: has left #RubyOnRails: ()
[20:25:16] Arlantir_: has joined #RubyOnRails
[20:26:54] IanV0rn2341: has joined #RubyOnRails
[20:26:59] Craigimus: has joined #RubyOnRails
[20:28:45] havenwood: has joined #RubyOnRails
[20:28:45] havenwood: has joined #RubyOnRails
[20:29:31] Arlantir_: Failed tests RSpec, doing everything by the book , but there are newer gem , google did not help , please tell me what I 'm doing wrong : Failure / Error: visit "/ static_pages / home"?
[20:29:55] ecmacoder: has joined #RubyOnRails
[20:31:06] yenic: has joined #RubyOnRails
[20:31:18] dain1: has joined #RubyOnRails
[20:32:01] rhizome: Arlantir_: that doesn't look like an actual error message
[20:32:02] yenic: hey everyone, doing some research- does RoR have anything like Go channels or Django channels ATM or OTW? http://channels.readthedocs.org/en/latest/
[20:32:53] rhizome: what are go channels or django channels?
[20:32:55] Papierkorb: yenic: what are you looking for? WebSockets with Rails? Background job processing? something different?
[20:33:06] dain1: has left #RubyOnRails: ()
[20:33:26] yenic: Papierkorb: just anything equivalent I suppose or similar that I can go read about
[20:33:27] dain1: has joined #RubyOnRails
[20:33:45] Papierkorb: yenic: just like rhizome, I don't know what 'django channels' do
[20:33:53] mustmodify: has left #RubyOnRails: ()
[20:34:14] Denarii: link says they're websockets
[20:34:36] Papierkorb: > "as well as the ability to run code after a response has been sent for things like thumbnailing or background calculation."
[20:34:54] ecmacoder: has joined #RubyOnRails
[20:36:49] yenic: would ActionCable be the equivalent?
[20:37:11] sdwrage: has joined #RubyOnRails
[20:37:22] Papierkorb: yenic: if you're looking for Websockets, yes, action cable basically embeds websockets in rails
[20:37:32] Limix: has joined #RubyOnRails
[20:37:55] Papierkorb: yenic: note that Cable is a new module introduced with Rails5, which is currently in 'beta1'
[20:38:22] Craigimus: has joined #RubyOnRails
[20:39:31] gbgdev: has joined #RubyOnRails
[20:39:32] yenic: Django channels are in beta too and won't be out till August, so that's ok. I have a little experience in Py and wanted to do a fair review of Rails to see where everything stands (and how well positioned each are going forward)- before committing to something for my new project
[20:39:55] ecmacoder: has joined #RubyOnRails
[20:40:31] choke_: has joined #RubyOnRails
[20:40:41] wcalderipe: has joined #RubyOnRails
[20:41:15] wcalderipe: someone already tried to create an attributes policy using active model serializer?
[20:41:36] IanV0rn2341: has joined #RubyOnRails
[20:41:37] Papierkorb: yenic: Oh, and we also have stuff for background processing. The most popular solution for new projects as far I can tell (!) is Sidekiq for this.
[20:42:34] Arlantir_: rhizome: Failure/Error: visit "/static_pages/home" NoMethodError: undefined method `visit' for #<RSpec::ExampleGroups::StaticPages::HomePage:0x00000002e58470>
[20:42:48] mordof_work: has joined #RubyOnRails
[20:44:12] yenic: Papierkorb: thank you, I'll look into that as well. I found this http://weblog.rubyonrails.org/releases/ and looks like 5.0 is already in production at basecamp. So it may not be long
[20:44:53] ecmacoder: has joined #RubyOnRails
[20:45:21] Coldblackice: has joined #RubyOnRails
[20:47:24] guacamole: has joined #RubyOnRails
[20:48:00] lxsameer: has joined #RubyOnRails
[20:48:16] Craigimus: has joined #RubyOnRails
[20:48:41] lxsameer: has joined #RubyOnRails
[20:48:41] lxsameer: has joined #RubyOnRails
[20:49:03] ur5us: has joined #RubyOnRails
[20:49:44] sleungcy: has joined #RubyOnRails
[20:49:51] herbst: has joined #RubyOnRails
[20:49:54] ecmacoder: has joined #RubyOnRails
[20:51:08] Synthead: has joined #RubyOnRails
[20:51:26] lethjakman-l: has joined #RubyOnRails
[20:52:36] guacamole: has joined #RubyOnRails
[20:53:24] momomomomo: has joined #RubyOnRails
[20:54:56] ecmacoder: has joined #RubyOnRails
[20:56:53] IanV0rn2341: has joined #RubyOnRails
[20:57:58] manfrin: has joined #RubyOnRails
[20:58:32] jhn: has joined #RubyOnRails
[20:58:59] jottr: has joined #RubyOnRails
[20:59:54] ecmacoder: has joined #RubyOnRails
[21:00:44] f3ttX]: has joined #RubyOnRails
[21:01:06] safety_cut: has joined #RubyOnRails
[21:02:42] baweaver: has joined #RubyOnRails
[21:02:50] safety_cut: has joined #RubyOnRails
[21:03:44] Arlantir_: Failed tests RSpec, doing everything by the book , but there are newer gem , google did not help , please tell me what I 'm doing wrong : Failure / Error: visit "/ static_pages / home"?
[21:04:55] ecmacoder: has joined #RubyOnRails
[21:05:06] Craigimus: has joined #RubyOnRails
[21:08:44] NBarnes: Question that makes me look like a scrub; what the heck is a websocket, anyway?
[21:09:11] Radar: Arlantir_: Please put your code up on GitHub.
[21:09:57] ecmacoder: has joined #RubyOnRails
[21:10:00] Craigimus: has joined #RubyOnRails
[21:11:21] Radar: nbarnes: !rule1
[21:11:21] helpa: nbarnes: Do your research before hand. Your question may be answerable with a quick Google search or by simply experimenting. If you're using a method in Rails, look it up in the API Docs or in the Official Guides.
[21:11:44] NBarnes: I done been told.
[21:14:10] NBarnes: Well, that clarified things.
[21:14:54] ecmacoder: has joined #RubyOnRails
[21:16:08] baweaver: has joined #RubyOnRails
[21:19:57] ecmacoder: has joined #RubyOnRails
[21:20:59] Cohedrin: has joined #RubyOnRails
[21:22:07] B1n4r10: has joined #RubyOnRails
[21:24:34] dexter-tzu: has joined #RubyOnRails
[21:24:54] ecmacoder: has joined #RubyOnRails
[21:24:59] Ergo: has joined #RubyOnRails
[21:25:13] xhoy: has joined #RubyOnRails
[21:25:15] flashpoint9: has joined #RubyOnRails
[21:25:28] Limix: has joined #RubyOnRails
[21:27:05] baweaver: has joined #RubyOnRails
[21:27:44] rromanchuk: has joined #RubyOnRails
[21:28:07] l4v2: has joined #RubyOnRails
[21:28:17] B1n4r10: has joined #RubyOnRails
[21:28:36] l4v2: ok, I was just making sure I could post
[21:29:35] l4v2: I am very new to rails. I have been reading through the guides for a week. what would developers say they spend 80% of their time on with rails? Is it the migrations?
[21:30:01] ecmacoder: has joined #RubyOnRails
[21:31:26] maletor_: has joined #RubyOnRails
[21:31:42] baweaver: has joined #RubyOnRails
[21:32:22] PedramT: has joined #RubyOnRails
[21:32:56] flashpoint9: I hear that you arent supposed to put a lot of logic in the controller, is it ok to put in a logic loop?
[21:34:03] DeXterbed: has joined #RubyOnRails
[21:34:30] jas02: has joined #RubyOnRails
[21:34:53] ecmacoder: has joined #RubyOnRails
[21:35:24] Axilla: has joined #RubyOnRails
[21:36:23] f3ttX]: i have a small problem
[21:36:35] ethansr: has joined #RubyOnRails
[21:36:52] shmilan: has joined #RubyOnRails
[21:37:29] Radar: flashpoint9: !rule0
[21:37:29] helpa: flashpoint9: Show rather than tell. Explaining your problem with code, stacktraces or errors is always preferred to explaining it with just text. Show us what's happening, rather than telling us. Put the code on https://gist.github.com and then give us the HTTP link to the Gist.
[21:37:44] baweaver: has joined #RubyOnRails
[21:37:44] Radar: l4v2: Thinking about how to design the application.
[21:38:00] flashpoint9: Radar: I dont have an example, was just asking a best practice
[21:38:06] pyemkey: has joined #RubyOnRails
[21:38:14] f3ttX]: I searced in google but ... not found the solution
[21:38:24] Radar: The logic has to go somewhere, flashpoint9.
[21:38:37] f3ttX]: the problems is ....
[21:38:46] jas02: has joined #RubyOnRails
[21:39:00] f3ttX]: URI::Invalid URIError
[21:39:06] Radar: f3ttX]: !rules
[21:39:06] helpa: f3ttX]: https://gist.github.com/996779
[21:39:10] chouhoulis: has joined #RubyOnRails
[21:39:33] ferr: has joined #RubyOnRails
[21:39:39] jgpawletko: has joined #RubyOnRails
[21:39:54] ecmacoder: has joined #RubyOnRails
[21:39:58] srinidhi: has joined #RubyOnRails
[21:40:26] Scient: cap 3 doesnt support setting user and group glbally anymore?
[21:43:53] mordof_work: has joined #RubyOnRails
[21:44:18] workmad3: has joined #RubyOnRails
[21:44:48] rubyonrails618: has joined #RubyOnRails
[21:44:55] ecmacoder: has joined #RubyOnRails
[21:45:30] crazyphil: has joined #RubyOnRails
[21:45:36] chouhoul_: has joined #RubyOnRails
[21:46:08] crazyphil: new to ruby user here, I'm trying to find a way to copy gems from one machine to another without having to install things like gcc etc, is this possible?
[21:46:20] Radar: crazyphil: no
[21:46:27] rhizome: crazyphil: do they have the same exact hardware?
[21:46:28] B1n4r10: has joined #RubyOnRails
[21:46:35] Radar: You'd probably have to image the machine and then copy that image over to the new machine
[21:46:50] Radar: Which'll take longer than installing all the tools/gems again
[21:47:19] crazyphil: right, just trying to narrow down the amount of stuff I need to install to use a particular program, so if I need to install gcc, all the -devel stuff, I will
[21:47:28] avemestr: has joined #RubyOnRails
[21:47:34] jottr: has joined #RubyOnRails
[21:48:55] LyF3L3SS: has joined #RubyOnRails
[21:49:54] ecmacoder: has joined #RubyOnRails
[21:50:35] eljimmy: has joined #RubyOnRails
[21:50:58] LyF3L3SS: has left #RubyOnRails: ()
[21:51:56] lacrymology: has joined #RubyOnRails
[21:53:35] l4v2: radar that is what you spend most of your time on? thinking about how to set up the application?
[21:53:49] lemur: has joined #RubyOnRails
[21:53:55] Radar: l4v2: yeah. One does not simply write code all day.
[21:54:43] l4v2: radar ok thank you. I just graduated from college, I am trying to get into rails development
[21:54:57] ecmacoder: has joined #RubyOnRails
[21:57:49] f3ttX]: has left #RubyOnRails: ("ERC (IRC client for Emacs 24.5.1)")
[21:58:29] Radar: l4v2: Do you know much Ruby yet?
[21:59:19] f3ttX]: has joined #RubyOnRails
[21:59:30] l4v2: Radar as far as Ruby alone I just made methods that did different things and called them.
[21:59:48] f3ttX]: I'm sorry
[21:59:55] ecmacoder: has joined #RubyOnRails
[22:00:49] shibabu: has joined #RubyOnRails
[22:01:14] Craigimus: has joined #RubyOnRails
[22:01:56] f3ttX]: https://gist.github.com/anonymous/bb6e0c569854f6f4bbc6
[22:04:00] codepete: has joined #RubyOnRails
[22:04:56] ecmacoder: has joined #RubyOnRails
[22:05:20] l4v2: Radar why what???s up?
[22:05:49] nfk: has joined #RubyOnRails
[22:07:45] ciree: can I create an initializer for a local library in lib?
[22:09:56] ecmacoder: has joined #RubyOnRails
[22:10:30] jottr_: has joined #RubyOnRails
[22:10:48] rhizome: f3ttX]: looks like you have an error in your stylesheet manifest
[22:12:24] rhizome: when the error in the stacktrace mentions a file, it's a good idea to give it a look
[22:12:24] gbgdev: has joined #RubyOnRails
[22:14:27] tfitts: I'm trying to run a browser test that uses javascript in capybara using capybara webkit. The javascript has an ajax function. The test is getting to the javascript code 1 line before the ajax call, but then it doesn't run either the success or failure method for the $.post action. It seems like if the JS is running I should get either the success or the fail code to run.
[22:14:57] ecmacoder: has joined #RubyOnRails
[22:14:59] Pazician: has joined #RubyOnRails
[22:15:06] Radar: l4v2: I'd advise learning Ruby before learning Rails.
[22:15:08] Radar: l4v2: !twgr
[22:15:08] helpa: l4v2: Learn Ruby by reading this book - http://manning.com/black3 - The Well-Grounded Rubyist by David A. Black
[22:15:11] Radar: l4v2: Read that book first
[22:15:13] Radar: !rubykoans
[22:15:13] helpa: The Koans, available online at http://rubykoans.com, walk you along the path to enlightenment in order to learn Ruby. The goal is to learn the Ruby language, syntax, structure, and some common functions and libraries. Also, see !koans for downloading for local use.
[22:15:20] Radar: Go through the Koans if you can't afford the book
[22:15:25] Radar: Play around with Ruby for like a month
[22:15:33] Radar: Then go ahead and learn Rails
[22:15:42] Radar: !r4ia is the book I helped write
[22:15:42] helpa: Rails 4 in Action - http://manning.com/bigg2 - An excellent book combining Rails and TDD/BDD development. Written by Rebecca Skinner, Steve Klabnik, Ryan Bigg, Yehuda Katz
[22:17:31] f3ttX]: rhizome the file manifest looks normal
[22:17:57] rhizome: rails doesn't think so
[22:17:57] yfeldblum: has joined #RubyOnRails
[22:19:18] Radar: f3ttX]: is the app online somewhere that we can inspect it?
[22:19:22] Radar: f3ttX]: like GitHub?
[22:19:38] bronson: has joined #RubyOnRails
[22:19:58] ecmacoder: has joined #RubyOnRails
[22:20:45] f3ttX]: unfortunately no , github no
[22:21:01] chancy: has joined #RubyOnRails
[22:21:43] rhizome: can you gist your application.css
[22:24:54] ecmacoder: has joined #RubyOnRails
[22:25:29] f3ttX]: https://gist.github.com/anonymous/1f15a1a03b784d10ae74
[22:25:58] rhizome: require_self goes first
[22:26:07] Radar: not necessarily.
[22:26:24] Radar: f3ttX]: Could you please put the app on GitHub? I think there's a configuration issue somewhere and it would help to see the whole thing.
[22:27:37] one_zero: has joined #RubyOnRails
[22:27:53] StaticVoid: has joined #RubyOnRails
[22:29:00] f3ttX]: the application I can't even start
[22:29:56] ecmacoder: has joined #RubyOnRails
[22:31:10] altair118: has joined #RubyOnRails
[22:31:42] FooMunki: has joined #RubyOnRails
[22:31:46] Radar: Ok. glhf. I need to go prep for my day now.
[22:32:12] ur5us: has joined #RubyOnRails
[22:32:39] Craigimus: has joined #RubyOnRails
[22:34:49] _djbkd: has joined #RubyOnRails
[22:34:57] ecmacoder: has joined #RubyOnRails
[22:36:10] Axilla: has joined #RubyOnRails
[22:36:16] guacamole: has joined #RubyOnRails
[22:40:33] Scripore: has joined #RubyOnRails
[22:41:05] lethjakman-l: has joined #RubyOnRails
[22:43:32] voidDotClass: has joined #RubyOnRails
[22:44:09] voidDotClass: Getting the error 'NoMethodError (undefined method `rindex' for nil:NilClass):' on the line: ' file = Cloudinary::PreloadedFile.new(params[:photo_sig])
[22:44:11] guacamole: has joined #RubyOnRails
[22:44:55] tfitts: that's all we get to go on?
[22:45:07] creature: voidDotClass: My magic psychic debugging powers tell me that params[:photo_sig] is nil.
[22:45:13] superlou: has joined #RubyOnRails
[22:46:27] someish: has joined #RubyOnRails
[22:47:48] Cohedrin: has joined #RubyOnRails
[22:47:53] kies^: has joined #RubyOnRails
[22:48:24] tfitts: voidDotClass: or doesn't match the regex that parses out a filename
[22:48:39] voidDotClass: creature, no, doing 'puts "Signature: #{params[:photo_sig]}' on the line above it, gives 'Signature: 223bca8ae2bc1e00b059a2ae19c315869536884e'
[22:48:49] voidDotClass: tfitts, what else would you like to know?
[22:48:53] User458764: has joined #RubyOnRails
[22:49:09] tfitts: https://github.com/cloudinary/cloudinary_gem/blob/5ebbb4ee2cb23d59c39e889a27577782c9f013d3/lib/cloudinary/preloaded_file.rb#L2-L7
[22:50:45] herbst: has joined #RubyOnRails
[22:50:46] voidDotClass: tfitts, i've seen that. i'm a bit new to ruby, am i doing something wrong?
[22:50:58] tfitts: whatever parameter you are passing into PreloadedFile.new needs to have this regex PRELOADED_CLOUDINARY_PATH = /^([^\/]+)\/([^\/]+)\/v(\d+)\/([^#]+)#([^\/]+)$/ return 5 results, resource_type, type, version, filename, and signature
[22:51:20] creature: I think that's supposed to be a path.
[22:51:29] tfitts: that's what it looks like to me
[22:51:47] creature: "foo/bar/v1234/abcdef#baz"
[22:52:01] TDJACR: has joined #RubyOnRails
[22:52:10] voidDotClass: dunno how the fuck to get that. hm
[22:52:24] voidDotClass: cloudinary is a piece of shit
[22:54:25] _3by8: has joined #RubyOnRails
[22:55:03] _3by8: Radar: hi
[22:55:16] bbrowning: has joined #RubyOnRails
[22:55:23] aloneintheworld: has joined #RubyOnRails
[22:55:29] ruby-lang372: has joined #RubyOnRails
[22:55:55] Synthead: I have this in a project: "locals = send(params[:panel], params)" Is send() a rails thing or something?
[22:55:56] voidDotClass: it should also fucking gracefully give an error instead of throwing an exception like a bitch in a method that's supposed to validate user input
[22:56:10] Papierkorb: Synthead: that's the normal Object#send method
[22:56:16] Synthead: it's really hard to search about because of the name, and 'def send' doesn't return anything
[22:56:27] Papierkorb: Synthead: Kernel#send *
[22:57:08] Papierkorb: pry, why do you fail me?
[22:57:09] Papierkorb: Synthead: http://ruby-doc.org/core-2.3.0/Object.html#method-i-send
[22:57:34] tfitts: voidDotClass: it's trying to run a method on a nil class. that's as helpful a message as you need. You need to figure out why it's trying to run the method on nil
[22:57:52] tfitts: Papierkorb: the method you're looking for is whatever the value of params[:panel] is
[22:57:53] Papierkorb: Synthead: in that context though, that #send method there looks like it's not the ruby one.
[22:58:09] Papierkorb: tfitts: Synthead is looking for it
[22:58:20] Synthead: Papierkorb: it's not running on an object, though (i.e. this_object.send)
[22:58:21] tfitts: oops, Synthead then
[22:58:29] voidDotClass: tfitts, yeah, i've figured it, its trying to parse the string with regex. but thing is, string is user input. someone could curl a req with an empty string or any kind of b.s. it should gracefully catch that error instead of throwing an exception
[22:58:39] Papierkorb: Synthead: It's always called on an object, in this case, implicit-self
[22:58:54] alexhartley: has joined #RubyOnRails
[22:58:59] Synthead: Papierkorb: ah yeah, like how you can run "all" in model methods
[22:59:33] Papierkorb: Synthead: that call there, if it's the standard ruby send, calls a method by name as defined in params[:panel] and passes params as sole argument to it. Looks like a security hazard to me
[22:59:47] ferr: has joined #RubyOnRails
[22:59:54] Synthead: Papierkorb: I agree
[23:00:44] Papierkorb: Synthead: Sorry, I was confused for a moment. That method is /probably/ the normal ruby #send method I linked you to. Of course, it could have been overwritten.
[23:01:04] voidDotClass: i'm now passing the string as it expects: 'Signature: image/upload/1453503541/avatar#4e00bf5cbac5c4f9a33f0b48a3e2c34e2d94575b
[23:01:15] voidDotClass: still get the same stupid error which tells me nothing
[23:01:21] voidDotClass: NoMethodError (undefined method `rindex' for nil:NilClass):
[23:01:38] Synthead: Papierkorb: I don't think it is as their is no 'def send' in the project
[23:02:27] Synthead: Papierkorb: so params is a ActionController::Parameters, and params[:panel] is a String. What is send(params[:panel], params) equivalent to?
[23:02:28] creature: voidDotClass: https://github.com/cloudinary/cloudinary_gem/blob/5ebbb4ee2cb23d59c39e889a27577782c9f013d3/lib/cloudinary/preloaded_file.rb#L25 suggests it's looking for a dot. Could your file be avatar.png instead of just "avatar"?
[23:02:53] Papierkorb: Synthead: you could ask pry by putting binding.pry next to that line and issuing '$ send', or do 'raise' there and then in the webshell to 'method :send', which will tell you if it's from "Object(Kernel)#send", or not
[23:03:32] Papierkorb: Synthead: it looks in 'self' for a method called what params[:panel] contains, and then calls it
[23:03:34] creature: Synthead: send() invokes a method based on its first parameter. So if you had, say, "send('avocado', params)" it would call avocado(params).
[23:04:11] shibabu: has joined #RubyOnRails
[23:04:27] Papierkorb: Synthead: If you don't want to use send (Which would be great), you could e.g. either use a whitelist to check the value of the string, or just use a case statement to do manual calls
[23:04:36] Synthead: Papierkorb: ooooh, I see. I've always used something.send
[23:04:53] dexter-tzu: has joined #RubyOnRails
[23:05:26] voidDotClass: creature, Signature: image/upload/1453503889/food.png#36593c73cfe228f2b14bfbbefb69f035789bf267 , still no luck
[23:05:27] Papierkorb: Synthead: `send(foo, bar) if %w[allowed_method another_allowed_one].include? foo` or `case foo; when 'one' then one(bar); when 'two' then two(bar); end`
[23:05:51] creature: voidDotClass: I bet your error changed, though.
[23:06:03] voidDotClass: creature, it didnt. NoMethodError (undefined method `rindex' for nil:NilClass):
[23:06:16] creature: Could you pastebin the whole error, please?
[23:06:26] Papierkorb: Synthead: (Note that you only need the `then` keyword in the case statement if the code block to run is written on the same line as the condition)
[23:09:27] erick: has joined #RubyOnRails
[23:10:53] tfitts: voidDotClass: yeah, that string doesn't match the regex
[23:10:59] sarink: has joined #RubyOnRails
[23:11:12] creature: Oh, it needs a v before the number.
[23:11:27] l4v2: has left #RubyOnRails: ()
[23:11:32] creature: https://github.com/cloudinary/cloudinary_gem/blob/5ebbb4ee2cb23d59c39e889a27577782c9f013d3/lib/cloudinary/preloaded_file.rb#L21 is the format in a more readable way, FWIW.
[23:13:28] _3by8: Hey guys, I have a question about #RubyOnRails.
[23:13:51] _3by8: How is everyone in #RubyOnRails doing?
[23:14:18] Papierkorb: Fine, and you _3by8 ?
[23:14:41] _3by8: Papierkorb: I'm in #RubyOnRails. =P
[23:14:42] sleungcy: has joined #RubyOnRails
[23:14:48] baweaver: has joined #RubyOnRails
[23:14:49] tfitts: was that the question?
[23:15:00] _3by8: Sorry, let me put my tongue back in my mouth. =|
[23:15:53] _3by8: tfitts: I know I'm a genius but my question is regarding the degree of my brilliance.
[23:16:06] KanKava: has joined #RubyOnRails
[23:17:09] _3by8: Somber body fits.
[23:17:30] _3by8: Zomber body.
[23:20:54] bronson: has joined #RubyOnRails
[23:20:56] duderono_: has joined #RubyOnRails
[23:22:21] IrishGringo: has joined #RubyOnRails
[23:25:06] big|bad|wolf: has joined #RubyOnRails
[23:27:08] ZerGabriel: has joined #RubyOnRails
[23:28:25] voidDotClass: creature, tfitts , thanks for the help. finally got it to work. q, how do i catch that exception in ruby?
[23:28:43] voidDotClass: how do i catch if 'file = Cloudinary::PreloadedFile.new(params[:photo_sig])' causes exception?
[23:29:14] nerium: has joined #RubyOnRails
[23:29:32] Papierkorb: voidDotClass: http://rubylearning.com/satishtalim/ruby_exceptions.html
[23:30:06] nerium: How do I check if there is any back history when using ???link_to ???back???, :back??? ?
[23:30:19] nerium: I only want to show the button if there is any history
[23:30:32] paradisaeidae: has joined #RubyOnRails
[23:31:08] tfitts: voidDotClass: you can use begin rescue
[23:31:39] maletor__: has joined #RubyOnRails
[23:33:31] fgdfg: has joined #RubyOnRails
[23:34:00] voidDotClass: is this format correct? def foo
[23:34:37] NBarnes: voidDotClass: You might try posting your example code to gist and give us the link, that'd preserve formatting better.
[23:38:55] helpa: Anything more than 2 lines goes in a Gist (http://gist.github.com) or a Pastie (http://pastie.org). Spamming the channel with walls of text is not welcome.
[23:41:30] nertzy2: has joined #RubyOnRails
[23:41:38] tfitts: voidDotClass: yeah, with the original attempt after begin and the code to call in case of an exception after rescue
[23:41:46] lethjakman-l: has joined #RubyOnRails
[23:41:56] tfitts: you can also do rescue => e where is the exception
[23:42:04] tfitts: e* is the excpetion
[23:42:06] tfitts: exception
[23:44:08] rhizome: WFM https://www.google.com/search?q=ruby+send+method
[23:46:39] `aspiRe: has joined #RubyOnRails
[23:47:57] deweysdecimal: has joined #RubyOnRails
[23:47:59] chipotle: has joined #RubyOnRails
[23:50:17] tfitts: anyone here use capybara with webkit to test a page with an ajax request? My ajax requests never complete and I'm trying to figure out what I need to setup so I can get the tests to respond like the actual page
[23:53:00] IrishGringo: has joined #RubyOnRails
[23:54:32] lemur: has joined #RubyOnRails
[23:56:17] mostlybadfly: has joined #RubyOnRails
[23:56:24] nerium: has joined #RubyOnRails
[23:57:07] goodcodeguy: has joined #RubyOnRails