« Back to channel list

#RubyOnRails - 23 March 2016

« Back 1 day Forward 1 day »
[00:01:03] swistak35: has joined #RubyOnRails
[00:02:56] bamorim: has joined #RubyOnRails
[00:03:27] jottr: has joined #RubyOnRails
[00:05:01] aloneintheworld: has joined #RubyOnRails
[00:05:11] DragonPunch: smathy: i dont get, it ,can u tel lme what it is lol
[00:06:14] jottr: Hi all. I'm seeing the following issue on a rails app using angular, which has recently been migrated to heroku: ActionController::InvalidAuthenticityToken https://git.io/va5vo
[00:06:48] speakingcode: has joined #RubyOnRails
[00:07:26] jottr: The following so answer to a similar issue recommends using a skip_before_filter to disable verify_authenticity_token on pages that show this error.
[00:07:47] smathy: DragonPunch, of course I could, but I won't. It'd be like you turning up to a professor of astro physics who is volunteering his time to help students understand more about astro physics and you show him a pencil and ask what the point end is for.
[00:07:50] jottr: I am very unsure if this is a good idea though. Maybe people in here can give some advice?
[00:08:11] mwcmitchell: has joined #RubyOnRails
[00:10:04] uglybandersnatch: has joined #RubyOnRails
[00:10:31] banister: has left #RubyOnRails: ()
[00:10:44] banisterfiend: has joined #RubyOnRails
[00:11:24] banisterfiend: is there a nice way of using active record contexts with 'update' ? or must i use assign_attributes and then save(context: :foo) ?
[00:11:37] Darmani: has joined #RubyOnRails
[00:20:32] Silox|: has joined #RubyOnRails
[00:20:47] Cohedrin: has joined #RubyOnRails
[00:21:52] Devalo: has joined #RubyOnRails
[00:23:16] Darmani: Radar: Brooooo
[00:23:39] Radar: Darmani: did you see my memoserv?
[00:23:55] Darmani: I saw that you had sent me one but I haven't looked at it yet >.<
[00:24:04] Radar: look at it plz
[00:25:25] Darmani: oh shiit sorry
[00:25:31] Darmani: I'll check next time.
[00:25:33] smathy: jottr, no, that's terrible advice.
[00:25:44] Radar: Darmani: Just in case you're expecting me to be omnipresent
[00:25:50] mwlang: ACTION notes to self: ‘memoserv’ sounds fiendishly like “you’ve been served”
[00:26:01] Darmani: Lol no you're fine. I have other things to do as well.
[00:26:18] Darmani: Anyway I figured out how to use Github! I uploaded my project to my repository today :D
[00:26:24] Radar: Darmani: Good work :)
[00:26:38] Darmani: Radar: https://github.com/mfifth/Rails-Practice
[00:26:55] dalbuschat: has joined #RubyOnRails
[00:27:10] jottr: smathy: Thats what I figured. But what should I do then? The apps logs are full of above error. Could this be an issue with non digested assets?
[00:27:15] Darmani: Anyway my nested resource isn't working Q.Q I'm confused with the controller..
[00:27:34] aloneintheworld: So I’m creating a partner for my User at the same time that I’m creating the User… so I’m doing p = @user.build_partner(….). That way I have p (partner) assigned to @user. But I also want to assign @user to the partner… the only way to do that is after saving @user ? because it doesnt work to do something like p.partner_id = @user
[00:27:42] smathy: jottr, read http://guides.rubyonrails.org/security.html for more information, this is more the sort of SO answer you should be heeding: http://stackoverflow.com/q/7560837/152786
[00:28:44] smathy: jottr, Rails only adds the auth token for you if you use it's helpers, ie. the remote: true options for forms/buttons/links/etc, if you're rolling your own non-GET ajax calls then you need to add the token yourself.
[00:29:03] bePolite: has joined #RubyOnRails
[00:29:09] jenrzzz: has joined #RubyOnRails
[00:29:32] smathy: jottr, this is another excellent post: http://stackoverflow.com/q/941594/152786
[00:29:47] stannard: has joined #RubyOnRails
[00:30:30] jottr: smathy: Yep. Read that one already. I'm not sure I understand what I should do though. That error did not exist before the move of the app to heroku. Strangely, logs are full of it now.
[00:31:26] smathy: jottr, too many possible variables to draw any conclusion from that, fact is you DO need to do something about it, read the security guide and those posts carefully. All the info is in there.
[00:32:12] sneakerhax: has joined #RubyOnRails
[00:32:24] jottr: smathy: Ok will try. Thx
[00:32:57] aloneintheworld: This explains it better. How do I assign @user as a partner of “p” ? https://gist.github.com/anonymous/57f3eefdba95054c9c8c
[00:33:33] aloneintheworld: I’m succesfully creating “p” as a partner of @user there, but not the other way around
[00:35:05] lessless: has joined #RubyOnRails
[00:36:54] quazimodo: i don't know if i'm losing the plot, but every time i click a bootstrap style nav tab and the view switches instantly to the next panel it feels somehow 'too fast', as though there ~should be an ajax delay
[00:36:58] aloneintheworld: p = @user seems to generate a loop
[00:37:07] aloneintheworld: I mean p.partner = @user
[00:38:34] Radar: Darmani: how isn't it wokring?
[00:38:38] jottr: smathy: Hm. Generally speaking, could bad caching settings be the reason for the error?
[00:38:41] pwnd_nsfw: has joined #RubyOnRails
[00:38:54] Radar: Darmani: and where isn't it working?
[00:39:05] smathy: jottr, yes, if you're caching a form.
[00:39:14] Darmani: Radar: It's working now... But yesterday I kept getting an error that the 'index' action for the comments controller wasn't working...
[00:39:21] jottr: smathy: ok
[00:39:42] johnflux: has joined #RubyOnRails
[00:40:04] Radar: Darmani: Ok. Let us know if you run into any other problems. Someone in the channel can help you.
[00:40:10] Radar: I'm pretty busy today
[00:40:20] Darmani: Radar: Roger that ^.^
[00:40:45] nerium: has joined #RubyOnRails
[00:41:17] chouhoul_: has joined #RubyOnRails
[00:41:42] Disavowed: has joined #RubyOnRails
[00:42:06] mwlang: what are you supposed to do in a Pundit scope’s resolve method when you want to deny access to some resource? I’m raising a Pundit::NotAuthorizedError, but this seems to not be playing well with when I’m checking to see if a user has permission to do something with a resource.
[00:42:33] kdough: has joined #RubyOnRails
[00:43:31] akshat: has joined #RubyOnRails
[00:45:17] bePolite: has joined #RubyOnRails
[00:45:17] bePolite: has joined #RubyOnRails
[00:49:53] Pazician: has joined #RubyOnRails
[00:50:00] mwlang: ah, nevermind, it was as simple as handling the exception on the generated application_policy’s show? method (which was calling scope in the first place).
[00:51:02] jottr: smathy: Hm, but disbaling verify_authenticity_token on :index or :show should be fine, right?
[00:53:55] Radar: aloneintheworld: !rule10
[00:53:55] helpa: aloneintheworld: Do not beg / plead with people to help you. This includes asking questions like "Any ideas?" after posting your original question.
[00:54:26] Radar: aloneintheworld: p.partner = user ?
[00:54:37] Radar: *shrug* hard to know without knowing the app
[00:55:23] aloneintheworld: that ends up with an insane amount of updates and a 500 Internal Server Error
[00:55:27] smathy: jottr, yes, assuming you're not changing any data in your GETs.
[00:55:52] aloneintheworld: My User class has_one :partner, class_name: 'User', foreign_key: :partner_id
[00:56:01] aloneintheworld: the controller is on https://gist.github.com/anonymous/57f3eefdba95054c9c8c
[00:56:49] sonofdirt: has joined #RubyOnRails
[00:57:51] Darmani: Radar: I feel like the next step with this app would be to have users and authentication along with the articles and comments that are in place.
[00:57:57] Radar: Darmani: Agree.
[00:58:03] Radar: Darmani: Did you read much of Rails 4 in Action yet?
[00:58:07] aloneintheworld: and I’m just trying to assign @user as a partner of “p”
[00:58:25] Radar: Darmani: Looks like you've covered basically the same things that are covered in Chapters 1-5... so you should start on Chapter 6 next :)
[00:58:33] Radar: Darmani: and Chapter 6 just so happens to be authentication :)
[00:58:36] Darmani: Radar: yeah I read the first three chapters. I haven't bought the book.
[00:58:47] Darmani: Let me ask you a serious question Radar.
[00:58:47] pwnd_nsfw: You should buy the book
[00:58:52] Darmani: Is it really worth my money?
[00:59:02] pwnd_nsfw: Why ask the author that question anyways
[00:59:13] Darmani: Oh that's right that's his book lmaoo
[00:59:22] Radar: Darmani: Well, you've got two options.
[00:59:24] Darmani: No wonder he wants me to buy it xP
[00:59:34] pwnd_nsfw: You should buy it because it's a great book
[00:59:37] mag42c: has joined #RubyOnRails
[00:59:38] Radar: Darmani: You can buy it right now, or you can check your email for a GitHub org invitation that I just sent you.
[00:59:39] pwnd_nsfw: mhartl's doesn't have shit on it
[00:59:53] Radar: pwnd_nsfw: I keep calling mhartl's the "trial version of a Rails book"
[00:59:57] Radar: true story
[01:00:07] Radar: it covers only what we cover in the first 7 chapters
[01:00:17] pwnd_nsfw: Darmani, come on, he has a kid on the way
[01:00:32] Darmani: Do you really Radar???
[01:00:33] Radar: Darmani: If you accept that invitation, then you can go here and generate the book: https://github.com/rubysherpas/rails_4_in_action
[01:00:36] Radar: Darmani: Yes I do.
[01:00:44] Radar: my wife is 18 weeks pregnant this coming Friday.
[01:00:56] Darmani: Congrats man ^.^
[01:00:57] sneakerhax: has joined #RubyOnRails
[01:01:09] Radar: Darmani: And after you read the book that you generate, you can decide if you want to pay me or not.
[01:01:37] Darmani: Radar: That's very generous.
[01:01:52] Radar: Darmani: That's who I am :)
[01:02:24] Darmani: Lol alright, so what chapter should I start on?
[01:03:13] Darmani: ACTION flips through the pages
[01:03:24] codernotz: has joined #RubyOnRails
[01:03:53] Darmani: I'm actually kind of excited :3
[01:03:58] Darmani: to read this I mean.
[01:04:18] Darmani: I need to eat something though otherwise I'm going to collapse. brb.
[01:06:19] bePolite: has joined #RubyOnRails
[01:06:49] arBmind: has joined #RubyOnRails
[01:07:23] yupiup: has joined #RubyOnRails
[01:07:30] johnflux_: has joined #RubyOnRails
[01:07:40] sevenseacat: has joined #RubyOnRails
[01:08:45] Disavowed: has joined #RubyOnRails
[01:09:59] halfamind1: has joined #RubyOnRails
[01:10:45] agoribaba: has joined #RubyOnRails
[01:14:32] ppnlo: has joined #RubyOnRails
[01:15:06] codernotz: has joined #RubyOnRails
[01:15:31] diegoaguilar: has joined #RubyOnRails
[01:16:05] axl_: has joined #RubyOnRails
[01:20:03] joshkovach: has joined #RubyOnRails
[01:20:47] edwinvdgraaf: has joined #RubyOnRails
[01:21:09] bronson: has joined #RubyOnRails
[01:22:00] zave: has joined #RubyOnRails
[01:22:19] bedouin_: has joined #RubyOnRails
[01:23:43] banister: has joined #RubyOnRails
[01:24:02] banister: has joined #RubyOnRails
[01:28:44] bedouin_: has joined #RubyOnRails
[01:32:51] codernot3: has joined #RubyOnRails
[01:34:03] _Tariq: has joined #RubyOnRails
[01:35:58] Dreamer3: has joined #RubyOnRails
[01:36:11] Dreamer3_: has joined #RubyOnRails
[01:37:44] chouhoulis: has joined #RubyOnRails
[01:39:05] Nuter: has joined #RubyOnRails
[01:40:50] codernotz: has joined #RubyOnRails
[01:43:55] _Tariq: has joined #RubyOnRails
[01:47:40] kdough1: has joined #RubyOnRails
[01:49:29] jstransky: I need to develop a helper function and need some output while I do it.
[01:49:44] jstransky: What’s the best approach? echo to the view or rails console?
[01:50:56] zave: has joined #RubyOnRails
[01:52:54] kdough: has joined #RubyOnRails
[01:54:43] siaW: has left #RubyOnRails: ()
[02:01:47] delgiudices: has joined #RubyOnRails
[02:01:56] djbkd: has joined #RubyOnRails
[02:02:41] axl_: has joined #RubyOnRails
[02:03:19] codernotz: has joined #RubyOnRails
[02:04:25] one_zero: has joined #RubyOnRails
[02:04:27] sevenseacat: either would work, don't think it really matters
[02:04:53] maxz: has joined #RubyOnRails
[02:05:03] jstransky: K, heh I don’t actually know how to send messages to the console
[02:05:19] jstransky: I’m writing a for loop and want to output info on each loop
[02:05:52] jstransky: So I don’t thing using debug from within a view is helpful because it won’t get a return until the loop finishes
[02:06:17] sevenseacat: I hope you're not writing a for loop personally
[02:06:25] sevenseacat: but using Rails.logger will log to the console
[02:07:06] jstransky: not sure what you mean by that
[02:07:15] jstransky: what’s wrong with a for…loop?
[02:07:39] zave: has joined #RubyOnRails
[02:07:41] codernotz: has joined #RubyOnRails
[02:07:47] sevenseacat: you certainly would be better benefited by some other type of loop
[02:09:47] uglybandersnatch: has joined #RubyOnRails
[02:10:17] jstransky: oh yah. will do. Right now just want to get logging working.
[02:10:30] jstransky: felt I should explain what kind of logging
[02:12:39] codernot1: has joined #RubyOnRails
[02:13:05] Arcaire: >NOTE: Normal readers of this book file issues at railsbook/r4ia. If you are reading this, you are not a normal reader.
[02:13:08] Arcaire: >you are not a normal reader
[02:13:12] jstransky: So just use ‘Rails.logger(‘some message’)’ within my helper function?
[02:13:15] jkahn: has joined #RubyOnRails
[02:13:19] Arcaire: jstransky: yeah
[02:13:44] Arcaire: mmm not quite, actually
[02:13:44] Arcaire: http://guides.rubyonrails.org/debugging_rails_applications.html
[02:13:56] Arcaire: but tbh just use puts
[02:13:58] Arcaire: that outputs to console
[02:14:30] Arcaire: It's a ruby app.
[02:14:35] Arcaire: puts works just like it would in any ruby app.
[02:14:45] Arcaire: The fact it serves a web application is kind of secondary.
[02:14:47] sevenseacat: Arcaire: yes, you're a super special snowflake reader
[02:14:47] Arcaire: It's still a ruby app.
[02:15:47] jstransky: hmm, I’m running rails console, but not seeing anything output
[02:16:06] jstransky: I just added a method in application_helper.rb
[02:16:25] jstransky: and have this line in my view partial <% get_active_group() %>
[02:16:36] Arcaire: good grief
[02:16:53] Arcaire: Is your project on Github, jstransky ?
[02:17:01] helpa: You have not provided enough information to debug your problem. Please provide this information: https://gist.github.com/radar/5384431
[02:17:01] jstransky: private bitbucket
[02:17:02] Arcaire: Can you put it there?
[02:17:09] Arcaire: use GitLab, at least.
[02:17:16] Arcaire: Bitbucket is... consistently subpar.
[02:17:17] sevenseacat: whats wrong with b itbucket?
[02:17:23] Arcaire: Uptime and reliability, mostly.
[02:17:25] jstransky: Tried to get these guys to use gitlab, they’re fine with bitbucket
[02:17:35] sevenseacat: meh, I havent noticed a problem
[02:17:39] Arcaire: I'm sure they'll continue being fine next time the Git endpoints break and you can't push code.
[02:17:56] Arcaire: Anyway, well if that's the case I can't really help you beyond what I've suggested.
[02:17:59] jstransky: lol, especially with how fast gitlab can be set up
[02:18:00] Arcaire: I'm not going to debug like an Alakazam.
[02:18:14] Arcaire: GitLab can be a hosted solution too. For free. With unlimited private repos.
[02:18:26] Arcaire: I personally don't even see why people would use GitHub over GitLab other than the meme factor anymore, to be honest.
[02:19:05] sevenseacat: keeping everything in one place
[02:20:14] scepticulous: has joined #RubyOnRails
[02:20:22] sevenseacat: I don't want to have to keep track of 45 different gitlab accounts because everyone wants to run their own copy
[02:20:33] Arcaire: I don't run my own.
[02:21:08] Arcaire: http://imgur.com/RuQmYUn
[02:21:23] jstransky: Does this help at all or still not enough info? http://pastebin.com/aM2NMBvZ
[02:21:54] _Sypheren_: has joined #RubyOnRails
[02:21:55] sevenseacat: ah right, they've introduced a saas version since I last used it
[02:22:15] edwinvdgraaf: has joined #RubyOnRails
[02:22:15] Arcaire: At least two years ago, I believe.
[02:22:18] Arcaire: My account is old.
[02:22:28] Arcaire: jstransky: I can't see why that wouldn't work, at first glance.
[02:22:58] jstransky: ok thanks for looking Arcaire
[02:23:17] sevenseacat: yeah I last used it before that :) it didnt seem to offer anything that github doesnt, with extra painful overhead of hosting it yourself
[02:23:27] Arcaire: Yeah that was basically all it was back then.
[02:23:39] Arcaire: The unlimited private repos and nicer (imo) UI drew me in.
[02:23:48] Arcaire: I have to hunt for the forks or commits button every time on Github.
[02:23:53] Arcaire: Why doesn't jstransky's code work
[02:24:04] Arcaire: jstransky: Are you actually visiting that page when you run the app?
[02:24:10] Arcaire: `rails s`, then visit the page
[02:24:15] tycoon177: has joined #RubyOnRails
[02:24:30] Arcaire: I swear I've done that exact thing before and it has worked without issue.
[02:24:36] sevenseacat: it's not hard to have a nicer ui that github. if they don't rearrange it every week, that would be a plus too.
[02:24:43] Arcaire: but EMOJI BUTTONS
[02:25:17] sevenseacat: ACTION signs up for gitlab
[02:25:34] sevenseacat: I do wonder about the business model though
[02:25:38] Arcaire: You can even pick a non-violet color scheme if your favourite color isn't the same as mine.
[02:25:42] Arcaire: They make money off their enterprise version.
[02:25:48] Arcaire: They're confirmed profitable iirc. The CEO posts on HN.
[02:26:08] Arcaire: The SaaS version is running the enterprise version, so you get maximum features except like AD integration.
[02:26:29] Arcaire: Probably a good thing, because AD exposed over the public Internet is a terrible idea.
[02:26:40] Darmani: Radar: So I was reading chapter six and it seems great. I get what's going on. But I feel like I should go back to an earlier chapter because I haven't made the 'ticket' system the book keeps talking about.
[02:26:48] Arcaire: ACTION makes a note about AD for his honeypot project.
[02:27:03] jstransky: Didn’t work Arcaire. I’ll have to talk to team when they come in tomorrow.
[02:27:07] tycoon177: What is a good ruby gem that would allow me to make reports on a rails website? I've been looking at the dossier gem, but wanted some opinions from some other devs. This would be for work and we'd be redoing some ActiveX reports in it
[02:27:21] Arcaire: Reports about what?
[02:27:21] DragonPunch: What's the difference between :on and on:
[02:27:29] sevenseacat: > You can create up to 100,000 projects.
[02:27:31] Arcaire: DragonPunch: :on is a symbol, on: is a key
[02:27:32] smoitra: has joined #RubyOnRails
[02:27:36] sevenseacat: ermahgerd thats not unlimited j/k
[02:27:39] DragonPunch: Thank you arcarie
[02:27:57] Arcaire: sevenseacat: I think that's only because they needed some arbitrary limit due to the hosted version heh.
[02:28:03] sevenseacat: yeah the gitlab ui has changed immensely since last I looked
[02:28:05] Arcaire: I kind of want to hit that limit and ask for it to be raised.
[02:28:14] tycoon177: Arcaire, they're just different things for each one I think. It's like having to do with sales and goals and stuff. Dealing with money, percentages, etc
[02:28:41] Arcaire: sevenseacat: https://twitter.com/Arcaire/status/712466034222088195
[02:29:24] codernot2: has joined #RubyOnRails
[02:29:40] nettoweb: has joined #RubyOnRails
[02:30:05] Arcaire: tycoon177: I'd personally do it with LaTeX and a template
[02:30:09] Arcaire: but I'm certifiably a bad Rails developer
[02:30:19] Arcaire: https://github.com/baierjan/rails-latex
[02:30:40] ziyadb: has joined #RubyOnRails
[02:30:47] tycoon177: Arcaire, Hmm, is LaTeX easy to learn?
[02:30:51] DragonPunch: Can someone help me go through this route, would be much happy : )
[02:30:53] DragonPunch: http://hastebin.com/hewuhupofo.coffee
[02:31:06] Arcaire: tycoon177: It's easy to learn, quite difficult to master and do complex thing swith.
[02:31:15] codernotz: has joined #RubyOnRails
[02:31:20] Arcaire: Basic markup is approximately as difficult as HTML.
[02:31:36] DragonPunch: it creates a post action on guests#bulk_create
[02:31:47] DragonPunch: but what are ther get doing with the :on => :collection ??
[02:31:56] tycoon177: Hm, I'll mention it to my boss tomorrow
[02:33:07] Arcaire: DragonPunch: :on is just shorthand for a block with a single route
[02:33:35] DragonPunch: what about :collection
[02:33:48] Arcaire: :collection is the base route
[02:33:57] Arcaire: http://guides.rubyonrails.org/routing.html#adding-more-restful-actions
[02:34:05] scope: has joined #RubyOnRails
[02:34:28] Radar: Darmani: Hi.
[02:34:41] Darmani: Radar: Hey
[02:34:43] Radar: Darmani: You can clone the r4ia_examples project, then check out to this commit: https://github.com/rubysherpas/r4ia_examples/commit/0612922125b2fd92b6d3fa0f12ba4c9e9e0067a3
[02:34:51] Radar: Darmani: That commit is the last commit in Chapter 5.
[02:34:56] Radar: then you can follow the examples in Chapter 6.
[02:35:32] Darmani: Radar: Okay
[02:36:49] sarink: has joined #RubyOnRails
[02:37:14] patrick-sartent: has joined #RubyOnRails
[02:41:08] dmz: has joined #RubyOnRails
[02:41:32] patrick-sartent: has joined #RubyOnRails
[02:42:33] uglybandersnatch: has joined #RubyOnRails
[02:42:42] DragonPunch: when you map directly to an action
[02:42:47] DragonPunch: wher is the action stored?
[02:42:55] DragonPunch: get 'profile', to: :show
[02:43:03] Radar: who was action
[02:43:03] DragonPunch: where is the action :show supposed to be?
[02:43:11] Radar: DragonPunch: depends on the context of that.
[02:43:22] DragonPunch: Radar it's from the .. routes.rob
[02:43:28] DragonPunch: config/routes.rb file
[02:43:30] Radar: DragonPunch: Is that the only line in config/routes.rb?
[02:43:31] DragonPunch: I'm going through the tutorial
[02:43:36] Radar: DragonPunch: Which tutorial?
[02:43:43] DragonPunch: http://guides.rubyonrails.org/routing.html
[02:43:47] sevenseacat: *the* tutorial. keep up.
[02:44:13] Radar: DragonPunch: Gist entire routes file please
[02:44:30] DragonPunch: I didn't write anything >_> I'm just reading the tutorial and trying to understand it
[02:44:40] baweaver: has joined #RubyOnRails
[02:46:37] Radar: get 'profile', to: :show won't do anything by itself
[02:46:41] Radar: You will need to tell it what controller it's going to
[02:46:53] DragonPunch: why would the tutorial show such an example
[02:47:02] Radar: File a bug about it?
[02:47:10] DragonPunch: i will this weekend
[02:47:22] sevenseacat: its fixed in edgeguides. http://edgeguides.rubyonrails.org/routing.html#singular-resources
[02:48:03] DragonPunch: which one should i be going thorugh
[02:48:47] sevenseacat: the normal guides. just letting you know you don't have to file an issue.
[02:50:20] bob434: has joined #RubyOnRails
[02:50:35] zave: has joined #RubyOnRails
[02:50:45] TheNet: has joined #RubyOnRails
[02:52:07] HalcyonicStorm: has joined #RubyOnRails
[02:54:28] jkahn: has joined #RubyOnRails
[02:58:57] draig: has joined #RubyOnRails
[03:00:38] chagel: has joined #RubyOnRails
[03:00:41] Cervajz: has joined #RubyOnRails
[03:03:21] nettoweb: has joined #RubyOnRails
[03:03:25] Didac: has joined #RubyOnRails
[03:04:09] totimkopf: has joined #RubyOnRails
[03:04:54] Radar: oh nice! I didn't think to check there.
[03:05:50] scope: has joined #RubyOnRails
[03:06:45] chagel: has joined #RubyOnRails
[03:08:58] baweaver: has joined #RubyOnRails
[03:09:57] sarink: has joined #RubyOnRails
[03:10:43] statelesscode: has joined #RubyOnRails
[03:11:06] htmldrum_: has joined #RubyOnRails
[03:11:07] htmldrum: has joined #RubyOnRails
[03:11:25] Chagel_: has joined #RubyOnRails
[03:13:42] cd-rum: has joined #RubyOnRails
[03:14:52] scope_: has joined #RubyOnRails
[03:21:08] djbkd_: has joined #RubyOnRails
[03:23:07] bronson: has joined #RubyOnRails
[03:26:01] jhass: has joined #RubyOnRails
[03:26:36] GitGud: has joined #RubyOnRails
[03:29:38] zzach: has joined #RubyOnRails
[03:32:21] kirillzh: has joined #RubyOnRails
[03:33:30] kirillzh: has joined #RubyOnRails
[03:34:08] joshkovach: has joined #RubyOnRails
[03:34:46] kirillzh: has joined #RubyOnRails
[03:39:07] nertzy: has joined #RubyOnRails
[03:40:55] DLSteve: has joined #RubyOnRails
[03:42:06] nerium: has joined #RubyOnRails
[03:43:39] tycoon178: has joined #RubyOnRails
[03:44:50] IrishGringo: has joined #RubyOnRails
[03:48:19] duncannz: has joined #RubyOnRails
[03:48:30] scope: has joined #RubyOnRails
[03:48:44] moeabdol3: has joined #RubyOnRails
[03:49:33] hahuang61: has joined #RubyOnRails
[03:50:13] sonofdirt: has joined #RubyOnRails
[03:50:40] sleungcy: has joined #RubyOnRails
[03:52:48] bePolite: has joined #RubyOnRails
[03:52:50] chagel: has joined #RubyOnRails
[03:54:11] DragonPunch: whats the diff between :collection vs :on
[03:54:17] DragonPunch: :collection vs :member
[03:55:50] hashtd: has joined #RubyOnRails
[03:56:28] sevenseacat: http://guides.rubyonrails.org/routing.html#adding-more-restful-actions
[03:56:40] sevenseacat: compare the generated URLs
[03:58:17] rakm: has joined #RubyOnRails
[03:59:02] Inside: has joined #RubyOnRails
[03:59:02] Inside: has joined #RubyOnRails
[03:59:04] kirillzh: has joined #RubyOnRails
[03:59:12] TheNet: has joined #RubyOnRails
[03:59:51] rubyonrails757: has joined #RubyOnRails
[04:00:35] halfamind: has joined #RubyOnRails
[04:00:47] voidDotClass: how do i check if params[:avatar] is a file? doing params[:avatar].is_a?(File) seems to return false positives
[04:01:18] sevenseacat: why do you need to check this?
[04:02:22] voidDotClass: to validate that a user didn't send a text
[04:02:27] voidDotClass: and it was a valid file size
[04:02:46] krz: has joined #RubyOnRails
[04:02:54] voidDotClass: any ideas sevenseacat ?
[04:03:01] hashtd: has joined #RubyOnRails
[04:03:32] sevenseacat: sounds like model validations, not a controller conditional
[04:03:34] Regulati_: has joined #RubyOnRails
[04:06:26] halfamind: has joined #RubyOnRails
[04:07:12] voidDotClass: yeah fine, but how to check it in the model?
[04:08:21] chagel: has joined #RubyOnRails
[04:08:38] sevenseacat: how are you storing it in your model?
[04:14:20] braincrash: has joined #RubyOnRails
[04:17:03] sonofdirt: has joined #RubyOnRails
[04:22:19] yfeldblum: has joined #RubyOnRails
[04:24:20] treaki_: has joined #RubyOnRails
[04:25:13] dandaman: has joined #RubyOnRails
[04:26:21] dandaman: has joined #RubyOnRails
[04:31:54] stannard: has joined #RubyOnRails
[04:34:00] sysodaff: has joined #RubyOnRails
[04:34:01] tildes: has joined #RubyOnRails
[04:34:43] sonofdirt: has joined #RubyOnRails
[04:34:52] norc_: has joined #RubyOnRails
[04:36:39] voidDotClass: has joined #RubyOnRails
[04:38:18] merida: has joined #RubyOnRails
[04:39:12] sysodaff: has joined #RubyOnRails
[04:42:14] smoitra: has joined #RubyOnRails
[04:43:40] scope_: has joined #RubyOnRails
[04:45:04] sah_usmc: has joined #RubyOnRails
[04:46:56] krz: has joined #RubyOnRails
[04:49:01] petor: has joined #RubyOnRails
[04:49:32] mary5030: has joined #RubyOnRails
[04:50:29] kp666: has joined #RubyOnRails
[04:51:17] Pazician: has joined #RubyOnRails
[04:51:40] fedexo: has joined #RubyOnRails
[04:52:01] kp666: has joined #RubyOnRails
[04:52:56] DragonPunch: has joined #RubyOnRails
[04:53:35] kp666: has joined #RubyOnRails
[04:56:48] bob434: has joined #RubyOnRails
[04:56:54] Tref: has joined #RubyOnRails
[04:58:13] startupality: has joined #RubyOnRails
[05:01:06] wRaben: has joined #RubyOnRails
[05:01:07] DragonPunch: sevenseacat: i am comparing them, i dont get it thoguh
[05:01:37] sevenseacat: one has an ID in the URL because it belongs to a specific _member_ of a collection of objects. one does not.
[05:01:45] dandaman: has joined #RubyOnRails
[05:02:04] DragonPunch: didnt click after reading it..
[05:04:05] cataclysms: has joined #RubyOnRails
[05:04:11] wRaben: has left #RubyOnRails: ()
[05:05:05] DragonPunch: sevenseacat: whats the :on => :member => arrow function for?
[05:05:22] sevenseacat: its not an "arrow function", its a hash of options
[05:05:23] DragonPunch: in the tutorial the example just showed :on member
[05:05:29] Tref: hey guys is there an easier way to push events to a rails app from within itself or trigger a partial page update?
[05:05:38] Tref: something other than using eventmachine
[05:05:39] sevenseacat: it would have showed on: :member which is the same thing as :on => :member
[05:06:23] DragonPunch: sevenseacat ahh, gotchya
[05:07:28] privacyid01_: has joined #RubyOnRails
[05:07:30] dandaman: has joined #RubyOnRails
[05:08:16] privacyid01_: has joined #RubyOnRails
[05:08:48] dandaman1: has joined #RubyOnRails
[05:08:52] icemelt: has joined #RubyOnRails
[05:09:42] njero: has joined #RubyOnRails
[05:11:13] icemelt: hi anyone can help me? I'm trying to fill 2 field with one combobox, but I don't know how to do it
[05:12:33] sevenseacat: if by combobox you mean a select tag, thats just one field
[05:12:47] sevenseacat: anything else will require javascript
[05:13:04] DragonPunch: icemelt very easy to do it with jquery try #jQuery
[05:13:45] DragonPunch: sevenseacat, when you create a collection ... say one called "unverified" on the resources :visits
[05:13:58] DragonPunch: would it look like this: /visits/unverified ... /visits/new/unverified
[05:14:08] DragonPunch: or would it just be the, first one
[05:14:24] sevenseacat: /visits/new/unverified doesn't really make sense
[05:14:43] sevenseacat: it would also be very trivial for you to write the code in your app and check the generated routes
[05:14:58] scope: has joined #RubyOnRails
[05:15:16] icemelt: yeah I realise it the use of jquery is inevitable, thank you
[05:15:40] DragonPunch: i was thinking the same
[05:15:55] DragonPunch: sevenseacat sorry for the little annoying questions lol, im just trying to read through a bunch of code right now Q_Q
[05:16:19] Ropeney: icemelt, two database fields with one combo box, or two fields on the page?
[05:16:59] icemelt: Ropeney, multiple fields one combobox in one page /new_path
[05:17:15] Ropeney: still ambigious
[05:17:21] Radar: DragonPunch: !rule1
[05:17:21] helpa: DragonPunch: Do your research before hand. Your question may be answerable with a quick Google search or by simply experimenting. If you're using a method in Rails, look it up in the API Docs or in the Official Guides.
[05:17:38] startupality: has joined #RubyOnRails
[05:17:45] Radar: DragonPunch: Please try things before asking questions here. You will definitely learn things better that way.
[05:18:25] DragonPunch: i will do, just wanting to go over everything before i dig in
[05:18:53] icemelt: Ropeney, so I have multiple fields, and I want to just need to choose the combobox and the fields is autofilled
[05:19:38] Ropeney: autofilled on the page, or once its submitted, therefore saved into the database?
[05:20:03] icemelt: on the page for saved to the database, just like this http://stackoverflow.com/questions/32107900/rails-fill-in-two-form-fields-with-one-dropdown-option
[05:20:41] startupality: has joined #RubyOnRails
[05:21:04] Ropeney: I dont know if I just can't work out which one you want, but its like you just dont want to choose one of the two I offered :(
[05:22:40] Devalo: has joined #RubyOnRails
[05:22:49] diegoaguilar: has joined #RubyOnRails
[05:22:54] icemelt: thanks anyway Ropeney, I'm trying to create it with jquery
[05:23:09] Ropeney: okay, goodluck :D
[05:23:56] merida: has joined #RubyOnRails
[05:26:13] qejk: has joined #RubyOnRails
[05:27:32] Radar: DragonPunch: Dive in now! The water is warm :)
[05:28:09] DragonPunch: yeah i think i've got all the routes
[05:28:25] DragonPunch: just need to go through the action controller over view and the .. layouts + rendering
[05:29:10] sevenseacat: i dont think thats a good way to learn rails, by reading every one of the guides in order
[05:31:54] DragonPunch: it sure does seem like a start >_>
[05:32:12] sevenseacat: suit yourself
[05:32:23] DragonPunch: im fine : ) just new language
[05:32:42] bob434: has joined #RubyOnRails
[05:32:42] DragonPunch: thanks though :3
[05:32:44] sevenseacat: then start with the language, not the framework
[05:32:48] helpa: Learn Ruby by reading this book - http://manning.com/black3 - The Well-Grounded Rubyist by David A. Black
[05:33:00] DragonPunch: i would but time is an issue atm
[05:33:34] sarink: has joined #RubyOnRails
[05:36:50] sp1rs: has joined #RubyOnRails
[05:39:03] sleungcy: has joined #RubyOnRails
[05:41:01] sevenseacat: https://dgosxlrnzhofi.cloudfront.net/custom_page_images/64/page_images/Rails_Competencies.png note that routing is just one of the leaves in the blue Rails subtree
[05:41:45] tjbiddle: has joined #RubyOnRails
[05:42:56] tjbiddle: Hey all. When I post a JSON body to my controller, it's automatically copying my params into the `appointments` object. How can I stop this? https://gist.github.com/thomasbiddle/236141c30dd671694ef2
[05:43:07] tjbiddle: Not a huge deal - just an annoyance
[05:43:40] pwnd_nsfw`: has joined #RubyOnRails
[05:45:38] DragonPunch: is setting up websockets in a rails app difficult?
[05:51:07] Radar: tjbiddle: comment out code in config/initializers/wrap_parameters.rb
[05:51:47] tjbiddle: Radar: Neat. Thanks!
[05:52:46] arup_r: has joined #RubyOnRails
[05:53:01] Oog: has joined #RubyOnRails
[05:53:03] startupality: has joined #RubyOnRails
[05:53:55] srinidhi: has joined #RubyOnRails
[05:54:48] _Sypheren_: has joined #RubyOnRails
[05:55:58] dionysus69: has joined #RubyOnRails
[05:57:08] enitiz: has joined #RubyOnRails
[05:58:17] Radar: DragonPunch: You are trying to drink from the firehose. Please desist.
[05:58:32] edwinvdgraaf: has joined #RubyOnRails
[05:58:53] DragonPunch: ive set websocket servers up just fine before
[05:59:04] DragonPunch: in nodejs but idk bout rails
[05:59:08] Oog: http://fpaste.org/344028/71257514/ PG::UndefinedColumn: ERROR: column "distance" does not exist the ORDER BY works. it is the where that can't find the distance column :( ideas?
[05:59:51] sevenseacat: because there isnt a distance column
[06:00:34] tildes: has joined #RubyOnRails
[06:01:15] Oog: but i did the AS distance and it can order by it...?
[06:01:58] sevenseacat: you may have to clarify what exactly the problem is, then
[06:03:19] Oog: this query http://fpaste.org/344028/71257514/ gives error whiel this query works http://fpaste.org/344030/14587129/
[06:03:39] Oog: the error is ERROR: column "distance" does not exist it makes no sense...
[06:06:13] Ropeney: i dont think you can have the AS in a where clause
[06:06:17] Oog: its ugly but if ixed it http://fpaste.org/344031/58713171/
[06:06:23] Oog: just repeat it...
[06:06:27] Oog: guess itll do
[06:07:43] helpa: has joined #RubyOnRails
[06:12:30] Ropeney: Oog: You could do something like `SELECT full_name FROM (SELECT (first_name || last_name) as full_name, * FROM people) as foo WHERE full_name = 'cranksky' GROUP BY full_name;`
[06:12:54] Ropeney: so you don't repeat the business logic
[06:14:30] scope: has joined #RubyOnRails
[06:15:27] Ropeney: oh he left :(
[06:15:50] a11: has joined #RubyOnRails
[06:16:22] sevenseacat: you sound surprised by this
[06:16:38] Ropeney: I didn't notice
[06:17:16] a11: when i run rake db:seed, where does the data go/end up?
[06:17:22] sevenseacat: they come, they leech help, they leave.
[06:17:35] sevenseacat: a11: typically in your database, that's what you're seeding
[06:17:39] tdlm: has joined #RubyOnRails
[06:17:51] ur5us: has joined #RubyOnRails
[06:17:57] tdlm: has left #RubyOnRails: ()
[06:19:04] startupality: has joined #RubyOnRails
[06:19:26] sarink: has joined #RubyOnRails
[06:19:34] DragonPunch: should i read up on action controller overview first
[06:19:37] DragonPunch: or layouts and rendering
[06:22:18] jfelchner: has joined #RubyOnRails
[06:23:11] sonofdirt: has joined #RubyOnRails
[06:24:22] a11: i want to use this jquery autocomplete widget, but I can't figure out what to put in source:
[06:24:27] a11: https://gist.github.com/nfxgosu/6184aa98632c910c66ed
[06:25:10] a11: documentation said it can only be a string, array or a function
[06:25:16] bronson: has joined #RubyOnRails
[06:25:36] sevenseacat: an array of names to autocomplete, I assume
[06:26:30] a11: how can i use the data created by rake db:seed?
[06:28:30] rewmi: has joined #RubyOnRails
[06:28:53] sevenseacat: either by printing out all of the names in your view there, or setting the source to be a function that loads all the names via ajax, or equivalent
[06:31:34] kp666: has joined #RubyOnRails
[06:32:23] gabr13l: has joined #RubyOnRails
[06:33:04] sleungcy: has joined #RubyOnRails
[06:33:49] ascarter: has joined #RubyOnRails
[06:34:41] arup_r: has joined #RubyOnRails
[06:35:14] arup_r: i'm ready....
[06:36:10] ascarter: has joined #RubyOnRails
[06:37:03] startupality: has joined #RubyOnRails
[06:37:12] enitiz: has joined #RubyOnRails
[06:40:15] Disavowed: has joined #RubyOnRails
[06:43:25] Macaveli: has joined #RubyOnRails
[06:45:45] rewmi: question about rails-api: how one handle recieved kebab-case JSONAPI attributes? should i .deep_symbolize_keys! manually?
[06:46:39] kies: has joined #RubyOnRails
[06:52:54] scope: has joined #RubyOnRails
[06:52:56] Pazician: has joined #RubyOnRails
[06:55:03] griffindy: has joined #RubyOnRails
[06:56:06] djbkd: has joined #RubyOnRails
[06:56:37] imuglyandimproud: has joined #RubyOnRails
[06:56:44] Caerus: has joined #RubyOnRails
[06:57:56] imuglyandimproud: hmm, hey all =] one question, what could cause a failed post (logic flowing to render :new) to edit the margin/padding for the resulting page?
[06:58:25] sarink: has joined #RubyOnRails
[06:58:47] sevenseacat: thats a css issue, so... nothing?
[06:59:02] _djbkd: has joined #RubyOnRails
[06:59:07] merida_: has joined #RubyOnRails
[06:59:25] arup_r: ACTION trying to get imuglyandimproud has frontend or backend issue. :p
[06:59:42] rakm: has joined #RubyOnRails
[07:00:01] imuglyandimproud: yep it's definitely CSS. I'm using susy-sass so I'll investigate. It seems to not like the div wrapper around my template >:|
[07:00:02] yfeldblum: has joined #RubyOnRails
[07:00:05] arup_r: rewmi: kebab-case is a technical term..?
[07:01:11] rewmi: arup_r, probably, as well as snake_case and CamelCase
[07:01:28] arup_r: oh I see.. new term to me
[07:02:45] ur5us: has joined #RubyOnRails
[07:05:07] Devalo: has joined #RubyOnRails
[07:06:48] mary5030_: has joined #RubyOnRails
[07:14:12] Pazician: has joined #RubyOnRails
[07:17:48] startupality: has joined #RubyOnRails
[07:24:08] bePolite: has joined #RubyOnRails
[07:24:52] Pazician: has joined #RubyOnRails
[07:27:16] sleungcy: has joined #RubyOnRails
[07:30:34] mja: has joined #RubyOnRails
[07:34:08] tetraktys: has joined #RubyOnRails
[07:36:11] merida: has joined #RubyOnRails
[07:37:05] Pazician: has joined #RubyOnRails
[07:38:15] stannard: has joined #RubyOnRails
[07:39:24] baweaver: has joined #RubyOnRails
[07:43:01] mark3: has joined #RubyOnRails
[07:44:02] comrad: has joined #RubyOnRails
[07:46:17] solars: question, I have this snippet which updates all items with the most recent generated_timestamp: https://gist.github.com/solars/09ee161ea095696a4148 I noticed that sometimes not all are updated but left with collected_timestamp nil. Does anyone know under what circumstances this can happen? I don't get it
[07:46:37] edwinvdgraaf: has joined #RubyOnRails
[07:47:29] sevenseacat: are you passing `nil` in as `timestamp`?
[07:48:06] artto: has joined #RubyOnRails
[07:49:23] solars: sevenseacat, no, the scenario is I have for example 500 items with the same generated timestamp, that should be updated - but only 498 are
[07:49:38] solars: which makes me wonder why those 498, and not all of them..
[07:49:48] sevenseacat: what do your logs say about it?
[07:50:08] sevenseacat: and somehow I don't think all those timestamps would be perfectly identical
[07:50:55] gingray: has joined #RubyOnRails
[07:51:24] sevenseacat: what type of field is generated_timestamp?
[07:52:44] solars: it's datetime
[07:52:46] solars: see this output:
[07:52:52] solars: https://gist.github.com/solars/2dd6cb849ade1548339b
[07:53:06] solars: this is if I group by generated_timestamp, collected_timestamp, channel_id
[07:53:25] solars: after that method was executed tonight
[07:53:46] solars: so timestamps should be the same, but some don't get updated..
[07:54:04] sevenseacat: so what do your logs say about it, what SQL is getting generated?
[07:54:38] solars: unfortunately I don't have sql logs enabled on the production servers, but let me quickly execute it locally
[07:55:06] startupality: has joined #RubyOnRails
[07:55:08] sevenseacat: mmm debugging in production
[07:55:27] solars: I'm not debugging, just looking at the results
[07:56:07] artto: has joined #RubyOnRails
[07:57:09] solars: this is the generated command:
[07:57:11] solars: SQL (55.6ms) UPDATE `channel_metadata` SET collected_timestamp = '2016-03-23 07:56:35.817282' WHERE `channel_metadata`.`channel_id` = 'Google' AND `channel_metadata`.`generated_timestamp` = '2016-03-22 16:29:00'
[08:00:44] Inside: has joined #RubyOnRails
[08:00:44] Inside: has joined #RubyOnRails
[08:01:37] Devalo: has joined #RubyOnRails
[08:01:57] jenrzzz: has joined #RubyOnRails
[08:02:20] Devalo: has joined #RubyOnRails
[08:06:59] tubbo: has joined #RubyOnRails
[08:07:11] scepticulous: has joined #RubyOnRails
[08:07:29] tetraktys: has joined #RubyOnRails
[08:09:58] liquid-silence: has joined #RubyOnRails
[08:09:58] liquid-silence: has joined #RubyOnRails
[08:11:41] jgpawletko: has joined #RubyOnRails
[08:12:00] DoubleMalt: has joined #RubyOnRails
[08:12:07] sonofdirt: has joined #RubyOnRails
[08:13:20] Ergo: has joined #RubyOnRails
[08:13:43] Pazician: has joined #RubyOnRails
[08:15:02] Palsson: has joined #RubyOnRails
[08:15:49] lilster: has joined #RubyOnRails
[08:16:23] Pazician: has joined #RubyOnRails
[08:17:00] Jasaka: has joined #RubyOnRails
[08:17:20] darutoko: has joined #RubyOnRails
[08:19:24] smoitra: has joined #RubyOnRails
[08:21:15] sleungcy: has joined #RubyOnRails
[08:21:40] qhp: has joined #RubyOnRails
[08:27:26] Irikos: has joined #RubyOnRails
[08:27:40] bronson: has joined #RubyOnRails
[08:32:23] matthias_: has joined #RubyOnRails
[08:33:51] diegoaguilar: has joined #RubyOnRails
[08:35:20] diegoaguilar: has joined #RubyOnRails
[08:35:39] startupality: has joined #RubyOnRails
[08:37:24] arup_r: has joined #RubyOnRails
[08:38:45] defsdoor: has joined #RubyOnRails
[08:38:46] aganov: has joined #RubyOnRails
[08:41:08] startupality: has joined #RubyOnRails
[08:41:50] Irikos: has joined #RubyOnRails
[08:44:26] pawnbox: has joined #RubyOnRails
[08:44:43] scope: has joined #RubyOnRails
[08:45:21] muhammadn: has joined #RubyOnRails
[08:47:24] startupality: has joined #RubyOnRails
[08:47:34] kriskhaira: has joined #RubyOnRails
[08:48:08] Dbugger: has joined #RubyOnRails
[08:48:11] Dbugger: hello everyone
[08:48:18] Dbugger: How is everyone today?
[08:48:59] Ropeney: has joined #RubyOnRails
[08:51:16] Pazician_: has joined #RubyOnRails
[08:51:28] Dbugger: I wanted to ask you guys something. Rubocop is complaining this line is too long, but Im not sure how to break it better in the function: http://hastebin.com/yetuduyoxu.ruby
[08:51:30] tvw: has joined #RubyOnRails
[08:51:54] Dbugger: Wait, wrong link
[08:52:11] ppnlo: has joined #RubyOnRails
[08:52:11] sevenseacat: that line is also pretty dang long.
[08:52:40] Dbugger: This: http://hastebin.com/coviyigefe.ruby
[08:52:44] marr: has joined #RubyOnRails
[08:52:57] Dbugger: Yeah, but that line does not even work :)
[08:53:55] sevenseacat: neither does the second one
[08:54:41] Dbugger: I meant "scope :search. -> (params) {", sorry
[08:55:51] startupality: has joined #RubyOnRails
[08:56:22] elsurudo: has joined #RubyOnRails
[08:57:17] elsurudo: Quick question: how can I specify (system-wide) the hostname that is used for generation of URLs via `*_url` helpers?
[08:57:47] elsurudo: For mailers, I have something like the following: `config.action_mailer.default_url_options = { host: ENV['hostname'] }`
[08:57:51] Devalo: has joined #RubyOnRails
[08:58:00] artto: has joined #RubyOnRails
[08:58:27] elsurudo: This s Rails 4.2, btw
[08:59:27] roshanavand1: has joined #RubyOnRails
[09:00:02] Spami: has joined #RubyOnRails
[09:01:25] jsrn: has joined #RubyOnRails
[09:01:56] eisi: has joined #RubyOnRails
[09:04:38] elsurudo: It looks like configuring the action_mailer is enough?
[09:04:56] blackmesa: has joined #RubyOnRails
[09:06:31] arathald: has joined #RubyOnRails
[09:06:53] Ergo: has joined #RubyOnRails
[09:07:09] ppnlo: has joined #RubyOnRails
[09:08:26] djbkd: has joined #RubyOnRails
[09:09:49] vasilakisFiL: has joined #RubyOnRails
[09:10:19] vasilakisFiL: is it possible to get this structure from url params somehow? {fields: [:id, user: [:name]]} ? whatever I do, I get 400
[09:11:23] mrbubbles: has joined #RubyOnRails
[09:11:56] mhoungbo: has joined #RubyOnRails
[09:13:24] blackmesa: has joined #RubyOnRails
[09:14:29] Pazician: has joined #RubyOnRails
[09:15:13] edwinvdgraaf: has joined #RubyOnRails
[09:15:25] Pazician: has joined #RubyOnRails
[09:15:34] sleungcy: has joined #RubyOnRails
[09:18:19] Devalo: has joined #RubyOnRails
[09:18:20] kdough: has joined #RubyOnRails
[09:24:11] Dbugger: is there a better way to write this, so that the lines arent so long? http://hastebin.com/evisudewiq.ruby
[09:24:18] AzaToth: has joined #RubyOnRails
[09:24:31] czerasz: has joined #RubyOnRails
[09:25:00] Hates_: dbugger: just add a line break before each .?
[09:25:24] Dbugger: that works? let me see..
[09:25:25] baweaver: has joined #RubyOnRails
[09:25:39] Hates_: dbugger: https://gist.github.com/Hates/1dc4b4fc43f1011cb961
[09:27:13] uglybandersnatch: has joined #RubyOnRails
[09:27:14] Dbugger: Hates_, you wrote "scope :search.". Why the final dot?
[09:27:27] Hates_: dbugger: ahhh accidental typo there :)
[09:27:33] Devalo: has joined #RubyOnRails
[09:29:23] mrbubbles: has joined #RubyOnRails
[09:29:53] tetraktys: has joined #RubyOnRails
[09:33:10] arup_r: has joined #RubyOnRails
[09:35:44] Dbugger: is there a way to apply a scope operation directly onto the variable? Something like +=, but for scopes?
[09:36:14] ferr: has joined #RubyOnRails
[09:36:52] sevenseacat: dbugger: thats what you've had in all your original code, with the dot
[09:37:07] sevenseacat: hence me pointing out that none of the code you've posted would work
[09:37:11] matthias_: has joined #RubyOnRails
[09:37:53] sevenseacat: maybe you'll start to accept that women can offer technical help too, not just guys... but what do I know
[09:38:06] Dbugger: wait... im lost...
[09:38:09] Hates_: sevenseacat: lol I assumed I accidentally put it there when making the gist
[09:38:14] Dbugger: first of all, you are a woman?
[09:38:41] sevenseacat: dbugger: I've lost track of the number of times I've asked you to not refer to everyone as guys
[09:38:49] sevenseacat: it's been at least half a dozen
[09:38:57] Dbugger: sevenseacat, I was just assuming you did it for politeness, not because you were a woman
[09:39:04] Hates_: *facepalm*
[09:39:19] sevenseacat: why does it make a difference *why* i said it?
[09:39:35] Dbugger: Well, I am just explaining why I did not know what you were a woman
[09:39:48] sevenseacat: what I am is irrelevant
[09:39:52] Dbugger: with that clear... why do you say that "i do not accept advice from women"?
[09:39:53] mikecmpbll: has joined #RubyOnRails
[09:39:59] sevenseacat: because you only ever ask guys for help
[09:40:05] sevenseacat: you only ever talk to guys in this channel
[09:40:19] sevenseacat: despite my repeatedly asking you to not refer to everyone as guys
[09:40:35] FooMunki: has joined #RubyOnRails
[09:40:37] Dbugger: I didnt call anyone "guy" today, did I?
[09:40:37] mikecmpbll: good morning
[09:40:59] sevenseacat: <dbugger> I wanted to ask you guys something.
[09:41:18] Dbugger: Ok, sorry. it slipped
[09:41:31] Dbugger: But please do not take it so seriously... it is just a habit. It is not meant that way.
[09:42:27] Dbugger: Besides, it is not my mother language, so such details also escape sometimes my day-to-day conversation
[09:42:39] Dbugger: and she left...
[09:42:53] Dbugger: morning mikecmpbll
[09:42:57] mikecmpbll: dbugger : it's a colloquialism shared by much of the english-speaking world, so that's understandable.
[09:43:06] mikecmpbll: rules are rules though eh.
[09:43:19] Dbugger: I know, but she seems to take it quite personally
[09:43:25] mikecmpbll: ACTION shrugs
[09:43:30] Dbugger: I never meant to offend, and Im pretty sure I have expressed that many times
[09:44:38] davee_: has joined #RubyOnRails
[09:45:35] dgncn: has joined #RubyOnRails
[09:46:19] Dbugger: Anyway, as I was saying... is there a way to apply a scope in a direct manner over the variable? Instead of "var = var.my_scope", something like var.my_scope! or similar?
[09:46:36] snowy: has joined #RubyOnRails
[09:46:51] mikecmpbll: scope as in, activerecord scope?
[09:46:59] snowy: has joined #RubyOnRails
[09:47:12] arup_r: dbugger: can you show real code.. not getting your intention ..
[09:47:48] Dbugger: well, I have this: @data = @data.owned_by user
[09:47:57] Dbugger: and I was wondering if there was a prettier syntax
[09:48:02] Dbugger: in a way, like you can turn
[09:48:53] FooMunki: has joined #RubyOnRails
[09:48:57] Dbugger: arup_r, yes, as in activerecord
[09:49:11] Dbugger: sorry, I forgot to mention that
[09:49:46] uglybandersnatch: has joined #RubyOnRails
[09:50:11] arup_r: hehe. I think what you have is much readable ..
[09:50:43] tbuehlmann: I guess the answer is no, there's always a clone returned
[09:50:51] arup_r: no syntactic sugar is available for that one as you are asking..
[09:51:03] Caerus: in a = a + 1 you're using 1 variable
[09:51:11] tbuehlmann: scopes, includes, joins, ... return a clone. when thinking of immutability, that's not that bad
[09:51:14] Dbugger: Well, it was just curiosity :) Thanks for the tip :)
[09:51:51] mikecmpbll: they should replace += with +!
[09:52:00] mikecmpbll: a +! 1 :D the destructive +
[09:52:36] sloggerkhan: has joined #RubyOnRails
[09:53:00] mikecmpbll: dbugger : you can surely create an owned_by! method yourself, though
[09:53:18] ql6wlld: has joined #RubyOnRails
[09:53:37] tbuehlmann: curious to see how you achieve that
[09:54:05] Dbugger: mikecmpbll, a method work on instances, but scopes work for table search... im not sure that would work
[09:54:26] mdw: has joined #RubyOnRails
[09:54:37] mikecmpbll: i must have misunderstood something then? def self.my_cool_scope!; where!(foo: 'bar'); end
[09:54:48] adaedra: There's no mutability either in `a += 1`
[09:55:11] Dbugger: I did not know that exists
[09:55:48] Dbugger: Cant find documentation about it
[09:56:00] andatche: has joined #RubyOnRails
[09:56:29] arBmind: has joined #RubyOnRails
[09:56:33] mikecmpbll: i think technically it's an implementation method, but i've always used it
[09:56:41] adaedra: mikecmpbll: I think dbugger is just looking for some sugar syntax which would allow to do something like `@data .= owned_by_user`, changing the value in @data by the result of the call without repeating @data.
[09:56:59] Dbugger: adaedra, that is exactly what I want
[09:57:08] adaedra: which, as said above, doesn't exist.
[09:57:10] mikecmpbll: adaedra : the no repetition wasn't specified as a constraint :p
[09:57:27] Dbugger: sorry if I explained myself incorrectly
[09:57:32] mikecmpbll: apology accepted.
[09:58:09] Dbugger: in any case, it is not that tragic, if the sugar is not there
[09:58:54] adaedra: Yeah, that's also something I sometimes miss.
[10:00:12] Dbugger: Another question about scopes. Is there a way to refactor this? http://hastebin.com/uqozazifer.ruby
[10:00:44] Dbugger: it is a simplification of a bigger scope I have, with many ifs
[10:00:53] adaedra: I see one but it's not really prettier.
[10:01:01] sonofdirt: has joined #RubyOnRails
[10:01:14] Dbugger: adaedra, can you show me? Maybe I learn something I did not know...
[10:01:45] tbuehlmann: is the if condition user input related?
[10:01:48] adaedra: No, in fact, it's shit.
[10:02:06] Dbugger: yes, tbuehlmann. it is the result of a search form with lots of filters
[10:02:26] Pazician_: has joined #RubyOnRails
[10:02:27] adaedra: simpleScope1.send(condition ? :simpleScope2 : :itself)
[10:02:28] tbuehlmann: so you're actually implementing a kind of clever search?
[10:02:33] adaedra: Don't do this
[10:02:43] Dbugger: let me put you the actual case
[10:03:07] n008f4g_: has joined #RubyOnRails
[10:04:04] pawnbox: has joined #RubyOnRails
[10:04:30] neanderslob_: has joined #RubyOnRails
[10:05:47] Dbugger: http://hastebin.com/jaxecihegi.ruby
[10:06:38] mikecmpbll: s = [common_chain]; s.older_than(...) if ...; s
[10:06:53] Dbugger: I dont follow..
[10:07:40] mikecmpbll: https://gist.github.com/mikecmpbll/970a6afc78119f8df83b
[10:07:52] mikecmpbll: i don't ever use scopes, but i presume that works?
[10:07:56] nerium: has joined #RubyOnRails
[10:08:19] Dbugger: I have no idea.. I will try
[10:09:31] tbuehlmann: that's probably easier than adding another layer of abstraction. if you get any more user input related filters, hit me again, I might have something for you
[10:09:43] sleungcy: has joined #RubyOnRails
[10:10:06] Dbugger: Sure, thanks for your help, guys and girls
[10:11:07] mikecmpbll: https://github.com/meritec/simple_searchable may be relevant. just a tiny gem i wrote for this kinda searching.
[10:11:14] c355E3B: has joined #RubyOnRails
[10:11:50] Dbugger: I will look into it afterwards, thanks
[10:14:00] srinidhi: has joined #RubyOnRails
[10:15:20] jenrzzz: has joined #RubyOnRails
[10:17:43] arathald: has joined #RubyOnRails
[10:29:30] bronson: has joined #RubyOnRails
[10:31:35] pawnbox: has joined #RubyOnRails
[10:36:23] artto: has joined #RubyOnRails
[10:40:39] Pazician: has joined #RubyOnRails
[10:42:24] GreatDanton: has joined #RubyOnRails
[10:44:44] arup_r: has joined #RubyOnRails
[10:46:34] bePolite: has joined #RubyOnRails
[10:47:21] merida: has joined #RubyOnRails
[10:50:50] gabr13l: has joined #RubyOnRails
[10:51:12] jgpawletko: has left #RubyOnRails: ()
[10:55:46] arBmind: has joined #RubyOnRails
[10:58:31] eisi: has joined #RubyOnRails
[10:59:10] AntiSpamMeta: has joined #RubyOnRails
[11:00:16] wethu: has joined #RubyOnRails
[11:03:04] jottr: has joined #RubyOnRails
[11:03:28] eisi: has joined #RubyOnRails
[11:03:43] sleungcy: has joined #RubyOnRails
[11:07:22] ziyadb: has joined #RubyOnRails
[11:07:43] mozzarella: has joined #RubyOnRails
[11:08:30] rahc: has joined #RubyOnRails
[11:08:36] rahc: I get an error in my rails application:
[11:08:40] rahc: /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/connection_specification.rb:190:in `rescue in spec': Specified 'mysql2' for database adapter, but the gem is not loaded. Add `gem 'mysql2'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord). (Gem::LoadError)
[11:08:45] rahc: however, `gem 'mysql2'` is in my Gemfile
[11:09:12] mank: has joined #RubyOnRails
[11:09:32] MrDoctor: has joined #RubyOnRails
[11:15:36] htmldrum: has joined #RubyOnRails
[11:15:37] htmldrum_: has joined #RubyOnRails
[11:19:09] bePolite: has joined #RubyOnRails
[11:19:36] Hates_: rahc: have you tried just 'mysql' in your database.yml?
[11:20:02] Hates_: rahc: been a while since I used it so can't remember if you define it with or without the 2
[11:20:19] rahc: Hates_: why would I not define it with the 2?
[11:20:56] dionysus69: has joined #RubyOnRails
[11:21:30] workmad3: rahc: what happens if you open irb and do `require 'mysql2'`?
[11:21:36] Hates_: rahc: ah I just checked a project, you need the 2
[11:21:51] rahc: irb(main):001:0> require 'mysql2'
[11:22:31] workmad3: rahc: cool... so it's not a driver load error being masked by something else (which happens)
[11:22:49] workmad3: rahc: any chance you could gist your Gemfile and the complete stacktrace?
[11:23:07] Hates_: rahc: I suggested not putting the 2 as the gemfile name doesn't always match the adaptor in the database.yml
[11:23:52] rahc: Hates_: the adapator exists
[11:24:14] workmad3: rahc: also, what version of mysql2 do you have installed?
[11:24:29] rahc: $ gem list | grep mysql2
[11:24:29] rahc: mysql2 (0.3.16)
[11:24:38] nettoweb: has joined #RubyOnRails
[11:24:46] workmad3: rahc: hmm... and what version of rails are you using?
[11:25:24] rahc: ii ruby-rails 2:4.1.8-1+deb8u2 all MVC ruby based framework geared for web application development
[11:26:08] scope_: has joined #RubyOnRails
[11:26:16] workmad3: rahc: I have no idea what version that corresponds to... did you install rails via a deb package rather than rubygems? :/
[11:26:39] rahc: workmad3: yes
[11:26:48] rahc: 4.1.8 maybe?
[11:27:52] workmad3: rahc: possibly... but that could be part of your issue... packaged versions of gems frequently cause weird issues for development
[11:28:28] rahc: how can I solve those issues?
[11:28:40] workmad3: rahc: try using a rubygems installed version of rails inside your Gemfile?
[11:28:50] workmad3: rahc: and get rid of the deb package
[11:29:10] rahc: I'm working on creating a .deb package of a rails app
[11:29:45] ldnunes: has joined #RubyOnRails
[11:29:58] workmad3: rahc: I'd still suggest doing that... create a .deb containing all the gems you need, rather than using other .deb dependencies
[11:30:05] rahc: so I need to understand how I can resolve issues with packages gems
[11:30:30] rahc: I understand the suggestion
[11:30:40] workmad3: rahc: if you really want to use packaged gems, you probably need to talk to some people who maintain those packages
[11:31:01] rahc: however, the correct packaging is part of what I'm trying to get done
[11:32:21] workmad3: rahc: I don't think I've actually encountered anyone with a serious rails infrastructure that uses those packages btw... if a company is using .deb packages, they make them self-contained in my experience
[11:33:00] workmad3: rahc: so take 'correct packaging' with a pinch of salt :)
[11:33:51] rahc: workmad3: well, I think most companies do what's economical to them rather than taking the time to create packages according to Debian policy
[11:33:56] DaniG2k: has joined #RubyOnRails
[11:34:18] rahc: workmad3: most companies don't contribute packages to Debian itself
[11:34:48] rahc: ours does
[11:34:58] castor: has joined #RubyOnRails
[11:35:19] workmad3: rahc: true... it doesn't help that Debian packages for ruby and rails related stuff tend to be difficult to impossible to work with though... there's a reason most of the community avoids packaged versions of ruby
[11:37:00] elsurudo: has joined #RubyOnRails
[11:37:26] workmad3: rahc: still, best of luck with figuring out your issues... I'd still suggest moving away from the packaged versions until you've got something working (and also until you know the versions involved :) )
[11:37:44] workmad3: rahc: because at least then you can work backwards to the packages from a known working state
[11:39:34] rahc: is there any way to get more information about why a require statement failed?
[11:43:56] bob434: has joined #RubyOnRails
[11:46:09] tetraktys: has joined #RubyOnRails
[11:48:54] _Tariq: has joined #RubyOnRails
[11:49:55] sonofdirt: has joined #RubyOnRails
[11:50:52] eisi: has joined #RubyOnRails
[11:53:10] tetraktys: has joined #RubyOnRails
[11:56:10] rvanlieshout: has joined #RubyOnRails
[11:57:44] sleungcy: has joined #RubyOnRails
[11:59:54] ferr: Hey, any ideas how could I save images from url to paperclip? https://gist.github.com/Fercell/8732a103570a494a55ce I've followed their official documentation
[12:00:42] superrorc: has joined #RubyOnRails
[12:01:37] superrorc: Does Rails can act as a backend for Android or iOS app?
[12:02:09] ferr: superrorc: Yes, it can
[12:02:30] ferr: If you mean back end as API
[12:03:25] superrorc: i need not only read data, but send some requests to write in DB
[12:03:35] superrorc: API can provide this?
[12:04:20] DaniG2k_: has joined #RubyOnRails
[12:05:26] ferr: superrorc: Yes
[12:05:28] jcm: hi, I encouter a strange behaviour on my staging server: invoking cli rails leads always to the help message. console is never launched. rbenv, rails 4.2.6, rubygems 2.2.3, ruby 2.1.6-p336 (x86_64-linux)
[12:05:50] ferr: superrorc: You may give it a try on this reading: http://edgeguides.rubyonrails.org/api_app.html
[12:06:24] mdw: has joined #RubyOnRails
[12:07:09] superrorc: Thanks a lot!
[12:07:13] rodfersou: has joined #RubyOnRails
[12:07:25] elsurudo: has joined #RubyOnRails
[12:08:51] _Tariq: has joined #RubyOnRails
[12:09:36] trinaldi: has joined #RubyOnRails
[12:11:25] gbgdev: has joined #RubyOnRails
[12:12:47] guest56: has joined #RubyOnRails
[12:13:35] relix: Hey guys, I was wondering if the expiration time set in a signed cookie is verified as well, on the backend
[12:13:43] relix: or if its just passed along to the browser
[12:14:01] relix: checking out the code, it seems the expiration date is not checked again during verification, but I might be missing something
[12:14:16] beauby: has joined #RubyOnRails
[12:14:21] n008f4g_: has joined #RubyOnRails
[12:14:24] elsurudo: has joined #RubyOnRails
[12:14:49] phon: has joined #RubyOnRails
[12:16:11] bePolite: has joined #RubyOnRails
[12:16:16] Tref: has joined #RubyOnRails
[12:16:23] quazimodo: has joined #RubyOnRails
[12:18:05] Caerus: has left #RubyOnRails: ("zzZZzzz....")
[12:18:38] AntiSpamMeta: has joined #RubyOnRails
[12:19:12] j3r0: has joined #RubyOnRails
[12:19:13] Coldblackice_: has joined #RubyOnRails
[12:21:49] eisi: has joined #RubyOnRails
[12:23:55] artto: has joined #RubyOnRails
[12:24:23] jottr: has joined #RubyOnRails
[12:26:31] krz: has joined #RubyOnRails
[12:27:38] Cornish_Pasty: has joined #RubyOnRails
[12:32:23] _Tariq: has joined #RubyOnRails
[12:32:33] bePolite: has joined #RubyOnRails
[12:32:33] bePolite: has joined #RubyOnRails
[12:33:04] bob434: has joined #RubyOnRails
[12:34:01] Devalo: has joined #RubyOnRails
[12:38:36] moeabdol4: has joined #RubyOnRails
[12:45:23] RegulationD: has joined #RubyOnRails
[12:45:49] AimlessRAven: has joined #RubyOnRails
[12:46:22] halfamind: has joined #RubyOnRails
[12:46:53] AimlessRAven: hi all, i have model order in this model i have has_many :order_items, now i wanna inject orders in my product model like this has_many :orders, class_name: 'Sellor::Order', through: :order_items
[12:47:10] AimlessRAven: but in the end i have ActiveRecord::HasManyThroughAssociationNotFoundError: Could not find the association :order_items in model Sellor::Product
[12:47:39] yellow5: has joined #RubyOnRails
[12:47:58] mank: has joined #RubyOnRails
[12:48:20] blackmesa: has joined #RubyOnRails
[12:48:45] drbayer: has joined #RubyOnRails
[12:50:35] tvw: has joined #RubyOnRails
[12:51:43] aegis3121: has joined #RubyOnRails
[12:52:02] sleungcy: has joined #RubyOnRails
[12:58:20] AimlessRAven: anyone knows ?
[12:59:46] universa1: AImlessRaven: because there is no order_items association in your Sellor::Product
[12:59:46] _Tariq: has joined #RubyOnRails
[13:00:09] universa1: and by any chance, do you mean Seller instead of Sellor? ;)
[13:05:07] joshkovach: has joined #RubyOnRails
[13:06:12] AimlessRAven: universa1: ok but order_items is association in order, not in product
[13:06:17] AimlessRAven: i wanna associate order in product
[13:06:20] AimlessRAven: to use @product.orders
[13:07:53] digneety: has joined #RubyOnRails
[13:08:08] scope: has joined #RubyOnRails
[13:08:32] universa1: AImlessRaven: !associations
[13:08:32] helpa: AImlessRaven: http://guides.rubyonrails.org/association_basics.html - Active Record Association Basics by Mike Gunderloy
[13:08:36] universa1: AImlessRaven: !code
[13:08:36] helpa: AImlessRaven: We cannot help you with your problem if you don't show us your code. Please put it on http://gist.github.com and give us the URL so we can see it.
[13:09:48] xardion_: has joined #RubyOnRails
[13:10:43] AimlessRAven: helpa: https://gist.github.com/anonymous/9f700703a6f2703253a4
[13:10:56] AimlessRAven: is this is a correct association to use @product.orders
[13:11:04] openstruct: has joined #RubyOnRails
[13:11:19] universa1: AImlessRaven: !gist-usage
[13:11:19] helpa: AImlessRaven: How to use Gist properly: https://github.com/radar/guides/blob/master/using-gist.markdown
[13:12:21] universa1: AImlessRaven: no, this is not correct. as the error says: it needs a order_items association! and not somewhere in your app, but in the SAME model where you want to define the through association.
[13:13:05] AimlessRAven: universa1: ok ill check now
[13:14:10] IrishGringo: has joined #RubyOnRails
[13:15:12] mank: has joined #RubyOnRails
[13:15:23] AimlessRAven: universa1: i make association in product and when i type @product.orders i see #<Sellor::Order::ActiveRecord_Associations_CollectionProxy:0x3fd6a2f19c2c>
[13:15:30] AimlessRAven: but not me orders where product exist
[13:19:52] jottr: I am having issues with our rails app not displaying all assets uploaded via carrierwave. Carrierwave, S3, Cloudflare and _some_ assets uploaded to S3 don't show up, since the app returns the wrong url. I.e. it is not using the CDN url but the url of the app itself.
[13:20:01] jottr: Here's a gist with all relevant bits: https://git.io/vadga
[13:20:19] jottr: And here's the question with the urls: https://gist.github.com/jottr/b7c83f1c5e9265c3b146#file-question-md
[13:20:38] jottr: This line seems to be the culprit: https://gist.github.com/jottr/b7c83f1c5e9265c3b146#file-websites_controller-rb-L21
[13:20:43] DragonPunch: has joined #RubyOnRails
[13:20:52] jottr: Or at least spawning the issue.
[13:21:29] jottr: If someone in here could have a look, that would be more than awesome. I've been pulling my hair out over this...
[13:24:04] fexilal: has joined #RubyOnRails
[13:24:08] Fernando-Basso: has joined #RubyOnRails
[13:25:51] Detch: has joined #RubyOnRails
[13:26:22] sevenseacat: has joined #RubyOnRails
[13:28:12] flashpoint9: has joined #RubyOnRails
[13:29:26] jottr: arup_r, Radar, matthewd, aepI hope I don't violate any customs by directly pinging you guys?
[13:29:53] akshat: has joined #RubyOnRails
[13:29:54] dandaman: has joined #RubyOnRails
[13:30:07] jottr: I really need help on some issues. We have a tv show tonight, with high user load expected and our app needs to be running flawlessly, and I'm swamped in bugs.
[13:30:42] jottr: Untested app nightmare, and after moving it to heroku, all sorts of bugs cropped up....
[13:31:45] bronson: has joined #RubyOnRails
[13:33:44] dici: has joined #RubyOnRails
[13:34:19] epochwolf: jottr: What's the output of Rails.env in the conole?
[13:34:43] epochwolf: And ENV['CDN_URL']
[13:36:55] sevenseacat: you might not get a response from some of them, given timezones
[13:38:15] mary5030: has joined #RubyOnRails
[13:38:35] epochwolf: And I'm here.
[13:38:50] sonofdirt: has joined #RubyOnRails
[13:39:04] workmad3: epochwolf: but you're not arup_r!
[13:39:23] sevenseacat: and thank #{deity} for that, one of him is enough.
[13:39:54] epochwolf: sevenseacat: hey, be nice.
[13:40:20] sevenseacat: i'm always nice!
[13:41:34] epochwolf: Anyway, I'm plenty qualified to help.
[13:41:57] arup_r: workmad3: I see a list of names there though.. why mentioned me only? ;) Anyway, I didn't notice this, bcoz my joins query not working suddenly... :( So, I am there.
[13:42:20] alho: has joined #RubyOnRails
[13:44:53] User458764: has joined #RubyOnRails
[13:46:01] sleungcy: has joined #RubyOnRails
[13:47:02] AimlessRAven: arup_r: if i have model order who have has_many order_items and model product who have has_many: orders, through: :order_items .. why i cant use @product.orders
[13:47:09] AimlessRAven: to see all orders where product exist
[13:47:12] matthias_: has joined #RubyOnRails
[13:47:27] jschoolcraft: has joined #RubyOnRails
[13:48:09] epochwolf: AImlessRaven: you need to have all of the associations set up correctly. Can you gist Order, OrderItem, and Product models?
[13:48:24] arup_r: AImlessRaven: As you just see, people here don't help you if you mentions others, so please don't mention anyones if you want quick helps while just asking a fresh question.. Learn the environment first
[13:48:35] arup_r: not all, but some..
[13:48:52] fmcgeough: has joined #RubyOnRails
[13:49:32] JakFrist: has joined #RubyOnRails
[13:50:10] B1n4r10: has joined #RubyOnRails
[13:50:13] AimlessRAven: https://gist.github.com/anonymous/febaaca5c529a8cc7a75
[13:50:16] AimlessRAven: thats it my 3 models
[13:50:49] Detch: has joined #RubyOnRails
[13:51:32] epochwolf: AImlessRaven: you're missing the associations between Product and OrderItem.
[13:51:57] Fernando-Basso: has joined #RubyOnRails
[13:52:14] epochwolf: Oh wait, you have another class called Variant inbetween those.
[13:52:33] epochwolf: So it's Product -> Variant -> OrderItem -> Order
[13:52:50] AimlessRAven: epochwolf: yea
[13:53:00] AimlessRAven: how to fix this
[13:53:36] epochwolf: AImlessRaven: first, you need to create assoications for all of those relationships.
[13:53:40] epochwolf: On both sides.
[13:53:44] monoprotic: has joined #RubyOnRails
[13:54:07] epochwolf: So Product -> Variant, Variant -> OrderItem, OrderItem -> Order
[13:54:24] AimlessRAven: (y) tnx ill try now
[13:54:34] epochwolf: Then you need to create two has_many :through on Product.
[13:54:48] epochwolf: Here's a good reference: http://stackoverflow.com/questions/2383479/ruby-on-rails-multiple-has-many-through-possible
[13:55:45] blackmesa: has joined #RubyOnRails
[13:56:59] AimlessRAven: epochwolf:epochwolf> So Product -> Variant, Variant -> OrderItem, OrderItem -> Order this models have association on both sides
[13:57:15] stannard: has joined #RubyOnRails
[13:57:33] AimlessRAven: no i need to create has_many :through on product vor variant and order_items ?
[13:58:14] kuroro: has joined #RubyOnRails
[13:58:16] epochwolf: AImlessRaven: I think you only need the two has_many :through on the Product class.
[13:58:24] aegis3121: has joined #RubyOnRails
[13:58:49] AimlessRAven: epochwolf: yea first for order_items
[13:59:02] epochwolf: through order_items
[13:59:26] AimlessRAven: epochwolf: thats it first
[13:59:55] epochwolf: 1. has_many :order_items, through: :variants
[14:00:09] epochwolf: 2. has_many :orders, through: :order_items
[14:02:50] AimlessRAven: epochwolf: (y) thanks man so much! now its work
[14:03:01] epochwolf: AImlessRaven: awesome. :)
[14:04:01] Fly80: has joined #RubyOnRails
[14:04:42] lessless: has joined #RubyOnRails
[14:04:55] flashpoi_: has joined #RubyOnRails
[14:08:12] beauby: has joined #RubyOnRails
[14:08:23] mank: has joined #RubyOnRails
[14:08:29] flashpoint9: has joined #RubyOnRails
[14:08:39] daveomcd_: has joined #RubyOnRails
[14:09:37] drbayer: has joined #RubyOnRails
[14:09:53] Quintasan_: has joined #RubyOnRails
[14:10:14] HalcyonicStorm: has joined #RubyOnRails
[14:10:19] darkmug: has joined #RubyOnRails
[14:10:46] RTG`: has joined #RubyOnRails
[14:11:22] borkdude: has joined #RubyOnRails
[14:11:51] kuroro: im having trouble converting condition inner joins into activerecord dsl. what's a proper way to write the SQL statement (i.e. INNER JOIN ... ON ) in activerecord
[14:12:08] kuroro: here's a file showing the models, desired output, and sql statement that needs converting - http://pastebin.com/raw/tWSmwKpY
[14:12:28] fluxsour1e: has joined #RubyOnRails
[14:12:37] adre: has joined #RubyOnRails
[14:13:36] jfelchner: has joined #RubyOnRails
[14:13:44] devn: has joined #RubyOnRails
[14:13:52] Ergo: has joined #RubyOnRails
[14:14:30] rickmasta: has joined #RubyOnRails
[14:14:53] denym_: has joined #RubyOnRails
[14:15:14] zmartAway: has joined #RubyOnRails
[14:15:26] jottr: has joined #RubyOnRails
[14:15:50] Sigma00: has joined #RubyOnRails
[14:15:57] Diabolik: has joined #RubyOnRails
[14:15:57] ql6wlld_: has joined #RubyOnRails
[14:16:03] treaki_: has joined #RubyOnRails
[14:16:11] tetraktys: has joined #RubyOnRails
[14:16:19] aegis3121: has joined #RubyOnRails
[14:16:27] jottr: epochwolf: Oh Rails.env gives me 'development'
[14:16:33] braincra-: has joined #RubyOnRails
[14:16:46] Seich: has joined #RubyOnRails
[14:16:53] AntiSpamMeta: has joined #RubyOnRails
[14:17:24] jottr: epochwolf: ENV['CDN_URL'] gives me => "//cdn.mein-grundeinkommen.de" which is correct
[14:17:44] MaienM: has joined #RubyOnRails
[14:18:13] levifig: has joined #RubyOnRails
[14:18:34] lipoqil: has joined #RubyOnRails
[14:18:35] eduardodeoh_: has joined #RubyOnRails
[14:18:35] dgncn_: has joined #RubyOnRails
[14:18:37] lipoqil: has joined #RubyOnRails
[14:18:53] Veejay: has joined #RubyOnRails
[14:19:04] Fly80: has left #RubyOnRails: ("Leaving")
[14:19:16] d0nn1e: has joined #RubyOnRails
[14:19:45] halfamind: has joined #RubyOnRails
[14:19:51] drbayer: has joined #RubyOnRails
[14:20:53] nettoweb: has joined #RubyOnRails
[14:21:56] jottr: epochwolf: Ok. in production I get User.find(235171).avatar.url
[14:21:58] jottr: => "//cdn.mein-grundeinkommen.de/uploads/user/avatar/235171/raute.png"y
[14:22:24] Majadon: has joined #RubyOnRails
[14:22:25] hive-mind: has joined #RubyOnRails
[14:22:41] IrishGringo: has joined #RubyOnRails
[14:22:42] jottr: Which is also correct. But that is not what is requested by the browser when requesting websites#show
[14:22:55] sonofdirt: has joined #RubyOnRails
[14:23:14] jottr: s/But that is not what is requested by the browser when requesting websites#show/But that is not what is returned to the browser when requesting websites#show
[14:23:14] gingray: has joined #RubyOnRails
[14:23:31] enitiz: has joined #RubyOnRails
[14:23:54] kp666: has joined #RubyOnRails
[14:24:14] Uber|Dragon: has joined #RubyOnRails
[14:24:36] Devalo: has joined #RubyOnRails
[14:25:22] jottr: I've made a github issue as well: https://github.com/carrierwaveuploader/carrierwave/issues/1903 with all the relevant info
[14:25:27] jottr: ^ epochwolf
[14:27:20] sevenseacat: jottr: I don't really see what the problem is. your console has shown the URL being generated correctly in production mode
[14:27:57] srinidhi: has joined #RubyOnRails
[14:27:59] epochwolf: This doesn't look like an issue with carrierwave.
[14:28:02] sevenseacat: you have not shown anything being generated incorrectly
[14:29:04] sevenseacat: though you've just said Rails.env is development, and you're only setting the CDN url for production
[14:29:15] sevenseacat: config.asset_host = ENV['CDN_URL'] if Rails.env.production? # blerp
[14:29:49] epochwolf: Where is the incorrect url being rendered?
[14:30:07] jottr: Weird. Our logs are full of this error https://gist.github.com/jottr/b7c83f1c5e9265c3b146#file-error-log. this is what I see in rollbar https://imgur.com/i5SMcjC
[14:30:30] epochwolf: And the error message is due to you not having a show template when you call the default render action.
[14:30:33] sevenseacat: well thats a totally different URL again
[14:31:10] epochwolf: sevenseacat: the gist is out of date, jottr make changes and decided to post it as a carrierwave issue.
[14:31:17] gabr13l: has joined #RubyOnRails
[14:31:18] epochwolf: Instead of just updating the gist.
[14:31:47] sevenseacat: fix your Rails.env. problem solvered?
[14:31:49] epochwolf: There is 0 evidence in the issue that there is a problem with carrierwave.
[14:32:15] jottr: Ok closed it
[14:32:35] jottr: I was hoping to get some help there...
[14:32:50] jottr: Let me update the gist
[14:32:55] epochwolf: sevenseacat: he's already stated he's fixed the environment but he's getting a www subdomin instead of a cdn subdomain some other piece of code he hasn't shown.
[14:33:11] sevenseacat: where did he say that :/
[14:33:12] drbayer: has joined #RubyOnRails
[14:33:26] epochwolf: 10:21 < jottr> epochwolf: Ok. in production I get User.find(235171).avatar.url
[14:33:52] epochwolf: (It's now 10:33 for me)
[14:33:59] sevenseacat: yep, which is correct, no?
[14:34:05] jottr: https://gist.github.com/jottr/b7c83f1c5e9265c3b146#file-question-md
[14:34:08] epochwolf: The issue is in code he hasn't shown.
[14:34:19] sevenseacat: sooooooo fix whichever app was running in development and generating incorrect urls
[14:34:34] jottr: Well it is not running in development
[14:34:40] jottr: This was just in the rails console
[14:34:51] sevenseacat: [22:16:27] jottr: epochwolf: Oh Rails.env gives me 'development'
[14:34:53] jottr: This is in production on heroku
[14:35:16] epochwolf: jottr: what webpage is generating the www urls?
[14:35:27] epochwolf: We need to see the source of those pages.
[14:36:03] mary5030: has joined #RubyOnRails
[14:36:04] jottr: This is the repo in question: https://github.com/MeinGrundeinkommen/meingrundeinkommen/tree/develop
[14:36:30] epochwolf: jottr: Do you have a url for the app?
[14:36:31] StevenXL: has joined #RubyOnRails
[14:36:37] jottr: mein-grundeinkommen.de
[14:37:24] pawnbox: has joined #RubyOnRails
[14:37:27] StevenXL: Hey guys. I have a problem that is very odd to me. I am (trying) to remove active admin from my project but it removes activesupport as well.
[14:37:35] StevenXL: Just trying to understand why that would be the case.
[14:37:50] epochwolf: wow... this is a mess. Some things are being served by the cdn, some by s3, and some by your rails host.
[14:38:10] valetudo: has joined #RubyOnRails
[14:38:13] jottr: epochwolf: Yes, a total mess... the whole app that is
[14:38:24] sonofdirt: has joined #RubyOnRails
[14:38:34] valetudo: has joined #RubyOnRails
[14:38:39] epochwolf: stevenxl: rails includes activesupport, removing active admin wouldn't remove activesupport. Please gist the error message.
[14:39:13] StevenXL: epochwolf: I'm as surprised as you are!
[14:39:29] arup_r: has joined #RubyOnRails
[14:39:46] jottr: epochwolf: We need to serve all carrierwave uploads via the cdn. There should be no S3 in the mix. I guess the application.js has to be served by the app...
[14:39:59] sleungcy: has joined #RubyOnRails
[14:40:28] jottr: epochwolf: The problem is, we expect over 2M hits by tonight, and the app is so not ready for the load
[14:40:30] epochwolf: jottr: it doesn't have to be but that requires a change to your deployment process.
[14:40:52] epochwolf: jottr: you're fucked. I'll do my best to help in the time I have.
[14:41:04] jottr: epochwolf: Thx. Very much appreciated.
[14:41:04] mary5030: has joined #RubyOnRails
[14:41:09] bobbobbins: has joined #RubyOnRails
[14:41:29] jottr: epochwolf: How would you recommend I change the deployment process?
[14:42:18] kies: has joined #RubyOnRails
[14:44:29] bobbobbins: hey...not rails question per say, but I'm being asked to step up and be a team lead, and they want me to learn up on agile development. There are a ton of resources out there for that from what I can tell. Anyone here know where the best place to start is? Or if there is some kind of holy grail book/course that will get me up to speed the fastest?
[14:44:45] epochwolf: jottr: oh dear... this is an angular app.
[14:44:58] jottr: epochwolf: yes...
[14:45:07] jottr: ACTION headdesks
[14:45:40] epochwolf: jottr: https://github.com/MeinGrundeinkommen/meingrundeinkommen/blob/develop/app/assets/templates/home.html#L16 Here's your problem.
[14:45:48] epochwolf: You have hardcoded s3 urls.
[14:47:05] jottr: epochwolf: Ok thats. the S3 issue solved then. Still the problem with the avatar urls remains...
[14:47:17] jottr: I.e. those not being saved from cdn. but www.
[14:47:30] epochwolf: jottr: all of the avatars I'm seeing are served from the cdn.
[14:47:33] sevenseacat: jottr: you didn't even grep your code for the hardcoded URLs before coming here and throwing it at us?
[14:47:51] jottr: sevenseacat: No. Still learning.
[14:47:57] jottr: sevenseacat: No offence.
[14:48:13] jottr: Will do that next time
[14:48:20] sevenseacat: jottr: i recommend sitting down with whoever is teaching you.
[14:48:29] sevenseacat: they can explain this kind of stuff really simply.
[14:48:30] jottr: sevenseacat: That would be myself
[14:48:40] sevenseacat: jottr: thats really scary.
[14:48:58] jottr: sevenseacat: ah come on
[14:49:09] epochwolf: I'm actually with sevenseacat.
[14:49:36] roshanavand1: has joined #RubyOnRails
[14:49:40] epochwolf: A junior dev in charge of a high volume app that's going live tonight.
[14:50:16] snowy: has joined #RubyOnRails
[14:50:27] epochwolf: Who ever decided to do that is an absolute idiot.
[14:50:30] jottr: It is what it is. I can't really do anything except my best
[14:50:32] franzip: has joined #RubyOnRails
[14:50:42] epochwolf: jottr: not blaming you, you don't know better. :)
[14:51:16] epochwolf: Take a deep breath and just try to get things running.
[14:52:14] epochwolf: There's a good chance some critical piece is going to explode and take the site down. Heroku doesn't solve scaling problems despite what they advertise.
[14:52:39] epochwolf: That said, computers have gotten very powerful in the last 10 years. It might work.
[14:52:46] bricker: has joined #RubyOnRails
[14:53:27] adavia: has joined #RubyOnRails
[14:53:41] epochwolf: jottr: what time does this go live?
[14:53:58] pwnd_nsfw`: has left #RubyOnRails: ()
[14:54:14] pwnd_nsfw: has joined #RubyOnRails
[14:54:16] pwnd_nsfw: WHERE a.attrelid = '"service_provider_services"'::regclass
[14:54:19] pwnd_nsfw: that sql looks wrong...
[14:54:25] pwnd_nsfw: why is there extra quotes heh
[14:54:39] jottr: epochwolf: t-hours from now.
[14:54:45] jottr: t-7 hours
[14:55:10] epochwolf: 18:00 for me.
[14:55:35] epochwolf: Unfortunately, I'll be busy around that time. Best of luck.
[14:56:30] jottr: epochwolf: What timezone?
[14:57:12] kirillzh: has joined #RubyOnRails
[14:57:29] epochwolf: EDT/EST... I never know which. XD
[14:58:20] mank: has joined #RubyOnRails
[14:58:24] kirillzh: has joined #RubyOnRails
[14:58:57] jottr: Ok. Your 18:00 is how long from now
[14:59:18] ascarter: has joined #RubyOnRails
[14:59:40] mank: has joined #RubyOnRails
[14:59:51] epochwolf: It's 10:59 now.
[15:00:29] epochwolf: You said t-7 hours which I took to mean 7 hours from now. 11 + 7 = 18
[15:00:42] workmad3: has joined #RubyOnRails
[15:00:46] Sadin: has joined #RubyOnRails
[15:00:47] jottr: Yes. correct.
[15:01:35] dopie: has joined #RubyOnRails
[15:03:31] olivierlacan: has joined #RubyOnRails
[15:04:03] Ergo^: has joined #RubyOnRails
[15:04:28] jottr: So. I'm still seeing the issue of the app serving the wrong url, as descripbed in my gist: https://gist.github.com/jottr/b7c83f1c5e9265c3b146#file-question-md
[15:04:35] jottr: This is what it looks like in rollbar: https://imgur.com/VZGSvDW
[15:04:43] jottr: and https://imgur.com/jdLuqIJ
[15:04:54] Devalo: has joined #RubyOnRails
[15:05:10] jottr: ^ The screenshots are of the same screen, just scrolled horizontally to show the whole context
[15:06:34] griffindy: has joined #RubyOnRails
[15:07:20] jottr: epochwolf: ^
[15:08:39] smoitra: has joined #RubyOnRails
[15:08:59] artto: has joined #RubyOnRails
[15:09:03] epochwolf: jottr: where is it serving the wrong url?
[15:09:09] epochwolf: Which template?
[15:09:41] mank: has joined #RubyOnRails
[15:10:24] pawnbox: has joined #RubyOnRails
[15:12:06] jottr: epochwolf: Thats what I struggle with to find out. Looking at the logs it seems that its websites#show https://gist.github.com/jottr/b7c83f1c5e9265c3b146#file-websites_controller-rb-L5 which is rendered as the 'root' in routes.rb https://git.io/vaFeu
[15:13:08] epochwolf: jottr: that's jsut the stacktrace, what's the HTTP_REFERRER?
[15:13:12] emachnic: has joined #RubyOnRails
[15:13:58] epochwolf: jottr: do you have any previous experience building websites?
[15:14:05] jottr: epochwolf: yes some
[15:14:49] epochwolf: jottr: okay, the errors are for the request for that url. They don't show where the bad url came from. The only useful information in the error would be the url that started the required (The referrer)
[15:15:02] diegoaguilar: has joined #RubyOnRails
[15:15:24] epochwolf: Rails doesn't do any magic, it just responses to http requests.
[15:16:03] _Sypheren_: has joined #RubyOnRails
[15:16:59] jottr: epochwolf: Hm. So since this won't show in the logs, how can I find the request then? Could this be due to a bad cache at the CDN?
[15:17:39] epochwolf: jottr: can you get any more information on the error?
[15:18:04] epochwolf: You need the http referrer header to see where the bad urls are coming from.
[15:18:49] User458764: has joined #RubyOnRails
[15:20:13] djellemah: has joined #RubyOnRails
[15:20:41] jottr: epochwolf: https://imgur.com/15Z8lQC
[15:21:04] jottr: epochwolf: ah thats resized. hold on
[15:24:02] jottr: epochwolf: Sorry for the long link:
[15:24:04] jottr: https://s3-us-west-2.amazonaws.com/mge-test/public/screencapture-rollbar-com-jottr-mge-rails-items-1-occurrences-12267936019-1458746299428.png?X-Amz-Date=20160323T152341Z&X-Amz-Expires=300&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Signature=afd9a670ba42ab84e7e5a12ec592eb26e743d718e3e5cdbd982d4b02b0a185f9&X-Amz-Credential=ASIAIWNEVRTORAHRDAMQ/20160323/us-west-2/s3/aws4_request&X-Amz-SignedHeaders=Host&x-amz-
[15:24:38] epochwolf: Permission error.
[15:25:45] pawnbox: has joined #RubyOnRails
[15:25:56] jottr_: has joined #RubyOnRails
[15:26:11] arup_r: has joined #RubyOnRails
[15:26:28] smathy: has joined #RubyOnRails
[15:26:52] jottr: epochwolf: http://bit.ly/1q2exg2
[15:26:54] nettoweb: has joined #RubyOnRails
[15:27:37] merida: has joined #RubyOnRails
[15:28:11] jottr: epochwolf: No referer info
[15:28:17] RegulationD: has joined #RubyOnRails
[15:28:29] epochwolf: Yup. Good luck.
[15:28:49] epochwolf: I got nothing.
[15:28:56] jottr: epochwolf: Ah found one in one of the issues: https://www.mein-grundeinkommen.de/tandem?mitdir=16050
[15:29:21] disgrntld: has joined #RubyOnRails
[15:29:49] jottr: epochwolf: And the relevant GET request, which can't be right: GET https://www.mein-grundeinkommen.de/tandem/Tandem-Paar-{{portraits[$index].pic}}.jpg
[15:30:11] epochwolf: Well, that's a bug in your code.
[15:30:44] halfamind: has joined #RubyOnRails
[15:31:26] jottr: epochwolf: obviously. Most requests don't have a referer though. It seems they come from the google bot.
[15:31:36] epochwolf: yeah, I can't help you with that.
[15:31:41] renanoronfle: has joined #RubyOnRails
[15:31:42] ascarter: has joined #RubyOnRails
[15:32:17] epochwolf: Best advice I can offer is grep the source for hard coded links.
[15:32:25] jottr: epochwolf: ok.
[15:32:37] sevenseacat: i suggest hiring a consultant.
[15:32:58] epochwolf: sevenseacat: not an option when you're less than 7 hours from launch.
[15:32:59] cpruitt: has joined #RubyOnRails
[15:33:04] jottr: epochwolf: thx
[15:33:10] sevenseacat: it should have been considered and done well before this point.
[15:33:30] jottr: sevenseacat: Yes to all of that. But this does not remedy the current situation
[15:33:32] epochwolf: sevenseacat: Well, it wasn't.
[15:33:45] agit0: has joined #RubyOnRails
[15:34:40] jottr: I was informed of the launch two days in advance. This is an untested app, I just struggled to get to barely work on heroku.
[15:35:05] jottr: So, would've should've really does not help me atm.
[15:35:50] epochwolf: jottr: chill, I'll go chew sevenseacat out in private.
[15:39:14] n008f4g_: has joined #RubyOnRails
[15:39:38] shamanime: has joined #RubyOnRails
[15:42:04] sanjay: has joined #RubyOnRails
[15:42:13] banister: has joined #RubyOnRails
[15:43:20] axl_: has joined #RubyOnRails
[15:45:51] B1n4r10: has joined #RubyOnRails
[15:47:17] cmckni3: has joined #RubyOnRails
[15:47:48] sloggerkhan: has joined #RubyOnRails
[15:48:02] ascarter: has joined #RubyOnRails
[15:48:46] context: has joined #RubyOnRails
[15:49:47] epochwolf: $5 that context leaves after an hour.
[15:49:53] [Butch]: has joined #RubyOnRails
[15:50:48] context: i was shooting for under 15 minutes myself
[15:51:48] gambl0re: has joined #RubyOnRails
[15:51:48] gambl0re: has joined #RubyOnRails
[15:52:45] arup_r: has left #RubyOnRails: ()
[15:54:31] arup_r: has joined #RubyOnRails
[15:55:04] workmad3: has joined #RubyOnRails
[15:55:54] sonofdirt: has joined #RubyOnRails
[15:56:43] yellow5: has joined #RubyOnRails
[15:57:09] baweaver: has joined #RubyOnRails
[15:57:51] tjohnson: has joined #RubyOnRails
[15:58:11] SpikeSpiegel: has joined #RubyOnRails
[15:58:39] drbayer_: has joined #RubyOnRails
[16:02:03] dionysus69: has joined #RubyOnRails
[16:04:03] antgel: has joined #RubyOnRails
[16:06:32] mrgreenfur: has joined #RubyOnRails
[16:06:34] Devalo: has joined #RubyOnRails
[16:07:26] sarink: has joined #RubyOnRails
[16:08:26] pwnd_nsfw: 69 examples, 0 failures
[16:08:38] epochwolf: pwnd_nsfw: 6409 examples, 0 failures, 9 pending
[16:08:54] epochwolf: The 9 pending have been disabled so I can fix them later.
[16:08:59] pwnd_nsfw: I bet that takes a while to go through an entire suite
[16:09:32] pwnd_nsfw: STUB NOTHINGGGGGG
[16:09:40] epochwolf: MOCK EVERYTHING
[16:09:48] epochwolf: context: you funny lookin'
[16:10:50] kuroro: im trying to use an Arel join on activerecord joins method. however, "a = Arel::Table.new(:questions); b = Arel::Table.new(:answers); a.join(b)" gives me an instance of Arel::SelectManager. ActiveRecord#joins method requires an instance of Arel::Nodes::Join
[16:11:05] kuroro: how do i create a Arel::Nodes::Join instance from arel ?
[16:12:11] chouhoulis: has joined #RubyOnRails
[16:13:52] drbayer: has joined #RubyOnRails
[16:14:48] The_Phoenix: has joined #RubyOnRails
[16:14:49] antgel: has joined #RubyOnRails
[16:16:01] smathy: kuroro, join_sources
[16:17:49] kuroro: smathy: thanks! i was just about to try that. hopefully it works
[16:17:51] rakm: has joined #RubyOnRails
[16:18:20] chipotle: has joined #RubyOnRails
[16:19:13] drbayer: has joined #RubyOnRails
[16:19:39] kuroro: smathy: hmm. unfortunately, my arel join contains a where statement
[16:19:46] kuroro: and join_sources dont include it
[16:20:32] jottr: epochwolf: So the app has two more major problems. It is generating too many requests to the db, when opening the root url. The controller does way too much stuff it shouldn't https://git.io/vaFcp We were discussing if the caches_page :show is sufficient to relive pressure on the db. I think it is not, since I still see requests to the db. I'm wondering what would be a good and fast way to relive
[16:20:34] jottr: pressure from the db in this case. The content does not need to be updated during the peak time, so rendering some static info should be sufficient. So I guess my questions would be: Does caches_page :show suffice? If not, how should I approach this issue?
[16:21:21] kuroro: the sql is like "INNER JOIN answers on answers.question_id = 3 and answers.value > 500"
[16:21:43] smathy: kuroro, the unfortunate part is how you only mentioned part of your problem up front :(
[16:22:13] smathy: kuroro, !rule3
[16:22:13] helpa: kuroro: Clearly explain what is happening and create a Gist (http://gist.github.com), (formatted neatly please: http://bit.ly/1q75oia) of the code that is causing the problem you are encountering, as well as any useful output like stacktraces.
[16:22:15] kuroro: smathy: sorry, was trying to keep it simple
[16:22:33] sonofdirt: has joined #RubyOnRails
[16:22:55] smathy: kuroro, you *did* keep it simple, and you got a simple answer.
[16:23:12] kuroro: this is the actual problem - http://pastebin.com/raw/tWSmwKpY
[16:23:47] smathy: kuroro, you have a problem with rules? Or you just don't like reading?
[16:24:17] kuroro: oh, ok i'll use Gist instead of pastebin then
[16:24:26] chocoelho: has joined #RubyOnRails
[16:26:10] kuroro: ill write down my current code as well
[16:27:22] codepete: has joined #RubyOnRails
[16:30:02] kuroro: smathy - context with current code that's not working (https://gist.github.com/anonymous/ed7372bd0471a89e4fd0)
[16:30:56] Megamos: has joined #RubyOnRails
[16:31:22] epochwolf: jottr: I don't think caches_page exist in rails 4.
[16:31:36] zave: has joined #RubyOnRails
[16:31:45] epochwolf: If you're going to do that, just stick a file in the public folder.
[16:32:06] ascarter: has joined #RubyOnRails
[16:32:34] jottr: epochwolf: Good idea.
[16:34:20] sbarg: has joined #RubyOnRails
[16:34:30] bronson: has joined #RubyOnRails
[16:34:42] sbarg: has left #RubyOnRails: ()
[16:35:13] halfamind: has joined #RubyOnRails
[16:36:14] jottr: epochwolf: Hm. The project uses actionpack-page_caching
[16:36:17] emachnic: has joined #RubyOnRails
[16:36:20] jottr: The gem that is
[16:37:17] emachnic: has joined #RubyOnRails
[16:41:06] context: kuroro: just select * where user_id = whatever;
[16:41:07] powersurge: has joined #RubyOnRails
[16:41:20] context: or use a JSON field to store answers.
[16:42:14] powersurge: anyone know anything about the rails 5 release? I read there was supposed to be an RC on March 1st and a final on March 16th but I haven't seen much buzz after that
[16:42:54] tubbo: jottr: yeah that's the backport of page caching for those apps which didn't feel like upgrading. if you can use rack-cache and a redis/memcache data store to cache full pages, that's a much better alternative for a few reasons
[16:43:19] context: kuroro: otherwise... "not working" is too detailed of an error description to possibly be able to understand whats going on.
[16:43:35] tubbo: the biggest win is that rack-cache doesn't touch your rails app itself, so requests come back a little faster
[16:44:16] tubbo: some people think using a "real" web cache like Varnish is a better alternative to Rack::Cache because it's on a separate app server entirely. requests being served by a Varnish cache won't even be processed by Ruby. super fast :)
[16:44:53] SpikeSpiegel: has joined #RubyOnRails
[16:45:15] flashpoint9: has joined #RubyOnRails
[16:45:28] smathy: kuroro, nothing there requires any special Arel, read http://guides.rubyonrails.org/association_basics.html
[16:46:31] context: smathy: but playing with arel is fun
[16:46:40] epochwolf: tubbo: he's on heroku.
[16:46:50] tubbo: epochwolf: you're on heroku
[16:47:11] kuroro: i actually prefer avoiding arel. i wasnt able to figure out how to do in AR, so i did it that way. let me read that guide again
[16:47:11] epochwolf: tubbo: that explains why my rent is so damn high.
[16:47:28] banister: has joined #RubyOnRails
[16:48:33] smathy: kuroro, once you've read that, make a new gist with your models and the code you're using to try to do what you want.
[16:48:46] smathy: kuroro, !gist-usage please read this too before making that new gist.
[16:48:46] helpa: kuroro: How to use Gist properly: https://github.com/radar/guides/blob/master/using-gist.markdown
[16:49:45] kuroro: btw, i just realized i can actually pass it multiple conditions to the "on" method of arel. basically, replacing the where methods i had previously and just passing them on to the "on" method as multiple args
[16:49:55] kuroro: but i'll take a look at the AR as well as the gist guide
[16:50:12] shinnya: has joined #RubyOnRails
[16:52:49] robbyoconnor: has joined #RubyOnRails
[16:53:26] tvw: has joined #RubyOnRails
[16:54:26] silentpost: has joined #RubyOnRails
[16:55:30] sleungcy: has joined #RubyOnRails
[16:57:35] Devalo: has joined #RubyOnRails
[16:58:37] rubyonrailed: has joined #RubyOnRails
[17:00:31] speakingcode: has joined #RubyOnRails
[17:01:16] jottr: This might be a bit off-topic. As epochwolf recommended above, I would like to render our homepage statically. I.e. putting a pre-rendered html into public and serving that. But how can I generate the static html in the first place? I.e. requesting the page source returns sais source with angular code. What I need is the completely rendered content though
[17:01:25] jottr: Maybe someone has an idea?
[17:03:01] epochwolf: jottr: don't you have the website online right now?
[17:03:20] sleungcy: has joined #RubyOnRails
[17:03:38] yellow5: has joined #RubyOnRails
[17:03:39] epochwolf: Any reason you can't just use Chrome's development tools to watch the network requests and just copy and paste the contents of that one request into a static html file?
[17:03:41] merida: has joined #RubyOnRails
[17:03:43] jottr: epochwolf: Yes. But since it's angular running wget mein-grundeinkommen.de returns the site with the angular sprinkled through the html. Which would do the requests to the db
[17:04:14] tubbo: jottr: well if you're generating your html with angular, then rails can't help you with any sort of server-side caching, because you made the decision to render on the client-side.
[17:04:31] epochwolf: tubbo: yeah but they can cache a single api call.
[17:04:51] jottr: tubbo: Well yes. We just need to eliminate all client side code for today, to prepare for high user load
[17:05:05] jottr: Edit not all client side code, but the stuff on the hp
[17:05:07] tubbo: epochwolf: that api call still needs to be made, even if the information is cached. which is totally possible, yeah...but i'm just saying that's why jottr isn't seeing the fully evaluated html the way it looks in dev tools.
[17:05:08] jottr: epochwolf: what?
[17:05:35] tubbo: jottr: that's probably a good idea, those pesky clients are always ruining my websites ;) are you saying you want to get rid of the angular code or something?
[17:05:45] epochwolf: tubbo: use the network tab in chrome's dev tools. You can see the full content of each request.
[17:05:46] jottr: tubbo: yep
[17:05:49] B1n4r10: has joined #RubyOnRails
[17:06:01] dopie: smathy: king of tests... I have a question for you
[17:07:21] domgetter: has joined #RubyOnRails
[17:08:04] flashpoint9: has joined #RubyOnRails
[17:08:36] aegis3121: has joined #RubyOnRails
[17:08:49] Gkj8899: has joined #RubyOnRails
[17:08:55] User458764: has joined #RubyOnRails
[17:08:56] jottr: epochwolf, tubbo any ideas on how I CAN get the evaluated html? In dev tools I only see what I would see on an ordinary wget request as well... Or am I missing something here
[17:09:25] domgetter: How do I permit a parameter that just points to an array? I tried params.permit(resends: []), but the server output is complaining about Unpermitted parameters: utf8, authenticity_token, commit
[17:09:44] tubbo: jottr: i'm not sure, because the browser doesn't consider that html to be "the document", since it's being generated after the page has been served. the browser is just evaluating JS, it doesn't realize you're still generating web pages.
[17:11:00] epochwolf: jottr: I don't think that's even possible with an angular app.
[17:11:16] epochwolf: jottr: I thought you just wanted to cache one api call.
[17:12:36] bronson: has joined #RubyOnRails
[17:12:56] ivanskie: has joined #RubyOnRails
[17:12:57] domgetter: If I have params.permit(resends: [])[:resends], doesn't it only grab the array? Why is it passing utf8, auth_token, etc?
[17:13:08] jottr: epochwolf: What I did for now is this: https://gist.github.com/jottr/4c409c5c5fbe12219f8f#file-homepages_controller-rb-L19
[17:13:22] ivanskie: i feel dumb for asking.. but whats the right way of doing this? "<a href='<%= edit_workorder_path %>'>"
[17:13:34] jottr: Which is probably wrong....
[17:13:36] ivanskie: i need to wrap a block in a link tag. so can't really do link_to here..
[17:14:23] baweaver: has joined #RubyOnRails
[17:14:35] ivanskie: google anwered
[17:14:37] workmad3: ivanskie: just realised you can pass a block to link_to? :)
[17:15:10] pipework: fwiw, you can pass a block to all methods in ruby.
[17:15:59] jottr: epochwolf: The homepage_data.json holds the data for this single request. But there's a bunch of pages like this one https://www.mein-grundeinkommen.de/assets/community_home.html being loaded
[17:16:42] wldcordeiro: has joined #RubyOnRails
[17:18:49] cpruitt: pipework: Huh? You can pass blocks but not every method will actually do something with it.
[17:19:12] smathy: dopie, shoot.
[17:19:37] dopie: smathy: ok im formulating the question while working through vim crashing :\
[17:19:57] marr: has joined #RubyOnRails
[17:19:58] domgetter: How do you load actionpack in irb? I'm getting LoadError: cannot load such file -- actionpack after a require 'actionpack'
[17:20:07] smathy: dopie, you must be doing something terrible, vim never crashes ;)
[17:21:21] smathy: dopie, FWIW, the only time I've had vim crash was when I had it linked against another interpreter, like perl, ruby, python etc., and then I removed that other software.
[17:21:47] beauby: has joined #RubyOnRails
[17:21:52] slash_nick: Hey all. There's a remote meetup today, interviewing Rafael França (big time rails contributor, top all time actually): https://plus.google.com/events/c1pfgpg65lkav7dlq4cu0tf8rso ... everyone is welcome to attend :)
[17:22:38] tbuehlmann: slash_nick: thank you
[17:23:07] smathy: slash_nick, got a tweet?
[17:23:19] tetraktys: has joined #RubyOnRails
[17:23:20] slash_nick: https://twitter.com/remotemeetup/status/712406170284195840
[17:23:29] workmad3: smathy: I've had a couple of plugins crash vim after an update too
[17:23:40] workmad3: but I blame the plugin for that, not vim :)
[17:23:58] FooMunki: has joined #RubyOnRails
[17:24:03] tbuehlmann: slash_nick: that's in about 5.5 hours, right?
[17:24:19] smathy: workmad3, yeah, no software can be immune to you swapping out a dyn linked lib under its feet.
[17:24:34] smathy: slash_nick, are you the other side of the interview?
[17:25:05] codepete: has joined #RubyOnRails
[17:25:42] slash_nick: tbuehlmann: that's right
[17:26:17] slash_nick: smathy: not really... but i think the format allows anyone attending to be the other side of the interview
[17:26:22] dopie: has joined #RubyOnRails
[17:26:28] smathy: domgetter, why aren't you just running `rails console`?
[17:27:00] domgetter: smathy: because I just wanted to test something out in irb. Is it impossible to do?
[17:27:08] roshanavand1: has joined #RubyOnRails
[17:27:17] domgetter: can you run the rails console without a rails app?
[17:27:51] cpruitt: domgetter: Far as I know it’ll load a specific rails app at startup
[17:27:58] n008f4g_: has joined #RubyOnRails
[17:28:47] smathy: domgetter, no, the gem is called action_pack though, with the underscore.
[17:29:02] baweaver: has joined #RubyOnRails
[17:29:14] emachnic: has joined #RubyOnRails
[17:29:27] smathy: domgetter, just that there are a lot of dependencies, so this might be a long road - depending on what you're doing.
[17:29:53] dopie: smathy: https://gist.github.com/ce14231ee805dc2889b6
[17:30:20] dopie: do i put it example in there?
[17:30:30] dopie: and just do a get :index ?
[17:30:40] dopie: to check if @users is set?
[17:31:31] smathy: dopie, you're already doing a get :index
[17:31:49] cnk: has joined #RubyOnRails
[17:32:07] smathy: dopie, oh, I see what you mean, because you won't be using the implicit subject.
[17:32:11] smathy: dopie, just call response
[17:32:21] smathy: (or subject)
[17:32:43] tetraktys: has joined #RubyOnRails
[17:34:26] dopie: shouldnt i do somehting like assigns[:users].should == [nil] since i havent created any users yet?
[17:34:55] armyriad: has joined #RubyOnRails
[17:35:20] disgrntld1: has joined #RubyOnRails
[17:35:36] qejk: has joined #RubyOnRails
[17:35:48] pwnd_nsfw: dopie, assigns[:users]
[17:35:57] smathy: dopie, I wouldn't switch to should syntax.
[17:36:20] dopie: https://www.relishapp.com/rspec/rspec-rails/docs/controller-specs
[17:36:41] baweaver: has joined #RubyOnRails
[17:36:46] arup_r: has joined #RubyOnRails
[17:37:13] pwnd_nsfw: expect(assigns[:users]).to eql Users.all
[17:38:19] smathy: dopie, see my comment: https://gist.github.com/staycreativedesign/ce14231ee805dc2889b6#gistcomment-1732162
[17:39:09] smathy: dopie, I can't see your controller code, but FWIW, I doubt your @users will be nil.
[17:39:16] dopie: oh i know
[17:39:19] dopie: i havent set it up yet
[17:39:30] dopie: im just going through the motions red green refactor
[17:39:36] pwnd_nsfw: dat tdd dough
[17:39:48] dopie: pwnd_nsfw: ?
[17:40:12] djbkd: has joined #RubyOnRails
[17:40:20] Disavowed: has joined #RubyOnRails
[17:41:55] smathy: dopie, I also don't think you can test .eql with another AR Relation object (as pwnd_nsfw suggested).
[17:42:21] smathy: pwnd_nsfw can contradict me if he knows that works, maybe rspec's .eql is more magic than I think.
[17:42:37] cpruitt: Totally ambiguous question but… Other than additions like ActionCable I don’t know what kind of lower level changes have been made that’d cause older gems to give up the ghost. Anyone more informed than me have any opinion and have a sense of how problematic Rails 5 will be in terms of gems breaking? (Getting ready to type `rails new` & wondering if I should just bite the bullet now instead of upgrade later).
[17:42:50] pwnd_nsfw: ACTION shrugs
[17:42:56] pwnd_nsfw: Only one way to find out
[17:43:34] cnk: cpruitt: Go new and report back
[17:43:49] cpruitt: Sigh… yeah… lol
[17:43:55] smathy: cpruitt, only one way to find out.
[17:43:56] mwlang: has joined #RubyOnRails
[17:44:10] gambl0re: has joined #RubyOnRails
[17:44:11] cnk: The guys on BikeShed were talking about updating stuff - so most of the thoughtbot gems should be ready
[17:44:16] smathy: cpruitt, many gems may just have a hard coded requirement for Rails 4 - without actually breaking in Rails 5
[17:45:06] cpruitt: smathy: So your saying that even if the gem works fine, it’d have to be updated just in terms of dependencies?
[17:45:41] smathy: cpruitt, yep.
[17:45:48] rogue_koder: has joined #RubyOnRails
[17:45:55] baweaver: has joined #RubyOnRails
[17:46:07] smathy: (you'll get a problem during `bundle install` if that's the case)
[17:46:20] chocoelho: has left #RubyOnRails: ("WeeChat 1.4")
[17:46:24] JoshGlzBrk: has joined #RubyOnRails
[17:46:30] cpruitt: smathy: Yeah I follow.
[17:46:39] 14WAAJ0BT: has joined #RubyOnRails
[17:46:49] slash_nick: Just gotta bother the maintainers of the projects you use :)
[17:46:53] cpruitt: OK. That’s enough info. I was just curious if I’d get a “Nothing big changed. Everything seems to be fine” response. It’s a long term project. Not really something I want to take a chance on having trouble with.
[17:47:20] tuelz1: has joined #RubyOnRails
[17:47:34] slash_nick: cpruitt: i haven't upgraded any apps yet, but I am building a new feature/product using rails 5 in "api mode"
[17:47:45] smathy: cpruitt, gem dependencies are usually the biggest barrier to upgrading Rails.
[17:47:54] smathy: (whether actual or just in their gemspecs)
[17:48:35] workmad3: cpruitt: a big change is that `belongs_to` now includes an implicit `validates_presence_of` validation on the item... you can configure it to be gone by default, but it's somewhat of a surprise when starting a new project
[17:48:55] cpruitt: slash_nick: That’s kinda why I was looking at using 5 this go around. I don’t generally use too many additional gems, but we use stuff like delayed_job pretty regularly. Don’t want that kind of thing to be off the table.
[17:49:29] cpruitt: workmad3: Good to know. Mental bookmark
[17:50:03] slash_nick: cpruitt: all depends on your timeline... i think the only 3rd party gem i'm using is something for gelf/Graylog
[17:50:10] slash_nick: (and it works just fine)
[17:50:49] jkahn: has joined #RubyOnRails
[17:51:02] workmad3: cpruitt: if you're worried about gems though... hold off until final release... most big gems are probably working on compatibility already, but they tend to not drop a compatible release until rails does, so you'd be stuck on github-sourced gems until then
[17:51:22] cpruitt: slash_nick: Well, it’ll save some work down the road, but it’s probably worth at least trying to do a bundle install with the gems I suspect I’ll need.
[17:51:45] workmad3: cpruitt: unless you're fine double-checking for github branches with rails5 support for the first few weeks/months of the project :)
[17:52:14] Devalo: has joined #RubyOnRails
[17:52:15] slash_nick: ^ great suggestion
[17:52:18] dopie: pwnd_nsfw: https://gist.github.com/staycreativedesign/ce14231ee805dc2889b6
[17:52:20] cpruitt: workmad3: I’m more practical than that. I need to get my job done, not scour the internet every morning. ;-)
[17:52:48] tubbo: at the same time, if you want to help out reporting issues that come up stemming from the upgrade to said gems, you're more than welcome to give it a shot on 'master' or 'rails5' branches.
[17:52:50] workmad3: cpruitt: you're a developer... your entire job is 'scour the internet for solutions' right?
[17:53:10] Devalo: has joined #RubyOnRails
[17:54:13] cpruitt: workmad3: I wouldn’t say so. My job is to identify and either implement or create the best solution in the most stable, reliable, and cost effective way for my customer. Sometimes that means scour, sometimes it means wait until dust settles.
[17:54:58] workmad3: cpruitt: sorry, did the </troll> get lost in sending? :)
[17:55:27] cpruitt: workmad3: Sorry. Must have my content blocker enabled. ;-)
[17:56:01] cpruitt: Consider my previous reply retracted and replaced with a smile & nod. lol
[17:56:01] dopie: smathy: also im already creating a user ( the signed in user ) ...
[17:56:08] dopie: if you check the gist I updated with error
[17:56:23] sarink: has joined #RubyOnRails
[17:56:40] smathy: dopie, right, I already addressed object equality in my comments above.
[17:57:23] DoctorMonocular: has joined #RubyOnRails
[17:57:35] nettoweb: has joined #RubyOnRails
[17:57:57] mikecmpbll: has joined #RubyOnRails
[17:57:57] dopie: expect(assigns[:users]).to eq [jim]
[17:58:05] dopie: good ol jim
[17:58:52] smathy: dopie, do you understand objects? Do you realize that [].object_id != [].object_id ?
[17:58:58] duncannz: has joined #RubyOnRails
[17:59:25] baweaver: you're thinking of be
[17:59:31] smathy: dopie, anyway, I updated my comment in your gist for how I'd test that the @users is what you think it should be.
[17:59:48] yfeldblum: has joined #RubyOnRails
[18:00:01] duncannz: has joined #RubyOnRails
[18:00:27] workmad3: cpruitt: I was looking for an appropriate image link too... specifically this one :) http://d.gr-assets.com/books/1457364208l/29437996.jpg
[18:00:43] boontdustie: has joined #RubyOnRails
[18:00:51] cpruitt: workmad3: lol
[18:00:58] smathy: It's the new paradigm: SODD
[18:01:08] cpruitt: workmad3: are at least three people I need to send this to today.
[18:01:20] cpruitt: * “Thee are”
[18:01:27] cpruitt: UGH nevermind.
[18:01:35] smathy: Finger betrayal.
[18:01:44] cpruitt: Only on IRC...
[18:01:45] workmad3: maybe if you copy-pasted from SO instead, you'd get there? ;)
[18:02:01] dopie: smathy: what you said above... each object has a different id
[18:02:24] cpruitt: workmad3: I’ll try it next time. lol
[18:04:56] axl__: has joined #RubyOnRails
[18:05:48] yfeldblum: has joined #RubyOnRails
[18:06:32] jmignault: has joined #RubyOnRails
[18:07:45] jottr: Ok, I have one more question to all you rails masters in here:
[18:08:13] blackmesa: has joined #RubyOnRails
[18:08:19] context: ok, but only one more
[18:08:25] gousuto: has joined #RubyOnRails
[18:08:33] smathy: dopie, right, unless the object defines its own == or eql? then two objects aren't equal to each other unless they're actually the same object.
[18:08:39] cpruitt: so, if I have a ~/.railsrc and I just type `rails new` with no app name, rails creates the app as SkipTestUnit and dumps it into ./—skip-test-unit/ . Is that correct behavior?
[18:08:49] cpruitt: This is 5 beta by the way
[18:08:56] Synthead: has joined #RubyOnRails
[18:09:13] cpruitt: v4 warns about missing app_path
[18:10:04] emachnic: has joined #RubyOnRails
[18:11:08] flashpoint9: has joined #RubyOnRails
[18:11:11] baweaver: has joined #RubyOnRails
[18:11:20] davee_: has joined #RubyOnRails
[18:11:44] smathy: cpruitt, the handling/parsing of the command line for the rails executable is sloppy.
[18:12:51] cpruitt: smathy: Apparently. wasn’t sure if that was an intentional change or something introduced accidentally when the rails command took over a lot of the rake stuff.
[18:13:35] smathy: cpruitt, I'm sure mis-handling the command line parsing was not intentional :)
[18:14:26] cpruitt: smathy: lol Yeah yeah yeah… not exactly what I meant but I take your point.
[18:14:49] tubbo: cpruitt: haha doesn't seem like it
[18:15:04] jottr: So I am seeing ActionController::InvalidAuthenticityToken. Here's the trace: https://github.com/MeinGrundeinkommen/meingrundeinkommen/issues/93 This happens when a user tries to log in via POST https://www.mein-grundeinkommen.de/users/sign_in.json
[18:15:22] banister: has joined #RubyOnRails
[18:16:26] cpruitt: tubbo: My comment admittedly wasn’t phrased very well. I should have asked if there was some intentional change that was causing the strange behavior. :-)
[18:16:57] cpruitt: Either way, it’s obviously not working as it should
[18:18:49] jottr: Forget above question. It seems that this does not change the performance of the site. We'll postpone til another day.
[18:19:06] tubbo: jottr: check out http://stackoverflow.com/questions/1177863/how-do-i-ignore-the-authenticity-token-for-specific-actions-in-rails, also please google for your errors before asking in here. this is a very common error to be facing.
[18:19:18] maxz: has joined #RubyOnRails
[18:19:58] sneakerhax: has joined #RubyOnRails
[18:20:09] jottr: tubbo: I actually had that in my code. Which people in here strongly advised against. Also I witnessed mutex_lock issues after adding skip_before_action
[18:20:17] drbayer: has joined #RubyOnRails
[18:22:15] tubbo: jottr: that would have been useful to include in your initial question :) single-page apps work somewhat differently from regular old web requests. did you read the rails security guide on guides.rubyonrails.org?
[18:22:19] _Sypheren_: has joined #RubyOnRails
[18:23:11] tubbo: it tells you all about how CSRF protection works in rails. the TLDR is basically that rails generates a per-request "authenticity token" for forms, and requires that the token gets passed along with every form. this ensures that the form data is coming from the same server as it was generated by (your rails app), and not from some random person who figured out how to make a POST request to your site.
[18:23:32] tubbo: jottr: however, you're making a single-page app which effectively acts like a random person making HTTP requests to your site
[18:23:45] jstransky: has joined #RubyOnRails
[18:23:57] B1n4r10: has joined #RubyOnRails
[18:24:02] jottr: tubbo: That I understood, what I don't understand though is how to debug that issue.
[18:25:02] tubbo: jottr: i assume most people "solve" that issue by side-stepping it, they either make a choice to use rails' CSRF protection features or just turn them off and handle that kind of security themselves.
[18:25:30] valetudo: has joined #RubyOnRails
[18:25:47] tubbo: i have a feeling this isn't really a problem for single-page apps because it's essentially all "cross-site scripting". in a single-page app, ALL of your forms are generated by a computer that isn't the server...so the CSRF stuff is moot.
[18:25:55] valetudo: has joined #RubyOnRails
[18:26:08] tubbo: that said, i haven't made too many single-page apps and frankly haven't made any sophisticated ones with rails that required authentication. so YMMV.
[18:26:26] _Sypheren_: has joined #RubyOnRails
[18:26:31] smathy: Not a problem unless the you open your cross-domains to other sites.
[18:26:56] toydestroyer: has joined #RubyOnRails
[18:26:58] smathy: ...or maybe some browser bug or frame exploit or something.
[18:26:58] workmad3: tubbo: it's still a problem if the SPA uses a cookie-based session that's vulnerable to replays (which most session cookies are)
[18:27:15] smathy: It's such an easy problem to solve though, I don't know why people just disable it.
[18:27:23] tubbo: smathy: what the authenticity token thing?
[18:27:39] tubbo: smathy: mind telling jottr because i was just about to tell them to disable it :P
[18:27:56] smathy: tubbo, I already told him yesterday.
[18:28:07] smathy: tubbo, pointed him to things he had to read.
[18:28:22] jottr: smathy: Which I did
[18:29:12] jottr: Still not sure what to do. Either way. Since this seems to not give a significant performance hit, I'll actually have to postpone this issue to another day
[18:29:35] tubbo: jottr: you must not have read the stackoverflow because it tells you what you have to do.
[18:29:47] tubbo: jottr: it's the answer right underneath the checked one.
[18:30:02] smathy: jottr, http://stackoverflow.com/questions/7560837/proper-way-to-send-an-authenticity-token-with-ajax (which I gave you yesterday) explains a couple of approaches very clearly.
[18:30:19] tubbo: i'd use the header approach if i were you
[18:30:31] dionysus69: has joined #RubyOnRails
[18:30:32] tubbo: there's gotta be a way you can just add that header to every request like you can in an ember adapter.
[18:30:59] alho: has joined #RubyOnRails
[18:31:06] User458764: has joined #RubyOnRails
[18:33:07] emachnic: has joined #RubyOnRails
[18:33:14] ivanskie: has joined #RubyOnRails
[18:33:18] sp1rs: has joined #RubyOnRails
[18:33:59] Darmani_: has joined #RubyOnRails
[18:34:42] Darmani_: Hey guys, whenever I try to write an RSpec test I get the uninitialized constant error. I have the gem installed so I'm not sure what's going on. Any ideas?
[18:35:30] smathy: Darmani_, "the" suggests we're all aware of this, we're not.
[18:35:47] duderon__: has joined #RubyOnRails
[18:36:19] mikecmpbll: has joined #RubyOnRails
[18:36:26] jottr: tubbo: tubbo | jottr: it's the answer right underneath the checked one.
[18:36:45] jottr: ^ I can only see this link by you https://stackoverflow.com/questions/1177863/how-do-i-ignore-the-authenticity-token-for-specific-actions-in-rails
[18:36:52] epochwolf: smathy: or you allow ads on your site.
[18:37:02] sp1rs1: has joined #RubyOnRails
[18:37:04] DoctorMonocular: has joined #RubyOnRails
[18:37:06] jottr: which does not have a checked answer. Did you post something else which I might have overlooked?
[18:38:59] jenrzzz: has joined #RubyOnRails
[18:38:59] jenrzzz: has joined #RubyOnRails
[18:39:44] jkahn: has joined #RubyOnRails
[18:40:01] smathy: jottr, you've come back today asking precisely the same question as you asked yesterday, a question you received my help on, help that included several resources that explain in detail how to fix it. Today you don't ask a followup question, don't ask some specific detail of how to do such-and-such in angular, or show any progress from yesterday at all. Explain why someone would spend more time helping you today when in all likelihood you'll
[18:40:01] smathy: just ask precisely the same question tomorrow?
[18:40:23] tubbo: jottr: look at the link smathy posted.
[18:40:32] tubbo: jottr: that's the one i was referring to
[18:44:04] jottr: smathy: Yes. You're right, I should be more specific on my question. Actually right after asking said question, I said to just forget about it, because I'll have to postpone it to another day anyways.
[18:44:13] yellow5: has joined #RubyOnRails
[18:44:58] Uber|Dragon: has joined #RubyOnRails
[18:45:08] smathy: Let's (actually) drop it then.
[18:45:53] GreatDanton: has joined #RubyOnRails
[18:45:55] jottr: It must've gone overlooked. Anyways sorry for not rephrasing my question better. I will come back with it another day, when I have thought about it some ore.
[18:45:57] Diabolik: has joined #RubyOnRails
[18:45:59] Jasaka: has joined #RubyOnRails
[18:47:13] Spungey420: has joined #RubyOnRails
[18:47:16] smathy: As long as you don't come back with precisely the same question we'll be good.
[18:49:45] anirban: has joined #RubyOnRails
[18:49:55] c0defeed: has joined #RubyOnRails
[18:53:13] Darmani_: smathy: Uninitialized constant "Rspec"
[18:53:27] smathy_: has joined #RubyOnRails
[18:53:41] nertzy2: has joined #RubyOnRails
[18:53:42] rubyonra_: has joined #RubyOnRails
[18:53:47] diprotic: has joined #RubyOnRails
[18:54:03] mwlang_: has joined #RubyOnRails
[18:55:21] enkristoffer: has joined #RubyOnRails
[18:55:24] LBRapid: has joined #RubyOnRails
[18:55:31] targaf: has joined #RubyOnRails
[18:55:58] iamvery: has joined #RubyOnRails
[18:56:30] gremly: has joined #RubyOnRails
[18:56:48] hackeron: has joined #RubyOnRails
[18:57:21] markelite: has joined #RubyOnRails
[18:57:37] alho: has joined #RubyOnRails
[18:57:37] jlyndon: has joined #RubyOnRails
[18:57:44] eyck: has joined #RubyOnRails
[18:58:00] jhill: has joined #RubyOnRails
[18:58:12] gousuto: has joined #RubyOnRails
[18:58:15] jcp: has joined #RubyOnRails
[18:58:17] epochwolf: Darmani_: did you include the spec helper at the top of the file?
[18:58:23] akshat_: has joined #RubyOnRails
[18:58:43] manfrin: has joined #RubyOnRails
[18:59:11] gmci: has joined #RubyOnRails
[18:59:16] mostlybadfly: has joined #RubyOnRails
[18:59:17] tildes: has joined #RubyOnRails
[18:59:40] Darmani_: epochwolf: No, do I have to include that?
[19:00:23] duderonomy: has joined #RubyOnRails
[19:00:25] epochwolf: I'd read up on the docs for rspec. They are important.
[19:00:40] Darmani_: haha will do
[19:01:12] jfelchner_: has joined #RubyOnRails
[19:01:36] gabr13l: has joined #RubyOnRails
[19:04:41] cabinB: if I have turbolinks installed, does rails automatically use it, or are there special turbolinks code I need to enter? I'm a pretty advanced javascripter, and my preference is to do my own front-end js code when possible. so should I just remove it from the gemfile and uninstall?
[19:04:46] B1n4r10: has joined #RubyOnRails
[19:04:49] marr: has joined #RubyOnRails
[19:05:28] bronson: cabinB: yep, you need to actually use it to benefit from it.
[19:05:41] bronson: so, if you're not using it, go ahead and remove it.
[19:06:31] cabinB: thx @bronson. out of curiosity, what's a good overview of turbolinks, and examples of how to implement it, i'm interested in knowing more about it, just not now.
[19:07:20] smathy: cabinB, yes, Rails automatically uses it.
[19:07:57] bob434: has joined #RubyOnRails
[19:08:08] smathy: cabinB, it turns every link into a turbolinks enabled link, ie. that reloads just the <body> via ajax.
[19:08:31] [dmp]: has joined #RubyOnRails
[19:08:37] cabinB: smathy, so even without explicitly calling it, Rails will use it if installed, that's how I understand your reponse.
[19:09:08] smathy: cabinB, correct.
[19:09:31] emachnic: has joined #RubyOnRails
[19:10:08] epochwolf: cabinB: turbolinks is included in the default application.js file.
[19:10:08] smathy: cabinB, I mean bronson is literally correct, if you're not using it then remove it, but to use it all you need to do is have any standard <a href...> link on any page.
[19:10:56] smathy: Right, good point, I'm assuming you didn't *remove* it from your app/assets/javascripts/application.js
[19:11:10] cabinB: darn. i've been developing and testing this whole time with it installed. theoretically, if I uninstall it, it should not affect the function of my site, right? I haven't written any code that call it.
[19:11:23] sagarpatel: has joined #RubyOnRails
[19:11:39] epochwolf: cabinB: correct, it's relatively transparent.
[19:12:07] tjohnson_: has joined #RubyOnRails
[19:12:30] smathy: cabinB, well if you remove it then all links will do as any normal link does and make a full HTTP(S) request, reload the whole page, reparse all the JS, etc.
[19:12:31] cabinB: smathy & epochwolf, maybe my question should be whether I should use it or not. I'm planning on a lot of advanced jquery, self-written js, jquery ui, and bootstrap js. will any of these "trip" over turbolinks?
[19:12:40] Y_Ichiro_: has joined #RubyOnRails
[19:12:45] jcp_: has joined #RubyOnRails
[19:12:53] User458764: has joined #RubyOnRails
[19:13:05] cabinB: ok, so the answer would be to remove it.
[19:13:06] epochwolf: Just disable it unless you want to learn it and add the proper shims.
[19:13:14] smathy: cabinB, I love it, and it only affects regular links, so nothing to do with your own JS queries.
[19:13:17] dotty_: has joined #RubyOnRails
[19:13:22] dmcc_: has joined #RubyOnRails
[19:13:27] smathy: cabinB, all you need to know are the turbolinks events, page:load etc., read the README.
[19:13:28] epochwolf: smathy: it does affect how you wire up event listeners.
[19:13:40] jhill_: has joined #RubyOnRails
[19:13:53] cabinB: i'm interested in learning it, but just don't seem to have the time to introduce an unknown into a limited time schedule, and especially since there are a lot of other front-end code that will be running.
[19:13:55] smathy: C'mon, there's basically like 2 things to learn.
[19:13:56] epochwolf: And will cause problems with jquery ui if you don't include the proper code.
[19:14:14] Guest4184_______: has joined #RubyOnRails
[19:14:15] pfg__: has joined #RubyOnRails
[19:14:17] smathy: cabinB, the only real trick is that a <body> replacement doesn't trigger a document.ready event. I'm sure you know this already if you're a JS-whiz.
[19:14:19] shwoodard_: has joined #RubyOnRails
[19:14:27] epochwolf: It's not all that difficult to make everything work.
[19:14:35] smathy: Pfft, it's dead simple.
[19:14:35] BBHoss_: has joined #RubyOnRails
[19:14:47] epochwolf: You just need to be aware what's happening.
[19:14:58] cabinB: wait wait wait! so turbolinks only manipulates <body>?
[19:15:03] epochwolf: cabinB: yeah.
[19:15:24] cabinB: surely it interacts with other elements inside of <body>?
[19:15:32] baweaver: has joined #RubyOnRails
[19:15:34] smathy: cabinB, Even someone who *doesn't* have a good grounding in JS and events will be able to learn what they need to know in 10 minutes. Just read the turbolinks README.
[19:15:39] cabinB: (that was more of an astonished question, not a statement :-_
[19:15:41] smathy: cabinB, turbolinks-classic if you're still on Rails4.
[19:16:28] cabinB: smathy & epochwolf & bronson, thanks. I think I'll leave it in. If i run into any problems and don't feel like dealing, should be easy enough to uninstall it.
[19:16:31] smathy: cabinB, as I said, it attaches to the click of <a>s, and changes them into an ajax reload of <body> rather than the full HTTP request they are by default.
[19:16:32] cabinB: thx for the education.
[19:16:49] existensil_: has joined #RubyOnRails
[19:16:51] Spaceghost|work: has joined #RubyOnRails
[19:17:19] tubbo`: has joined #RubyOnRails
[19:17:22] arBmind1: has joined #RubyOnRails
[19:18:00] aaronseibert_: has joined #RubyOnRails
[19:18:13] chridal_: has joined #RubyOnRails
[19:18:56] ereslibre_laptop: has joined #RubyOnRails
[19:19:25] pwnd_nsfw`: has joined #RubyOnRails
[19:19:35] jottr: has joined #RubyOnRails
[19:19:48] epochwolf: cabinB: I think you can tell it to only replace a single div but by default it's deleting and replacing <body>
[19:19:48] cschneid-: has joined #RubyOnRails
[19:19:51] FooBarWidget_: has joined #RubyOnRails
[19:19:53] mhoungbo: has joined #RubyOnRails
[19:19:53] amitchellbullard: has joined #RubyOnRails
[19:20:00] amitchellbullard: has joined #RubyOnRails
[19:20:00] armyriad: has joined #RubyOnRails
[19:20:24] jbermudes: has joined #RubyOnRails
[19:20:24] jbermudes: has joined #RubyOnRails
[19:21:18] markelite: has joined #RubyOnRails
[19:21:23] Ergo^: has joined #RubyOnRails
[19:21:48] flashpoint9: has joined #RubyOnRails
[19:21:52] Y_Ichiro: has joined #RubyOnRails
[19:22:33] crdpink2: has joined #RubyOnRails
[19:22:41] Klumben: has joined #RubyOnRails
[19:23:19] Ikri: has joined #RubyOnRails
[19:23:29] srinidhi: has joined #RubyOnRails
[19:23:34] cabinB: thx epochwolf
[19:24:19] jhass: has joined #RubyOnRails
[19:24:33] n008f4g_: has joined #RubyOnRails
[19:24:43] Fridtjof: has joined #RubyOnRails
[19:25:06] elaptics`away: has joined #RubyOnRails
[19:25:45] arup_r: cabinB: o/
[19:26:01] cabinB: hey arup_r how's it going?
[19:26:35] baweaver: has joined #RubyOnRails
[19:27:04] _Sypheren_: has joined #RubyOnRails
[19:27:19] arup_r: smathy: I am using finally Newrelic .. they don't have money to give me a subscription plan to honeybadger :( .. I am using Newrelic free plan though..
[19:27:30] arup_r: cabinB: little good.. :)
[19:28:37] smathy: arup_r, ok, HB has a free plan too but as long as you have something.
[19:28:52] Ratler: has joined #RubyOnRails
[19:29:15] arup_r: ok, I didn't notice that. Let me look at it.
[19:31:01] smathy: It's hidden, you just start on a free trial and never add your CC details and they'll downgrade you to the free plan.
[19:31:26] smathy: The NR free plan might have more features, if it already does what you want just use it.
[19:31:26] avelldiroll: has joined #RubyOnRails
[19:31:59] Radar: jottr: I am not around at 12:30am.
[19:32:23] Radar: [00:29:26] <jottr> arup_r, Radar, matthewd, aepI hope I don't violate any customs by directly pinging you guys?
[19:32:24] maxx88: smathy: what is HB, is that another analytic package
[19:32:42] jottr: Radar: ah ok
[19:32:50] arup_r: maxx88: https://www.honeybadger.io/pages/features_1
[19:32:55] smathy: maxx88, more perf/error monitoring: https://www.honeybadger.io/
[19:33:14] Radar: jottr: typically it's better if you don't ping people who you don't know are around
[19:33:16] maxx88: oh cool, thanks!
[19:33:22] Radar: jottr: the channel always has other people around to help out
[19:33:30] jottr: Radar: ok. Will do
[19:33:52] smathy: jottr, you're talking to automated responses.
[19:34:13] arup_r: is it? :)
[19:35:19] Radar: what even is consciousness
[19:38:01] baweaver: has joined #RubyOnRails
[19:38:07] Devalo: has joined #RubyOnRails
[19:38:46] smathy: Evidently Radar wants to be awake in the middle of the night.
[19:38:53] Radar: Preferrably no.
[19:39:01] Radar: But since I have a baby on the way, I think it's unavoidable?
[19:39:05] muhammadn: has joined #RubyOnRails
[19:39:08] smathy: Then SHHH dude, I was covering for you.
[19:39:10] epochwolf: ACTION pokes Radar with a stick to wake him up.
[19:39:18] Radar: smathy: oh thanks
[19:39:38] context: radar: how far?
[19:39:42] User458764: has joined #RubyOnRails
[19:39:52] context: radar: ~2 months for me
[19:39:55] Radar: context: 16 weeks as of last Friday
[19:39:56] context: remaining.
[19:39:59] Radar: So 24 more weeks
[19:40:05] stesind: has joined #RubyOnRails
[19:40:05] context: congrats man
[19:40:15] smathy: There's a channel for this y'know.
[19:40:17] Radar: congrats to you too :)
[19:40:17] cpruitt: Radar: A) Congratulations on the baby. B) Yeah sleep is gone for at least 3 years. I can’t get mine to stop waking me up no matter what I do.
[19:40:51] cabinB: radar :-) good for you
[19:41:00] context: cpruitt: whiskey.
[19:41:23] cpruitt: context: For me or them? I dont’ share that.
[19:41:43] cpruitt: Least not with someone that’s woken me up. :-)
[19:42:20] epochwolf: cpruitt: have a heart, share it with the kid so they sleep.
[19:42:24] context: cpruitt: hahaha
[19:42:30] mikecmpbll: has joined #RubyOnRails
[19:42:50] cpruitt: epochwolf: kidS. 3. And I’d rather just take the bottle & sleep outside.
[19:43:01] epochwolf: cpruitt: there's a plan.
[19:43:04] cpruitt: I like camping anyway
[19:43:38] AlvaroFernandoMS: has joined #RubyOnRails
[19:44:15] a11: has joined #RubyOnRails
[19:45:54] rattatmatt: has joined #RubyOnRails
[19:46:44] FooMunki: has joined #RubyOnRails
[19:47:13] maxz: has joined #RubyOnRails
[19:47:25] IrishGringo: has joined #RubyOnRails
[19:48:34] smathy: Get a man cave.
[19:50:44] kiloreux: has joined #RubyOnRails
[19:52:19] Infinite_182: has joined #RubyOnRails
[19:53:07] flashpoint9: has joined #RubyOnRails
[19:53:40] tenderlove: has joined #RubyOnRails
[19:54:50] moosetans: has joined #RubyOnRails
[19:58:13] pwnd_nsfw`: has left #RubyOnRails: ()
[19:58:28] pwnd_nsfw: has joined #RubyOnRails
[19:58:36] pwnd_nsfw: smathy, how did you end up solving situations like this: https://gist.github.com/SirUncleCid/b0361eca4a6fd968cf73
[19:58:42] halfamind: has joined #RubyOnRails
[19:59:08] mrbubbles: has joined #RubyOnRails
[19:59:24] mhoungbo: has joined #RubyOnRails
[19:59:33] B1n4r10: has joined #RubyOnRails
[20:00:51] smathy: pwnd_nsfw, by not sending a User to something expecting a Customer?
[20:01:00] pwnd_nsfw: nowayyyyyyyy
[20:01:25] epochwolf: pwnd_nsfw: belongs_to :author, class_name: "User"
[20:01:36] smathy: pwnd_nsfw, I'm not sure the error could be any clearer here: https://gist.github.com/SirUncleCid/b0361eca4a6fd968cf73#file-_error-L7-L8
[20:01:36] pwnd_nsfw: But author is supposed to be a customer..
[20:01:49] epochwolf: pwnd_nsfw: Customer < User'
[20:01:52] smathy: You kids and modern day error messages. You've gotten so lazy.
[20:02:18] snowy: has joined #RubyOnRails
[20:02:23] pwnd_nsfw: Ok, so, through the polymorphic association, how do I get the customer from the user
[20:02:24] epochwolf: smathy: I wish I was using C again. Those errors were the best.
[20:02:51] smathy: current_user.customer ?
[20:03:20] DoctorMonocular: has joined #RubyOnRails
[20:03:31] smathy: ...or current_user.authorizable - whatever you called it?
[20:03:41] pwnd_nsfw: Yeah, finally got to that heh
[20:03:50] pwnd_nsfw: I wasn't sure the magic behind it.
[20:04:08] pwnd_nsfw: I firmly understood the error
[20:04:18] pwnd_nsfw: Wasn't sure how to deduce from there.
[20:04:25] pwnd_nsfw: but yey it works..
[20:04:35] smathy: pwnd_nsfw, cool.
[20:04:44] pwnd_nsfw: You guys and your sarcasm
[20:05:36] pwnd_nsfw: I wonder what I could call authenticable to make it look less "wdf" in controllers..
[20:06:08] epochwolf: ACTION slow claps
[20:06:11] smathy: pwnd_nsfw, I often use :owner, current_user.owner
[20:07:35] barajasfab: has joined #RubyOnRails
[20:08:50] sbarg1: has joined #RubyOnRails
[20:10:56] jenrzzz: has joined #RubyOnRails
[20:11:00] emachnic: has joined #RubyOnRails
[20:11:40] kiloreux: has joined #RubyOnRails
[20:11:43] nettoweb: has joined #RubyOnRails
[20:12:06] c0defeed: has left #RubyOnRails: ("Leaving")
[20:12:20] epochwolf: epochwolf.owner => nil
[20:14:24] epochwolf: helpa.owner => R adar
[20:14:39] pwnd_nsfw: dat anti-highlight
[20:16:09] weaksauce: has joined #RubyOnRails
[20:16:18] ur5us: has joined #RubyOnRails
[20:18:45] sonofdirt: has joined #RubyOnRails
[20:19:28] epochwolf: I'm being polite.
[20:19:35] DonOtreply: has joined #RubyOnRails
[20:19:51] epochwolf: ACTION is a polite wolf that only does mean things to people that deserve it. 
[20:21:25] epochwolf: pwnd_nsfw: you earned your abuse in spades my friend. :P
[20:22:47] ascarter: has joined #RubyOnRails
[20:23:11] jfelchner: has joined #RubyOnRails
[20:23:18] halfamind: has joined #RubyOnRails
[20:23:57] _Sypheren_: has joined #RubyOnRails
[20:24:03] Ikzi: has joined #RubyOnRails
[20:24:23] f3ttX]: has joined #RubyOnRails
[20:25:57] epochwolf: what da fuq
[20:26:55] slash_nick: will don furs
[20:27:25] Disavowed: has joined #RubyOnRails
[20:27:27] slash_nick: oh it's really "what da fuq"?
[20:27:45] slash_nick: Thought we were making things up :)
[20:28:27] smathy: Making things up, on the internet, must be armageddon.
[20:28:52] rubyonrailed: has joined #RubyOnRails
[20:28:58] yfeldblum: has joined #RubyOnRails
[20:29:21] cd-rum: has joined #RubyOnRails
[20:29:50] a11: has joined #RubyOnRails
[20:30:52] epochwolf: smathy: the epochalypse.
[20:31:32] crdpink2: has joined #RubyOnRails
[20:31:43] manfrin_: has joined #RubyOnRails
[20:32:04] wldcordeiro: has joined #RubyOnRails
[20:33:45] baweaver: has joined #RubyOnRails
[20:34:10] IrishGringo: has joined #RubyOnRails
[20:34:20] manfrin`_: has joined #RubyOnRails
[20:34:28] many: has joined #RubyOnRails
[20:35:02] sbarg: has joined #RubyOnRails
[20:37:01] chipotle: has joined #RubyOnRails
[20:37:39] smathy_: has joined #RubyOnRails
[20:39:36] sbarg: has left #RubyOnRails: ()
[20:40:31] dtzuzu: has joined #RubyOnRails
[20:40:47] chrisja: has joined #RubyOnRails
[20:41:56] smathy: epochwolf, internet went down, FELT like the epochalypse.
[20:42:16] epochwolf: smathy: mhwahahaha
[20:42:49] epochwolf: The real epochalypse: https://en.wikipedia.org/wiki/Year_2038_problem
[20:42:52] a11: has joined #RubyOnRails
[20:42:55] smathy: I obviously shouldn't have bitched about Charter on twitter ;)
[20:43:03] chipotle: has joined #RubyOnRails
[20:43:47] smathy: Yeah, anyone still using a 32 bit machine in 2038 deserves all the clusterfucks they receive.
[20:48:26] rodr1go: has joined #RubyOnRails
[20:49:30] banister: has joined #RubyOnRails
[20:50:21] banister: has left #RubyOnRails: ()
[20:57:02] smathy_: has joined #RubyOnRails
[20:57:33] gabr13l: has joined #RubyOnRails
[20:57:36] _Sypheren_: has joined #RubyOnRails
[20:59:08] tycoon177: has joined #RubyOnRails
[21:01:06] tycoon177: Hello, currently at my job, we are using an activex reporting software which means we need to keep IE a dependency. Are there any good reporting gems that can output to a standard view or a pdf easily? I saw dossier, but was wondering if anyone had better suggestions
[21:01:42] axl_: has joined #RubyOnRails
[21:04:54] benlieb: has joined #RubyOnRails
[21:05:02] maxz: has joined #RubyOnRails
[21:06:37] Radar: tycoon177: datagrid?
[21:07:34] flashpoi_: has joined #RubyOnRails
[21:08:08] tycoon177: Thanks Radar. I'll look into it. Dossier is strange and requires a server restart if I change the sql...
[21:08:13] ascarter: has joined #RubyOnRails
[21:08:33] B1n4r10: has joined #RubyOnRails
[21:09:38] Ergo__: has joined #RubyOnRails
[21:10:33] stannard: has joined #RubyOnRails
[21:11:37] a11: has joined #RubyOnRails
[21:12:52] n008f4g_: has joined #RubyOnRails
[21:13:18] moeabdol4: has joined #RubyOnRails
[21:13:58] smathy: has joined #RubyOnRails
[21:16:15] quazimodo: has joined #RubyOnRails
[21:17:12] eyeamaye: has joined #RubyOnRails
[21:17:56] djbkd: has joined #RubyOnRails
[21:18:38] zave: has joined #RubyOnRails
[21:18:40] djbkd: has joined #RubyOnRails
[21:18:45] ascarter: has joined #RubyOnRails
[21:21:38] ivanskie: has joined #RubyOnRails
[21:21:40] eyeamaye: Hey, I've created a method that returns an array of classes acting as a polymorphic class. It works fine in the console and in the view but I have to run Model.connection in the console/view before it will return that specific model. This seems to have something to do with rails 4 lazy loading database connections. Does anyone know how I can guarantee a connection to all the models?
[21:25:13] _Sypheren_: has joined #RubyOnRails
[21:27:11] codepete: has joined #RubyOnRails
[21:27:32] bob434: has joined #RubyOnRails
[21:28:02] yfeldblum: has joined #RubyOnRails
[21:31:06] manfrin: has joined #RubyOnRails
[21:31:49] DragonPunch: has joined #RubyOnRails
[21:32:05] dgncn_: has left #RubyOnRails: ()
[21:32:29] camilasan: has joined #RubyOnRails
[21:32:35] latortuga: has joined #RubyOnRails
[21:34:21] makerops: has joined #RubyOnRails
[21:34:23] chouhoulis: has joined #RubyOnRails
[21:35:16] latortuga: I have an app deployed in staging env, my css/js assets load fine but my svg assets do not show up. They load fine if I visit the asset url directly that's generated for my css. ideas?
[21:35:38] ziyadb: has joined #RubyOnRails
[21:36:49] tvw: has joined #RubyOnRails
[21:40:08] maxz: has joined #RubyOnRails
[21:41:19] gingray: has joined #RubyOnRails
[21:42:56] eyeamaye: I found that if I set `config.eager_load = true`, I can avoid having to run Model.connection before my method will work but I'm wondering if there are any disadvantages to eager_load as the default is false.
[21:43:30] cnk: eyeamaye: probably mostly slower start up times
[21:44:17] cnk: why are you using this array of classes? does rails STI not cut it for your use case?
[21:44:50] mostlybadfly: has joined #RubyOnRails
[21:45:32] wldcordeiro: has joined #RubyOnRails
[21:46:00] stannard_: has joined #RubyOnRails
[21:46:48] eyeamaye: cnk: I think the only way I could get STI to work cleanly would be if I used a meta table as a key value store. I wanted to go with that solution because I think it's kinda exciting, in the end I think it's way overkill for my use case and polymorphic ends up being much simpler.
[21:47:29] eyeamaye: As for why I'm using this array of classes. I think it's probably overkill honestly but I like the idea of automatically building a list of classes. it's really just to populate a collection_select though.
[21:48:16] ascarter: has joined #RubyOnRails
[21:48:45] a11: has joined #RubyOnRails
[21:49:44] joshuaturner: has joined #RubyOnRails
[21:50:21] zave: has joined #RubyOnRails
[21:54:02] diegoaguilar: has joined #RubyOnRails
[21:54:04] pwnd_nsfw: ALTER TABLE "listings" ADD CONSTRAINT "fk_rails_5f637b035a"
[21:54:07] pwnd_nsfw: WOW LANGUAGE MISTER
[21:54:18] FooMunki: has joined #RubyOnRails
[21:55:47] manfrin_: has joined #RubyOnRails
[22:00:33] yoshie902a: has joined #RubyOnRails
[22:01:26] baweaver: has joined #RubyOnRails
[22:02:31] yoshie902a: I’m new to active_job and wondering, if I use Inline, and use dilver_later for my mailer, will my controller still wait for the mail to send? or will it process the mailer in the background?
[22:02:48] yoshie902a: dilver_later= deliver_later
[22:03:51] solars: has joined #RubyOnRails
[22:04:00] jenrzzz_: has joined #RubyOnRails
[22:04:00] workmad3: yoshie902a: it'll wait... the inline adapter is synchnronous
[22:04:24] yoshie902a: what is the recommended adapter? I would like to find something simple
[22:04:29] DoctorMonocular: has joined #RubyOnRails
[22:04:54] yoshie902a: I was thinking delayed jobs maybe
[22:05:09] stannard: has joined #RubyOnRails
[22:05:11] workmad3: yoshie902a: depends on what facilities you have available or are willing to set up... I'd tend to recommend sidekiq for minimal, low-fuss and reasonable feature-set
[22:05:39] yoshie902a: it’s just for sending mail and not having my controller action delayed
[22:06:00] workmad3: (at work, we have lots of apps that use sidekiq and one that uses delayed_job... 90% of issues with background tasks are the single delayed_job app)
[22:08:19] yoshie902a: do I need a redis server for sidekiq?
[22:08:32] workmad3: yeah, that's the one minor disadvantage
[22:08:47] workmad3: (it's a minor disadvantage because redis is pretty damn easy to install and keep up)
[22:09:14] yoshie902a: I think delayed jobs just installs a table
[22:09:33] workmad3: yes, but that doesn't mean it's less work
[22:09:46] yoshie902a: Reviewing it now
[22:10:17] quazimodo: has joined #RubyOnRails
[22:10:43] choke: has joined #RubyOnRails
[22:11:59] yoshie902a: If delploying on heroku, I assume sidekiq should be no problem?
[22:13:05] djbkd: has joined #RubyOnRails
[22:13:10] workmad3: yoshie902a: not at all... heroku-redis is easy to set up and lowest tier is free
[22:14:10] workmad3: yoshie902a: just make sure to set your sidekiq concurrency at 10 rather than leaving at the default 25 when writing your Procfile, as the hobby level for heroku-redis only gives you 20 connections :)
[22:15:03] yoshie902a: thanks for the iindo
[22:15:25] jamon_: Hey, with redis as cache I occasionally get nil from Rails.cache.fetch("key") {} blocks
[22:15:41] jamon_: but for most of the time content from redis is served as expected
[22:17:05] smathy: Jamo__, redis is local or remote?
[22:17:30] sonofdirt: has joined #RubyOnRails
[22:17:44] jamon_: I installed it recently so it might (and probably is) a misconfiguration
[22:18:38] jamon_: I'm using readthis gem and deploying it with passenger5
[22:18:50] Radar: Jamo__: If you're replying to people, it's generally polite to prefix messages with their nick
[22:18:58] jamon_: well deploying is not the proper term...
[22:19:04] Radar: Jamo__: i.e. exactly what I'm doing here. It makes it clear that you're in a conversation with that person.
[22:19:05] benlieb: has joined #RubyOnRails
[22:19:42] jamon_: Radar oh, ok. I personally have found it not neccessary unless there is lots of activity
[22:21:53] jamon_: Radar: :) - anyways ideas what I might have not done properly that could cause this. this block of code https://github.com/testmycode/tmc-server/blob/master/app/controllers/points_controller.rb#L22-L32 and the @summary might show up as nil...
[22:22:23] Radar: Jamo__: I'm busy right now. Maybe ask smathy?
[22:22:46] Radar: https://github.com/testmycode/tmc-server/blob/master/app/controllers/points_controller.rb#L29
[22:22:47] Radar: Seems redundant
[22:23:17] yoshie902a: in development is there a quick way to launch the rails server and redis server together? I normally just do rails s, but now I need to launch redis with it
[22:23:45] ascarter: has joined #RubyOnRails
[22:23:52] yoshie902a: I’m on OSX
[22:24:12] Radar: yoshie902a: You can't just run redis-server?
[22:24:21] jamon_: Radar: nice catch.
[22:25:04] jamon_: smathy: soooo.. any ideas :) so I'm expecting that I have misconfigured something/ configs are pretty much defaults
[22:25:31] workmad3: yoshie902a: brew install redis and then install the launchagent?
[22:25:35] yoshie902a: Rader: I need to run redis-server /usr/local/etc/redis.conf, so I normally need to go to my readme and copy and past, it’s just a drag
[22:26:40] jamon_: yoshie902a: I've got a bunch of things I need to run for my dev env; our solution: https://github.com/testmycode/tmc-server/blob/master/script/dev_env
[22:27:23] eyeamaye: I'm trying to create a mixin that I want to include inside multiple classes. I have a method defined inside a module defined in app/concerns/model_methods.rb and I'm including the module inside my models. However the method I'm including only seems accessible through Model::ModelMethods instead of just Model. What am I not understanding?
[22:27:29] jamon_: yoshie902a: so I'll run ./script/dev_env instead of running rails s.
[22:27:37] smathy: Jamo__, sorry, I lost track. Looks like others have some direction for you anyway.
[22:28:54] choke: has joined #RubyOnRails
[22:29:21] yoshie902a: Jamo__: what do the screen and title commands do? Can I assume screen runs it and title displays what it ran?
[22:29:30] kallisti5: anyone have a classy way to get "the index of an activerecord result"
[22:29:51] kallisti5: aka: index_of(item) gives 0,1,2,etc...
[22:30:03] kallisti5: but that doesn't exist within ActiveRecord result :-\
[22:30:26] ascarter: has joined #RubyOnRails
[22:30:41] jamon_: yoshie902a: yea, it runs the command, and https://cloudup.com/coyO9EbViOy makes it look nicer.
[22:32:45] baweaver: has joined #RubyOnRails
[22:33:13] kallisti5: nvmd. ActiveRecordResult.index(result) does it
[22:33:22] superlou: has joined #RubyOnRails
[22:33:32] yoshie902a: Jamo__: how do you shut everything down at once?
[22:33:47] akshat: has joined #RubyOnRails
[22:33:50] ascarter: has joined #RubyOnRails
[22:33:50] jenrzzz: has joined #RubyOnRails
[22:33:50] jenrzzz: has joined #RubyOnRails
[22:34:15] bricker: has joined #RubyOnRails
[22:34:25] Radar: yoshie902a: You could also use Foreman.
[22:34:30] jamon_: yoshie902a: repeating: ctrl+c q or killing the screen, ctrl+a k y if I remember correctly
[22:34:34] moeabdol: has joined #RubyOnRails
[22:34:40] jottr_: has joined #RubyOnRails
[22:35:01] htmldrum: has joined #RubyOnRails
[22:35:02] htmldrum_: has joined #RubyOnRails
[22:35:03] chouhoulis: has joined #RubyOnRails
[22:35:53] wethu: has joined #RubyOnRails
[22:36:31] yoshie902a: Radar: forman looks nice, plus, it works with heroku I think, right?
[22:36:55] Radar: yoshie902a: yes, but redis runs as a separate (paid, I think?) service on RedisToGo.
[22:37:30] yoshie902a: Radar: workman3 stated they have a free tier I think
[22:42:35] blackmesa: has joined #RubyOnRails
[22:43:25] DragonPunch: has joined #RubyOnRails
[22:45:33] htmldrum: has joined #RubyOnRails
[22:45:34] htmldrum_: has joined #RubyOnRails
[22:45:35] diegoaguilar: has joined #RubyOnRails
[22:46:25] stannard: has joined #RubyOnRails
[22:46:55] _Sypheren_: has joined #RubyOnRails
[22:47:49] itkin: has joined #RubyOnRails
[22:49:13] axl_: has joined #RubyOnRails
[22:49:33] jgpawletko: has joined #RubyOnRails
[22:52:39] _Sypheren: has joined #RubyOnRails
[22:53:20] powersurge: has left #RubyOnRails: ("WeeChat 0.4.3")
[22:54:09] maxz: has joined #RubyOnRails
[22:54:12] yoshie902a: Radar:foreman's great, just set it up. do I need to make a different proc file for heroku and development?
[22:54:50] Radar: yoshie902a: I don't know. I don't use Heroku.
[22:55:05] quazimodo: has joined #RubyOnRails
[22:55:10] workmad3: yoshie902a: if you want to start redis-server with your dev setup, then you'll need separate ones
[22:55:41] moei: has joined #RubyOnRails
[22:55:47] workmad3: Radar: heroku introduced their own heroku-redis addon a few months ago, with a free hobby tier that's good for small apps :)
[22:56:08] Radar: Sorry, I should've said "I don't use Heroku _with Foreman"
[22:56:16] Radar: end-underscore-goes-here
[22:58:31] eyeamaye: Does anyone have an opinion on why I would NOT want to do this? http://pastie.org/10771701
[22:58:59] intrigueD: has joined #RubyOnRails
[23:00:14] uglybandersnatch: has joined #RubyOnRails
[23:02:45] halfamind: has joined #RubyOnRails
[23:04:44] axl_: has joined #RubyOnRails
[23:04:52] kies: has joined #RubyOnRails
[23:05:38] edwinvdgraaf: has joined #RubyOnRails
[23:05:39] _Tariq: has joined #RubyOnRails
[23:05:45] benlieb: Does anyone know how to troubleshoot this heroku error: 2016-03-23T23:04:50.790469+00:00 heroku[router]: at=info method=POST path="/en/members/sign_in" host=xxxxxx.herokuapp.com request_id=ec64680a-689f-4901-ba81-6109d6b65c3e fwd="" dyno=web.1 connect=0ms service=337ms status=500 bytes=1754
[23:05:59] benlieb: it has status = 500 but there is no error in the log
[23:06:52] bamorim: has joined #RubyOnRails
[23:07:26] zave: has joined #RubyOnRails
[23:08:22] smathy: benlieb, look in your app's logs.
[23:08:36] benlieb: smathy: that is from the logs
[23:08:41] benlieb: that's the only entry
[23:08:58] benlieb: unless there is more logs apart from `heroku logs`
[23:11:06] Uber|Dragon: has joined #RubyOnRails
[23:11:20] epochwolf: has joined #RubyOnRails
[23:11:35] cschneid_: has joined #RubyOnRails
[23:11:53] borkdude: has joined #RubyOnRails
[23:11:55] mary5030: has joined #RubyOnRails
[23:15:16] JoshGlzBrk: has joined #RubyOnRails
[23:16:12] benlieb: smathy: any ideas?
[23:16:19] domgetter: has joined #RubyOnRails
[23:17:06] yoshie902a: I have my mailers Enqueued, but they are not processing for some reason. what is the next step to trouble why? I’m using forman to start the redis, sidekiq
[23:17:28] Radar: benlieb: Use an exception tracker, like Rollbar.
[23:17:58] benlieb: Radar: exceptions used to appear in the logs, I guess that's not the case anymore?
[23:18:07] Radar: benlieb: !shrug
[23:18:07] helpa: benlieb: ¯\_(ツ)_/¯ Sorry, Radar is not able to help you any further as they do not know.
[23:18:11] Radar: Depends on your app?
[23:18:18] baweaver: has joined #RubyOnRails
[23:18:23] Radar: General best practice is to use an exception logging service though
[23:18:42] smathy: benlieb, no, that's not your app's log, that's the httpd log.
[23:18:49] Radar: GragHarker: what
[23:19:03] Radar: smathy: It's the heroku logs, which should include the exception too.
[23:19:11] Radar: benlieb: Do you have the rails_12factor gem in your Gemfile?
[23:19:21] benlieb: Radar: lemme look
[23:19:28] yoshie902a: Radar: I did not setup any special jobs, since rails 4 have active job and I read that deliver_later is all I need. does this seem accurate?
[23:19:31] smathy: benlieb, I don't know much about heroku, and where they store their logs, you're looking for the thing from log/production.log, should look the same as your log/development.log
[23:19:49] Radar: smathy: It should also be in "heroku logs"... if the rails_12factor gem is installed.
[23:20:01] Radar: yoshie902a: what
[23:20:09] Radar: yoshie902a: Not sure why I am being mentioned here?
[23:20:31] benlieb: Radar: nope, but I just added it to group production
[23:20:36] yoshie902a: Radar: oops, you mentioned logs to someone else, I though it was to me, sorry
[23:20:39] Radar: benlieb: Ok, good. Give that a try.
[23:21:28] choke: has joined #RubyOnRails
[23:21:34] benlieb: Radar: You have added to the Gemfile: * rails_12factor Failed to install gems via Bundler.
[23:22:01] Radar: benlieb: Did you run bundle install + add Gemfile + Gemfile.lock to your Git repo?
[23:22:11] jottr: has joined #RubyOnRails
[23:22:48] silentpost: has joined #RubyOnRails
[23:23:06] jfelchner: has joined #RubyOnRails
[23:23:16] benlieb: Radar: ah, i didn't do bundle install because it was production group, but that appears to be misguided
[23:23:51] benlieb: Radar: what should this gem do in this case?
[23:24:00] _Sypheren: has joined #RubyOnRails
[23:24:01] benlieb: with respect to tracking down the exception?
[23:24:05] kpwarr: Hey I have a model which contains 'belongs_to :thing'. Does this by default create a validation which requires 'thing' to exist?
[23:24:19] Radar: benlieb: It should put the exception details in your logs (I think)
[23:24:22] Radar: kpwarr: No.
[23:24:58] benlieb: Radar: yep, that worked
[23:25:16] dandaman: has joined #RubyOnRails
[23:25:41] Radar: benlieb: magical
[23:26:08] benlieb: but it revealed some issues :( in my app
[23:26:14] one_zero: has joined #RubyOnRails
[23:26:15] Radar: A likely story.
[23:27:03] sypheren: has joined #RubyOnRails
[23:27:06] benlieb: I'm porting an old app, and in the previous versions, exceptions were handled gracefully with a message to user. There seems to be an exception in my exception handling code now. :(
[23:27:13] benlieb: And the exception is even weirder: <PG::InsufficientPrivilege: ERROR: permission denied for relation app_logs
[23:27:32] kpwarr: Radar: in spite of this I am getting a validation error. I don't suppose I am making an obvious mistake here? https://gist.github.com/lanilabs/dc06b1e5b1d10f33a9e1
[23:27:57] wldcordeiro: has joined #RubyOnRails
[23:28:27] workmad3: kpwarr: you're using rails 5
[23:28:42] Arcaire: codename "Phoenix", I heard.
[23:28:59] kpwarr: workmad3: yes. does validation occur by default in this case?
[23:29:06] workmad3: kpwarr: yup
[23:29:30] kpwarr: workmad3: thx! do I disable it by adding a `validates ... allow_nil: true` ?
[23:29:43] frozenmeatloaf: has joined #RubyOnRails
[23:29:47] workmad3: kpwarr: there's a global config setting in config/initializers to turn it off if you don't want that at all, or you can do `belongs_to :lanibox, required: false` to turn it off on a case-by-case basis
[23:29:59] kpwarr: workmad3: cheers
[23:30:23] workmad3: (figuring that out cost me an hour in a limited-time company hackathon btw :) )
[23:30:27] benlieb: Well after a walk down cryptic error lane, I've found: heroku pg:info -> Rows: 1002676/10000 (Write access revoked)
[23:30:50] workmad3: benlieb: haha :) they should have sent the app owner an email about that when it happened
[23:31:15] benlieb: so my app writes a log on error, which causes an error, which tries to log the error... haha
[23:31:30] benlieb: time to fork out some dough
[23:31:47] workmad3: benlieb: get a premium 0 database! the HA features are awesome :)
[23:32:33] benlieb: workmad3: I wish I understood that enough to know if it's serious or a joke
[23:33:08] workmad3: benlieb: well, the High Availability features are pretty nice, but it's somewhat joking as I doubt you want to go from free to $200/m :)
[23:33:09] manfrin: has joined #RubyOnRails
[23:33:36] benlieb: yeah that's more like HAHA features
[23:34:19] stannard: has joined #RubyOnRails
[23:34:29] Arcaire: Just use a VPS.
[23:34:35] Arcaire: Heroku is overpriced and honestly doesn't do that much.
[23:34:53] Arcaire: And I say that from the semi-biased side of having two friends who work for Heroku.
[23:35:34] chouhoulis: has joined #RubyOnRails
[23:35:36] slash_nick: Interview (remote meetup) with Rafael Franca going on now: https://twitter.com/remotemeetup/status/712750191384924162... a little hard to hear (i think his voice is going from a speakerphone into a microphone), but i think they're doing a good job of recapping his answers
[23:35:50] n008f4g_: has joined #RubyOnRails
[23:36:06] workmad3: Arcaire: for my own stuff, I do... we use heroku for pretty much everything at work though, so I've gotten more familiar with what's available just from osmosis
[23:36:16] joshhbk: has joined #RubyOnRails
[23:36:30] Arcaire: My condolences.
[23:36:44] Arcaire: You must be one of the few companies where your infrastructure bill is higher than your human resources bill.
[23:37:31] choke: has joined #RubyOnRails
[23:37:53] workmad3: Arcaire: I have no idea... but they're still happily paying it (they had some pretty bad experiences a few years ago where a junior-heavy engineering team thought they could run servers, so they're still burned from that)
[23:37:54] baweaver: has joined #RubyOnRails
[23:38:30] zave: has joined #RubyOnRails
[23:38:44] benlieb: Arcaire: I'm moving from 6 yrs of this app on a VPS
[23:38:58] intrigueD: has joined #RubyOnRails
[23:39:01] Arcaire: ACTION makes note to saasify his ezdeploy solution
[23:40:06] sarink: has joined #RubyOnRails
[23:40:32] smathy: Arcaire, heroku does a lot if you have no clue about ops/server setup/security/etc.
[23:40:51] Arcaire: Is that "a lot"?
[23:41:07] Arcaire: I don't know... It takes me under half a day to fully set up a new server from absolute scratch if I ignore the build scripts I've already created.
[23:41:30] Arcaire: That includes the obscure kernel-level tweaks I make for performance and security, and an ASLR kernel patch which is not included in FreeBSD right now.
[23:41:57] Arcaire: Maybe I've been doing this too long. :^)
[23:42:46] TheGreatGudsby: has joined #RubyOnRails
[23:43:08] workmad3: Arcaire: how long to set up a multi-site auto-failover postgres instance with point-in-time recovery?
[23:43:22] smathy: Arcaire, I think you underestimate how much knowledge you have that allows you to do that without leaving your server exposed or just generally unusable.
[23:43:23] Arcaire: Probably about the same time to be honest.
[23:43:48] Arcaire: smathy: Are you saying I should sell it as a service? :^)
[23:43:58] workmad3: Arcaire: ah, so quite a bit slower than the 5s it would take to add that to a heroku app for someone with zero knowledge but a decent credit line :)
[23:44:05] DLSteve: has joined #RubyOnRails
[23:44:08] smathy: Arcaire, there are a lot of people who develop apps who know how to run `rails server` and that's the extent of their "ops" knowledge.
[23:44:33] Arcaire: workmad3: I have no build script for that. :)
[23:44:42] smathy: Arcaire, I'm just saying that it's more of a gap, which I would wager is the product of years of *nix experience.
[23:44:57] Arcaire: smathy: Yeah.
[23:45:33] makerops: as a person who lives and breathes systems/operations etc
[23:45:34] smathy: Arcaire, and I'd much rather those people use heroku than try to setup their own VPS and put their clients/employers at risk and end up giving us all a worse name than we already have.
[23:45:39] makerops: heroku is awesome
[23:45:39] workmad3: Arcaire: yeah... and I do get that it's not something that's even particularly difficult (more 'fiddly'), but it's pretty nice to just be able to spin that up with a single command (and also trust that junior devs can do similar)
[23:46:00] hotpancakes: has joined #RubyOnRails
[23:46:24] xlegoman: has joined #RubyOnRails
[23:46:32] uglybandersnatch: has joined #RubyOnRails
[23:46:59] justinweiss: has joined #RubyOnRails
[23:47:32] smathy: Don't get me wrong, I hate heroku and would never use them myself for any real app, but I'm the same - years of *nix use/experience and can set one up in my sleep. But there are many devs out there who don't know what iptables is, I'd really rather they didn't setup their own VPS.
[23:48:47] makerops: why do you hate heroku?
[23:48:54] makerops: hte workflow is awesome, it's rock solid
[23:48:59] manfrin: has joined #RubyOnRails
[23:49:33] smathy: The cost/benefit isn't worth it to me, and I like having more control over everything than you get with them.
[23:49:43] baweaver: smathy: PF for life
[23:49:56] workmad3: anyway, I need to get to bed rather than discuss whether heroku is good (I'd say it is nowadays, but they've added a lot of nice things in the past year) or overpriced (it is, but I don't think as much as it used to be) :)
[23:50:05] smathy: I wish I knew what PF meant, I'd be so much cooler.
[23:50:27] makerops: overpriced is relative
[23:50:27] baweaver: Packet Filter, *BSD's variant of IPTables
[23:50:37] smathy: workmad3, I've used them within the last three months, still choked with shit for me, and so much vendor lockin.
[23:50:51] makerops: i mean, if people are paying for it, it's by definition not overpriced, but i get what you are saying
[23:51:04] smathy: They're basically the VPS version of cpanel from my perspective.
[23:51:05] Arcaire: I'd rather they learned, personally.
[23:51:06] Arcaire: I do understand where you're coming from though.
[23:51:14] Arcaire: Sorry, office is filled with faraday cages.
[23:51:20] Arcaire: Also yes @ baweaver
[23:51:31] wldcordeiro: has joined #RubyOnRails
[23:51:32] baweaver: IPTables makes me cry
[23:51:35] Arcaire: makerops: That's not how the word 'overpriced' works to be completely honest.
[23:51:46] smathy: Arcaire, I agree, but ops (and especially devops) is now its own specialization, hard to fight that.
[23:51:51] Arcaire: smathy: "devops"
[23:51:53] Arcaire: Developer + Ops?
[23:52:05] baweaver: THat's what they call us when they can't decide
[23:52:06] Arcaire: Oh I understand.
[23:52:07] DragonPunch: How do you do error handling in Rails for params?
[23:52:10] baweaver: or don't want to hire two people
[23:52:26] Arcaire: baweaver: Or expect someone working with a technology understand the ground its laying on? :^)
[23:52:26] smathy: Arcaire, not really, more a name to differentiate a real ops guy from a fake ops guy who can't write helper scripts.
[23:52:31] makerops: Arcaire, if people are willing to pay for it, and it makes sense from a business standpoint, it's not overpriced imo
[23:52:37] Arcaire: makerops: Shill detected.
[23:52:44] Arcaire: [[ SHILLDAR INTENSIFIES ]]
[23:52:47] DragonPunch: The model automatically raises an exception right? However, I'm building a rest API and I need to figure out how to handle errors, what not etc.
[23:52:57] baweaver: Arcaire: Fullstack is a bad excuse for underpaying someone to do way too much work.
[23:53:15] smathy: DragonPunch, no, the model doesn't automatically raise exceptions.
[23:53:21] baweaver: DragonPunch: Have you read a Rails book yet?
[23:53:23] DragonPunch: smathy: Er, you have to set it up right?
[23:53:24] makerops: Arcaire, on the other hand, Im not sure id find heroku as impressive, if i couldnt do the "ops" stuff in my sleep
[23:53:26] Arcaire: Specifically !r4ia
[23:53:29] DragonPunch: baweave Gone through the docs :S
[23:53:42] smathy: DragonPunch, please go get a book.
[23:53:45] DragonPunch: smathy: Well, someone in their rails code is doing a sneaky_save ... that will skip all checks ?
[23:53:50] makerops: knowing how the sausage is made etc....
[23:53:53] Arcaire: makerops: I can't parse that sentence.
[23:54:00] DragonPunch: smathy: I don't have the time to read through the book right now lol, I'm on a trial period for a rails project.
[23:54:05] DragonPunch: smathy: Or else, of course, I woudl.
[23:54:09] smathy: DragonPunch, I'm not familiar with the `sneaky_save` method.
[23:54:16] a11: has joined #RubyOnRails
[23:54:22] DragonPunch: smathy: Lmao, alright I will check it out.
[23:54:22] smathy: DragonPunch, well this channel is not your personal training camp.
[23:54:40] baweaver: read a book
[23:54:41] DragonPunch: smathy: Never treated it that way nor do I intend it to be, thank you,
[23:54:46] baweaver: it won't kill you
[23:54:57] Arcaire: https://www.youtube.com/watch?v=khC5-yCWNvM
[23:55:00] Darmani: http://ideone.com/hwdwUz -- So I'm trying to figure out RSpec. I already defined "Bacon" as another file in the same directory but whenever I try to load it in like this it says 'cannot load such file'
[23:55:11] smathy: DragonPunch, you are though when you're asking such rudimentary questions.
[23:55:52] DragonPunch: smathy: You don't need to be so blunt about it. Sometimes it comes off as rude and to new people who are trying to learn, it's probably not the best attitude to have.
[23:56:01] Arcaire: smathy's middle name is "blunt"
[23:56:05] Arcaire: sma "blunt" thy
[23:56:10] Arcaire: i've seen his birth certificate
[23:56:16] smathy: Darmani, are you using this within a Rails app?
[23:56:39] Darmani: smathy: yus
[23:56:39] AlvaroFernandoMS: has joined #RubyOnRails
[23:56:58] Ropeney: has joined #RubyOnRails
[23:57:36] chipotle: has joined #RubyOnRails
[23:58:21] smathy: Darmani, did you read the rspec README?
[23:58:56] Darmani: smathy: No... Should I do that first?
[23:59:32] cnk: Darmani: Is bacon in one of the standard rails locations?
[23:59:33] smathy: Darmani, yes, are you using the rspec-rails gem?
[23:59:56] cnk: if not, it is not autoloaded and you need to know a bunch about the load path