« Back to channel list

#RubyOnRails - 27 October 2015

« Back 1 day Forward 1 day »
[00:01:38] timdunn: same error
[00:04:47] sevenseacat: has joined #RubyOnRails
[00:04:56] workmad3: has joined #RubyOnRails
[00:07:07] ss_much: has joined #RubyOnRails
[00:07:36] ArTiSTiX: has joined #RubyOnRails
[00:08:20] Stuffness: has joined #RubyOnRails
[00:08:47] matthewd: timdunn: And Gemfile.lock still contains sqlite3?
[00:09:14] emptyflask: has joined #RubyOnRails
[00:10:29] smathy: EllisTAA, add your models to that gist.
[00:10:45] ellisTAA: smathy: i just ended up using has_many through
[00:10:48] timdunn: mattshewd: no it does not contain it but i get the same error when trying to deploy
[00:12:33] Rodya_: has joined #RubyOnRails
[00:12:36] matthewd: Sounds like maybe you're not pushing the same thing that's locally checked out, maybe?
[00:12:55] NBarnes: has joined #RubyOnRails
[00:12:57] smathy: EllisTAA, ok.
[00:13:13] tds5016: hi all. If I were to want to put https://github.com/derekharmel/sunspot_mongo/blob/master/lib/sunspot/mongo/tasks.rb in my project to replace the sunspot rake task... where would I put it?
[00:13:27] matthewd: timdunn: btw, where did you get `gem 'rails', '4.2.0'` from? That should almost always be a ~> constraint.
[00:13:32] timdunn: has left #RubyOnRails: ()
[00:13:48] tds5016: I created a cassandra adapter, and now I just need to figure out how to replace the reindex task :-)
[00:14:20] tds5016: I tried adding that file as an initializer, but it looks as though Rake isn't defined there.
[00:14:23] EminenceHC: has joined #RubyOnRails
[00:15:37] timdunn: has joined #RubyOnRails
[00:16:04] smathy: matthewd, that's the standard line that Rails generator creates.
[00:16:40] timdunn: /msg NickServ VERIFY REGISTER timdunn ignfqaldohcr
[00:16:54] FailBit: don't do that
[00:17:14] smathy: timdunn, the gist you posted before still shows sqlite3 in your Gemfile.lock
[00:17:32] timdunn: ya now it doesn't after i bundled it
[00:18:02] smathy: timdunn, and you've committed and pushed both the Gemfile and Gemfile.lock and are still getting the sqlite3 error on deploy to heroku?
[00:18:05] matthewd: smathy: So it is (!)... I wonder why we do that.
[00:18:29] timdunn: smathy: yes thats right
[00:18:37] smathy: matthewd, yeah, I've never known either.
[00:18:54] FailBit: activerecord I am disappoint
[00:19:01] FailBit: even mongoid has cursor iteration built in
[00:20:03] jgt1: has joined #RubyOnRails
[00:22:07] EminenceHC: has joined #RubyOnRails
[00:22:19] safety_cut: has joined #RubyOnRails
[00:26:48] rhizome: run all tests on startup sword sword sword
[00:27:59] rickmasta: has joined #RubyOnRails
[00:28:11] northfurr: has joined #RubyOnRails
[00:29:44] nya: has joined #RubyOnRails
[00:30:40] Joufflu: has joined #RubyOnRails
[00:31:02] wildlander: has joined #RubyOnRails
[00:31:19] grambo: has joined #RubyOnRails
[00:31:30] timdunn: smathy: I changed my gemlock file because I was on the wrong branch and now I can't seem to run bundle install
[00:31:50] grambo: has left #RubyOnRails: ()
[00:33:48] mices: what's a good folder to put images in?
[00:34:04] mices: i gotta take them out of assets
[00:34:06] NBarnes: has joined #RubyOnRails
[00:34:18] mices: so i don't have to keep compiling them
[00:34:29] mices: there's new images every day
[00:34:32] Radar: !xyproblem
[00:34:32] helpa: http://mywiki.wooledge.org/XyProblem
[00:34:48] Radar: mices: Those images should go into public/somewhere, probably.
[00:35:02] sevenseacat: probably, but not enough info to classify this as even a problem.
[00:35:05] smathy: timdunn, "can't seem to run" doesn't give any useful info,
[00:35:24] mices: Radar: don't put them under apps?
[00:35:41] Radar: mices: Perhaps explain what these images are, yeah?
[00:36:04] mices: news stories
[00:36:10] timdunn: this error I get: Your Gemfile.lock contains merge conflicts.
[00:36:10] timdunn: Run `git checkout HEAD -- Gemfile.lock` first to get a clean lock.
[00:36:12] mices: each story has an image
[00:36:15] bruno-: has joined #RubyOnRails
[00:36:55] skiz: has joined #RubyOnRails
[00:37:01] smathy: timdunn, and you follow those instructions and get the same error?
[00:37:14] mices: where should the image be respective to the view that calls it
[00:37:16] Radar: mices: then put the images in public/news/whatever
[00:37:26] Radar: mices: Images are then referred to as /whatever/image.jpg
[00:37:27] matthewd: mices: Do the news stories themselves live in git? If not, should the images? :/
[00:37:38] colleenmcguckin: has joined #RubyOnRails
[00:38:01] mices: matthewd: not, ty
[00:38:21] mices: wow i'm glad i asked
[00:38:24] bendangelo: has joined #RubyOnRails
[00:38:28] mices: i thought it was a stupid question
[00:39:13] mices: yea it was stupid for me not to have thought of that myself
[00:40:08] one_zero: has joined #RubyOnRails
[00:41:33] xcm: has joined #RubyOnRails
[00:41:39] timdunn: smathy: the git branch problem appears to have been fixed and so i tried again to deploy it to heroku and got the same error
[00:42:53] cpruitt: has joined #RubyOnRails
[00:44:01] smathy: timdunn, basically the Gemfile.lock (and possibly the Gemfile) in your repo/branch that you're deploying to heroku have the sqlite3 gem in them.
[00:44:40] smathy: timdunn, it's too hard to diagnose this with the slow trickle of information coming from you. So I'll leave it with you.
[00:45:24] NBarnes: has joined #RubyOnRails
[00:46:37] Radar: mices: I don't judge any questions for being stupid. What irks me is when people don't follow the rules. This time you followed them well. So thanks for that.
[00:46:52] Radar: timdunn: I agree with smathy. You need to respond faster.
[00:46:59] Radar: timdunn: Are you distracted by something else at the moment?
[00:47:15] timdunn: I was working on the trying some things
[00:47:21] timdunn: with bundle
[00:47:24] timdunn: and merge conflicts
[00:47:51] Radar: timdunn: It's just that this problem has taken over an hour to resolve
[00:49:22] RegulationD: has joined #RubyOnRails
[00:50:09] shibabu: has joined #RubyOnRails
[00:51:26] EminenceHC: has joined #RubyOnRails
[00:53:23] nighthwk1: has joined #RubyOnRails
[00:53:46] tvw: has joined #RubyOnRails
[00:54:31] jwaldrip: has joined #RubyOnRails
[00:54:58] baweaver: has joined #RubyOnRails
[00:59:49] annlewis: has joined #RubyOnRails
[01:00:27] tedstriker: has joined #RubyOnRails
[01:00:58] dpulliam: has joined #RubyOnRails
[01:02:48] roxtrongo: has joined #RubyOnRails
[01:04:00] chipotle_: has joined #RubyOnRails
[01:07:40] ivanskie: has joined #RubyOnRails
[01:09:58] emptyflask: has joined #RubyOnRails
[01:10:24] d34th4ck3r: has joined #RubyOnRails
[01:11:00] stannard: has joined #RubyOnRails
[01:13:47] thejamespinto: has joined #RubyOnRails
[01:16:11] ror15: has joined #RubyOnRails
[01:19:03] darrencauthon: has joined #RubyOnRails
[01:22:01] samgranieri: has joined #RubyOnRails
[01:23:47] dopie: has joined #RubyOnRails
[01:25:09] Contigi: has joined #RubyOnRails
[01:29:18] chopin: has joined #RubyOnRails
[01:34:18] mices: i took my images out of assets and put them in a folder under a public do i have to create a route for it
[01:35:09] mices: ActionController::RoutingError (No route matches [GET] "/images/public/images/press_releases/4967_175px.jpg"):
[01:35:22] mices: o never mind
[01:36:12] mices: i dunno how it prepended the "/images" to the whole thing
[01:36:44] jerry_tao: has joined #RubyOnRails
[01:36:59] bruno-: has joined #RubyOnRails
[01:37:09] rhizome: shouldn't have public either
[01:37:18] mices: what do you mean?
[01:37:37] mices: i created the directory images under public
[01:38:09] dopieee: has joined #RubyOnRails
[01:39:35] Alazoral: has joined #RubyOnRails
[01:40:13] wcalderipe: has joined #RubyOnRails
[01:41:29] wcalderipe: has joined #RubyOnRails
[01:42:51] bitkiller: has joined #RubyOnRails
[01:43:45] bitkiller: playing with actioncable, but i can't receive broadcasted messages
[01:45:45] chopin: has joined #RubyOnRails
[01:46:53] ellisTAA: has joined #RubyOnRails
[01:49:28] pixelhandler: has joined #RubyOnRails
[01:50:55] RegulationD: has joined #RubyOnRails
[01:51:00] northfurr: has joined #RubyOnRails
[01:52:56] ja: mices: ???public??? shouldn't be in the HTTP path either
[01:53:01] workmad3: has joined #RubyOnRails
[01:53:23] ja: it should just start with /images, even if your images dir is in public/
[01:53:33] bitkiller: the only thin i receive is heartbeats
[01:53:51] rhizome: that's something
[01:55:30] nya: has joined #RubyOnRails
[01:57:41] northfurr: has joined #RubyOnRails
[01:59:05] moeabdol: has joined #RubyOnRails
[02:00:05] fedexo: has joined #RubyOnRails
[02:00:20] annlewis: has joined #RubyOnRails
[02:05:43] unholycrab: has joined #RubyOnRails
[02:07:00] banister: has joined #RubyOnRails
[02:07:41] dopamean_: has joined #RubyOnRails
[02:09:57] dikaio: has joined #RubyOnRails
[02:13:17] l_tonz: has joined #RubyOnRails
[02:14:00] pydave6367: has joined #RubyOnRails
[02:15:48] acti0nman: If you're having to go through PCI-DSS, FISMA/FEDRAMP, HIPAA, ISO 27001/2 then come join ##GRC. There are QSAs, Sysadmins, and Developers in ##GRC to help you throughout the security compliance process. ##GRC will answer your questions about the jargon dense language of PCI-DSS, grok the guesswork involved with FEDRAMP/FISMA, breakdown the overwhelming tasks in ISO 27001/2 and more! ##GRC
[02:17:05] shibabu: has joined #RubyOnRails
[02:23:41] SteenJobs: has joined #RubyOnRails
[02:25:06] Pupeno: has joined #RubyOnRails
[02:26:14] null__: has joined #RubyOnRails
[02:26:14] null__: has joined #RubyOnRails
[02:27:59] m3_del: has joined #RubyOnRails
[02:28:28] Aeyrix: How did you even manage to make an advertisement for a declusterfucking channel, such a clusterfuck?
[02:29:24] chenillen: has joined #RubyOnRails
[02:30:33] samgranieri: has joined #RubyOnRails
[02:31:40] hahuang65: has joined #RubyOnRails
[02:33:28] hephaestus_rg: has joined #RubyOnRails
[02:39:20] bruno-: has joined #RubyOnRails
[02:40:14] bitkiller: has joined #RubyOnRails
[02:40:39] moeabdol: has joined #RubyOnRails
[02:50:40] nettoweb: has joined #RubyOnRails
[02:50:43] ryba: has joined #RubyOnRails
[02:51:57] wldcordeiro: has joined #RubyOnRails
[02:52:32] AnoHito: has joined #RubyOnRails
[02:54:30] Contigi777: has joined #RubyOnRails
[03:00:05] jwaldrip: has joined #RubyOnRails
[03:00:41] The_Phoenix: has joined #RubyOnRails
[03:01:05] annlewis: has joined #RubyOnRails
[03:02:32] m3_del: has joined #RubyOnRails
[03:03:36] rshetty: has joined #RubyOnRails
[03:03:54] AnoHito_: has joined #RubyOnRails
[03:05:21] m3_del: has joined #RubyOnRails
[03:07:18] EminenceHC: has joined #RubyOnRails
[03:09:26] northfurr: has joined #RubyOnRails
[03:13:22] EminenceHC: has joined #RubyOnRails
[03:13:26] chills42: has joined #RubyOnRails
[03:13:49] darrencauthon: has joined #RubyOnRails
[03:15:04] djbkd: has joined #RubyOnRails
[03:15:55] joshkovach: has joined #RubyOnRails
[03:16:35] baweaver: has joined #RubyOnRails
[03:17:22] Trynemjoel: has joined #RubyOnRails
[03:17:30] pawnbox: has joined #RubyOnRails
[03:18:17] dmarr: anyone know whats up with that? https://gist.github.com/marr/2993f12f3cb876d58960
[03:18:35] abhishekvasisht: has joined #RubyOnRails
[03:19:33] shibabu: has joined #RubyOnRails
[03:21:16] rshetty: has joined #RubyOnRails
[03:22:05] rshetty_: has joined #RubyOnRails
[03:22:23] dmarr: the #macosx people are telling me that the os doesn't allow writing to /usr
[03:23:44] matthewd: Sounds plausible. If it's a development machine, why are you installing with sudo?
[03:24:07] dmarr: i guess i need to install rbenv manually
[03:24:21] dmarr: so i don't have to use sudo
[03:25:47] george2: has joined #RubyOnRails
[03:26:06] dmarr: might just say screw it to ever getting boxen working properly
[03:26:13] Trynemjoel: has joined #RubyOnRails
[03:30:06] l_tonz: has joined #RubyOnRails
[03:31:13] jmaradin: has joined #RubyOnRails
[03:33:32] jmaradin: So I have a question about scaffold, I have generated views with the scaffold and it has inserted links with, edit_(test)_path(test)
[03:33:33] hahuang65: has joined #RubyOnRails
[03:33:56] jmaradin: I am trying to figure out what that really is supposed to point to and cannot figure out for the life of me.
[03:34:44] Trynemjoel: has joined #RubyOnRails
[03:35:09] acti0nman: Aeyrix: lol, all of compliance is a clusterfuck. We aim to help turn the clusterfuck into reasonably hygienic security procesess
[03:36:59] RegulationD: has joined #RubyOnRails
[03:37:40] Aeyrix: >sudo gem
[03:37:43] Aeyrix: help mods
[03:38:50] skiz: has joined #RubyOnRails
[03:39:34] naftilos76: has joined #RubyOnRails
[03:40:53] bruno-: has joined #RubyOnRails
[03:40:55] Aeyrix: s u d o g e m
[03:41:15] Radar: dmarr: http://ryanbigg.com/2015/06/mac-os-x-ruby-ruby-install-chruby-and-you/
[03:41:17] workmad3: has joined #RubyOnRails
[03:41:36] Radar: jmaradin: literally edit_(test)_path(test)
[03:41:43] Radar: jmaradin: or... what? Show us a real example please.
[03:42:22] l_tonz: has joined #RubyOnRails
[03:44:14] emptyflask: has joined #RubyOnRails
[03:45:23] jmaradin: <td><%= link_to 'Edit', edit_reference_path(reference) %></td>
[03:45:45] jmaradin: thats literally what I am talking about
[03:46:18] jmaradin: there is a edit_reference_path in routes though, so I figure that might be right.
[03:46:39] rhizome: should be. scaffold is pretty solid
[03:46:41] matthewd: jmaradin: That should work fine... what's your actual problem?
[03:47:30] jmaradin: sec, starting webrick back up
[03:48:32] jmaradin: so getting this error, undefined method .
[03:48:41] jmaradin: for edit_reference_path
[03:50:40] Radar: jmaradin: gist your routes file please
[03:50:53] Radar: jmaradin: !gist
[03:50:53] helpa: jmaradin: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[03:51:40] benlieb: has joined #RubyOnRails
[03:52:51] unreal: has joined #RubyOnRails
[03:52:54] moeabdol: has joined #RubyOnRails
[03:52:59] rshetty: has joined #RubyOnRails
[03:53:41] cleopatra: hello Radar :) how are you today
[03:53:52] Radar: cleopatra: good thanks :) How are you?
[03:54:00] jgt1: has joined #RubyOnRails
[03:54:45] cleopatra: a bit annoying, but I guess good: P
[03:55:22] Lytol: has joined #RubyOnRails
[03:55:55] kalanosh: has joined #RubyOnRails
[03:56:04] cleopatra: and what new !?
[03:57:53] chopin: has joined #RubyOnRails
[03:57:57] davidt: has joined #RubyOnRails
[03:58:37] bricker: has joined #RubyOnRails
[03:58:42] adamholt: has joined #RubyOnRails
[03:59:17] kalanosh: hey guys anyone have a moment to help me with understand this mini::test issue? Trying to learn and kinda stump
[03:59:20] Puffball: has joined #RubyOnRails
[04:00:55] kalanosh: When i use assert_not_nil session["forwarding_url"] it comes out as nil when it should be not nil. But weird thing is when i use assert_equal it no longer nil
[04:01:20] kalanosh: ive tried googling this discrepancy and cant pull up anything relevant
[04:01:24] rhizome: assert session[:forwarding_url].present?
[04:01:51] annlewis: has joined #RubyOnRails
[04:02:37] rhizome: use failure messages
[04:02:38] jwaldrip: has joined #RubyOnRails
[04:03:08] kalanosh: rhizome works...very weird that assert_not_nil is returning different result entirely from those two
[04:03:21] kalanosh: yes sir i am using failure message
[04:03:33] rhizome: #{session.inspect}
[04:04:54] m3_del: has joined #RubyOnRails
[04:05:10] kalanosh: ran it with assert_not_nil, its there in inspect
[04:05:47] pawnbox: has joined #RubyOnRails
[04:07:24] speaking1ode: has joined #RubyOnRails
[04:07:35] kalanosh: ugh gonna bug me its doing that. Seems like a bug but its 99% most likely something i dont understand
[04:07:57] hmsimha_: has joined #RubyOnRails
[04:08:12] rhizome: i never use _not stuff
[04:08:17] sevenseacat: can you show us the problem?
[04:08:41] sevenseacat: at the moment its just guessing
[04:09:16] braincrash: has joined #RubyOnRails
[04:09:43] rshetty: has joined #RubyOnRails
[04:10:57] pydave6367: has joined #RubyOnRails
[04:11:36] kalanosh: http://pastie.org/10510230
[04:11:53] kalanosh: its the first three asserts, ive added comments to make it clear hopefully
[04:12:07] kalanosh: simply changing the assert test changes the results
[04:12:49] sevenseacat: ok, half of what i meant
[04:12:55] matthewd: kalanosh: Typo.
[04:13:08] sevenseacat: show us the test failing
[04:13:23] sevenseacat: also yes, 'fowarding' is a typo
[04:14:25] ellisTAA: has joined #RubyOnRails
[04:14:48] kalanosh: ive never felt dumber...i just spent almost an hour on that
[04:15:43] kalanosh: that fixed it
[04:16:00] kalanosh: i am sorry to waste your time guys
[04:16:31] rhizome: those are the best
[04:18:25] ivanskie: has joined #RubyOnRails
[04:18:41] kalanosh: i am gonna cry in a corner, thanks again guys
[04:20:15] dopieee: has joined #RubyOnRails
[04:21:01] Radar: no crying
[04:21:08] Radar: just accept that you made a mistake and move on
[04:21:16] Radar: my entire day is literally fixing up mistakes that I make
[04:21:21] Radar: or other people have made
[04:21:25] Radar: mostly other people
[04:21:59] Or1on: Kalanosh left :)
[04:22:00] sevenseacat: but it's my party and I'll cry if I want to
[04:22:16] willardg: has joined #RubyOnRails
[04:23:35] redmaverick: has joined #RubyOnRails
[04:23:52] sevenseacat: ACTION is also having one of those days
[04:24:06] rhizome: cry it out everyone
[04:24:44] Radar: I said at today's standup, as I've said for 3 weeks worth of daily standups, that today will be the day that I finish work on this feature branch.
[04:24:57] Pupeno: has joined #RubyOnRails
[04:24:57] Pupeno: has joined #RubyOnRails
[04:25:14] rhizome: you and me both, brother
[04:25:23] sevenseacat: yep. been doing that. not helping.
[04:26:26] arup_r: has joined #RubyOnRails
[04:26:47] braincra-: has joined #RubyOnRails
[04:26:52] stannard: has joined #RubyOnRails
[04:32:12] redmaverick: has left #RubyOnRails: ()
[04:37:07] gingray: has joined #RubyOnRails
[04:37:26] baweaver: It was LDAP that done me in
[04:39:58] jerry_tao: has left #RubyOnRails: ()
[04:41:18] bruno-: has joined #RubyOnRails
[04:41:43] Radar: Weird. That just came up in one of the Slack channels I'm a part of.
[04:43:56] l_tonz: has joined #RubyOnRails
[04:44:00] Aeyrix: http://www.theage.com.au/victoria/armed-siege-underway-in-latrobe-street-in-melbournes-cbd-20151027-gkjkh1.html
[04:44:08] Aeyrix: wrong channel
[04:45:14] hahuang65: has joined #RubyOnRails
[04:46:13] stardiviner: has joined #RubyOnRails
[04:47:57] moeabdol: has joined #RubyOnRails
[04:49:37] benlieb: has joined #RubyOnRails
[04:51:26] mloy: has joined #RubyOnRails
[04:52:44] xcm: has joined #RubyOnRails
[04:54:22] pawnbox_: has joined #RubyOnRails
[04:55:41] d34th4ck3r: has joined #RubyOnRails
[05:01:42] rromanch_: has joined #RubyOnRails
[05:02:46] annlewis: has joined #RubyOnRails
[05:02:46] arathald: has joined #RubyOnRails
[05:02:58] mloy: has left #RubyOnRails: ("Leaving")
[05:08:22] arathald: whoops. forgot to pay my vps bill
[05:10:43] s2013: has joined #RubyOnRails
[05:11:07] mytrile: has joined #RubyOnRails
[05:11:39] s2013: hi Radar how are you doing this wonderful day?
[05:11:52] Radar: Getting tired towards the end of my day, but otherwise alrihgt.
[05:11:57] s2013: what time is it?
[05:12:23] s2013: ah ok cool.
[05:12:30] s2013: its midnight here
[05:13:49] towski_: has joined #RubyOnRails
[05:17:02] Coldblackice: has joined #RubyOnRails
[05:17:29] jgt1: has joined #RubyOnRails
[05:18:40] rshetty: has joined #RubyOnRails
[05:19:08] djbkd: has joined #RubyOnRails
[05:20:36] stardiviner: has joined #RubyOnRails
[05:21:12] nemo_: has joined #RubyOnRails
[05:22:39] stardiviner: has joined #RubyOnRails
[05:22:49] shibabu: has joined #RubyOnRails
[05:23:22] nemo__: has joined #RubyOnRails
[05:24:57] HANJIN: has joined #RubyOnRails
[05:28:03] shinenelson: has joined #RubyOnRails
[05:28:13] nya: has joined #RubyOnRails
[05:28:13] moeabdol: has joined #RubyOnRails
[05:28:38] Bloomer: has joined #RubyOnRails
[05:29:19] workmad3: has joined #RubyOnRails
[05:29:28] lxsameer: has joined #RubyOnRails
[05:29:35] willardg: has joined #RubyOnRails
[05:31:21] Musashi007: has joined #RubyOnRails
[05:31:22] lacuna: has joined #RubyOnRails
[05:31:22] lacuna: has joined #RubyOnRails
[05:32:05] Cervajz: has joined #RubyOnRails
[05:42:46] SteenJobs: has joined #RubyOnRails
[05:44:21] pawnbox: has joined #RubyOnRails
[05:51:33] pawnbox: has joined #RubyOnRails
[05:52:03] Bloomer: anyone can see my message?
[05:52:13] arup_r: Bloomer: Yo!
[05:52:33] Bloomer: My first time to be here
[05:52:54] arup_r: I know.. :)
[05:53:01] s2013: no Bloomer
[05:56:21] jmaradin: has joined #RubyOnRails
[05:57:04] craysiii: has joined #RubyOnRails
[05:58:05] jmaradin: So one more question, I have found plenty of references for using link_to to open up a link to another website in another tab. I am trying to figure out now how to have it do it while in a DO loop.
[05:58:32] sevenseacat: not how it works
[05:58:40] s2013: to open up another tab you just need to use target: "_blank"
[05:58:48] krz: has joined #RubyOnRails
[05:59:00] sevenseacat: but it requires user interaction
[05:59:06] sevenseacat: you cant just spawn new windows from the server
[05:59:21] jmaradin: but I am trying to pull the text for the url out and display that, along with the link.
[05:59:37] annlewis: has joined #RubyOnRails
[06:00:12] s2013: so like <% @items.each do |item| %> <%= link_to item.title, item_path(item) %><% end %> ? something like that you mean
[06:00:23] jmaradin: thats exactly what I mean
[06:01:20] sevenseacat: well I'm glad someone understood that
[06:01:20] dionysus69: has joined #RubyOnRails
[06:01:21] s2013: ok try it with your actual object and hopefully it works
[06:02:00] jmaradin: I did not phrase it in a very good way, pretty tired here and attempting to get this bootstrapped together to show someone tomorrow.
[06:02:12] jmaradin: first time with ruby/rails or web design really
[06:02:24] s2013: yeah we've all been there
[06:03:49] jmaradin: hhmm, not working yet
[06:04:50] skiz: has joined #RubyOnRails
[06:04:57] s2013: gist.github.com your code
[06:05:03] jmaradin: bingo got it
[06:05:29] jmaradin: now for url validation :(
[06:05:31] s2013: k im off to sleep. night
[06:05:34] jmaradin: I hate regex :(
[06:07:35] Bloomer: which way to build a API you guys recommend? grape or rails-api ?
[06:08:25] arup_r: jmaradin: where you want to validate the url ? and what you want to validate ?
[06:09:46] bruno-: has joined #RubyOnRails
[06:09:48] SteenJobs: has joined #RubyOnRails
[06:10:11] dionysus69: has joined #RubyOnRails
[06:12:06] bricker: has joined #RubyOnRails
[06:16:25] dhjondoh: has joined #RubyOnRails
[06:17:25] dgs: has joined #RubyOnRails
[06:19:24] dgs: i'm trying to debug a caching issue with my app (as in it doesn't look like caching is running). When I run memcached -vvv from console, I get what seems to be mostly garbage keys (def not what I'm specifying!). e.g. GET MOYLANS??L:????????????????????????????????????????????????/??????????????????????????????????????????????????????????????????/330/??????????????????????????????????????/131
[06:20:10] dgs: MOYLANS_L is the namespace i'm specifying, so thats as expected, but the remainder of the key is meant to be something like acts_as_select_list/InterestedThirdParty_0/c5664909a278675fe3c4f9c1ffd14d4b
[06:20:21] darkdevilish: has joined #RubyOnRails
[06:20:22] raunicolae: has joined #RubyOnRails
[06:20:41] dgs: i can't work out if that's just an issue with the displaying of the cache key in console, of if that's actually what the cache keys are going in as
[06:21:06] dgs: but the spaces in the key (if nothing else) are invalid and would seem to be causing every request to miss
[06:21:13] darutoko: has joined #RubyOnRails
[06:21:15] Radar: My goodness.
[06:21:17] Radar: dgs: !ncnh
[06:21:17] helpa: dgs: If you don't provide any code, it becomes really difficult for us to help you. Providing code to reproduce the problem increases your chances of getting great, accurate help immensely.
[06:23:14] dgs: not much in the way of code to paste - this seems to be every key from every cache request. i can paste that if you want, but it's just a standard Rails.cache.fetch("key name"), I was more just curious if anyone had seen anything similar with the garbage going in cache keys. Turns out to be a hard thing to google as I keep just getting results about memcache garbage collection
[06:23:32] Radar: I stand by my earlier assertion.
[06:23:37] helpa: http://i.imgur.com/m9m3wr9.gif
[06:23:57] pawnbox: has joined #RubyOnRails
[06:24:05] Radar: "Doctor, it hurts when I raise my arm at a 45 degree angle perpendicular to my body"
[06:24:14] Radar: OR "Doctor, it hurts when I do this [shows the doctor]"
[06:24:35] krz: has joined #RubyOnRails
[06:25:26] krz: has joined #RubyOnRails
[06:25:42] l_tonz: has joined #RubyOnRails
[06:25:48] dionysus69: has joined #RubyOnRails
[06:25:59] l_tonz: has joined #RubyOnRails
[06:27:38] sevenseacat: 'its just standard moving my arm, geez'
[06:28:08] Radar: All yours, sevenseacat. Hometime for me.
[06:28:13] dgs: sorry radar - was just generating pastie
[06:28:15] dgs: http://pastie.org/10510376
[06:28:29] Radar: no definition of what self.is_module is.
[06:28:35] Radar: byeeeeeeee
[06:28:50] sevenseacat: so whats.... yeah that
[06:28:55] dgs: hah. fair enough
[06:29:02] dgs: i'll generate a simpler case
[06:32:36] big|bad|wolf: has joined #RubyOnRails
[06:33:23] hotguitar: has joined #RubyOnRails
[06:33:38] jgt1: has joined #RubyOnRails
[06:34:42] dionysus69: has joined #RubyOnRails
[06:35:40] rromanchuk: has joined #RubyOnRails
[06:36:37] ruurd: has joined #RubyOnRails
[06:37:46] Musashi007: has joined #RubyOnRails
[06:38:04] dionysus69: has joined #RubyOnRails
[06:38:48] yardenbar: has joined #RubyOnRails
[06:38:53] yogeshrt: has joined #RubyOnRails
[06:39:13] annlewis: has joined #RubyOnRails
[06:40:17] tagrudev: has joined #RubyOnRails
[06:40:29] aganov: has joined #RubyOnRails
[06:40:56] zpe: has joined #RubyOnRails
[06:42:41] dionysus69: has joined #RubyOnRails
[06:42:41] dionysus69: has joined #RubyOnRails
[06:43:04] m3_del: has joined #RubyOnRails
[06:45:45] dideler: has joined #RubyOnRails
[06:47:19] The_Phoenix: has joined #RubyOnRails
[06:47:42] pawnbox: has joined #RubyOnRails
[06:48:44] MartinElvar: has joined #RubyOnRails
[06:50:01] northfurr: anyone know why my images are wiped from my app every time i push to heroku?
[06:50:32] sevenseacat: has joined #RubyOnRails
[06:51:45] rvanlieshout: has joined #RubyOnRails
[06:52:21] sevenseacat: northfurr: because heroku only has temporary storage?
[06:53:25] pawnbox: has joined #RubyOnRails
[06:53:29] duncannz: has joined #RubyOnRails
[06:54:08] arup_r: Can we use association name as a key while using http://api.rubyonrails.org/classes/ActiveModel/Errors.html#method-i-add
[06:54:18] Motoservo: has joined #RubyOnRails
[06:54:27] arup_r: seems the key should be either model attribute or :base
[06:54:31] sevenseacat: yes. will that do what you want? no idea.
[06:54:43] jwaldrip: has joined #RubyOnRails
[06:54:49] arup_r: But can we do use association name ?
[06:54:52] arup_r: sevenseacat: me ?
[06:55:12] eoy_: has joined #RubyOnRails
[06:55:14] dionysus69: has joined #RubyOnRails
[06:55:19] rshetty: has joined #RubyOnRails
[06:56:01] krz: has joined #RubyOnRails
[06:56:47] danneu: northfurr: upload images to S3
[06:57:01] danneu: or save those suckers in the db if it's no big deal
[06:58:14] arup_r: s3 is what I did
[06:58:25] Lightsword: has joined #RubyOnRails
[07:01:34] trosborn: has joined #RubyOnRails
[07:07:09] pawnbox: has joined #RubyOnRails
[07:07:20] chrissonar: has joined #RubyOnRails
[07:07:59] riotjones: has joined #RubyOnRails
[07:09:12] northfurr: danneu: thanks, looking into it :)
[07:09:45] danneu: the fur that she is wearing is the fur that she prefurs
[07:10:01] bruno-: has joined #RubyOnRails
[07:11:12] northfurr: has joined #RubyOnRails
[07:15:43] hahuang65: has joined #RubyOnRails
[07:16:06] d34th4ck3r: For some reason, sign_in isn???t working in my simple code: https://gist.github.com/d34th4ck3r/adea49bbc18cdb248731
[07:16:21] d34th4ck3r: anyidea, what I maybe doing wrong?
[07:17:25] workmad3: has joined #RubyOnRails
[07:17:37] mytrile: has left #RubyOnRails: ()
[07:18:31] sevenseacat: d34th4ck3r: not signing in an actual user?
[07:18:38] sevenseacat: you havent saved the user you're signing in
[07:19:17] Bloomer: i am trying to build a web app and API together, can I use grage? or recommedn to use rails-api?
[07:19:35] jas02: has joined #RubyOnRails
[07:20:00] trautwein: has joined #RubyOnRails
[07:20:19] d34th4ck3r: sevenseacat: You mean something like this: https://gist.github.com/d34th4ck3r/adea49bbc18cdb248731 ?
[07:20:29] d34th4ck3r: but my error is same for this code too
[07:20:41] sevenseacat: thats the same code you posted before
[07:20:46] sevenseacat: and its still not actually saving any users
[07:21:04] d34th4ck3r: by saving you mean in the database?
[07:23:53] youngbaks: has joined #RubyOnRails
[07:25:13] shibabu: has joined #RubyOnRails
[07:25:30] draken: another blizzard beta i didnt get invited 2, fk u blizzard ill just code then
[07:32:47] duncannz: has joined #RubyOnRails
[07:34:26] rshetty: has joined #RubyOnRails
[07:34:40] l_tonz: has joined #RubyOnRails
[07:39:52] annlewis: has joined #RubyOnRails
[07:40:24] dionysus69: has joined #RubyOnRails
[07:42:09] Motoservo: has joined #RubyOnRails
[07:45:04] m3_del: has joined #RubyOnRails
[07:45:13] livando: has joined #RubyOnRails
[07:45:49] yardenbar: has joined #RubyOnRails
[07:46:03] neanderslob: has joined #RubyOnRails
[07:46:43] tetraktys: has joined #RubyOnRails
[07:48:34] A124: has joined #RubyOnRails
[07:49:41] cac: has joined #RubyOnRails
[07:50:17] sdwrage: has joined #RubyOnRails
[07:51:26] sininen: has joined #RubyOnRails
[07:51:30] ruurd: has joined #RubyOnRails
[07:52:23] Pumukel: has joined #RubyOnRails
[07:53:21] srinidhi: has joined #RubyOnRails
[07:55:35] pawnbox: has joined #RubyOnRails
[07:58:17] leehambley: has joined #RubyOnRails
[07:58:27] chipotle: Radar: i started reading your book, thank you for writing so well
[07:59:03] arup_r: has joined #RubyOnRails
[07:59:36] benlieb: has joined #RubyOnRails
[08:00:05] krz: has joined #RubyOnRails
[08:01:33] arBmind: has joined #RubyOnRails
[08:01:51] trosborn: has joined #RubyOnRails
[08:02:30] trosborn: has joined #RubyOnRails
[08:03:46] zpe: has joined #RubyOnRails
[08:11:24] bruno-: has joined #RubyOnRails
[08:11:56] yardenbar: has joined #RubyOnRails
[08:12:28] trosborn: has joined #RubyOnRails
[08:13:12] d34th4ck3r: sevenseacat: I forgot to thank, that worked smoothly.
[08:14:54] unholycrab: has joined #RubyOnRails
[08:15:56] Palsson: has joined #RubyOnRails
[08:18:39] comrad: has joined #RubyOnRails
[08:19:59] SmOkE_RU: has left #RubyOnRails: ()
[08:22:29] Peg-leg: has joined #RubyOnRails
[08:26:12] MartinElvar: has joined #RubyOnRails
[08:28:22] dici: has joined #RubyOnRails
[08:29:15] qejk: has joined #RubyOnRails
[08:30:19] pawnbox: has joined #RubyOnRails
[08:30:59] artto: has joined #RubyOnRails
[08:32:04] kitsuneyo: has joined #RubyOnRails
[08:33:19] rshetty_: has joined #RubyOnRails
[08:34:20] jgt1: has joined #RubyOnRails
[08:35:12] Pupeno: has joined #RubyOnRails
[08:37:38] hephaestus_rg: has joined #RubyOnRails
[08:38:56] nya: has joined #RubyOnRails
[08:38:59] kimegede: has joined #RubyOnRails
[08:40:37] annlewis: has joined #RubyOnRails
[08:41:12] rshetty: has joined #RubyOnRails
[08:41:36] Bloomer: i am going to make a API with rails, this is my first time. Is API just same as a rails app but render json data?
[08:42:23] yfeldblum: has joined #RubyOnRails
[08:42:28] ecmacoder: has joined #RubyOnRails
[08:42:49] jeffmess: has joined #RubyOnRails
[08:43:38] Bloomer: Am I right?
[08:43:42] tbuehlmann: Bloomer, you can think of it that way, yeah
[08:44:05] tbuehlmann: there's also the rails-api gem (which will be included in rails with version 5), which removes some rack middleware that's not needed for an API
[08:44:50] jeffmess: has anyone managed to setup 2 asset pipelines on a rails 3.2 project? I have a rather large Backbone SPA and would like another asset pipeline to serve a Redux app on certain routes. Or is there another alternative, like setting up nginx in a way to route between rails/webpack and how would this work with the devise session? Apologies for the long question.
[08:44:50] Bloomer: if I need to combine both rails app and API?
[08:44:57] Bloomer: can I use rails-api?
[08:45:07] big|bad|wolf: has joined #RubyOnRails
[08:45:12] Motoservo: has joined #RubyOnRails
[08:45:25] trosborn: has joined #RubyOnRails
[08:45:45] lipoqil: has joined #RubyOnRails
[08:45:50] m3_del: has joined #RubyOnRails
[08:45:53] solars: has joined #RubyOnRails
[08:45:56] tbuehlmann: Bloomer, I'd use just rails then
[08:46:20] Bloomer: tbuehlmann, really appreciate your reply
[08:46:27] tbuehlmann: very welcome!
[08:47:02] hd1: has joined #RubyOnRails
[08:47:13] hd1: has left #RubyOnRails: ()
[08:47:25] hfp_work: has joined #RubyOnRails
[08:48:59] kerunaru: has joined #RubyOnRails
[08:52:09] youngbaks: has joined #RubyOnRails
[08:56:41] czerasz: has joined #RubyOnRails
[08:57:19] mikecmpbll: has joined #RubyOnRails
[08:58:12] workmad3: has joined #RubyOnRails
[08:59:09] mark2: has joined #RubyOnRails
[08:59:11] jsrn_: has joined #RubyOnRails
[09:01:37] MartinElvar: has joined #RubyOnRails
[09:03:38] pcpanic: has joined #RubyOnRails
[09:03:49] marr: has joined #RubyOnRails
[09:06:00] Pupeno: has joined #RubyOnRails
[09:06:00] Pupeno: has joined #RubyOnRails
[09:06:18] Grundell: has joined #RubyOnRails
[09:07:02] sadaf2605: has joined #RubyOnRails
[09:07:41] benhuda: has joined #RubyOnRails
[09:07:54] ibouvousaime: has joined #RubyOnRails
[09:07:56] d34th4ck3r: Argh! Here is what my application.rb looks like: https://gist.github.com/d34th4ck3r/3d67cb77379a066d294c but I keep getting uninitialized contant for my classes in lib/tasks/
[09:08:33] sevenseacat: code? error? something?
[09:08:50] sevenseacat: I can guess your tasks don't use the Rails environment, but don't know for sure
[09:09:24] d34th4ck3r: https://github.com/FreeFromBorders/f2b_website/blob/master/app/controllers/posts_controller.rb
[09:09:54] sevenseacat: thats not a rake task
[09:10:18] sevenseacat: lib/tasks is for rake tasks
[09:10:56] sevenseacat: its also not an error or anything
[09:11:49] sevenseacat: you also don't need to require the file specifically - thats what the autoload configuration is for
[09:11:57] adac: has joined #RubyOnRails
[09:12:29] d34th4ck3r: Yeah! I just did it as a temporary solution to test my code real quick
[09:12:38] yashinbasement: has joined #RubyOnRails
[09:13:25] d34th4ck3r: I have to change a lot of things in that code if you notice. haha My controllers are huge, need to move the code to models.
[09:13:41] adac: with "rake db:create" no initializers are called, with "rake db:migrate" they are. Any ideas why it is like that? And second question, can I somehow force to load the initializers?
[09:13:48] norc: has joined #RubyOnRails
[09:13:56] adac: with a system rake task I mean
[09:14:02] techsethi: has joined #RubyOnRails
[09:14:36] big|bad|wolf: has joined #RubyOnRails
[09:15:00] sevenseacat: the db:create task doesn't depend on the rails environment, which I'm guessing is why.
[09:15:25] adac: sevenseacat, In my case it does :)
[09:16:22] vigintas: has joined #RubyOnRails
[09:16:44] Motoservo: has joined #RubyOnRails
[09:17:24] adac: sevenseacat, I have an initializer that checks if the db connection can be established. If not then it just retries after some time. When it succeeds the rake task is executed.
[09:17:46] sevenseacat: what does that have to do with what I said...?
[09:17:46] adac: It is because sometimes the docker container with the postgres is not yet ready
[09:18:01] adac: sevenseacat, not much it is just my case
[09:18:14] adac: and I guess for crfeation of a databse you need a connection, right=
[09:18:19] adac: *creation
[09:18:47] adre: has joined #RubyOnRails
[09:19:06] norc: Assuming Foo has_many Bar, is there some elegant way to do this: foo = Foo.first; Bar.where(foo: foo) ?
[09:19:25] norc: Or do I really have to explicetely join and filter by columns explicitely here?
[09:20:18] Cervajz: has joined #RubyOnRails
[09:20:44] yardenbar: has joined #RubyOnRails
[09:20:57] arup_r: foo = Foo.first; Bar.where(foo: foo) should work .. What is wrong? Bar belongs_to :foo need also on the other side
[09:21:09] workmad3: norc: you mean 'foo.bars'?
[09:21:17] norc: workmad3: Nope.
[09:21:31] workmad3: norc: why not?
[09:21:46] bonemind: has joined #RubyOnRails
[09:21:49] norc: I just want do something like Foo.find_or_create_by(color: "red", bar: my_bar)
[09:22:16] workmad3: norc: try `bars: [my_bar]` there
[09:22:25] workmad3: norc: also, that's completely different to what you just asked
[09:22:55] norc: workmad3: Well .where(...).first_or_create would work too. ;)
[09:23:36] workmad3: norc: still very different from asking "Is there a way to get all the bars associated with a foo'
[09:24:00] helpa: Please do not use fake values, as they can be confusing or misleading. Sometimes both.
[09:24:03] sevenseacat: we have it for a reason.
[09:24:26] norc: This is less about the original problem. Im actually trying to understand why my original problem does not work.
[09:24:53] sevenseacat: and the original problem is?
[09:24:53] nfk|laptop: has joined #RubyOnRails
[09:25:35] helpa: http://i.imgur.com/tyViD.gif
[09:25:36] norc: Gah nevermind. It was just a typoe. :)
[09:25:48] Radar: I'm back while Shaz is doing teacher-y type things
[09:25:54] workmad3: Radar: o/ hi
[09:26:02] workmad3: norc: well done :P
[09:26:26] norc: I have been here before.
[09:26:34] Radar: norc: Please follow all lighted signs and crew member instructions.
[09:27:53] quazimodo: has joined #RubyOnRails
[09:28:10] Radar: norc: what exactly is "lies"?
[09:28:53] shibabu: has joined #RubyOnRails
[09:29:20] Silex: with rails i18n, is there a tool to edit the files easily for translators? maybe something that converts to PO?
[09:29:28] Silex: (poedit is crossplatform)
[09:29:59] rvanlieshout: i've seen some gem that puts them on google drive as a spreadsheet
[09:30:04] rvanlieshout: export + import
[09:30:12] Radar: Silex: localeapp.com
[09:30:31] Silex: Radar: thanks, I also just found https://github.com/pejuko/i18n-translators-tools
[09:30:45] Radar: We're using localeapp to do bikeexchange.com.au and bikeexchange.de
[09:30:53] Radar: Seems to work alright.
[09:31:11] Silex: ah, it's only free up to a limit
[09:31:36] Radar: Hm it's as if running such a thing costs money
[09:32:05] rvanlieshout: Radar, how do you keep track of unused keys?
[09:32:19] n1ck7: has joined #RubyOnRails
[09:32:24] Radar: rvanlieshout: Hard to do currently. Would require us to look through our app for those keys.
[09:32:45] rvanlieshout: i'm going to try gettext rails for that one
[09:32:53] Silex: https://github.com/unho/yaml2po
[09:33:03] Radar: They're used in many different contexts. i.e. might be a view key that's referenced in there as just t(".price"), but it's actually views.adverts.show.price.
[09:33:55] kitsuneyo: has joined #RubyOnRails
[09:34:36] yogeshrt: has joined #RubyOnRails
[09:34:56] norc: Here is a purely educational question: On violating database constraints, the straight exception message I get has something like INSERT INTO "foo" ("c1", "c2", "c3") VALUES (?, ?, ?) in the message. Is there a particular reason why I cannot see the values in that error?
[09:35:43] Silex: rvanlieshout: yeah, I just found https://github.com/grosser/gettext_i18n_rails which seems to come with https://github.com/grosser/translation_db_engine which is like localapp.com
[09:35:48] norc: (For example I get this from my SQlite3 adapter at the moment)
[09:36:18] Radar: norc: they are secret values. Known only to the secret cabal.
[09:36:27] yfeldblum: has joined #RubyOnRails
[09:36:29] helpa: You have not provided enough information to debug your problem. Please provide this information: https://gist.github.com/radar/5384431
[09:36:35] norc: Radar: Is there a configuration to join the secret cabal?
[09:36:37] Radar: They are also placeholder values for the actual values. I don't know why Rails doesn't show you the actual values.
[09:37:05] jgt1: has joined #RubyOnRails
[09:37:06] Radar: norc: Only a blood sacrifice in Rails 4. I heard they're considering changing it in Rails 5 to be something more... modern.
[09:37:12] qejk: has joined #RubyOnRails
[09:37:17] tolo123: has joined #RubyOnRails
[09:37:18] tak1n: has joined #RubyOnRails
[09:37:45] tolo123: has left #RubyOnRails: ()
[09:38:16] norc: Radar: Well, an online registration form would be nice. But only if I get a onetime 5% coupon on ritual weapons at BloodTastesGood.com.
[09:38:33] norc: sevenseacat: http://pastie.org/10510731
[09:38:40] norc: This is the straight error message Im getting from rails.
[09:38:59] norc: I mean if I look at the server log I can see what its trying to pass there, but its just a bit annoying. :)
[09:39:30] sevenseacat: looks like part of it is missing.
[09:39:40] sevenseacat: error messages don't typically end in :
[09:40:33] Radar: Sigh Braintree. Transactions in the sandbox that are between.. I think $2k and $3k fail. Unless those transactions are subscription transactions. Then it works fine.
[09:40:42] eyck: has joined #RubyOnRails
[09:40:47] Radar: _not_ what I want to happen when I'm testing what happens when someone enters invalid credit card credentials
[09:41:24] annlewis: has joined #RubyOnRails
[09:41:50] norc: sevenseacat: I was a bit too eager there. http://pastie.org/10510748
[09:42:33] norc: sevenseacat: I mean the server log immediately shows the issue: http://pastie.org/10510751
[09:42:53] sevenseacat: *thats what i asked for the first time!!!!*
[09:42:58] sevenseacat: and it took three pasties to get there!
[09:43:27] norc: Im talking about the error message shown in the webbrowser.
[09:43:50] qejk: has joined #RubyOnRails
[09:43:59] Radar: Screenshot
[09:44:15] norc: Now you get greedy.
[09:44:41] krz: has joined #RubyOnRails
[09:44:47] voker57: has joined #RubyOnRails
[09:44:55] Radar: Oh I am an idiot. Setting the plan price on my side doesn't do anything besides change how it's displayed to the user. I need to set it on Braintree's side.
[09:45:06] Radar: (and this, peeps, is why you don't code all day)
[09:46:05] norc: Radar: https://img1.picload.org/image/popioal/screenshot2015-10-27at10.44.48.png
[09:46:08] norc: This is really not helpful.
[09:46:34] m3_del: has joined #RubyOnRails
[09:46:38] Radar: So what's happening there is that your database has a constraint set on it, but your model doesn't have a matching validation.
[09:46:48] mrbubbles: has joined #RubyOnRails
[09:46:55] elaptics: so actually really helpful :)
[09:46:56] Radar: Think of it as a double constraint designed to make sure that the data stays pure.
[09:46:59] norc: Radar: Sure. But I still want to see the values its trying to insert there in the browser. :P
[09:47:10] Radar: if you want a proper error message then you should add a validation to the model.
[09:47:43] norc: My issue is just that Im seeing a lot of ? ? ? ?. :(
[09:47:46] Radar: norc: yes
[09:47:56] Radar: norc: look at the params at the bottom. You can see what it is sending through there.
[09:48:02] Radar: ? ? ? is just the placeholder stuff
[09:48:07] Motoservo: has joined #RubyOnRails
[09:48:14] elaptics: the error does tell you that you're not setting anything in unit - i.e. it's a blank string as per the request params
[09:48:18] norc: Radar: The parameters is what the controller gets, not what is passed to the model thoughl
[09:48:27] Radar: norc: Semantics.
[09:48:35] Radar: norc: 99.9% of the cases, they're the same thing
[09:48:46] Radar: Very rarely do parameters get munged before getting to the model
[09:48:48] norc: Radar: With strong params and my before_save hooks (which I actually have)...
[09:49:01] elaptics: norc: are you doing something other than just passing the params to the model then?
[09:49:15] Radar: ok, enough drip feeding
[09:49:19] Radar: I need to go do something more productive.
[09:49:21] mikecmpbll: do all the adapters do that? i don't recognise it.
[09:49:27] mikecmpbll: wondering if it's sqlite specific
[09:49:38] elaptics: mikecmpbll: they all do afaik
[09:49:54] norc: But seriously - Im not sure why we are arguing.. I just wanted to know why I cant see the values of the SQL statement there.
[09:50:02] norc: I didnt have an issue to figure out my problem.
[09:50:43] Radar: norc: because Rails doesn't do it!
[09:50:46] Radar: It's not you. It's Rails.
[09:50:49] Radar: Can you now stop asking about it?
[09:51:11] Radar: It's deep within the bowels of AR or probably Arel and I don't feel like dirtying my elbow tonight.
[09:52:00] sevenseacat: god, like you actually get a say.
[09:53:04] norc: Sorry if I caused an argument here. I was merely curious about this bit, nothing more. :(
[09:53:24] Radar: Were you not happy with the "placeholders" explanation?
[09:53:24] mikecmpbll: bit fractious in here this morning
[09:54:02] beauby: has joined #RubyOnRails
[09:54:10] norc: Radar: Naming it is not explaining it though. Not that I dont appreciate it...
[09:54:14] mikecmpbll: it's not unreasonable to wonder why some of the useful things for debugging aren't in the error message ;)
[09:55:09] dikaio: has joined #RubyOnRails
[09:55:23] Radar: FTR: the values are visible in the SQL statement from your logs.
[09:55:25] yardenbar: has joined #RubyOnRails
[09:55:46] Radar: For instance, this is what I see in my dummy Rails app https://gist.github.com/radar/767d8493bd6c3c9b6246
[09:56:12] mikecmpbll: [09:39:05] <norc> I mean if I look at the server log I can see what its trying to pass there, but its just a bit annoying. :)
[09:56:34] Radar: I missed that part.
[09:56:46] jgt1: has joined #RubyOnRails
[09:57:59] rodfersou: has joined #RubyOnRails
[10:01:04] elaptics: why's it annoying to look at the logs? Isn't that what logs are for?
[10:01:40] mikecmpbll: elaptics: may as well do away with the error page all together eh :)
[10:01:41] pawnbox: has joined #RubyOnRails
[10:02:15] elaptics: mikecmpbll: yep, ideally it shouldn't get that far if you're writing tests :D
[10:03:31] pawnbox: has joined #RubyOnRails
[10:03:56] quazimodo: has joined #RubyOnRails
[10:04:06] yfeldblum: has joined #RubyOnRails
[10:04:07] Musashi007: has joined #RubyOnRails
[10:07:13] nettoweb: has joined #RubyOnRails
[10:08:15] tvw: has joined #RubyOnRails
[10:08:24] pawnbox: has joined #RubyOnRails
[10:10:22] norc: elaptics: for the same reason the error template gives me a full stack trace, with the functionality to extract the source code for each frame, an error message, environment variables, parameters and a debug console
[10:10:38] norc: So I dont have to go somewhere else to understand the cause of my problem.
[10:11:50] norc: One might argue that if proper tests are written, you should not be needing this error display in the first place...
[10:11:57] yayu___: has joined #RubyOnRails
[10:12:04] vsh_: has joined #RubyOnRails
[10:12:18] norc: Why give me the SQL statement in the first place and tell me the database emits an error, if its incomplete.
[10:12:38] vsh_: has left #RubyOnRails: ()
[10:12:49] elaptics: That would be my argument but I do understand why it's useful to have this info displayed
[10:13:15] Hazim: has joined #RubyOnRails
[10:14:00] yayu___: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[10:16:12] jgt1: has joined #RubyOnRails
[10:17:13] Hazim: hi, i need help with factory girl associations
[10:17:34] jammanbo: has joined #RubyOnRails
[10:18:27] razieliyo: has joined #RubyOnRails
[10:18:40] trautwein: has joined #RubyOnRails
[10:18:56] jammanbo: Just to confirm, if I have classes under say app/models/v1/, I should really add app/models/v1/ to eager_load_paths?
[10:20:23] pawnbox: has joined #RubyOnRails
[10:20:35] rickmasta: has joined #RubyOnRails
[10:20:42] Hazim: anyone free to help?
[10:20:59] rvanlieshout: jammanbo: not in a recent rails
[10:21:06] rvanlieshout: is they have a v1 prefix
[10:21:12] rvanlieshout: hazim: always
[10:21:30] Hazim: hi thanks rvan
[10:21:36] sameerynho: has joined #RubyOnRails
[10:21:48] Olipro_: has joined #RubyOnRails
[10:22:06] yardenbar: has joined #RubyOnRails
[10:22:06] rvanlieshout: van = https://en.wikipedia.org/wiki/Tussenvoegsel
[10:22:21] rvanlieshout: i don't have an english friendly name :)
[10:22:27] elaptics: hazim: ask away, if anyone can help they will
[10:22:43] pawnbox: has joined #RubyOnRails
[10:23:10] Musashi007: has joined #RubyOnRails
[10:23:56] bruno-: has joined #RubyOnRails
[10:24:00] jammanbo: rvanlieshout: You mean that if those classes are in a V1 namespace it isn't _necessary_? But to actually get the classes eager loaded when cache_classes is true, is it not necessary? In the code I see `paths.add "app", eager_load: true, glob: "{*,*/concerns}"` which would omit the V1 classes right?
[10:24:25] rvanlieshout: jammanbo: but isn't it already in the autoload path?
[10:24:41] Hazim: thanks people
[10:25:24] jammanbo: rvanlieshout: Sure, V1::MyClass will autoload, but I'm wondering/thinking that I need to do more if I want it to eager load...
[10:25:31] ibouvousaime_: has joined #RubyOnRails
[10:26:09] Hazim: https://gist.github.com/hazim78/2ff76e002d7a6b69ffd0
[10:26:22] rvanlieshout: jammanbo: ah right. why would you want to eager load?
[10:26:41] Hazim: my factory girl association is returning undefined method 'department='
[10:26:51] Hazim: can't seem to figure how to create the association
[10:26:55] jammanbo: rvanlieshout: Dunno ... just sounds like the kind of thing one should be doing in production? :)
[10:27:23] Hazim: thanks for the help
[10:27:25] rvanlieshout: jammanbo: production is different.. it'll cache classes
[10:27:28] krisquigley: has joined #RubyOnRails
[10:27:29] rvanlieshout: so nothing to worry about now
[10:27:55] rvanlieshout: hazim: does your user have a department relationship?
[10:28:24] jammanbo: rvanlieshout: Okay, fair enough
[10:28:56] Hazim: rvanlieshout: yes
[10:29:05] Hazim: it's in an engine
[10:30:05] rvanlieshout: hazim: Rails disagrees.. prove it :)
[10:30:39] l_tonz: has joined #RubyOnRails
[10:30:48] Hazim: i have belongs_to :department in class User
[10:31:00] shibabu: has joined #RubyOnRails
[10:31:25] rvanlieshout: hazim: then there should be a department= for user
[10:31:34] rvanlieshout: add the full error with stacktrace to your gist
[10:31:35] rvanlieshout: and user model
[10:32:24] Hazim: sorry to ask, i got the error in rspec, how do I provide the full error
[10:32:49] Hazim: also just uploaded the user model to the gist
[10:34:37] rvanlieshout: the full output of that rspec stuff
[10:34:52] ibouvousaime: has joined #RubyOnRails
[10:34:57] Motoservo: has joined #RubyOnRails
[10:35:27] Hazim: gotcha rvan
[10:35:35] Hazim: can you check the gist again
[10:35:36] pawnbox: has joined #RubyOnRails
[10:35:58] pawnbox: has joined #RubyOnRails
[10:36:13] rvanlieshout: that's a Subscribem::User
[10:36:15] rvanlieshout: not a User, right?
[10:36:42] qejk: has joined #RubyOnRails
[10:36:49] rvanlieshout: i've misread the error
[10:37:00] Hazim: do tell me
[10:37:04] rvanlieshout: it is complaining about your department not having a department attribute
[10:37:12] Hazim: but it does
[10:38:17] asdfasdf_: has joined #RubyOnRails
[10:39:11] Hazim: yes sir, can you check my gist again, schema.rb
[10:40:37] annlewis: has joined #RubyOnRails
[10:40:53] rvanlieshout: factory :department do
[10:40:53] rvanlieshout: sequence(:department){|n|"dep#{n}"}
[10:41:09] rvanlieshout: where does it show that the department model has a department attribute?
[10:41:34] annlewis_: has joined #RubyOnRails
[10:41:59] jwaldrip: has joined #RubyOnRails
[10:42:29] Hazim: can you tell me what's wrong, and how to fix it, clearly newbie here
[10:42:57] norc: hazim: I really recommend a read here: https://github.com/thoughtbot/factory_girl/blob/master/GETTING_STARTED.md
[10:43:50] ldnunes: has joined #RubyOnRails
[10:44:02] metalic: has joined #RubyOnRails
[10:44:03] Hazim: thanks norc
[10:44:36] norc: hazim: Once you read that, your mistake should become quite clear. :)
[10:45:01] norc: (Whichever sections seem relevant to you obviously)
[10:45:07] youngbaks: has joined #RubyOnRails
[10:45:11] Hazim: but pls give a hint ;)
[10:45:54] rvanlieshout: hazim: what attributes does your department table have?
[10:47:08] hfp__work: has joined #RubyOnRails
[10:47:10] norc: hazim: You need to understand what your own code does. Reading the basic getting started of FactoryGirl helps you with that. :)
[10:47:22] m3_del: has joined #RubyOnRails
[10:47:51] xcm: has joined #RubyOnRails
[10:48:24] Hazim: it's clear
[10:48:33] Hazim: just figured it out
[10:49:12] Hazim: factory :department do
[10:49:13] Hazim: sequence(:name){|n|"dep#{n}"}
[10:49:13] Hazim: factory :department do
[10:49:13] Hazim: sequence(:name){|n|"dep#{n}"}
[10:49:15] Hazim: factory :department do
[10:49:17] Hazim: sequence(:name){|n|"dep#{n}"}
[10:49:24] Hazim: factory :department do
[10:49:25] Hazim: sequence(:name){|n|"dep#{n}"}
[10:49:29] Hazim: factory :department do
[10:49:31] Hazim: sequence(:name){|n|"dep#{n}"}
[10:49:37] Hazim: sorry people didn't notice i pasted multiple times
[10:50:12] Hazim: i changed the sequence(:department) to sequence(:name)
[10:50:20] Hazim: that was the problem
[10:50:33] jvanbaarsen: has joined #RubyOnRails
[10:53:00] Hazim: thans rvan and norc
[10:55:40] n1ck7: has joined #RubyOnRails
[10:56:07] stamina: has joined #RubyOnRails
[10:56:56] Musashi007: has joined #RubyOnRails
[10:57:53] MartinElvar: has joined #RubyOnRails
[10:58:28] yogeshrt: has joined #RubyOnRails
[10:58:46] chills42: has joined #RubyOnRails
[10:59:39] RegulationD: has joined #RubyOnRails
[11:00:01] syath: has joined #RubyOnRails
[11:00:19] chills42: has joined #RubyOnRails
[11:00:54] RegulationD: has joined #RubyOnRails
[11:01:08] hmsimha_: has joined #RubyOnRails
[11:01:10] shibabu: has joined #RubyOnRails
[11:02:07] RegulationD: has joined #RubyOnRails
[11:02:12] pawnbox: has joined #RubyOnRails
[11:03:22] RegulationD: has joined #RubyOnRails
[11:03:39] ruurd: has joined #RubyOnRails
[11:04:00] kerunaru: has joined #RubyOnRails
[11:04:40] RegulationD: has joined #RubyOnRails
[11:05:21] allcentury: has joined #RubyOnRails
[11:05:55] RegulationD: has joined #RubyOnRails
[11:06:07] spiman: has joined #RubyOnRails
[11:07:12] RegulationD: has joined #RubyOnRails
[11:08:23] RegulationD: has joined #RubyOnRails
[11:10:10] pawnbox: has joined #RubyOnRails
[11:15:07] mices: i'm using rescue mailer but there's nothing in environments/production.rb do i need to edit it
[11:17:16] rvanlieshout: iirc the defaults use sendmail
[11:17:33] ovnix: has joined #RubyOnRails
[11:23:10] pawnbox: has joined #RubyOnRails
[11:23:17] weihan: has joined #RubyOnRails
[11:23:44] Dbugger: has joined #RubyOnRails
[11:23:47] Dbugger: Hello everyone
[11:24:16] Dbugger: Could anyone point me to the documentation of Ruby On Rails, where I could find help on how to add a image file to a model?
[11:25:22] rvanlieshout: dbugger: rails itself doesn't provide anything for that. you might want to check gems carrierwave and papierclip
[11:26:21] rvanlieshout: well.. rails provides everything you need, but still a gem would help here
[11:26:57] Dbugger: rvanlieshout, in that case, what kind of field would the one holding my image? a :string?
[11:27:22] workmad3: dbugger: typically, you don't store the image in the db... you store a path or URL to it
[11:27:28] workmad3: (depending on storage)
[11:27:36] elaptics: dbugger: generally it would be a string holding a reference to it, usually the file name since you'd know/be able to work out the path
[11:27:41] workmad3: https://rubygems.org/gems/dragonfly is another option for handling uploads, processing and attachment
[11:28:09] leehambley: has joined #RubyOnRails
[11:28:31] elaptics: storing files using a cloud file service like S3 is generally the best bet
[11:28:32] Dbugger: I hope I can find a screencast for this
[11:28:56] elaptics: dbugger: http://railscasts.com/episodes?utf8=???&search=upload
[11:29:19] rvanlieshout: although those are from years ago
[11:29:20] Cervajz: has joined #RubyOnRails
[11:29:31] elaptics: the principles are still the same
[11:29:47] elaptics: should at least give you a clue/starting point
[11:31:10] srinidhi: has joined #RubyOnRails
[11:31:17] Dbugger: I just built an app for build your own "Create your own adventure" stories, and I want to add pictures to pages :)
[11:33:46] darrencauthon: has joined #RubyOnRails
[11:33:58] dhjondoh: has joined #RubyOnRails
[11:35:25] chipotle: has joined #RubyOnRails
[11:37:46] Motoservo: has joined #RubyOnRails
[11:42:04] norc: I have a couple models with association chains (A > B > C > D). What is the best way to setup FactoryGirl here? Using a trait in each that recursively creates the associations before :create?
[11:42:17] annlewis: has joined #RubyOnRails
[11:42:18] pwnd_nfsw: dbugger, cloudinary is pretty good too
[11:42:25] pwnd_nfsw: No CC required
[11:42:48] pwnd_nfsw: Credit card
[11:42:58] Dbugger: storage is not what bothers me
[11:43:01] Dbugger: I just want easy integration
[11:43:09] pwnd_nfsw: It's pretty damn easy
[11:43:38] pwnd_nfsw: Youd ont need any extra software on server, because all transformations are done in "THE CLOUDDDDDDDDDdduhduhduhduhddd"
[11:44:02] pwnd_nfsw: basically just install the gem, put mounter in routes, and add association to model
[11:44:32] pwnd_nfsw: attachinary is the gem
[11:44:54] srinidhi: has joined #RubyOnRails
[11:45:16] arup_r: why not AWS:S3 ?
[11:45:34] pwnd_nfsw: Just listed everything that matters.
[11:45:46] n1ck7: has joined #RubyOnRails
[11:46:02] jeffmess: has left #RubyOnRails: ()
[11:46:07] eikood: has joined #RubyOnRails
[11:46:49] chorgi: has joined #RubyOnRails
[11:48:03] m3_del: has joined #RubyOnRails
[11:49:31] pwnd_nfsw: p sure cloudinary uses s3 anyways
[11:50:01] bitkiller: has joined #RubyOnRails
[11:50:12] ruurd: has joined #RubyOnRails
[11:51:42] Detch: has joined #RubyOnRails
[11:52:43] hughjass: has joined #RubyOnRails
[11:52:43] TPBallbag: has joined #RubyOnRails
[11:54:02] yogeshrt: has joined #RubyOnRails
[11:55:41] arBmind: has joined #RubyOnRails
[11:56:35] tetraktys: has joined #RubyOnRails
[12:00:58] joshkovach: has joined #RubyOnRails
[12:04:31] qejk: has joined #RubyOnRails
[12:05:41] benhuda: has joined #RubyOnRails
[12:07:42] atomical: has joined #RubyOnRails
[12:09:02] spiman_: has joined #RubyOnRails
[12:09:46] Motoservo: has joined #RubyOnRails
[12:10:55] jvanbaarsen: has joined #RubyOnRails
[12:18:14] roxtrongo: has joined #RubyOnRails
[12:21:05] Ergo: has joined #RubyOnRails
[12:24:09] smoitra: has joined #RubyOnRails
[12:24:33] artto: has joined #RubyOnRails
[12:25:09] ecmacoder: has joined #RubyOnRails
[12:25:47] Palsson: has joined #RubyOnRails
[12:27:00] tknz: has joined #RubyOnRails
[12:30:27] jwaldrip: has joined #RubyOnRails
[12:30:55] pawnbox: has joined #RubyOnRails
[12:31:39] meoblast001: has joined #RubyOnRails
[12:33:50] yogeshrt: has joined #RubyOnRails
[12:34:12] ritic: has joined #RubyOnRails
[12:34:14] jkamenik: has joined #RubyOnRails
[12:37:04] chorgi: has joined #RubyOnRails
[12:37:49] meshugga: has joined #RubyOnRails
[12:38:40] hephaestus_rg: has joined #RubyOnRails
[12:39:51] russt: has joined #RubyOnRails
[12:40:56] jvanbaar1en: has joined #RubyOnRails
[12:40:57] Motoservo: has joined #RubyOnRails
[12:43:03] thejoecarroll: has joined #RubyOnRails
[12:43:05] annlewis: has joined #RubyOnRails
[12:44:03] tak1n: has joined #RubyOnRails
[12:45:54] sdwrage: has joined #RubyOnRails
[12:48:01] stardiviner: has joined #RubyOnRails
[12:48:50] m3_del: has joined #RubyOnRails
[12:49:41] stannard: has joined #RubyOnRails
[12:50:18] n1lo: has joined #RubyOnRails
[12:50:20] jgt1: has joined #RubyOnRails
[12:51:07] annlewis: has joined #RubyOnRails
[12:51:41] jminch: has joined #RubyOnRails
[12:52:05] aaronr: has joined #RubyOnRails
[12:53:20] HayesHimself: has joined #RubyOnRails
[12:56:03] rubyonrails420: has joined #RubyOnRails
[12:56:26] quazimodo: has joined #RubyOnRails
[12:56:37] rubyonrails420: please anyone with rails experience email me at jminchew97@gmail.com
[12:56:41] rubyonrails420: i need to discuss something!!!
[12:56:47] rubyonrails420: PLEASE im not a creeper
[12:56:49] siddart: has joined #RubyOnRails
[12:57:41] cajone: has joined #RubyOnRails
[12:59:13] rvanlieshout: rubyonrails420: why not just ask it in here?
[13:02:44] bbrowning: has joined #RubyOnRails
[13:04:13] rickmasta: has joined #RubyOnRails
[13:04:18] NBarnes: has joined #RubyOnRails
[13:04:52] ddv: rvanlieshout: yeah i'm Dutch (sorry for the late response)
[13:05:50] rshetty_: has joined #RubyOnRails
[13:07:41] rshetty_: has joined #RubyOnRails
[13:07:44] SeanLazer: has joined #RubyOnRails
[13:08:43] allcentury: has joined #RubyOnRails
[13:09:14] RegulationD: has joined #RubyOnRails
[13:09:58] mag42c: has joined #RubyOnRails
[13:10:29] RegulationD: has joined #RubyOnRails
[13:10:52] rvanlieshout: ddv: that was a response for a things a few days ago :)
[13:10:54] rvanlieshout: but still counts
[13:11:01] Fire-Dragon-DoL: has joined #RubyOnRails
[13:11:06] ddv: rvanlieshout: :-)
[13:11:43] RegulationD: has joined #RubyOnRails
[13:12:28] rvanlieshout: well.. gezellig then!
[13:12:37] rvanlieshout: supporting the dutch rails community
[13:12:58] RegulationD: has joined #RubyOnRails
[13:12:59] rvanlieshout: would i've seen your work somewhere?
[13:13:53] metalic: has joined #RubyOnRails
[13:14:05] kitsuneyo: has joined #RubyOnRails
[13:14:16] RegulationD: has joined #RubyOnRails
[13:14:26] ddv: rvanlieshout: :) don't think so
[13:14:52] ramortegui: has joined #RubyOnRails
[13:15:31] RegulationD: has joined #RubyOnRails
[13:15:45] IFrank00: has joined #RubyOnRails
[13:16:00] leehambley: has joined #RubyOnRails
[13:16:45] RegulationD: has joined #RubyOnRails
[13:16:52] weckl: has joined #RubyOnRails
[13:18:02] RegulationD: has joined #RubyOnRails
[13:18:34] SIGILL: has joined #RubyOnRails
[13:19:08] losvedir: has joined #RubyOnRails
[13:22:22] sniperhaxor: guys what is the cheapest way to get external hosting for RoR?
[13:22:55] sevenseacat: has joined #RubyOnRails
[13:23:03] ddv: sniperhaxor: keep in mind that quality hosting won't be cheap
[13:23:54] sharkman: has joined #RubyOnRails
[13:24:58] SIGILL: I have a Rails 4 App and some API endpoints using grape. The endpoints need to be CSRF-protected because the API is used within a browser. It seems my only chance to use Rails' CSRF token is to copy the code from ProtectionMethods and modify it to work without Rails. Is that correct?
[13:25:16] rvanlieshout: sniperhaxor: does it have to work?
[13:25:29] rvanlieshout: or is that something less relevant over the price?
[13:25:59] beauby: has joined #RubyOnRails
[13:26:05] pawnbox: has joined #RubyOnRails
[13:26:25] sniperhaxor: rvanlieshout: what does that mean? it should work lol
[13:26:37] rvanlieshout: cause proper hosting isn't free
[13:26:50] rvanlieshout: nor would you get proper quality for almost nothing
[13:26:56] rvanlieshout: you'll get what you pay for
[13:27:41] Rinzlit: has joined #RubyOnRails
[13:27:55] Motoservo: has joined #RubyOnRails
[13:28:06] Denarii: has joined #RubyOnRails
[13:28:07] norc: Ah well. The upsides of having your own data centers in the company. :-)
[13:29:06] arup_r: SIGILL: I think those tokens are used to change.. not always same
[13:29:34] rvanlieshout: SIGILL: you'll have to either get the token or remove the validation on it
[13:30:25] rvanlieshout: you could have your grape thing use some other token
[13:30:43] rvanlieshout: although it doesn't really add security of it's publicly known
[13:32:25] SIGILL: Alright, so it seems I have to duplicate the code to verify the token ??? I have access to the session so it should be easy to get all information I need
[13:33:09] kitsuneyo: has joined #RubyOnRails
[13:34:15] xcm: has joined #RubyOnRails
[13:34:25] raunicolae: has left #RubyOnRails: ("Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is")
[13:34:57] norc: [14:10] <rvanlieshout> ddv: that was a response for a things a few days ago :)
[13:35:14] norc: Glad to see that IP over Avian Carriers still hasnt died out.
[13:35:56] livando: has joined #RubyOnRails
[13:38:28] yogeshrt: has joined #RubyOnRails
[13:38:45] Cervajz_: has joined #RubyOnRails
[13:39:01] ddv: hi, arup_r
[13:39:14] arup_r: long time no see :p
[13:39:37] centrx: has joined #RubyOnRails
[13:40:10] dhjondoh: has joined #RubyOnRails
[13:41:31] sankaber: has joined #RubyOnRails
[13:41:39] beauby: has joined #RubyOnRails
[13:42:18] RegulationD: has joined #RubyOnRails
[13:42:39] qejk: has joined #RubyOnRails
[13:42:51] ktchup: has joined #RubyOnRails
[13:42:53] tvw: has joined #RubyOnRails
[13:43:17] eduardodeoh: has joined #RubyOnRails
[13:43:47] shamanime: has joined #RubyOnRails
[13:44:00] norc: Any opinion here about shoulda-matchers? Is using the validation matchers here a good idea, or should I just test the behavior of the model directly?
[13:44:16] rvanlieshout: i like shoulda matchers
[13:44:19] rvanlieshout: it saves a lot of time
[13:44:30] FailBit: my opinion about rspec is ???
[13:44:37] FailBit: ACTION runs to a trashcan and hurls
[13:44:41] stannard: has joined #RubyOnRails
[13:44:51] sankaber: has joined #RubyOnRails
[13:44:55] nfk: has joined #RubyOnRails
[13:45:17] sniperhaxor: What is easier to get to run on a production server? RoR or NodeJS? I seriously have had nightmares getting RoR to run on some VPSs.
[13:45:25] darrencauthon: has joined #RubyOnRails
[13:45:32] rvanlieshout: i don't have any issues in running ror anywhere
[13:45:35] rvanlieshout: never tried nodejs
[13:46:00] sniperhaxor: like right now I have some error that simply says look at your logs. then it looks like something is wrong with my postgreSQL
[13:46:14] sniperhaxor: and i googled a solution but it's for an older install of rails
[13:46:18] FailBit: although I always dockerize node because f-, uh, screw javascript
[13:46:25] arup_r: sniperhaxor: look carefully then
[13:46:33] FailBit: smoke node erryday amirite
[13:46:42] rvanlieshout: sniperhaxor: what's the issue?
[13:46:53] sniperhaxor: Do you want me to paste my gianat log file?
[13:47:04] rvanlieshout: at least the part that contains the error
[13:47:09] FailBit: but what's the issue
[13:47:15] jkamenik: has joined #RubyOnRails
[13:47:24] artto: has joined #RubyOnRails
[13:47:31] Signum: has joined #RubyOnRails
[13:47:44] norc: rvanlieshout: Well, Im not amazed yet.
[13:47:52] sniperhaxor: https://gist.github.com/anonymous/ee1742da89554e530b78
[13:47:53] norc: But this might have something to do with the fact that I cant even get it to work.
[13:48:05] Signum: Hi, I wonder what the file app/views/application.html.erb is supposed to be for. Some guides refer to it. But it's neither a layout nor a view.
[13:48:08] sniperhaxor: thats my production.log
[13:48:20] rvanlieshout: norc: that won't help :)
[13:48:24] FailBit: sniperhaxor: db wasn't created in postgres
[13:48:40] rvanlieshout: Signum: who created it?
[13:48:52] rvanlieshout: sniperhaxor: ActiveRecord::NoDatabaseError (FATAL: database "erictheprogrammerremake_production" does not exist
[13:48:57] FailBit: sniperhaxor: you have to run RAILS_ENV=production rake db:setup
[13:48:57] Bloomer: has joined #RubyOnRails
[13:49:17] rvanlieshout: or create the db yourself
[13:49:21] Signum: rvanlieshout: It's not created by default. But e.g. https://www.rubyplus.com/articles/1371 refers to it. Perhaps something from the past?
[13:49:26] Guest53: has joined #RubyOnRails
[13:49:34] m3_del: has joined #RubyOnRails
[13:49:59] Signum: rvanlieshout: I've been trying to use Bootstrap + AdminLTE theme for a project. And the amount of bad documentation leaves me wondering if re-inventing the wheel is faster than dealing with crazy documentation and broken gems. :(
[13:50:42] FailBit: Signum: it often is
[13:51:01] FailBit: don't think of it as inventing a wheel, think of it as building a better mousetrap
[13:51:14] sniperhaxor: I do that command and get another error. Welcome to rails mans. Getting a test app running on a production server is impossible.
[13:51:18] pcpanic: has joined #RubyOnRails
[13:51:26] rvanlieshout: Signum: it's not created by default no
[13:51:30] sniperhaxor: it yells at your for your DB which you don't even care about. @_@
[13:51:40] rvanlieshout: cause in most cases (certainly on production) the rails user wouldn't have permissions to create databases
[13:51:57] rvanlieshout: sniperhaxor: if you don't care about the db atm you could also just use sqlite
[13:52:01] rvanlieshout: it's capable of creating that one
[13:52:30] FailBit: sniperhaxor: I've never had an issue deploying rails apps
[13:52:43] sniperhaxor: you must've got lucky then
[13:52:45] FailBit: it seems as though everyone is oft confused though
[13:52:55] bratsche: has joined #RubyOnRails
[13:53:04] FailBit: lucky how? I did come across errors
[13:53:17] FailBit: I read the messages, googled what to do, continued
[13:53:22] sniperhaxor: you understood your errors and how to solve them
[13:53:23] FailBit: sometimes I worked on intuition
[13:53:31] sniperhaxor: it doesn't help when google doesn't give you the answer
[13:53:55] FailBit: well, maybe the answer is not googled enough because it's obvious? sorry
[13:54:48] sniperhaxor: yea obvious to someone who knows rails already
[13:55:15] ritic: has joined #RubyOnRails
[13:55:27] arup_r: Signum: any files under app/views/layout are called layout files or there can be partials which are used by layouts
[13:55:37] rvanlieshout: sniperhaxor: it won't help if you don't understand what you're deploying no
[13:55:53] Pupeno: has joined #RubyOnRails
[13:55:53] Pupeno: has joined #RubyOnRails
[13:56:03] Guest53: has joined #RubyOnRails
[13:56:17] smathy: has joined #RubyOnRails
[13:56:21] mag42c: has joined #RubyOnRails
[13:56:21] Signum: arup_r: sure??? but app/views/application.html.erb doesn't make sense to me
[13:56:26] bbrowning: has joined #RubyOnRails
[13:57:05] rvanlieshout: Signum: don't recall that as something for the past
[13:57:08] arup_r: correct name in wrong place.. It just abused the convention that is it
[13:57:11] rvanlieshout: and been using rails since 1
[13:57:16] rvanlieshout: could just be a typo there
[13:57:37] sunya7a: has joined #RubyOnRails
[13:57:50] sniperhaxor: like its telling me i dont have a schema.rb file run 'rake db :migrate' now. When I run that it tells me PG cannot connect to the server, bad connection refused.
[13:58:26] ustrajunior: has joined #RubyOnRails
[13:58:35] s2013: has joined #RubyOnRails
[13:58:54] rvanlieshout: sniperhaxor: did you setup your postgres database?
[13:59:08] sniperhaxor: i copied a folder that had it already setup
[13:59:18] rvanlieshout: postgres is a running server
[13:59:30] rvanlieshout: it's not just copying some files
[13:59:32] pwnd_nsfw: has joined #RubyOnRails
[13:59:48] sniperhaxor: well i didnt touch that running server then
[13:59:58] rvanlieshout: but you also don't have one
[14:00:12] jgpawletko: has joined #RubyOnRails
[14:00:14] rvanlieshout: so either fix your postgres database or tell don't tell rails to use it
[14:00:35] sniperhaxor: so why didnt my other rails app complain about postgres
[14:00:42] rvanlieshout: did it use postgres?
[14:00:44] rvanlieshout: check database.yml
[14:00:46] hughjass: has joined #RubyOnRails
[14:01:04] rvanlieshout: you're telling rails to use a datbase there.. the fact that it should work is not something rails is going to solve for you
[14:01:32] sniperhaxor: yeah the database.yml says the default adapter is postgresql
[14:01:34] pawnbox: has joined #RubyOnRails
[14:01:51] rvanlieshout: so install a postgres server
[14:01:52] rvanlieshout: or use sqlite
[14:01:56] hughjass: has left #RubyOnRails: ()
[14:02:10] l_tonz: has joined #RubyOnRails
[14:02:10] sniperhaxor: it should be installed
[14:02:18] rvanlieshout: then it's broken
[14:02:28] rvanlieshout: or the connection details you've supplied in database.yml are wrong
[14:02:59] sniperhaxor: i have a preconfigured VPS that was already running a rails app that i got from digital ocean
[14:03:02] jwaldrip: has joined #RubyOnRails
[14:03:08] sniperhaxor: I copied the rails folder that they were using
[14:03:44] sniperhaxor: and I changed nginx and unicorn to point to my new app
[14:04:00] sniperhaxor: i don't understand why postgres is causing any issues whatsoever
[14:04:09] lacuna: has joined #RubyOnRails
[14:04:26] hughjasss: has joined #RubyOnRails
[14:05:34] sniperhaxor: i've also changed database.yml to point to my new project
[14:07:04] marahin: Hello, I'm having an issue where I try to access remote API over http. Everything is described on gist: https://gist.github.com/Marahin/436861c3708ed439e4a1
[14:07:30] rvanlieshout: sniperhaxor: how did you check that postgres is running?
[14:07:41] rvanlieshout: and listening on whatever specified in database.yml
[14:08:07] sniperhaxor: I'm doing RAILS_ENV=production rake db:create and it's telling me it can't connect to the server: connection refused
[14:08:31] rvanlieshout: marahin: you're telling the remote server that you accept gzip
[14:09:02] rvanlieshout: sniperhaxor: that's because there is no postgres server listenening on what you've specified in database.yml for enfironment production
[14:09:15] marahin: rvanlieshout: I googled and some SOs thread (as far as I understood) said that it's automatically translated in net/http
[14:09:23] marahin: am I wrong?
[14:09:37] RegulationD: has joined #RubyOnRails
[14:10:00] rvanlieshout: marahin: dunno. what if you leave out those headers you don't really care about atm?
[14:10:23] rvanlieshout: sniperhaxor: IF your postgres server is only listening on let's say a socket file you should specify that in your database.yml
[14:10:24] sniperhaxor: how do i tell it to listen on my database.yml file then?
[14:10:31] rvanlieshout: that's not how postgres works
[14:10:40] gloom_lit: has joined #RubyOnRails
[14:10:44] rvanlieshout: you're telling rails to use a separate database server
[14:10:51] rvanlieshout: and you're telling rails how to connect to it
[14:10:55] marahin: rvanlieshout: I just commented the Accept-Encoding line, it still responses the same (response.txt file on gist)
[14:10:56] rvanlieshout: but there is nobody listening there
[14:11:43] rvanlieshout: what if you leave out all headers?
[14:11:43] Aswebb_: has joined #RubyOnRails
[14:11:45] sniperhaxor: so my rails is setup correct but my postgres server is messed up?
[14:12:05] rvanlieshout: sniperhaxor: doesn't have to be.. it doesn't match
[14:12:13] rvanlieshout: one of both sides is wrong
[14:12:19] marahin: rvanlieshout: wait, sorry - I edited the wrong file. When I comment Accept-Encoding line, it responses with "[]"
[14:12:37] rvanlieshout: sniperhaxor: what's in your database.yml?
[14:12:55] rvanlieshout: marahin: what does this api endpoint expect you to send?
[14:13:05] ibouvousaime: has joined #RubyOnRails
[14:13:17] sniperhaxor: https://gist.github.com/anonymous/b6f32a39be2b77e66531
[14:13:21] rvanlieshout: cause it won't work with a plain curl, marahin
[14:13:24] kalusn: has joined #RubyOnRails
[14:13:30] marahin: rvanlieshout: I'm sorry, I don't really understand the question? Are you asking me for the headers I've found in chrome devtools?
[14:13:53] jwaldrip: has joined #RubyOnRails
[14:14:11] rvanlieshout: marahin: i also get a [] when opening that url
[14:14:19] rvanlieshout: sniperhaxor: that's not the full file
[14:14:23] Cork: is there a solution to have template content_for strip out spaces and line breaks between tags?
[14:14:29] rvanlieshout: but assuming it's only missing the default line
[14:14:39] rvanlieshout: you're telling rails you have a postgres server running on localhost
[14:14:40] doublemalt_: has joined #RubyOnRails
[14:14:48] Cork: i'm trying to use css :empty but the template breaks it cause if the indentations
[14:14:57] sniperhaxor: https://gist.github.com/anonymous/f9e87f34f0656a6e2f31
[14:15:16] arup_r: Cork: yes
[14:15:20] Guest53: has joined #RubyOnRails
[14:15:22] Dar: has joined #RubyOnRails
[14:15:26] Cork: arup_r: do tell :)
[14:15:34] arup_r: well let me read it again what you asked
[14:15:45] marahin: rvanlieshout: well this works for me in a browser (screenshot: http://d.gimb.us/b/8e70c3b4ec882e876e073c0f0f18515e.png)
[14:15:55] Cork: i've tried gsub but that escapes the tags so that doesn't work
[14:15:57] umgrosscol: has joined #RubyOnRails
[14:15:59] marahin: the thing is I need to access that data in a script :P
[14:16:11] jwaldrip: has joined #RubyOnRails
[14:16:19] arup_r: Cork: a simple gist plase to see what you want to strip out
[14:16:29] wldcordeiro: has joined #RubyOnRails
[14:17:01] rvanlieshout: marahin: then it might be your session
[14:17:02] arup_r: Cork: We have method like http://api.rubyonrails.org/classes/ActionView/Helpers/SanitizeHelper.html#method-i-strip_links but not sure what you want
[14:17:10] dhjondoh: has joined #RubyOnRails
[14:17:26] rvanlieshout: sniperhaxor: and you've ensured you've got a postgres server running that listeners on localhost using default port and socket?
[14:17:34] marahin: rvanlieshout: what would you advise me?
[14:17:35] senya: has joined #RubyOnRails
[14:17:36] rvanlieshout: not sure if it uses socket or tcp
[14:17:40] rvanlieshout: marahin: find documentation about that pi
[14:17:47] rvanlieshout: marahin: open that url in a new browser session
[14:17:50] rvanlieshout: still result?
[14:17:57] jobewan: has joined #RubyOnRails
[14:18:10] sniperhaxor: rvanlieshout: i don't know how to
[14:18:18] Cork: arup_r: http://jsfiddle.net/pqLy4ahv/
[14:18:41] riotjones: has joined #RubyOnRails
[14:18:48] sniperhaxor: rvanlieshout: it should though
[14:18:55] chorgi: has joined #RubyOnRails
[14:19:00] Cork: arup_r: i don't want to depend on the ones updating the view to not have indentations, cause that WILL not be remembered
[14:19:04] sniperhaxor: as i said i got this from a preconfigured app that digital ocean setup
[14:19:12] marahin: rvanlieshout: yep, you're right: on a completely new browser session there's no result (expect "[]")
[14:19:15] sniperhaxor: so i never touched the postgresql server
[14:19:22] marahin: is it possible to store a session so ruby can use it to get data?
[14:20:18] arup_r: Cork: I don't get what you meant by indentation.. sorry
[14:20:35] chills42: has joined #RubyOnRails
[14:20:43] Cork: arup_r: " <%=" <--
[14:20:49] mary5030: has joined #RubyOnRails
[14:20:53] rvanlieshout: sniperhaxor: then you might want to use sqlite.. easier setup
[14:20:58] Cork: the spaces on the left of the template lines
[14:21:00] IFrank00: has joined #RubyOnRails
[14:21:05] rvanlieshout: or read your vps provider docs about setting up postgres
[14:21:18] rvanlieshout: marahin: what did you have to do to get that session? sign in somewhere/
[14:21:30] marahin: rvanlieshout: yes, at steamcommunity.com
[14:21:44] dopieee: has joined #RubyOnRails
[14:21:45] marahin: however, as I mentioned before: my ruby script gets the response as well, but in a weird format (binary? gzip?...)
[14:22:12] sniperhaxor: rvanlieshout: i hope you understand why i want to shoot myself after dealing with this crap
[14:22:12] marahin: also: no idea how my ruby script gets it. Haven't done anything intentionally so it could access that
[14:22:41] rvanlieshout: marahin: i would still simulate the session by signing in or getting a token
[14:23:13] norc: I have a couple models that make use of scopes. Are there any rspec matchers that somehow let me test them?
[14:23:31] metalic: has joined #RubyOnRails
[14:23:45] mary5030: has joined #RubyOnRails
[14:23:50] rvanlieshout: norc: in shoulda matchers you mean?
[14:23:55] norc: rvanlieshout: For example
[14:23:58] krz: has joined #RubyOnRails
[14:24:05] rvanlieshout: in plain rspec you just create a bunch of objects and check if Model.using_scope returns them
[14:24:21] norc: rvanlieshout: Behavioral testing it is then. :)
[14:25:15] jkamenik: has joined #RubyOnRails
[14:25:24] pawnbox: has joined #RubyOnRails
[14:25:45] zpe: has joined #RubyOnRails
[14:27:14] marahin: rvanlieshout: I set Cookie => value, I'm still however getting weird, binary / gzip values
[14:27:22] marahin: (...)E:\xBE\"\x86\xB5\x89\xA2O[\xFC\xD9G\x1Em\x81\xEC\x8B\x06\x03\xB3\a\xD2?\xE5\x17\x8E\xCA&\xEA\x8D\x7F\xC5/\xD5\xD6:}\e\xCA\xB3\x1A\x1Ep\x10\x98\n\xB5\xC3N\xBA\xB3\x83\x8E\xB6\xE8-\x90\x80,l\x0FL\xD2Q5\xB4\xBE`E\x00)\xBD\x85|\xBC\xEF\xB3z}\xE7\x14ga\x04\x9Bd\xA9\bQ1\x86\xA7\x8E\x89\xC0\xFD\x821\x92\x13m\xDE\xBC\x9C\xD8\xBBy6c+o\xAC\xAAN\xC7@\tMm\xE5\xDC\x83\xF4\xAE\xD4\x0F\xC5\xB8\v\xBA\xB0\xBB\xAB\xE7\xFDT\r\xB2~\xF0\xEC#L\xE3&5&p\x03
[14:27:22] marahin: \x0F\x89\x8B*cP\xF9cQ\x98\xB0\x80q\xC6=M\x11-\x01\x83\x044\x06\xBE\x17\\8\b\x99\xCA\xAD?\x0E\b\xA8DO\xC8\xBC/\xA1\xAA\xCF\nc~\x9B\xDAG\xBA\xF8\x06\xB8d\xA5\xC4\xA1\x19\x80\x11Z\v\xB7 \x9C\x9A\xB6\x96\xBCC\xF5((\e\xEA\xA4t2i\xAC2\xCF\x04y!'\x82\xA8\x132\xC8\xD9\x1D\b\xF2\x95\x1F\a\xD(...)
[14:27:26] marahin: oops, sorry
[14:27:36] marahin: meant to copy a small part of it...
[14:28:22] rvanlieshout: marahin: and what if that cookie isn't accepted by the endpoint anymore?
[14:28:32] marahin: rvanlieshout: I'm screwed then!
[14:28:33] sonOfRa: has joined #RubyOnRails
[14:28:48] rvanlieshout: marahin: so create a new session
[14:28:53] marahin: I literally have no idea how to bypass this. I tried to log in the site through Mechanize, and it constantly responses with Captcha which I cannot fill :)
[14:28:54] rvanlieshout: and, first result on google, https://gist.github.com/joho/3747653
[14:29:10] rvanlieshout: marahin: then they designed this to not be machine fetchable
[14:29:41] marahin: I guess I'll have to ask my friend then. He has achieved logging into Steamcommunity through curl somehow, and then he fetches the data
[14:29:43] rvanlieshout: or use a similar method some people used in getting answers for gmail captcha
[14:29:50] arup_r: Cork: create a custom helper and then inside it build the template and take an advantage of http://api.rubyonrails.org/classes/String.html#method-i-strip_heredoc
[14:29:57] rvanlieshout: create a porn website and display the received captcha there for somebody else to answer
[14:29:59] youngbaks: has joined #RubyOnRails
[14:30:04] marahin: rvanlieshout: hehe
[14:30:15] marahin: rvanlieshout: thank you for your time and help
[14:30:27] A124: has joined #RubyOnRails
[14:31:06] arup_r: Cork: or with this http://api.rubyonrails.org/classes/ActionView/Helpers/TextHelper.html#method-i-concat
[14:31:07] hughjasss: haha just googled the porn site captcha, brilliant idea.
[14:31:09] Cork: arup_r: won't that force the safebuffer to be a string?
[14:31:41] arup_r: yes, it will .. but the safebuffer object has method to get the string
[14:32:11] arup_r: and your custom helper will just output the html string inside the template with .html_safe again
[14:32:39] arup_r: Or Cork take the second approach using concat method
[14:32:53] sunya7a: has joined #RubyOnRails
[14:33:10] Cork: thx will try
[14:33:25] youngbaks: has joined #RubyOnRails
[14:34:04] axl_: has joined #RubyOnRails
[14:34:39] marahin: rvanlieshout: just a feedback: we just discovered that the cookie never expires, as long as you maintain activity on the account: e.g. if you've been active today over steamcommunity, your cookie is extended with +1 year
[14:34:55] marahin: thanks a lot, both hughjasss and rvanlieshout :)
[14:35:31] arup_r: Cork: pm ?
[14:35:56] youngbaks: has joined #RubyOnRails
[14:36:03] jwaldrip: has joined #RubyOnRails
[14:37:07] hephaestus_rg: has joined #RubyOnRails
[14:37:21] dopamean_: has joined #RubyOnRails
[14:39:44] jessemcgilallen: has joined #RubyOnRails
[14:40:04] GhettoCode: has joined #RubyOnRails
[14:40:25] chills42: has joined #RubyOnRails
[14:41:44] kerunaru: has joined #RubyOnRails
[14:42:32] bonemind: has joined #RubyOnRails
[14:42:33] rshetty: has joined #RubyOnRails
[14:44:46] nettoweb: has joined #RubyOnRails
[14:46:37] Cork: arup_r: sorry was digging into SafeBuffer
[14:47:36] rshetty: has joined #RubyOnRails
[14:50:20] m3_del: has joined #RubyOnRails
[14:51:02] Fire-Dragon-DoL: has joined #RubyOnRails
[14:51:35] bruno-_: has joined #RubyOnRails
[14:52:18] n1ck7: has joined #RubyOnRails
[14:52:50] sniperhaxor: oh my god i got it working
[14:53:16] sniperhaxor: what does . /etc/default/unicorn
[14:53:21] sniperhaxor: i dont know what . does
[14:53:22] rvanlieshout: sniperhaxor: sqlite or postgres? :)
[14:53:30] nemo_: has joined #RubyOnRails
[14:53:32] fryguy: sniperhaxor: it sources the file
[14:53:32] rvanlieshout: sniperhaxor: most likely related to a system service for unicorn
[14:53:36] rvanlieshout: with default settings for it
[14:53:36] fryguy: loads it into your current environment
[14:53:56] lacuna: has joined #RubyOnRails
[14:53:58] sniperhaxor: that all went way over my head
[14:54:12] mordocai: has joined #RubyOnRails
[14:54:14] sniperhaxor: apparently i skipped writing that in my first attempt at building my app
[14:54:23] sniperhaxor: and its part of my VPS service's documentation to get rails running
[14:54:27] rvanlieshout: sniperhaxor: it doesn't really belong to your app.. it belongs to the way you host it
[14:54:50] sniperhaxor: is it running unicorn?
[14:55:01] sniperhaxor: aka . whatever runs whatever?
[14:55:05] jkamenik: has joined #RubyOnRails
[14:55:08] polishdub: has joined #RubyOnRails
[14:55:17] rvanlieshout: sniperhaxor: your deploy process would normally do that
[14:55:20] towski_: has joined #RubyOnRails
[14:55:22] rvanlieshout: something like capistrano
[14:55:29] rvanlieshout: a gem which takes care of deploy tasks
[14:55:41] sniperhaxor: rvanlieshout: i dont even want to think of capistrano now
[14:56:34] pawnbox: has joined #RubyOnRails
[14:56:42] iateadonut: has joined #RubyOnRails
[14:57:06] rvanlieshout: sniperhaxor: :)
[14:58:00] ibouvousaime_: has joined #RubyOnRails
[14:58:06] lindii_: has joined #RubyOnRails
[14:58:24] sniperhaxor: so onto phase 2: coding the app
[14:58:36] sniperhaxor: what gem should i use to get a user/login going?
[14:58:41] sniperhaxor: i want to create a simple blog app
[14:58:45] rvanlieshout: i personally prefer devise
[14:58:51] annlewis: has joined #RubyOnRails
[14:58:53] rvanlieshout: it contains logic for forgot password mail and stuff
[14:58:59] tubbo: sniperhaxor: !rubytoolbox is a great place to find gems for all sorts of things
[14:58:59] helpa: sniperhaxor: http://www.rubytoolbox.com/
[14:59:25] tubbo: has some great categories, ratings, etc.
[14:59:35] rvanlieshout: ok. signing off
[14:59:37] rvanlieshout: back tomorrow
[15:02:08] zpe: has joined #RubyOnRails
[15:02:12] mag42c: has joined #RubyOnRails
[15:02:45] kitsuneyo: has joined #RubyOnRails
[15:03:26] youngbaks: has joined #RubyOnRails
[15:04:27] sniperhaxor: actually another question: What is the best linux distro to run rails on or does it not really matter? I'm using Ubuntu but I remember it having way funkier commands than CentOS
[15:04:27] rodfersou: has joined #RubyOnRails
[15:04:28] thither: has joined #RubyOnRails
[15:04:36] thither: Is this kind of logic necessary? http://pastie.org/10511439
[15:04:49] chopin: has joined #RubyOnRails
[15:04:53] thither: The stashing and restoring of time zones
[15:05:17] kramsee: has joined #RubyOnRails
[15:05:25] lukas: has left #RubyOnRails: ("WeeChat 0.4.2")
[15:07:41] tvw: has joined #RubyOnRails
[15:08:01] youngbaks: has joined #RubyOnRails
[15:09:06] arthurix_: has joined #RubyOnRails
[15:09:28] matthewd: thither: .in_time_zone takes a zone parameter, so there shouldn't be a need to change Time.zone like that
[15:10:31] beauby: has joined #RubyOnRails
[15:10:54] thither: Huh, thanks. Surprised I hadn't seen that parameter
[15:11:34] l_tonz: has joined #RubyOnRails
[15:11:35] kitsuneyo: has joined #RubyOnRails
[15:12:55] AnoHito: has joined #RubyOnRails
[15:13:01] norc: sniperhaxor: For production pick one that ships a recent versions of Ruby. That is about it Id say.
[15:13:16] treehug88: has joined #RubyOnRails
[15:13:48] MartinEl_: has joined #RubyOnRails
[15:13:48] youngbaks: has joined #RubyOnRails
[15:13:51] IrishGringo: has joined #RubyOnRails
[15:14:24] AnoHito: has joined #RubyOnRails
[15:16:23] pawnbox: has joined #RubyOnRails
[15:16:33] darrencauthon: has joined #RubyOnRails
[15:16:40] norc: Im using RSpec with DatabaseCleaner. Now Im adding some constraints which is breaking a lot of controllers because all the POST actions dont supply the correct referecences.
[15:16:43] norc: As for my question...
[15:16:47] MartinElvar: has joined #RubyOnRails
[15:18:41] Guest53: has joined #RubyOnRails
[15:19:17] mag42c_: has joined #RubyOnRails
[15:19:58] sunya7a: has joined #RubyOnRails
[15:20:26] chouhoulis: has joined #RubyOnRails
[15:20:35] beauby: has joined #RubyOnRails
[15:20:38] norc: http://pastie.org/10511490 Given this spec/model/factory, how would I go about testing my controller here?
[15:20:45] disgrntld: has joined #RubyOnRails
[15:21:14] norc: Should I use my street factory to create a street for *every* test in my house controller that needs one=
[15:21:17] shock_one: has joined #RubyOnRails
[15:21:38] norc: (And pardon my pasting skills, I removed too much there)
[15:21:52] nzst: has joined #RubyOnRails
[15:22:07] nzst: Has anyone used pair for a rails application and have some opinions on it?
[15:23:06] EminenceHC: has joined #RubyOnRails
[15:23:11] alevy: has joined #RubyOnRails
[15:25:33] voker57: has joined #RubyOnRails
[15:27:35] sunya7a: has joined #RubyOnRails
[15:28:43] arthurix: has joined #RubyOnRails
[15:29:11] nzst: maybe it's pear
[15:29:40] pawnbox: has joined #RubyOnRails
[15:30:01] crunk_bear: has joined #RubyOnRails
[15:30:35] beauby: has joined #RubyOnRails
[15:31:11] Motoservo: has joined #RubyOnRails
[15:31:47] tubbo: nzst: dunno what you're talking about
[15:32:02] nzst: pair hosting for a rails application
[15:32:19] vr_mex: has joined #RubyOnRails
[15:32:28] slash_nick: ACTION thought pair programming
[15:32:29] tubbo: nzst: it's not recommended to host rails apps with shared hosting, you should use a VPS or a PaaS of some kind that helps build the application
[15:32:41] tubbo: slash_nick: i thought he meant PEAR http://pear.php.net/
[15:32:52] chouhoulis: has joined #RubyOnRails
[15:32:56] nzst: tubbo: why not? is there an article?
[15:33:12] nzst: i'm really trying to prevent it from happening
[15:33:40] emilkarl: has joined #RubyOnRails
[15:34:01] arup_r: ACTION thought same as slash_nick 
[15:34:18] nzst: my bad, totally wasn't clear
[15:34:49] youngbaks: has joined #RubyOnRails
[15:35:19] tubbo: nzst: i was just kidding about the PEAR thing :D anyway...typically, you don't get the level of control on a shared host that you need when you're running a rails app. for example, if the core team discovered a security flaw tomorrow and released a patch update, there's a huge chance your host wouldn't update and you would be forced to use an earlier rails or ruby version
[15:35:35] tubbo: nzst: pair networks offers VPS https://www.pair.com/hosting/vps/
[15:35:52] Grundell: has joined #RubyOnRails
[15:35:53] tubbo: haha that is SO expensive
[15:36:27] tubbo: nzst: there's nothing on pair's site that indicates they even support rails apps
[15:36:43] nzst: https://www.pair.com/support/knowledge_base/our_network_and_servers/installed_ruby_gems.html
[15:36:59] nzst: rails 2.3.2 from what i can tell
[15:37:11] SteenJobs: has joined #RubyOnRails
[15:37:12] Hazim: why is my strong_parameters not permitting nested members
[15:37:17] shibabu: has joined #RubyOnRails
[15:37:30] ruurd: has joined #RubyOnRails
[15:37:33] nzst: hazim: do you have a code example of how you set up strong parameters?
[15:37:46] nzst: tubbo: thanks, i'm really trying to avoid this nightmare
[15:37:55] slash_nick: nzst: oh now... why would you use rails 2.3.2?
[15:37:55] Hazim: thanks, i'll create a gist link
[15:38:01] dopieee: has joined #RubyOnRails
[15:38:10] slash_nick: nzst: we're on rails 4.2.4
[15:38:18] tubbo: nzst: that is not only an ass-old version of rails, deploying apps to said version could be considered gross negligence WRT security of your users information
[15:39:00] tubbo: plus, you can get a solid VPS from digitalocean for way less than even pair's shared hosting
[15:39:46] Motoservo: has joined #RubyOnRails
[15:40:31] Hazim: strong parameters not working -> https://gist.github.com/hazim78/4ffdecb903bc55c66130
[15:41:28] tomeara: has joined #RubyOnRails
[15:42:11] sniperhaxor: anyone get why my rails app is changing upon refresh? http://104.131.197.25/
[15:42:23] sniperhaxor: i simply edited that one file to say Eric Remake and not Digital Ocean
[15:42:39] sniperhaxor: yet sometimes I refresh and digital ocean appears...?
[15:42:46] sniperhaxor: is there some weird caching that rails does or something?
[15:42:52] workmad3: ACTION wonders if anyone will click on a random IP-address URL from a user with 'haxor' in their handle
[15:43:16] sniperhaxor: it's safe i swear
[15:43:37] sniperhaxor: i only will install a keylogger and spyware
[15:44:16] Denarii: ACTION opened it in a VM
[15:44:49] vladster: has joined #RubyOnRails
[15:45:01] willardg: has joined #RubyOnRails
[15:45:23] arup_r: hazim: How you got that SP is not working? https://gist.github.com/hazim78/4ffdecb903bc55c66130#file-staffs_controller-rb-L120
[15:45:25] northfurr: has joined #RubyOnRails
[15:45:25] smathy: sniperhaxor, in prod you need to restart the app server, you can't just edit a file and expect it to work.
[15:45:31] arup_r: show the error please
[15:45:45] smathy: sniperhaxor, you'll have one of your app processes still loaded with the previous code.
[15:46:01] sniperhaxor: smathy: so restart nginx?
[15:46:47] smathy: sniperhaxor, nginx is your httpd not your app server. It may also trigger your app server to restart, eg. if you're running an embedded passenger nginx module.
[15:47:17] sniperhaxor: i guess unicorn is my server then?
[15:47:49] Hazim: arup_r yep member_attributes are unpermitted
[15:48:02] sniperhaxor: yeah ok that works thanks smathy
[15:48:10] sniperhaxor: what's httpd btw
[15:48:29] smathy: Oh dear :) Are you setting up your own production server here?
[15:48:55] sniperhaxor: it's for testing dont worry
[15:49:04] smathy: ACTION gives sniperhaxor the award for most over-reaching nick of the day
[15:49:05] mustmodify: has joined #RubyOnRails
[15:49:06] sniperhaxor: i dont care if it get's hacked or tracked or what not
[15:49:12] kitsuneyo: has joined #RubyOnRails
[15:49:33] arup_r: hazim: show the log. I am not seeing anyt wrong in the code
[15:49:33] mustmodify: Why do some sites have a banner that advertises their use of cookies?
[15:49:34] smathy: sniperhaxor, ok good. I won't be telling you what an httpd is, what you'll learn by googling it will be invaluable.
[15:49:43] northfurr: has joined #RubyOnRails
[15:49:54] sniperhaxor: yeah google confuses me
[15:50:02] smathy: mustmodify, because they let their legal dept control their product.
[15:50:03] fedexo: has joined #RubyOnRails
[15:51:09] m3_del: has joined #RubyOnRails
[15:51:22] yogeshrt: has joined #RubyOnRails
[15:51:25] tubbo: sniperhaxor: curl'ed your site, got huge base64...definitely haxxxxxxxx
[15:51:28] mustmodify: smathy: as far as you know is there a valid justification other than that it makes lawyers happy?
[15:52:40] nogic: has joined #RubyOnRails
[15:52:54] sniperhaxor: tubbo: huge base64? i wish i was actually even slightly competent at hacking because I don't see how that correlates.
[15:52:56] Motoservo: has joined #RubyOnRails
[15:52:56] smathy: mustmodify, none at all, it's ignorant lawyers who have misinterpreted the law, misunderstood the tech, or are just doing what any consultant does - trying to justify their fees with FUD.
[15:53:45] gasbakid: has joined #RubyOnRails
[15:53:57] bricker: has joined #RubyOnRails
[15:54:14] pawnbox: has joined #RubyOnRails
[15:54:46] sadaf2605: has joined #RubyOnRails
[15:54:51] senya: hi! how do I write WebMock's stub_request to match all queries for a domain?
[15:55:06] senya: like stub_request(:any, "www.example.com/.*")
[15:55:06] dionysus69: has joined #RubyOnRails
[15:55:19] senya: but that one doesn't do what I want
[15:55:28] nzst: has left #RubyOnRails: ("ERC (IRC client for Emacs 24.5.1)")
[15:55:34] workmad3: smathy: are you talking about banners as an attempt to comply with the stupid EU cookie laws?
[15:55:42] tubbo: sniperhaxor: well, when one is attempting to load code onto a page (say with a rogue extension or some other form of malware), in order to serve you advertising, they will obfuscate the code in a lot of ways (one of them being encoding the whole source to base64, then the only "code" you can see is it decoding and evaling this huge string
[15:55:47] tubbo: just adds steps so you can't see what they're doing
[15:56:21] s2013: has joined #RubyOnRails
[15:56:27] sharkman: has joined #RubyOnRails
[15:57:04] smathy: workmad3, any - but yes.
[15:57:04] sniperhaxor: Huh? Sorry, I hadn't slept this well since I was in my college CS professor's class.
[15:57:40] jvanbaarsen: has joined #RubyOnRails
[15:57:44] jvanbaar1en: has joined #RubyOnRails
[15:57:53] sniperhaxor: Man, it feels weird to be a dumb one for once.
[15:58:06] sniperhaxor: google: definition obfuscate
[15:58:33] Hazim: arup_r i've posted the log file at the gist
[15:58:35] workmad3: smathy: heh :) I think the EU laws are the only ones that come close to needing shit like those banners... it is very unclear as to whether the banner is enough or needed, last I checked
[15:58:40] rgrmatt: has joined #RubyOnRails
[15:59:06] smathy: workmad3, not sure if it changed then, the exemptions are very clear and cover all legitimate uses of cookies.
[16:01:19] workmad3: smathy: when the law first came in, the exemptions weren't particularly clear... even to the point that government sites giving explanatory details on it couldn't manage to get the information correct
[16:01:25] pawnbox: has joined #RubyOnRails
[16:01:27] wldcordeiro: has joined #RubyOnRails
[16:01:28] qejk: has joined #RubyOnRails
[16:01:28] dionysus69: I have a quite an emergency, I had a working local environment. pushed on git, had a system crash and cloned remote to local and now I am getting errors upon create actions of products. In fact create resource path is missing, heres my routes. any ideas why the admin/create path is missing? https://gist.github.com/webzorg/40a3d3eb37d9dc7ae1d2 if no one has any idea why this might be the case I will post specific errors for create and imp
[16:01:32] workmad3: smathy: I think the exemptions have been made clearer now though
[16:02:39] arup_r: hazim: You have "user"=>{"member"=>{"username but you need it like "user"=>{"member_attributes"=>{"username
[16:03:16] corioliss: has joined #RubyOnRails
[16:03:53] safety_cut: has joined #RubyOnRails
[16:04:28] smathy: workmad3, yes, I see the opinion I always reference was only published in 2012.
[16:04:49] based_pdev: has joined #RubyOnRails
[16:05:27] ftj: has joined #RubyOnRails
[16:05:37] workmad3: smathy: http://ec.europa.eu/justice/data-protection/article-29/documentation/opinion-recommendation/files/2012/wp194_en.pdf yes?
[16:05:56] smathy: dionysus69, you only have an admin namespace, there won't be any restful paths for that resource.
[16:06:06] smathy: workmad3, yeah, that's the one.
[16:06:06] rgrmatt: dionysus69: what is the error you are receiving?
[16:06:13] Hazim: arup_r how come when in post it comes out as member only?
[16:06:14] tubbo: dionysus69: admin/create?
[16:06:38] dionysus69: yes admin/create let me recreate the error one second
[16:06:44] arup_r: that need to check the source, from where the params are getting created
[16:06:53] EminenceHC: has joined #RubyOnRails
[16:07:02] mrtomme: has joined #RubyOnRails
[16:08:15] rgrmatt: ok :) while I am here. If anyone is using Limechat, is there an easy way to reference a user in a response without having to type their username by hand. i thought there was a way to do that. I just don't remember what it was
[16:08:30] arup_r: rgrmatt: use TAB
[16:08:38] ustrajunior: has joined #RubyOnRails
[16:08:38] arup_r: like rgr<TAB>
[16:08:47] dionysus69: I am getting this error for create action. No route matches [POST] "/products"
[16:08:55] dionysus69: but it should be /admin/products
[16:09:05] tubbo: dionysus69: that isn't because your "admin/create path" is missing
[16:09:32] dionysus69: what is the reason then as I said it was working and I didnt change anything and now it doesnt work :\
[16:09:43] safety_c_: has joined #RubyOnRails
[16:09:44] dionysus69: my production works, this only happens in development
[16:09:48] rgrmatt: dionysus69: do you have a form where you are trying to post to the products_path?
[16:10:21] tubbo: dionysus69: if you want to POST to /admin/products the route helper is admin_products_path
[16:10:29] arthurix_: has joined #RubyOnRails
[16:10:45] dionysus69: form looks good https://gist.github.com/webzorg/a2a4d136e9c392522faa
[16:11:15] dionysus69: tubbo: yes and this form should guess that the path should be admin_products_path instead it is going for products_path
[16:11:20] tubbo: `form_for(@admin_product)` is dubious
[16:11:54] Motoservo: has joined #RubyOnRails
[16:11:55] dionysus69: meaning? @admin_product is a variable that is being passed back to controller
[16:12:00] tubbo: dionysus69: if @admin_product is a Product, then that is just going to use products_path, not admin_products_path. in order to properly namespace this within the admin, you'd need to do [:admin, @admin_product]. the name of the instance variable doesn't matter.
[16:12:25] arup_r: tubbo: for namespace thing we need form_for([@product, :admin]) right ?
[16:12:25] l_tonz: has joined #RubyOnRails
[16:12:26] tubbo: you could call the ivar @foo, and if @foo is a Product, it's gonna use products_path
[16:12:34] arup_r: yes... :)
[16:12:36] willardg: has joined #RubyOnRails
[16:12:48] tubbo: arup_r: you have it backwards
[16:12:49] dionysus69: tubbo: let me try that actually I am surprised I dont have it like that :D
[16:12:54] rgrmatt: yeah that sounds about right
[16:12:57] tubbo: dionysus69: me too ;P
[16:13:08] arup_r: tubbo: yes, was trying to be much faster than you ;)
[16:13:55] n1ck7: has joined #RubyOnRails
[16:14:49] arthurix: has joined #RubyOnRails
[16:15:28] dionysus69: param is missing or the value is empty: admin_product >>> this is a new error
[16:15:44] chrissonar: has joined #RubyOnRails
[16:15:54] dionysus69: ok let me post controller too
[16:16:06] NBarnes: has joined #RubyOnRails
[16:16:08] sharkman: how do i make this work, its failing on the html_options part, <% name, "index.html", html_options ={class => "section-header" } %>
[16:16:26] sharkman: oops, that is <% link_to
[16:16:48] dionysus69: https://gist.github.com/webzorg/7b2bf042213844da4339
[16:16:49] rgrmatt: you need to make it <%= link_to ... %>
[16:16:51] nya: has joined #RubyOnRails
[16:17:25] rgrmatt: sharkman: and generally you don't want to use path helpers and not relative paths in your link to
[16:17:40] polishdub: has joined #RubyOnRails
[16:17:43] tubbo: sharkman: that's not valid ruby, you are setting a local value called html_options to { class => 'section-header' }, which is itself invalid because class is a keyword, needs to be a symbol
[16:17:54] sharkman: rgrmatt can you paste the first thing you said again please, i got disconnected
[16:17:55] rgrmatt: sharkman: so if index.html is your root path you need to use <%= link_to "Root Path", root_path %>
[16:18:05] NBarnes: has joined #RubyOnRails
[16:18:09] rgrmatt: sharkman: you need to make it <%= link_to ... %>
[16:18:39] rgrmatt: sharkman: does that make sense?
[16:18:42] sharkman: ah i see, and it should be :class => "class_name"
[16:19:00] arup_r: ^^ yes otherwise syntax error
[16:19:38] sharkman: rgrmatt not sure what you mean about relative paths and path helpers
[16:20:36] rgrmatt: sharkman: so by relative path i mean <%= link_to "users", "/users" %> should instead be something like <%= link_to "users", users_path %>
[16:20:40] moeabdol: is it possible to embed erb code inside a yml locale file?
[16:20:54] gasbakid_: has joined #RubyOnRails
[16:20:55] rgrmatt: sharkman: users_path is a helper method that is generated based on your entries in your config/routes.rb
[16:21:11] NBarnes: moeabdol; my understanding is yes. Have you tried it?
[16:21:15] rgrmatt: moeabdol: i believe so
[16:21:25] arup_r: sharkman: root_path creates relaive and root_url creates absolute url
[16:21:39] arup_r: moeabdol: yes you CAN
[16:21:46] sharkman: oh okay i see thanks
[16:21:47] moeabdol: nbarnes: rgrmatt I did! and it renders the code literaly on the screen
[16:21:58] ryba: has joined #RubyOnRails
[16:22:02] moeabdol: meanin I see <%= link_to "something" %>
[16:22:03] arup_r: show the code moeabdol
[16:22:07] moeabdol: instead of the actual like
[16:22:18] moeabdol: arup_r: oh yes! ok sorry just a sec
[16:22:34] arup_r: moeabdol: you have link_to inside a yaml ?
[16:23:37] moeabdol: https://gist.github.com/moeabdol/36755425378e13aaa1d0
[16:23:55] moeabdol: arup_r: no I have an icon
[16:24:04] moeabdol: I'm using fontawesome icons
[16:24:30] arup_r: that is ok. But why that is inside yaml
[16:24:41] ecmacoder: has joined #RubyOnRails
[16:25:32] smathy: has joined #RubyOnRails
[16:25:35] nygrenh: has joined #RubyOnRails
[16:25:40] rgrmatt: <%= fa_icon("pencil").html_safe %>
[16:25:45] rgrmatt: is probably what you are looking for
[16:25:59] s2013: got an opinion question.. for a beginner rails internship is not knowing what STI is a deal breaker?
[16:26:01] rgrmatt: since it is rendering the actual html code instead of the icon.. you have to specify that it is safe html
[16:26:03] s2013: like how to deal with STI in rails
[16:26:42] towski_: has joined #RubyOnRails
[16:27:03] tak1n: has joined #RubyOnRails
[16:27:03] arup_r: rgrmatt: but that method is a view helper. dunno if that will be working inside an HTML
[16:27:09] arup_r: lets see OP's answer
[16:27:39] workmad3: s2013: I wouldn't class it as such... but then, I avoid STI as much as possible and basically try to ignore the fact it exists
[16:28:00] s2013: yeah i dont like using sti either.. but i just remembered something about it
[16:28:23] arup_r: moeabdol: Let us know where you are now
[16:28:24] rgrmatt: arup_r: yes you are right so he may have to call html_safe in his actual view
[16:28:53] arup_r: rgrmatt: I meant this fa_icon helper supposed to not work there
[16:29:00] arup_r: but lets wait
[16:29:14] rgrmatt: arup_r: i agree
[16:29:18] arup_r: but I am not sure
[16:29:47] pixelhandler: has joined #RubyOnRails
[16:31:57] xtagon: has joined #RubyOnRails
[16:32:03] moeabdol: arup_r: I tried html_safe :( it doesn't work
[16:32:25] rgrmatt: moeabdol: i may have misled you, you may have to do it in your view not your yml file
[16:32:28] moeabdol: i also tried "%{fa_icon("pencil").html_save}"
[16:32:56] moeabdol: rgrmatt: oh :) can you point me to how I can do that please
[16:32:59] rgrmatt: moeabdol: can you share with us how you are using the values of that YML file in your view
[16:33:43] moeabdol: basically I'm trying to override the defaults that rails provide for the create/update buttons of a resource
[16:33:44] rgrmatt: moeabdol: and just so we fully understand is your view displaying <i class="fa fa-pencil"></i> or something similar instead of the actual pencil iocon
[16:33:58] moeabdol: I have a single _form which I use for both creating and updating a resource
[16:34:25] moeabdol: rgrmatt: I have the font-awesome gem installed in my gemfile
[16:35:25] SteenJobs: has joined #RubyOnRails
[16:36:41] mustmodify: has left #RubyOnRails: ()
[16:36:53] rgrmatt: moeabdol: yes i am very familiar with that gem, it works very well. did you see my question above? is it actually rendering the html code?
[16:37:00] Motoservo: has joined #RubyOnRails
[16:37:09] lacuna: has joined #RubyOnRails
[16:37:18] rgrmatt: moeabdol: i love helping :) i just want to make sure I fully understand what is happening
[16:37:46] EminenceHC: has joined #RubyOnRails
[16:38:03] moeabdol: rgrmatt: sorry I didn't see you question. Yes! the view is rendering
[16:38:07] moeabdol: ill share a pic
[16:38:42] arup_r: moeabdol: why you are adding the method inside the YAML. You could do it inside the view using a bloack with the submit button
[16:39:00] arup_r: helpers are there to replace text, not to generate HTML AFAIK
[16:39:08] arup_r: sorry I meant
[16:39:15] FailBit: they can...
[16:39:17] arup_r: helper inside the yaml
[16:39:35] arup_r: FailBit: inside the yaml we are able to create HTML
[16:39:40] arup_r: No, I don
[16:39:43] arup_r: t think so
[16:39:46] moeabdol: arup_r: correct
[16:39:52] arup_r: it is just to change the labels of stuffs
[16:40:01] FailBit: I missed the context
[16:40:10] n008f4g_: has joined #RubyOnRails
[16:40:11] FailBit: ACTION should stop doing drive-bys
[16:40:29] moeabdol: the thing is at run-time i can determine if params[:action] is create or edit and I can then show the correct button with the icon
[16:40:36] moeabdol: i used to do the arup_r
[16:41:02] arup_r: moeabdol: yes, you have action_name helper in the views
[16:41:13] moeabdol: but then when the user enters invalid attributes to the form the form rerenders and params[:action] is no longer preserved and the buttons just dissapear
[16:41:15] arup_r: call it and check which action it is and then render the fa_*
[16:41:39] arup_r: dunno what you said now
[16:41:58] arup_r: I always do use action_name as an helper to do what you are doing now
[16:42:15] arup_r: and wrap the logic inside the helpers/ dir in some relevant module
[16:42:23] Maletor: has joined #RubyOnRails
[16:42:48] mikecmpbll: moeabdol: use model.new_record? rather than relying on the action parameter
[16:42:59] mikecmpbll: that's how the form does it by default.
[16:43:07] arup_r: ^^^ he is always smart
[16:43:20] rgrmatt: moeabdol: were you able to put some of your view code in a gist?
[16:43:32] arup_r: mikecmpbll: if I don't have any model object, and I am using form_tag
[16:43:36] moeabdol: oh no sorry rgrmatt just a sec
[16:43:48] arup_r: I use action_name, it never ditched me yet
[16:43:58] hansss: has joined #RubyOnRails
[16:44:28] moeabdol: https://gist.github.com/moeabdol/36755425378e13aaa1d0
[16:44:32] moeabdol: I updated the gist
[16:44:54] SanguineAnomaly: has joined #RubyOnRails
[16:45:54] gasbakid__: has joined #RubyOnRails
[16:45:55] nettoweb: has joined #RubyOnRails
[16:46:35] Fahrenhe17: has joined #RubyOnRails
[16:46:58] Fahrenhe17: hello, guys, im sorry, that im writing here, but i dont know, where i can ask, tell me please, in this sentence, "roll your own" mean, that i should do my own or not?
[16:46:58] Fahrenhe17: "As you may know, there are various pre-built authentication solutions for !LANG!;??Box??6.1explains why, at least at first, it???s probably a better idea to roll your own."
[16:47:17] moeabdol: so what I initially wanted is to replace the entire logic in the view with a simple = f.submit
[16:47:34] moeabdol: and in my yml i can define both cases for create and update
[16:48:30] lacuna: has joined #RubyOnRails
[16:48:34] lacuna: has joined #RubyOnRails
[16:49:09] arup_r: moeabdol: ok. wrap that button logic inside your own custom helper method and then use it in view ?
[16:49:21] arup_r: now forget the yaml file please
[16:49:26] rgrmatt: moeabdol: you seem to be going against the Rails grain here. generally you don't want to have conditional code like that based on controller action inside your view. Instead you should have unique views for each of your controller actions.
[16:49:41] moeabdol: mikecmpbll: you're method is correct
[16:49:43] arup_r: create your own wrapper over the button_tag or submit_tag
[16:49:48] mikecmpbll: moeabdol: i know :)
[16:50:11] moeabdol: I tried if @course.new_record?
[16:50:14] mhib: has joined #RubyOnRails
[16:50:24] moeabdol: I bow to all you guys
[16:50:27] MartinElvar: has joined #RubyOnRails
[16:50:33] kitsuneyo: has joined #RubyOnRails
[16:50:34] moeabdol: thank you so much
[16:51:36] rgrmatt: moeabdol: good luck with your project! :)
[16:51:51] m3_del: has joined #RubyOnRails
[16:52:19] moeabdol: rgrmatt: thank you :) its gonna be awesome
[16:52:53] moeabdol: its an e-learning video content systems for arab speaking people
[16:53:25] EminenceHC: has joined #RubyOnRails
[16:54:31] metalic: has joined #RubyOnRails
[16:55:24] n1ck7: has joined #RubyOnRails
[16:56:26] rgrmatt: that sounds wonderful
[16:56:55] rakm: has joined #RubyOnRails
[16:58:11] m3t4l1c_s0ul: has joined #RubyOnRails
[16:58:22] moeabdol: rgrmatt: :)
[16:58:46] moeabdol: I have many projects in mind, but I'm taking it one step at a time since am relatively new to ruby & rails
[16:59:19] gasbakid_: has joined #RubyOnRails
[16:59:47] safety_cut: has joined #RubyOnRails
[17:01:01] ecmacoder: has joined #RubyOnRails
[17:01:09] hephaestus_rg: has joined #RubyOnRails
[17:03:42] xploshioon: has joined #RubyOnRails
[17:03:51] Elyx0: has joined #RubyOnRails
[17:04:24] Elyx0: Heya. Did anyone try Rails + Mongodb and it worked well ? Or is it not encouraged for production ?
[17:05:45] dawidof: has joined #RubyOnRails
[17:09:23] rgrmatt: I am sure Mongodb works fine with Rails but I think it really depends on what your data persistence needs are more than anything else.
[17:09:59] snurfery: has joined #RubyOnRails
[17:10:59] rgrmatt: for example you would probably want to use SQL for persisting data in regards to transactionally sensitive things like bank accounts
[17:11:41] rromanchuk: has joined #RubyOnRails
[17:11:52] rgrmatt: MongoDB may be useful for another project that requires the flexibility of a schema-less database
[17:11:53] kitsuneyo: has joined #RubyOnRails
[17:12:11] AzaToth: has joined #RubyOnRails
[17:12:23] artto: has joined #RubyOnRails
[17:13:39] rgrmatt: it really depends on your business model too i suppose, mysql databases scale vertically while mongodb supports sharding which is a method of horizontally scaling
[17:13:50] gasbakid: has joined #RubyOnRails
[17:14:27] jkamenik: has joined #RubyOnRails
[17:14:38] dawidof: Really simple site. ruby 2.2.3, passenger-5.0.21, more than 30 processes of ruby running at the same time(dont know why), site is not loading or very slow loading. What could be the problem?
[17:16:31] bricker: dawidof: maybe something is stalled, eg. you have a non-terminating loop
[17:16:39] sharkman: if i do image_tag("pic.jpg") what folder will rails look in?
[17:16:48] sharkman: assets/images? public? / ?
[17:17:31] DoubleMalt: has joined #RubyOnRails
[17:18:08] s2013: has joined #RubyOnRails
[17:18:33] rgrmatt: sharkman: i think your assets path
[17:18:45] nemo_: has joined #RubyOnRails
[17:18:46] rgrmatt: http://apidock.com/rails/ActionView/Helpers/AssetTagHelper/image_tag
[17:18:51] gasbakid: has joined #RubyOnRails
[17:18:57] skyjumper: is there a way to get the actual POST value of params['action'], rather than the rails controller method name?
[17:19:07] smathy: sharkman, !assets
[17:19:07] helpa: sharkman: http://guides.rubyonrails.org/asset_pipeline.html - The Asset Pipeline Guide by Ryan Bigg, Richard Hulse & Mohammad Typaldos
[17:19:22] dawidof: bricker, I don't think so, maybe some tasks, but I don't know how to check?
[17:19:54] treehug88: has joined #RubyOnRails
[17:20:33] sharkman: yeah ive looked at the image_tag page. i put the image in public, public/images, assets/ assets/images and none show up. if i do <img src> without the rails it does show up though
[17:21:04] Musashi007: has joined #RubyOnRails
[17:21:51] sharkman: the <img> tag is not even being generated in my html page. is that standard behavior for rails if it cannot find the image?
[17:21:58] _tpavel: has joined #RubyOnRails
[17:22:50] sharkman: oh i got it working sorry i just had <% %>, not <%= %>
[17:23:12] lacuna: has joined #RubyOnRails
[17:24:28] SteenJobs: has joined #RubyOnRails
[17:24:28] dawidof: bricker, is it possible to check which file makes this overloading?
[17:25:28] losvedir: has joined #RubyOnRails
[17:25:30] bricker: dawidof: you can send a specific signal to a passenger process to kill it and get a backtrace. I think it's SIGINT. That will show you where it's hung (if it is in fact hung)
[17:25:43] chills42: has joined #RubyOnRails
[17:25:49] hfp_work: has joined #RubyOnRails
[17:26:28] gasbakid: has joined #RubyOnRails
[17:27:31] chills42: has joined #RubyOnRails
[17:27:40] SteenJobs: has joined #RubyOnRails
[17:27:42] SIGILL: has left #RubyOnRails: ("WeeChat 1.1.1")
[17:28:35] rgrmatt: has joined #RubyOnRails
[17:30:56] ecmacoder: has joined #RubyOnRails
[17:31:41] arup_r: skyjumper: didn't get you
[17:31:59] arup_r: what do you mean by actual POST value ?
[17:32:49] hfp_work: has joined #RubyOnRails
[17:32:55] skyjumper: someone's sending a POST to me with a value for 'action', and rails is overwriting it
[17:33:11] Y_Ichiro: has joined #RubyOnRails
[17:33:59] tbuehlmann: skyjumper, first google result: http://stackoverflow.com/a/23675520/384293
[17:34:22] skyjumper: what did you search for?
[17:34:38] matthewd: sharkman: FYI, image_tag("pic.jpg") will look in assets/*/pic.jpg, then fall back to public/images/pic.jpg
[17:34:54] matthewd: (I'm not actually sure whether the guide describes that fallback)
[17:34:56] srinidhi: has joined #RubyOnRails
[17:35:10] sharkman: ah okay thanks matthewd
[17:35:16] tbuehlmann: searched for "rails params action key overwrite OR override"
[17:35:24] sharkman: yeah i did not see that in the guide when i read
[17:36:43] srinidhi: has joined #RubyOnRails
[17:37:50] Aswebb_: has joined #RubyOnRails
[17:38:16] trosborn: has joined #RubyOnRails
[17:40:28] hooper: has joined #RubyOnRails
[17:40:40] treehug88: has joined #RubyOnRails
[17:40:54] hooper: has joined #RubyOnRails
[17:41:21] hooper: has joined #RubyOnRails
[17:41:34] jessemcgilallen: has joined #RubyOnRails
[17:43:06] willardg: has joined #RubyOnRails
[17:43:27] ecmacoder: has joined #RubyOnRails
[17:44:04] srinidhi1: has joined #RubyOnRails
[17:44:28] nettoweb: has joined #RubyOnRails
[17:44:56] SteenJobs: has joined #RubyOnRails
[17:45:15] shinnya: has joined #RubyOnRails
[17:47:27] nemo_: has joined #RubyOnRails
[17:48:35] srinidhi1: has joined #RubyOnRails
[17:48:37] __tpavel: has joined #RubyOnRails
[17:48:55] superscott: has joined #RubyOnRails
[17:49:46] sharkman: if i do "article <%= text_area rows: 5 %>"
[17:50:08] sharkman: it puts the "article" text at the bottom of the text area, how would i justify the text to be aligned with the top of the text area
[17:50:29] User458764: has joined #RubyOnRails
[17:52:04] sharkman: maybe that is a CSS issue not a rails thing
[17:52:35] m3_del: has joined #RubyOnRails
[17:53:42] EminenceHC: has joined #RubyOnRails
[17:54:55] [Butch]: has joined #RubyOnRails
[17:55:55] shinnya: has joined #RubyOnRails
[17:55:57] arup_r: skyjumper: I hope that solved your issue ?
[17:56:19] skyjumper: arup_r: it did, surprised i didn't find it myself
[17:56:22] trosborn: sharkman: Yeah that is HTML/CSS, but I think maybe you can make rails output the HTML you want with the label_tag method. <%= label_tag ???Article??? %>
[17:57:16] arup_r: skyjumper: cool. here is the API doc, I was about to give you ( http://api.rubyonrails.org/classes/ActionDispatch/Request.html#method-i-request_parameters)
[17:57:48] skyjumper: yeah, thx for the help
[17:58:08] based_pdev_: has joined #RubyOnRails
[17:58:15] sharkman: trosborn i just added that, it is also aligned on the bottom. seems like this would also require css
[17:59:37] arup_r: sharkman: yes inside a <div> first label and then text_area .. and then display: inline to all :)
[17:59:58] tubbo: echo simple_form :D
[18:02:14] CanTonic: has joined #RubyOnRails
[18:04:38] CanTonic: has joined #RubyOnRails
[18:04:52] jkamenik: has joined #RubyOnRails
[18:05:09] Guest53: has joined #RubyOnRails
[18:06:17] hephaestus_rg: has joined #RubyOnRails
[18:07:34] cnk: has joined #RubyOnRails
[18:10:31] LBRapid: has joined #RubyOnRails
[18:11:11] baweaver: has joined #RubyOnRails
[18:11:35] KensoDev: has joined #RubyOnRails
[18:12:31] marahin: Hello, another issue today :) what's the best way to find a model (and if it doesnt exist, then create it [i know about find_or_create_by]), and then update it's values?
[18:13:03] marahin: I thought of Model.find_or_create_by(:name => name) do |model| { model.attribute = something }, however it doesnt seem to work if the model exists and is found
[18:13:05] ftj: has joined #RubyOnRails
[18:13:42] nettoweb: has joined #RubyOnRails
[18:14:53] matthewd: marahin: Model.find_or_initialize_by(...).update(...) ?
[18:16:05] mikecmpbll: has joined #RubyOnRails
[18:16:11] yardenbar: has joined #RubyOnRails
[18:16:22] errakeshpd: has joined #RubyOnRails
[18:17:22] marahin: matthewd: possibly, I'll try to check it out, thanks
[18:18:42] bricker1: has joined #RubyOnRails
[18:20:24] hfp_work: has joined #RubyOnRails
[18:20:26] nertzy: has joined #RubyOnRails
[18:20:35] reckoner: has joined #RubyOnRails
[18:20:59] reckoner: where do you put your liquid drops. under lib/?
[18:21:32] treehug88: has joined #RubyOnRails
[18:21:59] danneu: has joined #RubyOnRails
[18:22:25] FailBit: I put drops in my eyes
[18:22:36] User458764: has joined #RubyOnRails
[18:23:45] tubbo: reckoner: i put them right under the tongue for maximum absorption
[18:24:37] arup_r: i put inside my nose..
[18:24:54] tbuehlmann: reckoner, app/drops
[18:25:36] rgrmatt: has joined #RubyOnRails
[18:26:25] hfp_work: has joined #RubyOnRails
[18:26:41] smathy: Party pooper!
[18:26:55] hfp__work: has joined #RubyOnRails
[18:27:46] chills42_: has joined #RubyOnRails
[18:29:45] reckoner: tbuehlmann thanks
[18:29:51] reckoner: same with tags?
[18:30:39] n1lo: has joined #RubyOnRails
[18:30:45] reckoner: also, i'd say you should put them re: drops where the sun don't shine.
[18:31:14] aderium: has joined #RubyOnRails
[18:31:33] aderium: moving to capistrano ver3 Don't know how to build task 'bundle:install'
[18:31:43] hephaestus_rg: has joined #RubyOnRails
[18:31:44] colleenmcguckin: has joined #RubyOnRails
[18:34:09] DCameronMauch: has joined #RubyOnRails
[18:35:15] tubbo: Aderium: you need capistrano-bundler
[18:35:35] orolo: has joined #RubyOnRails
[18:35:39] aderium: its in my Capfile require 'capistrano/bundler'
[18:36:46] aderium: but was missing in deploy.rb ...
[18:36:58] darrencauthon: has joined #RubyOnRails
[18:37:06] aderium: new error NoMethodError: undefined method `instance' for Capistrano::Configuration:Class
[18:38:47] JusticeFries: has left #RubyOnRails: ()
[18:39:52] tak1n: has joined #RubyOnRails
[18:41:12] gasbakid_: has joined #RubyOnRails
[18:42:06] EminenceHC: has joined #RubyOnRails
[18:42:54] GnuYawk: has joined #RubyOnRails
[18:43:36] jord: has joined #RubyOnRails
[18:44:34] kadoppe: has joined #RubyOnRails
[18:44:59] gasbakid: has joined #RubyOnRails
[18:45:28] SteenJobs: has joined #RubyOnRails
[18:46:28] rgrmatt: has joined #RubyOnRails
[18:47:13] tbuehlmann: reckoner, yeah
[18:47:49] matthias__: has joined #RubyOnRails
[18:48:46] codesoda: has joined #RubyOnRails
[18:48:52] Guest53: has joined #RubyOnRails
[18:49:39] aderium: no luck I cant seem to move forward
[18:49:51] cschneid_: has joined #RubyOnRails
[18:49:55] MrPunkin: has joined #RubyOnRails
[18:51:15] ChuckieBGoode: has joined #RubyOnRails
[18:52:11] acti0nman: has joined #RubyOnRails
[18:52:13] eprasad: has joined #RubyOnRails
[18:52:40] MrPunkin: if you include an ensure clause that returns something are any exceptions not handled by a rescue clause just lost?
[18:53:20] m3_del: has joined #RubyOnRails
[18:55:12] MrPunkin: FailBit: thanks.
[18:56:13] nettoweb: has joined #RubyOnRails
[19:00:56] MartinElvar: has joined #RubyOnRails
[19:01:46] jhn: has joined #RubyOnRails
[19:02:43] `based_pdev`: has joined #RubyOnRails
[19:04:32] jhn: any reason why this: https://gist.github.com/jhn/0f7404538a8bb1434d27
[19:04:50] lacuna: has joined #RubyOnRails
[19:05:29] jhn: make this: new_user_playlist_path(@user)
[19:05:46] jhn: generate a route like this: http://localhost:3000/users/562d629e8afc1e6795000000/playlists/new
[19:06:12] chouhoulis: has joined #RubyOnRails
[19:06:16] jhn: instead of a route like http://localhost:3000/users/EMAIL/playlists/new
[19:06:53] pcpanic: jhn, I just did this with friendlyId
[19:06:58] jhn: it's a pretty barebones rails 4.2.4 app.
[19:07:08] jhn: but that doesn't answer my question.
[19:07:45] pcpanic: you get the user with token attribute of some sort, no?
[19:08:08] jhn: i'm not sure what you mean by 'token attribute'
[19:08:31] dikaio: has joined #RubyOnRails
[19:08:46] northfurr: has joined #RubyOnRails
[19:08:50] pcpanic: users/token/playlists/new
[19:09:15] pcpanic: token being a string as you have given above
[19:09:16] jhn: oh. no, that's the id that got generated by mongoid.
[19:09:35] pcpanic: apologies, ignore me...
[19:09:44] jhn: previously, in the routes.rb file, i didn't have params: email.
[19:10:21] tubbo: jhn: you'd need some kind of slugging module for mongoid, like https://github.com/digitalplaywright/mongoid-slug
[19:10:35] tubbo: for activerecord, one might use friendly_id
[19:14:45] jhn: tubbo: ah. i didn't know this was an AR thing.
[19:14:49] smathy: jhn, I don't think the :param option in routes changes the `to_param` at all for a resource.
[19:15:00] jhn: smathy: http://edgeguides.rubyonrails.org/routing.html#overriding-named-route-parameters
[19:15:25] Scriptonaut_: has joined #RubyOnRails
[19:15:26] snurfery: has joined #RubyOnRails
[19:15:30] willardg: has joined #RubyOnRails
[19:15:37] smathy: jhn, exactly, you can see that they've implemented a to_param method as well.
[19:15:46] Coldblackice: has joined #RubyOnRails
[19:16:05] jhn: ah, i see. yes. that makes sense. thank you guys!
[19:16:06] tubbo: param: :identifier is the param you use in the controller
[19:16:12] tubbo: params[:identifier]
[19:16:35] rgrmatt: has joined #RubyOnRails
[19:16:50] smathy: jhn, all that the :param option does is changes the *name* of the "primary identifying value" (ie. the return of `to_param`) for a given resource.
[19:17:09] yfeldblum: has joined #RubyOnRails
[19:17:15] smathy: jhn, if you want the value to change as well then you have to adjust the to_param otherwise that value will just be the .id
[19:17:22] tvw: has joined #RubyOnRails
[19:17:39] chills42: has joined #RubyOnRails
[19:17:40] jhn: thank you!
[19:18:09] daffy_duck: has joined #RubyOnRails
[19:18:09] dionysus69: has joined #RubyOnRails
[19:19:01] gingray: has joined #RubyOnRails
[19:19:12] bricker: has joined #RubyOnRails
[19:23:11] nettoweb: has joined #RubyOnRails
[19:24:00] arthurix_: has joined #RubyOnRails
[19:24:45] Fire-Dragon-DoL: has joined #RubyOnRails
[19:24:49] Elyx0: has joined #RubyOnRails
[19:25:24] kerunaru: has joined #RubyOnRails
[19:28:35] manfrin_: has joined #RubyOnRails
[19:29:09] Salve: has joined #RubyOnRails
[19:29:20] kerunaru: has joined #RubyOnRails
[19:30:46] ruurd: has joined #RubyOnRails
[19:30:59] colleenmcguckin: has joined #RubyOnRails
[19:32:11] mhib: has joined #RubyOnRails
[19:34:53] lemur: has joined #RubyOnRails
[19:35:59] ayonkhan: has joined #RubyOnRails
[19:37:46] baweaver_: has joined #RubyOnRails
[19:40:07] mattc007: has joined #RubyOnRails
[19:40:25] gavit: if you have code in git, how do you deploy it to your 'webserver'? ssh to webserver and then git fetch? or is there a better way?
[19:40:39] kiki_lamb: Is there a way to completely disable HTML escaping in views for a particular extension (or MIME type)? I'm trying to make .rtf.erb files and don't want it to do any HTML escaping in them at all.
[19:41:14] FailBit: gavit: cap, mina, etc
[19:42:56] ivanskie: has joined #RubyOnRails
[19:43:28] lacuna: has joined #RubyOnRails
[19:43:28] lacuna: has joined #RubyOnRails
[19:43:40] gavit: FailBit: I'll try cap
[19:43:50] gavit: tubbo: chef can do it too?
[19:43:50] mattc007: has left #RubyOnRails: ()
[19:43:51] FailBit: chef is horrifying frankly
[19:43:58] hephaestus_rg: has joined #RubyOnRails
[19:44:09] gavit: ACTION was thinking chef was like salt (for sysadmin purposes)
[19:44:25] tubbo: gavit: it's a configuration management framework
[19:44:28] northfurr: has joined #RubyOnRails
[19:44:41] tubbo: gavit: https://docs.chef.io/resource_deploy.html
[19:44:49] tubbo: FailBit: it's all relative. chef is way better than shell scripts :D
[19:44:57] tubbo: but it's definitely nowhere near as fun as heroku or docker.
[19:45:12] gavit: tubbo: chef is better than shell for sure :P
[19:45:40] tubbo: i also like chef because it does not separate building the app code from provisioning the server the app runs on
[19:45:50] tubbo: having that "all-in-one" is really nice
[19:47:42] northfurr: has joined #RubyOnRails
[19:49:30] srinidhi1: has joined #RubyOnRails
[19:50:21] gavit: tubbo: if you're outsourcing the coding yes, if you're developping I think the capistrano would be nicer
[19:50:31] northfurr: has joined #RubyOnRails
[19:53:09] tubbo: gavit: why?
[19:54:03] m3_del: has joined #RubyOnRails
[19:54:12] lxsameer: has joined #RubyOnRails
[19:54:28] northfurr: has joined #RubyOnRails
[19:54:41] Elyx0: rgrmatt, thx :)
[19:54:43] gavit: tubbo: dev would prolly update the servers with new code all day
[19:55:05] gavit: a sysadmin will setup a server once in a while and will only update the code when he gets it from the dev :P
[19:55:52] arup_r: kiki_lamb: didn't find anything to answer you
[19:56:07] letitflow: has joined #RubyOnRails
[19:56:07] letitflow: has joined #RubyOnRails
[19:56:14] bonhoeffer: has joined #RubyOnRails
[19:56:22] hephaestus_rg: has joined #RubyOnRails
[19:56:40] Motoservo: has joined #RubyOnRails
[19:58:15] mattc007: has joined #RubyOnRails
[19:58:45] Guest53: has joined #RubyOnRails
[19:58:52] dmarr: if i want to test out a PR for a gem, how would I do that?
[19:59:21] dmarr: like, my gemfile specifies `gem 'omniauth'`, but i want to try the gem source from my local copy: `~/src/omniauth` which is checked out at ref of the PR I want to test
[20:00:09] ahegyi: has joined #RubyOnRails
[20:01:09] dmarr: I guess that gem 'foobar', '0.0.1', :path => '/Users/lucas/code/foobar'
[20:01:22] arup_r: kiki_lamb: use http://stackoverflow.com/a/13142764/2767755 technique to stop html escape
[20:02:15] lacuna: has joined #RubyOnRails
[20:03:11] bender_unit: has joined #RubyOnRails
[20:04:17] siddart: has joined #RubyOnRails
[20:04:36] darrencauthon: has joined #RubyOnRails
[20:05:49] northfurr: has joined #RubyOnRails
[20:07:19] lacuna: has joined #RubyOnRails
[20:08:11] willardg: has joined #RubyOnRails
[20:11:40] djbkd: has joined #RubyOnRails
[20:12:19] ruurd: has joined #RubyOnRails
[20:13:27] ecmacoder: has joined #RubyOnRails
[20:16:19] dopamean_: has joined #RubyOnRails
[20:16:30] adac: has joined #RubyOnRails
[20:17:02] bender_unit: has joined #RubyOnRails
[20:17:24] trosborn: has joined #RubyOnRails
[20:18:20] Ergo: has joined #RubyOnRails
[20:20:27] colleenmcguckin: has joined #RubyOnRails
[20:21:15] yashinbasement: has joined #RubyOnRails
[20:21:30] dgs: has joined #RubyOnRails
[20:23:10] Or1on: has joined #RubyOnRails
[20:23:11] Or1on: has joined #RubyOnRails
[20:24:00] bender_unit: has joined #RubyOnRails
[20:25:20] sharkman: has joined #RubyOnRails
[20:26:15] nertzy: has joined #RubyOnRails
[20:27:10] greengriminal: has joined #RubyOnRails
[20:29:09] meoblast001: has joined #RubyOnRails
[20:29:49] pixelhandler: has joined #RubyOnRails
[20:32:43] ruurd: has joined #RubyOnRails
[20:33:47] ritic: has joined #RubyOnRails
[20:35:22] dionysus69: has joined #RubyOnRails
[20:35:29] bruno-: has joined #RubyOnRails
[20:37:08] safety_c_: has joined #RubyOnRails
[20:37:50] cac: has joined #RubyOnRails
[20:37:53] momomomomo: has joined #RubyOnRails
[20:39:39] chouhoul_: has joined #RubyOnRails
[20:41:06] kerunaru: has joined #RubyOnRails
[20:42:38] SteenJobs: has joined #RubyOnRails
[20:43:15] Radar: GOOD MORNING
[20:43:28] momomomomo: long time no see
[20:45:50] arthurnn: has joined #RubyOnRails
[20:47:31] dgs: has left #RubyOnRails: ()
[20:48:00] manfrin_: has joined #RubyOnRails
[20:48:54] arthurix: has joined #RubyOnRails
[20:48:58] Papierkorb: When in the rails shell console, is it possible to binding.pry into uncaught errors to directly debug them?
[20:49:10] Papierkorb: Like the pry-rescue gem does for stand-alone ruby scripts
[20:49:41] simkessy: has joined #RubyOnRails
[20:51:00] superscott: Papierkorb: if you already have pry-rails and pry-rescue installed i'm under the assumption that it should do what you're asking?
[20:51:12] Papierkorb: ah well, I just added a catch all rescue to the offending method
[20:51:24] Papierkorb: superscott: nope, pry-rescue 'only' gives you the rescue binary
[20:52:41] Papierkorb: superscott: Just tried it, nope, pry-rescue doesn't help here
[20:53:30] VeryBewitching: has joined #RubyOnRails
[20:53:37] ivanskie: has joined #RubyOnRails
[20:53:48] Guest53: has joined #RubyOnRails
[20:53:56] momomomomo: gday VeryBewitching
[20:54:51] m3_del: has joined #RubyOnRails
[20:56:25] Musashi007: has joined #RubyOnRails
[20:56:54] jahbrewski: has joined #RubyOnRails
[20:57:40] superscott: Papierkorb: ah =/ i'm pretty sure that is available for rails in some gem
[20:58:07] penguinpowernz: has joined #RubyOnRails
[20:58:13] Papierkorb: superscott: ah well, thanks for trying :)
[20:58:31] slash_nick: Papierkorb: wrap your code in begin/rescue/end... rescue -> binding.pry
[20:58:35] Radar: Papierkorb: do you an example of what you're trying to accomplish?
[20:59:12] Papierkorb: Radar: do you know the pry-rescue gem?
[21:00:05] jessemcgilallen: has joined #RubyOnRails
[21:00:19] eggoez: has joined #RubyOnRails
[21:00:37] slash_nick: Papierkorb: have you followed https://github.com/ConradIrwin/pry-rescue/issues/49 ?... you say it's not working as expected in rails, right?
[21:00:46] slash_nick: Oh... in the console
[21:00:46] stamina: has joined #RubyOnRails
[21:01:29] slash_nick: yeah, i'd just wrap the suspect code in begin/rescue/end... rescuing to binding.pry
[21:01:59] Papierkorb: Radar: (You might like it) Like this https://gist.github.com/Papierkorb/3a3202a8adb741957218
[21:02:00] slash_nick: i imagine you're iterating over a huge list of things.... one of which causes a failure, wherein you'd like to stop execution
[21:02:04] snurfery: has joined #RubyOnRails
[21:02:28] Papierkorb: slash_nick: almost, I don't want to manually clutter my code :)
[21:02:37] slash_nick: you're just debugging, no?
[21:03:01] roxtrongo: has joined #RubyOnRails
[21:03:09] Radar: I don't get the not-wanting-to-dirty-your-code argument
[21:03:12] Radar: you're debugging!
[21:03:19] slash_nick: Papierkorb: if the gem's not working for you, debug another way...
[21:03:58] lacuna: has joined #RubyOnRails
[21:04:23] Papierkorb: Radar: "binding.pry in code" .. run it .. ^D ^D ^D ^D *ah damn one time too much, try again*
[21:04:36] Musashi007: has joined #RubyOnRails
[21:05:18] Papierkorb: a manual rescue clause of course fixes that, but that's two lines of garbage, also you don't have access to the variables anymore in there
[21:05:25] Grundell: has joined #RubyOnRails
[21:06:05] lacrymology: has joined #RubyOnRails
[21:07:28] codesoda: has joined #RubyOnRails
[21:10:21] youngbaks: has joined #RubyOnRails
[21:11:08] ritic: has joined #RubyOnRails
[21:12:15] ruurd: has joined #RubyOnRails
[21:13:02] matthewd: Papierkorb: So you almost need some way to only run binding.pry when a particular condition is true
[21:14:02] kerunaru: has joined #RubyOnRails
[21:19:11] lacuna: has joined #RubyOnRails
[21:19:42] mag42c: has joined #RubyOnRails
[21:22:32] Trynemjoel: has joined #RubyOnRails
[21:22:59] ss_much: has joined #RubyOnRails
[21:23:09] darrenca_: has joined #RubyOnRails
[21:23:17] blackmesa: has joined #RubyOnRails
[21:23:51] tubbo: Papierkorb: why can't pry-rescue work for rails?
[21:24:01] Scriptonaut_: has left #RubyOnRails: ()
[21:24:18] darrenca_: has joined #RubyOnRails
[21:24:27] Papierkorb: tubbo: cause it needs an uncaught exception, and the console already catches it
[21:25:45] Papierkorb: Radar: Oh, and I forgot. Was surprised you're already around. So, here we go
[21:25:50] Papierkorb: Radar: OOOOHAAAAYOOOO
[21:26:25] shock_one: has joined #RubyOnRails
[21:27:35] sunya7a: has joined #RubyOnRails
[21:27:51] shock_one: has joined #RubyOnRails
[21:27:53] rgrmatt: has joined #RubyOnRails
[21:28:16] dici: has joined #RubyOnRails
[21:28:37] Radar: Today I figured out that one of my problems can be solved with middleware
[21:28:41] Radar: so now I will have otwone problems
[21:28:44] ruurd: has joined #RubyOnRails
[21:29:57] rgrmatt: has joined #RubyOnRails
[21:31:16] bricker: I got otwone problems but a b*tch ain't one
[21:31:28] bender_unit: has joined #RubyOnRails
[21:32:35] qejk: has joined #RubyOnRails
[21:33:11] MartinElvar: has joined #RubyOnRails
[21:34:02] allcentury: has joined #RubyOnRails
[21:34:05] bender_unit: has joined #RubyOnRails
[21:34:30] arthurix_: has joined #RubyOnRails
[21:34:31] krainboltgreene: Radar: Oh shit that joke is brilliant haha.
[21:36:17] yfeldblum: has joined #RubyOnRails
[21:38:53] arthurix: has joined #RubyOnRails
[21:39:51] bender_unit: has joined #RubyOnRails
[21:43:18] Papierkorb: have I missed something? RedCloth doesn't seem to support > blockquotes
[21:43:40] smathy: LOL at krainboltgreene :)
[21:43:53] SteenJobs: has joined #RubyOnRails
[21:44:07] jwaldrip: has joined #RubyOnRails
[21:46:39] tubbo: haha Papierkorb blast from the past
[21:46:46] tubbo: good ol' RedCloth
[21:46:54] Pupeno: has joined #RubyOnRails
[21:47:29] bricker: Papierkorb: RedCloth is for Textile isn't it
[21:47:34] bricker: > is markdown
[21:47:45] smathy: redcarpet - he corrected.
[21:48:00] smathy: Papierkorb, why do you think it doesn't work (it does, btw).
[21:48:19] ritic: has joined #RubyOnRails
[21:48:46] Papierkorb: smathy: Also already corrected that one. And, I think this because it doesn't work with my test.md file
[21:48:49] smathy: Oh, actually, I just worked out what "No it does" meant ;)
[21:49:00] Palsson: has joined #RubyOnRails
[21:49:41] bricker: this has all been very confusing
[21:49:52] bricker: "> doesn't work with redcloth"
[21:49:56] bricker: Oops I mean
[21:50:05] bricker: "> does work with redcarpet"
[21:50:24] bricker: get back to work
[21:50:44] rhizome: no i agree
[21:50:50] ivanskie: has joined #RubyOnRails
[21:55:06] sdwrage: has joined #RubyOnRails
[21:55:39] m3_del: has joined #RubyOnRails
[21:57:39] bender_unit: has joined #RubyOnRails
[21:59:12] yashinbasement: has joined #RubyOnRails
[21:59:22] bonhoeffer: has joined #RubyOnRails
[21:59:42] yashinbasement: has joined #RubyOnRails
[22:00:20] northfurr: has joined #RubyOnRails
[22:00:24] reber: has joined #RubyOnRails
[22:00:33] sankaber: has joined #RubyOnRails
[22:01:06] hansss: has joined #RubyOnRails
[22:01:30] ruurd: has joined #RubyOnRails
[22:02:08] ChuckieBGoode: has left #RubyOnRails: ()
[22:02:45] Sceko: has joined #RubyOnRails
[22:03:16] jgpawletko: has joined #RubyOnRails
[22:03:52] jwaldrip: has joined #RubyOnRails
[22:05:36] jgpawletko: has joined #RubyOnRails
[22:05:59] maxz: has joined #RubyOnRails
[22:06:25] kitsuneyo: has joined #RubyOnRails
[22:10:56] mghaig: has joined #RubyOnRails
[22:11:50] Glyphik: has joined #RubyOnRails
[22:11:50] mary5030: has joined #RubyOnRails
[22:12:08] bender_unit: has joined #RubyOnRails
[22:12:31] wkoszek: has joined #RubyOnRails
[22:12:58] jessemcgilallen: has joined #RubyOnRails
[22:14:18] BlackCoyote: has joined #RubyOnRails
[22:15:06] jgpawletko: has joined #RubyOnRails
[22:15:07] Glyphik: has joined #RubyOnRails
[22:15:22] northfurr: has joined #RubyOnRails
[22:19:36] wkoszek: Is there an API which would "explain" my Ruby script the structure of the Rails app: how many models, and what they are, how many controllers, and what they are etc.. ?
[22:19:57] rhizome: rake stats
[22:19:58] Papierkorb: ls app/models ?
[22:20:30] wkoszek: rhizome: these are just stats.
[22:21:00] rhizome: there are a million different kinds of documentation. what do you want to end up with?
[22:21:22] rhizome: a pdf with pages and pages of dirtree?
[22:21:43] senya: has joined #RubyOnRails
[22:22:03] cornerma1: has joined #RubyOnRails
[22:22:22] acti0nman: has joined #RubyOnRails
[22:22:29] rhizome: and while you use "etc.", this is not actually a common thing
[22:22:31] wkoszek: I want to make myself a CLI program which based on the Rails models structure, would give me a uniform argument parsing for the REST API I created.
[22:23:01] rhizome: oh. in that case i have no idea what you're talking about.
[22:24:13] wkoszek: Well, basically for each model M added with variables A:string B:string C:number, I'd like to get a command line interface to my Rails app: myapp M --new --A value1 --B value2 --C 123
[22:24:30] wkoszek: And it'd call curl or wget for me.
[22:25:16] wkoszek: So they way to think about it is that either I'd have to remember the command line calls made to "rails" command, or (better), I could write a script which could pull out all this stuff from the existing Rails app.
[22:25:22] SteenJobs: has joined #RubyOnRails
[22:25:26] rhizome: i think you're going to have to write it yourself.
[22:25:29] roxtrongo: has joined #RubyOnRails
[22:25:59] lacuna: has joined #RubyOnRails
[22:26:33] chouhoulis: has joined #RubyOnRails
[22:27:23] rhizome: not sure how it's different than making REST calls by hand. different models are still going to have different attributes that you specify on the command line. from what i can tell.
[22:27:25] wkoszek: Yeah. Since I believe there's no real database backing each of the performed commands (e.g.: I think "rails g scaffold bleh" isn't registered anywhere), I believe one of the ways to approach this would be to "overload" names used in models syntax and basically execute all models' .rb files.
[22:28:21] mxrguspxrt: has joined #RubyOnRails
[22:28:48] wkoszek: rake routes at least gives me the routes, but I don't think I can easily pull out a knowledge of what I can send to each API endpoint.
[22:29:03] lacuna: has joined #RubyOnRails
[22:29:32] quazimodo: has joined #RubyOnRails
[22:29:48] djbkd: has joined #RubyOnRails
[22:30:28] shibabu: has joined #RubyOnRails
[22:30:38] ModusPwnens: has joined #RubyOnRails
[22:30:55] rhizome: it tells you the available ones
[22:30:58] ModusPwnens: Does anyone know if doing nested presenters is a bad idea? Or if there are alternatives?
[22:31:37] rgrmatt: has joined #RubyOnRails
[22:31:38] mois3x: has joined #RubyOnRails
[22:31:43] RegulationD: has joined #RubyOnRails
[22:33:58] agit0: has joined #RubyOnRails
[22:34:25] acti0nman: has joined #RubyOnRails
[22:36:56] senya: has joined #RubyOnRails
[22:38:40] TheNet: has joined #RubyOnRails
[22:38:49] ritic: has joined #RubyOnRails
[22:38:59] bruno-: has joined #RubyOnRails
[22:39:16] agit0: has joined #RubyOnRails
[22:39:19] rgrmatt: has joined #RubyOnRails
[22:39:36] bendangelo: has joined #RubyOnRails
[22:41:04] nertzy: has joined #RubyOnRails
[22:41:17] mices: how should i rewrite this: <% if @press_release.image_url != nil %>
[22:41:24] lacuna: has joined #RubyOnRails
[22:41:24] lacuna: has joined #RubyOnRails
[22:41:46] mices: if @press_release.image_url?
[22:43:02] VeryBewitching: mices: if @press_release.image_url.present?
[22:43:27] ruurd: has joined #RubyOnRails
[22:44:08] Ropeney: has joined #RubyOnRails
[22:44:28] dopamean_: has joined #RubyOnRails
[22:45:26] TheNet: mices: unless @press_release.image_url.nil?
[22:46:29] rgrmatt: has joined #RubyOnRails
[22:46:36] TheNet: VeryBewitching's is better
[22:46:48] TheNet: but I think .any? is better than .present?
[22:47:35] pydave6367: has joined #RubyOnRails
[22:47:46] VeryBewitching: .present? tests against !blank?
[22:47:57] rhizome: if @press_release.image
[22:50:18] yardenbar: has joined #RubyOnRails
[22:54:40] codeurge: has joined #RubyOnRails
[22:54:47] rgrmatt: has joined #RubyOnRails
[22:55:42] yfeldblum: has joined #RubyOnRails
[22:56:15] marahin: Eh.. since I've set namespace in config/initializers/sidekiq.rb for my app, now clockwork cannot trigger the workers... at least the Sidekiq doesn't seem to trigger them
[22:56:23] m3_del: has joined #RubyOnRails
[22:56:23] marahin: any ideas what might be missing?
[22:56:52] mices: rhizome: the name of the field in the table is image_url
[22:57:14] darrencauthon: has joined #RubyOnRails
[22:57:19] kitsuneyo: is there a localhost version of "heroku config:set SENDGRID_USERNAME=" ? i wanna send mailers from my dev environment
[22:57:47] Aeyrix: You can set up a local mailer but it's more complex than that.
[22:58:00] rhizome: mices: ah.
[22:59:31] Cache_Money: has joined #RubyOnRails
[22:59:42] ruurd: has joined #RubyOnRails
[23:00:00] kitsuneyo: Aeyrix, previously i just used gmail, but then it said my system isn't secure
[23:00:15] kitsuneyo: i wondered if i put my gmail username and pass in an ENV variable, it could work
[23:00:33] Aeyrix: sendgrid is an email service
[23:00:47] Aeyrix: you can't just put your gmail details in that env and expect it to work
[23:00:50] rickmasta: has joined #RubyOnRails
[23:02:38] quazimodo: has joined #RubyOnRails
[23:02:48] kitsuneyo: Aeyrix: yeah but i could use actionmailer with my gmail credentials, i've done it before except i didn't protect the credentials with ENV
[23:02:55] andersoldahl: has joined #RubyOnRails
[23:03:00] kitsuneyo: reading i can put them in bash_profile, gonna try that
[23:03:33] lacuna: has joined #RubyOnRails
[23:03:34] lacuna: has joined #RubyOnRails
[23:04:20] n1ck7: has joined #RubyOnRails
[23:04:31] spijet: Hello guys! Yet another stupid question from me: Is there a way to fire up a DB connection when the rails app starts and make it accessible by ActiveJobs? I'm using Passenger+nginx to run the app.
[23:05:31] htmldrum: has joined #RubyOnRails
[23:05:40] lbotos: has joined #RubyOnRails
[23:06:08] nfk: has joined #RubyOnRails
[23:06:18] spijet: At the moment this job in my app starts a new connection every time it's called, executes a query, and then closes the connection.
[23:06:51] OyoKooN: has joined #RubyOnRails
[23:07:03] bender_unit: has joined #RubyOnRails
[23:07:17] northfurr: has joined #RubyOnRails
[23:07:18] roxtrongo: has joined #RubyOnRails
[23:09:03] yardenbar: has joined #RubyOnRails
[23:09:30] Radar: spijet: What is wrong with it doing that?
[23:09:35] Radar: I don't know of a way to share connections like that.
[23:11:23] willharrison: has joined #RubyOnRails
[23:13:57] rgrmatt: has joined #RubyOnRails
[23:14:52] jwaldrip: has joined #RubyOnRails
[23:15:38] lacrymology: has joined #RubyOnRails
[23:15:48] HalcyonicStorm: has joined #RubyOnRails
[23:15:51] kristofferR: has joined #RubyOnRails
[23:15:52] HalcyonicStorm: https://www.eff.org/deeplinks/2015/10/eff-disappointed-cisa-passes-senate
[23:17:12] simkessy: Hi, is it at all possible to manipulate a model column before a where statement? For example Sales.where(amount*5 > 100)
[23:17:18] bender_unit: has joined #RubyOnRails
[23:17:44] Papierkorb: Wow. Kramdown is crazy slow.
[23:18:15] SteenJobs: has joined #RubyOnRails
[23:19:17] hephaestus_rg: has joined #RubyOnRails
[23:19:27] dideler: has joined #RubyOnRails
[23:19:37] mxrguspxrt: has joined #RubyOnRails
[23:20:18] aarkerio: has joined #RubyOnRails
[23:21:15] gambl0re: has joined #RubyOnRails
[23:21:41] spijet: Radar: I thought about using prepared statements for PgSQL, but my friend told me that it makes no sense to use them once per connection (the query won't be cached or something)
[23:23:39] Papierkorb: https://gist.github.com/Papierkorb/ec80fefe1d69c6918892#file-results Benchmark results
[23:25:42] skinux: has joined #RubyOnRails
[23:26:12] skinux: How do I fix this? C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
[23:26:12] skinux: : cannot load such file -- bundler/setup (LoadError)
[23:26:18] chipotle: has joined #RubyOnRails
[23:26:35] Papierkorb: skinux: install the bundler gem, or make sure it can be found. sorry have to go, night
[23:27:22] chipotle_: has joined #RubyOnRails
[23:28:26] HalcyonicStorm: simkessy: I'm not sure but I'd try Sales.where("amount * 5 > 100")
[23:29:15] HalcyonicStorm: simkessy: I'd also look at https://github.com/activerecord-hackery/squeel
[23:29:57] rhizome: i'm trying to think of a reason to put the calc in the query
[23:31:20] circ-user-PmWMe: has joined #RubyOnRails
[23:31:22] Radar: You know those dogs who tilt their heads sideways when they see unfamilar things? I am doing that onw
[23:31:38] bricker: rhizome: as opposed to what?
[23:31:45] Radar: !xyproblerm
[23:31:46] Radar: !xyproblem
[23:31:46] helpa: http://mywiki.wooledge.org/XyProblem
[23:31:51] Radar: pretty much
[23:32:05] Radar: "I have a solution, please tell me how to make it work!!1one"
[23:32:20] Radar: simkessy: plz explain
[23:33:37] lacuna: has joined #RubyOnRails
[23:34:14] simkessy: hmm okay well it simplified it a lot but this is the issue essentially. I have to run something like this scope :within_night, -> {where("extract(hour from start_time) in (18,19,20,21,22,23,24,1)")}
[23:34:50] dopamean_: has joined #RubyOnRails
[23:35:08] simkessy: Problem is start_time is in UTC and users time zone could be anything so I'm trying to figure out if I can cast start_time to users timezone before checking if the hour is in the above range
[23:35:14] Radar: original example uses amount
[23:35:17] bonhoeffer: has joined #RubyOnRails
[23:35:18] Radar: current example uses hours
[23:35:23] EminenceHC: has joined #RubyOnRails
[23:35:25] Radar: ACTION senses a !fake coming up real soon
[23:35:29] rhizome: oh it's just a timezone thing
[23:35:36] Radar: simkessy: Store times in the DB in UTC.
[23:35:42] Radar: simkessy: Convert local times to UTC to do comparisons.
[23:35:45] Radar: Problem solved.
[23:36:07] pontiki: has joined #RubyOnRails
[23:36:12] jwaldrip: has joined #RubyOnRails
[23:36:41] jgt1: has joined #RubyOnRails
[23:36:54] lacuna: has joined #RubyOnRails
[23:38:38] rromanchuk: has joined #RubyOnRails
[23:38:42] simkessy: My times are stored in UTC in the db though, but when I run the query, the results are displayed in the users time (Eastern) and they aren't in the range from the scope above
[23:40:14] mices: i'm getting routing error undefined method before_create
[23:41:06] jgpawletko: has joined #RubyOnRails
[23:41:42] sunya7a: has joined #RubyOnRails
[23:42:17] jani: has joined #RubyOnRails
[23:43:15] Sigma00: mices: you can only use before_create in a model
[23:43:48] mices: yea i figured that out thank you, i had duplicated it in the controller
[23:44:12] l_tonz: has joined #RubyOnRails
[23:44:24] lacuna: has joined #RubyOnRails
[23:44:28] l_tonz: has joined #RubyOnRails
[23:45:46] simkessy: helpa: okay yea, that exactly described what happened. My bad.
[23:49:57] jord: has joined #RubyOnRails
[23:50:16] helpa: Ruby on Rails development was made for UNIX based systems and sometimes requires you to compile things. It is recommended that you do not develop on Windows-based systems. If you are stuck on windows, you can use VirtualBox to run Ubuntu linux.
[23:52:22] Cervajz: has joined #RubyOnRails
[23:53:56] smathy: Who you talking to now Aeyrix ?
[23:54:14] Radar: he's probably scrolled up?
[23:54:20] Radar: simkessy: All good now?
[23:54:57] Aeyrix: I just needed that output. :>
[23:56:36] willharrison: has joined #RubyOnRails
[23:56:40] smathy: ACTION wonders how "helpa" translates for ESL people
[23:57:12] m3_del: has joined #RubyOnRails
[23:57:35] Radar: smathy: Good point. I should probably call it ??????????????? instead.
[23:57:54] iateadonut: has joined #RubyOnRails
[23:58:16] darrencauthon: has joined #RubyOnRails
[23:58:21] simkessy: Radar: well the db was already in UTC so I haven't changed anything but I'm starting to think the issue is that my seed data doesn't have correct timezones associated with it and it's making me thing that things are working when they might be
[23:58:35] bricker: Aeyrix: did you know that you can send a private message to helpa :O
[23:59:06] one_zero: has joined #RubyOnRails
[23:59:15] bruno-: has joined #RubyOnRails
[23:59:18] Aeyrix: bricker: Yes, but this channel was the one in focus.
[23:59:29] bricker: Aeyrix: ;)
[23:59:30] Radar: simkessy: right
[23:59:39] smathy: Radar, then *I'd* talk to it.
[23:59:46] shibabu: has joined #RubyOnRails