« Back to channel list

#RubyOnRails - 22 October 2015

« Back 1 day Forward 1 day »
[00:00:19] TeckniX: has joined #RubyOnRails
[00:01:26] symbole: has joined #RubyOnRails
[00:01:59] one_zero: has joined #RubyOnRails
[00:02:39] railspie713: has joined #RubyOnRails
[00:04:34] sevenseacat: has joined #RubyOnRails
[00:06:36] rubypie713: has joined #RubyOnRails
[00:06:53] cstyles: has joined #RubyOnRails
[00:06:59] rubypie713: can anyone tell me how you add say a has_many relation to an model from a gem ?
[00:07:46] rubypie713: would you just create a model and inherit like Module::Class < ActiveRecord::Base
[00:08:01] danoph: has joined #RubyOnRails
[00:08:03] tuelz: has joined #RubyOnRails
[00:08:28] waseem_: rubypie713: What are you trying to do?
[00:09:33] rubypie713: create an association from a module class to one of my models
[00:11:30] rubypie713: if the model inherits from active record, then I could just overwrite?
[00:12:14] ericjphillips: has joined #RubyOnRails
[00:12:49] smathy: rubypie713, it's impossible to give you good advice with the amount of information you've given, so instead I'll give you crappy advice - yes, you can always reopen a class in ruby and add whatever you like to it.
[00:13:30] chills42: has joined #RubyOnRails
[00:14:18] waseem_: rubypie713: What problem are you trying to solve? Why are you doing what you're doing?
[00:15:01] waseem_: rubypie713: You can always, like smathy said, open a class in Ruby and add your own behavior. This is usually not a good practice though. This is what we call monkey patching.
[00:15:05] rubypie713: well, I have this user gem, and I have my posts model, im simply trying to create an association between the two, but hasn't turned out to be so simple
[00:17:09] waseem_: rubypie713: Which gem?
[00:17:24] rubypie713: it's called casein
[00:18:08] jgt1: has joined #RubyOnRails
[00:18:18] rubypie713: it creates a user admin controller and table
[00:18:34] IFrank00: has joined #RubyOnRails
[00:19:12] waseem_: rubypie713: I guess you'll have to resort to open the class and add the association.
[00:19:28] _djbkd: has joined #RubyOnRails
[00:21:21] rromanchuk: has joined #RubyOnRails
[00:21:37] rubypie713: yeah, i couldnt figure out any other alternative than to monkey patch
[00:23:08] smathy: Yes, unfortunately the author didn't do everything as a generator, so you have a couple of model classes that are within the gem.
[00:24:26] rubypie713: I would then just recreate those models and overwrite then create the db associations?
[00:24:30] nogic: has joined #RubyOnRails
[00:25:36] rubypie713: I'll look into it
[00:25:44] willharrison: has joined #RubyOnRails
[00:28:40] allcentury: has joined #RubyOnRails
[00:29:50] arBmind: has joined #RubyOnRails
[00:30:45] _djbkd: has joined #RubyOnRails
[00:30:52] thecyclone: has joined #RubyOnRails
[00:31:05] pydave6367: has joined #RubyOnRails
[00:35:13] capin: im reading https://github.com/refile/refile#additional-metadata and I added a column to my migration file but the file name still isn't preserving >.<
[00:36:12] rhizome: did you name it right?
[00:36:13] one_zero: has joined #RubyOnRails
[00:38:22] capin: https://gist.github.com/ipatch/024782637ce0ff7c25a1
[00:39:04] rhizome: what's the model
[00:40:34] capin: rhizome: just updated the gist with the model
[00:41:02] smathy: capin, probably a silly question, but you did run the migration right?
[00:41:18] Maletor: has joined #RubyOnRails
[00:41:24] smathy: ...probably also need to restart your app (and maybe spring if you're running it)
[00:41:38] rhizome: hm, yeah. restart and stuff
[00:42:01] capin: okay let me try that, and yes I did run the migration
[00:42:45] chills42: has joined #RubyOnRails
[00:43:05] nogic: has joined #RubyOnRails
[00:43:10] workmad3: has joined #RubyOnRails
[00:43:11] riotjones: has joined #RubyOnRails
[00:43:20] capin: restarted everything, and the file names are still a hash of characters
[00:43:38] capin: and I'm not using spring
[00:44:29] ebbflowgo: has joined #RubyOnRails
[00:44:34] ebbflowgo: has left #RubyOnRails: ()
[00:46:20] EminenceHC: has joined #RubyOnRails
[00:48:02] Jasaka: has joined #RubyOnRails
[00:48:40] danoph: has joined #RubyOnRails
[00:49:18] GriffinHeart: has joined #RubyOnRails
[00:50:17] LudicrousMango: has joined #RubyOnRails
[00:53:21] EminenceHC: has joined #RubyOnRails
[00:54:34] annlewis: has joined #RubyOnRails
[00:54:38] _djbkd: has joined #RubyOnRails
[00:55:39] bruno-: has joined #RubyOnRails
[00:55:39] montagesoftware: has joined #RubyOnRails
[00:56:11] montagesoftware: has left #RubyOnRails: ()
[00:57:52] andersoldahl: has joined #RubyOnRails
[00:59:04] quazimodo: has joined #RubyOnRails
[00:59:08] nya: has joined #RubyOnRails
[00:59:43] seank_: has joined #RubyOnRails
[01:00:34] nyaa: has joined #RubyOnRails
[01:00:58] GriffinHeart: has joined #RubyOnRails
[01:01:31] darrencauthon: has joined #RubyOnRails
[01:02:34] noodle: has joined #RubyOnRails
[01:03:07] jweaver__: has joined #RubyOnRails
[01:04:30] Or1on: has joined #RubyOnRails
[01:05:08] rickmasta: has joined #RubyOnRails
[01:05:17] s2013: has joined #RubyOnRails
[01:08:24] Maletor: has joined #RubyOnRails
[01:09:03] oflannabhra: has joined #RubyOnRails
[01:09:22] d34th4ck3r: has joined #RubyOnRails
[01:09:48] rhizome: hard to say
[01:11:11] capin: yeah not sure what the issue is :l
[01:11:13] TeckniX: has joined #RubyOnRails
[01:11:58] jweaver__: has joined #RubyOnRails
[01:12:23] ischwartz: has joined #RubyOnRails
[01:14:08] unreal: has joined #RubyOnRails
[01:15:11] cstyles: has joined #RubyOnRails
[01:15:42] Lytol: has joined #RubyOnRails
[01:17:07] NBarnes: has joined #RubyOnRails
[01:18:19] andatche: has joined #RubyOnRails
[01:19:32] rakm: has joined #RubyOnRails
[01:24:21] ja: is it a bad idea to have migrations that create multiple tables?
[01:24:35] ja: I'd like to group it up some more instead of having a ton of initial migrations
[01:25:51] sevenseacat: don't see much of a point
[01:28:53] nya: has joined #RubyOnRails
[01:29:05] ja: I guess not??? the migrations dir is always guaranteed to become a huge mess eventually
[01:29:22] sevenseacat: it'll get a lot of files in it, but its supposed to
[01:29:30] Scient: i truncate the migrations from time to time
[01:29:34] Scient: kind of "reset" it
[01:30:35] ja: sevenseacat: you're right. I just wish there were some separate dir for the initial migrations
[01:30:45] ja: or maybe I'm just thinking of this in a retarded way
[01:30:51] sevenseacat: what defines an 'initial' migration?
[01:30:55] rhizome: always possible
[01:31:18] ja: "initial" as in 1.0, I guess
[01:31:34] ja: I feel like I should stop talking now :D
[01:31:36] CanTonic: has joined #RubyOnRails
[01:31:40] ja: Scient: how do you truncate them?
[01:32:25] ja: sevenseacat: I'd just like a better overview of my database structure than looking at schema.rb
[01:32:41] sevenseacat: i dont know how anything you've said will help with that
[01:32:49] FooBarWidget: has joined #RubyOnRails
[01:33:26] ja: well, I usually look at my migrations instead of schema.rb??? at least in projects where I only have migrations that create tables, not modify or remove them
[01:33:52] sevenseacat: thats not what migrations are for
[01:33:55] ja: young, pre-production projects, obviously
[01:33:57] robotbrain: has joined #RubyOnRails
[01:34:10] ja: I need to accept that
[01:34:32] sevenseacat: even young, pre-production projects are going to have table modifications
[01:35:20] ja: yeeeah, but sometimes I just edit the table creation migration and reset my database >.>
[01:35:37] ja: s/sometimes/way too often
[01:35:50] sevenseacat: you're not supposed to edit migrations if they've already been run.
[01:36:01] sevenseacat: roll them back, edit them, run them again, if they've never been pushed.
[01:36:19] jweaver__: has joined #RubyOnRails
[01:36:23] ja: yes, that's what I've been doing
[01:36:42] ja: not a good habit
[01:40:43] atomical: has joined #RubyOnRails
[01:42:51] GriffinHeart: has joined #RubyOnRails
[01:44:00] riotjones: has joined #RubyOnRails
[01:48:17] Gustavo: has joined #RubyOnRails
[01:49:45] sunya7a: has joined #RubyOnRails
[01:55:05] danman: has joined #RubyOnRails
[01:55:19] annlewis: has joined #RubyOnRails
[01:56:20] bruno-: has joined #RubyOnRails
[01:58:25] oflannabhra: has joined #RubyOnRails
[01:58:35] wethu: has joined #RubyOnRails
[02:00:23] tjbiddle: has joined #RubyOnRails
[02:06:26] barhum2013: has joined #RubyOnRails
[02:09:07] hephaestus_rg: has joined #RubyOnRails
[02:09:22] jenrzzz: has joined #RubyOnRails
[02:10:35] siddart: has joined #RubyOnRails
[02:11:20] roshanavand: has joined #RubyOnRails
[02:12:21] GriffinHeart: has joined #RubyOnRails
[02:13:27] hmsimha: has joined #RubyOnRails
[02:17:06] shinnya: has joined #RubyOnRails
[02:24:03] sadaf2605: has joined #RubyOnRails
[02:26:25] moeabdol: has joined #RubyOnRails
[02:31:15] sankaber: has joined #RubyOnRails
[02:31:26] workmad3: has joined #RubyOnRails
[02:32:58] danman_: has joined #RubyOnRails
[02:33:33] sankaber: has joined #RubyOnRails
[02:34:18] spijet: has joined #RubyOnRails
[02:35:43] shibabu: has joined #RubyOnRails
[02:37:13] spijet: Hello guys! I'm having a weird problem with JS in my Rails app. I've added Jquery datetimepicker to the project (as a gem). When I add $('#datetimepicker').datetimepicker(); inside <script> in index.html.erb, it works well, but if I move it to assets/javascripts/application.js, it doesn't.
[02:38:56] spijet: Firefox network graph shows that all the included JS refered by application.js are loaded and I can see their content.
[02:38:59] rhizome: you put just that?
[02:39:17] spijet: yes, and //= require datetimepicker in application.js
[02:39:18] herbst: has joined #RubyOnRails
[02:39:28] spijet: (and the gem line in Gemfile, of course)
[02:39:34] sevenseacat: not ina document ready block or anything like that?
[02:39:41] hephaestus_rg: has joined #RubyOnRails
[02:39:42] rhizome: essentially
[02:40:26] rhizome: it's probably done running before your date field is in the page
[02:41:07] spijet: Hmm. How do I make it run after it's ready, then?
[02:41:30] tuelz: has joined #RubyOnRails
[02:41:32] epochwolf: has joined #RubyOnRails
[02:45:17] spijet: Or, rather, how do I make CoffeeScript do many actions on page change? o_o
[02:48:13] GriffinHeart: has joined #RubyOnRails
[02:50:10] Jameser: has joined #RubyOnRails
[02:50:56] RegulationD: has joined #RubyOnRails
[02:52:08] nettoweb: has joined #RubyOnRails
[02:52:16] s2013: has joined #RubyOnRails
[02:53:15] towski_: has joined #RubyOnRails
[02:55:02] moeabdol: has joined #RubyOnRails
[02:55:45] tjbiddle: has joined #RubyOnRails
[02:56:07] annlewis: has joined #RubyOnRails
[02:56:09] baweaver: has joined #RubyOnRails
[02:57:49] tvon: has joined #RubyOnRails
[02:58:41] levifig_: has joined #RubyOnRails
[02:59:05] baweaver: https://www.udemy.com/pro-rubyonrails/?couponCode=ruby0015 - Looks like this just got a pretty large discount
[02:59:07] baweaver: could be handy
[03:00:06] leeky: has joined #RubyOnRails
[03:00:43] sevenseacat: 95% discount sounds good
[03:01:24] baweaver: not sure what the real actual price is, but even at $15 that's a pretty good menu of content
[03:01:36] rhizome: looks as good as any
[03:02:03] sankaber: has joined #RubyOnRails
[03:03:33] spijet: rhizome: It seems that I'm missing something :( Here's the code: https://dpaste.de/MGRO
[03:03:55] spijet: It looks like only the first line of the block gets executed
[03:03:55] towski_: has joined #RubyOnRails
[03:04:30] oflannabhra: has joined #RubyOnRails
[03:06:41] spijet: Changed it a little bit, added an alert just to test if multiple lines are working. It seems that there's a problem with setlocale, not with the script. :)
[03:09:47] braincrash: has joined #RubyOnRails
[03:11:09] xtagon: has joined #RubyOnRails
[03:11:22] spijet: Found out that I can set the lang of datetimepicker in options array at creation time, so this isn't a problem anymore. :D But still, thank you for your help! :)
[03:13:32] nogic: has joined #RubyOnRails
[03:13:44] pydave6367: has joined #RubyOnRails
[03:16:08] rhizome: you're welcome
[03:16:37] hephaestus_rg: has joined #RubyOnRails
[03:16:53] spijet: Now off to finish PgSQL query generator...
[03:23:16] ajb: would anybody here be willing to tutor/mentor me through a hangout?
[03:24:57] nogic: has joined #RubyOnRails
[03:27:43] kies^: has joined #RubyOnRails
[03:37:00] Gustavo: has joined #RubyOnRails
[03:37:20] Motoservo: has joined #RubyOnRails
[03:41:29] duncannz: has joined #RubyOnRails
[03:43:18] wldcordeiro: has joined #RubyOnRails
[03:44:47] riotjones: has joined #RubyOnRails
[03:45:56] nyaa: has joined #RubyOnRails
[03:46:09] cstyles: has joined #RubyOnRails
[03:49:18] oflannabhra: has joined #RubyOnRails
[03:55:15] smathy: ajb, for more money than you can probably afford... or... here, for free.
[03:55:38] SmOkE_RU: has joined #RubyOnRails
[03:55:46] ajb: here it is
[03:56:52] annlewis: has joined #RubyOnRails
[03:56:56] ajb: I am having trouble with relations
[03:57:15] ajb: I have clubs, leaders and leader_positions
[03:57:35] Creeves: has joined #RubyOnRails
[03:57:37] ajb: and am trying to get the club to accept multiple leaders and leaders to have multiple clubs
[03:58:02] helpa: 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.
[03:58:35] bruno-: has joined #RubyOnRails
[03:59:22] wethu: has joined #RubyOnRails
[03:59:36] ajb: can I just give you a gh repo?
[04:00:43] smathy: The main things I need to know are: what do you expect to happen, what's actually happening, and the code.
[04:01:13] ajb: should we take this to pm or stay in main channel?
[04:01:40] EminenceHC: has joined #RubyOnRails
[04:02:01] nizmow: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[04:02:27] smathy: PM will be that thing that costs you more than you can afford.
[04:04:02] ja: ajb: look up `has_and_belongs_to_many` ??? it's fairly easy to get working
[04:04:33] ajb: ja: that is what I am doing but I can't get the view to correctly output the leaders
[04:05:08] ja: ajb: So it's a view problem, not a model problem? How is it output incorrectly?
[04:05:22] ja: ajb: Does everything work as expected in `rails console`?
[04:05:31] ajb: undefined method `leader_position' for #<Club:0x007fae1c5e86d0>
[04:05:54] ja: Shouldn't that be `leader_positions` in plural?
[04:06:19] sunya7a: has joined #RubyOnRails
[04:06:29] smathy: I've never EVER shipper a habtm association.
[04:06:29] ajb: https://gist.github.com/ZucchiniZe/82adb71c3fba4d8ed5bf
[04:06:47] smathy: ajb, !gist-usage - for next time
[04:06:47] helpa: ajb: How to use Gist properly: https://github.com/radar/guides/blob/master/using-gist.markdown
[04:06:48] ajb: I am not using a habtm association
[04:07:09] smathy: ajb, you said: [21:04:33] ajb: ja: that is what I am doing but I can't get the view to correctly output the leaders
[04:07:16] Wixy: has joined #RubyOnRails
[04:07:19] smathy: ...when ja suggested to has habtm
[04:07:35] sadaf2605: what is the complexity of table.columns on active record model?
[04:07:56] ajb: oh, sorry, I meant to say that I had tried that and it didn't work and I was suggested to do something else
[04:09:03] Wixy: Hey there! how do you implement a daily report? I want to send my users a report every day, to all of them, but I need to access the models and mailer views, though I believe it's not exactly part of the rails app
[04:09:06] wldcordeiro: has joined #RubyOnRails
[04:09:10] Wixy: what's your opinion? how would you do this?
[04:09:33] ajb: Ropeney: https://gist.github.com/ZucchiniZe/d01d79932776d2d8349d
[04:09:38] ja: Wixy: Active Job, possibly
[04:10:59] Wixy: thanks, I'll check that in a sec
[04:11:00] Wixy: any other idea?
[04:11:06] siddart: has joined #RubyOnRails
[04:11:37] smathy: Wixy, no, that's the way to do it.
[04:12:27] danoph: has joined #RubyOnRails
[04:13:47] GriffinHeart: has joined #RubyOnRails
[04:14:30] cstyles: !gist-usage
[04:14:47] smathy: cstyles, helpa has a whitelist.
[04:14:52] cstyles: derp. sorry smathy???wasn???t sure how that works
[04:14:59] smathy: No problem at all.
[04:17:14] ajb: I thought I did the gist right
[04:17:18] ajb: Did I not?
[04:18:22] smathy: ajb, your gist was good. Your error suggest you're calling a_club.leader_position
[04:19:25] Lightsword: has joined #RubyOnRails
[04:19:28] workmad3: has joined #RubyOnRails
[04:19:34] sdwrage: has joined #RubyOnRails
[04:20:32] dshoreman: has joined #RubyOnRails
[04:21:34] ajb: https://gist.github.com/ZucchiniZe/d01d79932776d2d8349d#file-index-html-erb
[04:23:01] smathy: ajb, again, great gist. Now, have you done a tutorial or something? Or read through any of the guides, especially http://guides.rubyonrails.org/association_basics.html ?
[04:23:52] ajb: I pretty much did the treehouse guide about 6 months ago, trying to get back into programming and rails
[04:24:01] ajb: but have not read that, reading now
[04:25:31] Ropeney: ajb did u solve it?
[04:25:40] ajb: not yet
[04:26:03] Ropeney: change your belongs_to to singulars
[04:26:31] Ropeney: and your look to club.leader_positions.each do |leader|
[04:27:57] ajb: still doesn't work
[04:28:12] Ropeney: whats the error, doesnt work doesnt help
[04:28:17] Radar: !didntwork
[04:28:17] helpa: What "didn't work"? Did your server not start? Did your computer explode? Did your webpage turn bright pink? Did your client not pay your bill on time? You may have to be more specific. A Gist (http://gist.github.com) of the code that doesn't work (and the error you are getting) will be helpful.
[04:29:03] ajb: I get "undefined method `leader_positions' for #<Club:0x007ffe66b12d50>"
[04:29:40] ajb: also, why does ruby quote things using a back tick instead of a single quote
[04:29:43] Ropeney: regist your new code :)
[04:30:48] Ropeney: and your schema.rb would be good
[04:30:55] ajb: new gist or update the current one?
[04:31:04] Ropeney: whichever youd like to do
[04:32:01] nyaa: has joined #RubyOnRails
[04:32:18] ajb: https://gist.github.com/ZucchiniZe/d01d79932776d2d8349d
[04:32:48] sadaf2605: What is the time complexity of Model.columns or Model.column_names on rails?
[04:32:49] sadaf2605: Details of this question are at stackoverflow: http://stackoverflow.com/questions/33273311/what-is-the-complexity-of-model-columns-or-model-column-names-on-rails
[04:32:49] Ropeney: have you tried restarting server yet btw?
[04:33:51] p1k: has joined #RubyOnRails
[04:35:20] ajb: just restarted server, still returns "undefined method `leader_positions' for #<Club:0x007fbeb476a410>"
[04:35:40] Ropeney: rails c -> Club.first.leader_positions
[04:36:29] ajb: NoMethodError: undefined method `leader_positions' for #<Club:0x007fa55e3980b8>
[04:38:01] pawnbox: has joined #RubyOnRails
[04:38:43] Guest83086: has left #RubyOnRails: ()
[04:39:29] rhizome: get rid of the leader_position_id's, are they left over from previous belongs_to?
[04:39:45] silverdust: has joined #RubyOnRails
[04:40:48] smathy: sadaf2605, your question is not clear. You're asking basically whether there's a time penalty when iterating over a collection vs calling hard-coded things in sequence?
[04:42:13] sadaf2605: smathy: yep that is my question. which one is better?
[04:42:14] tuelz: has joined #RubyOnRails
[04:42:38] arup_r: has joined #RubyOnRails
[04:43:45] ajb: rhizome: I added them after I added the belongs_to
[04:43:57] smathy: sadaf2605, either measure it yourself, or don't worry about it.
[04:44:00] ajb: since you need to refer to what it has_many of
[04:44:02] Ropeney: sadaf2605: http://ruby-doc.org/stdlib-1.9.3/libdoc/benchmark/rdoc/Benchmark.html this shows a good way to time code if you want to know measurements
[04:44:18] rhizome: ajb: you don't need them on the has_many side
[04:44:20] Ropeney: do a migration to remove them
[04:44:41] ajb: so I don't need anything in the db that refers to the other records?
[04:45:11] rhizome: you do in leader_positions
[04:45:16] Ropeney: you have the references on leader_positions
[04:46:16] IFrank00: has joined #RubyOnRails
[04:46:20] beauby: has joined #RubyOnRails
[04:46:21] krz: has joined #RubyOnRails
[04:46:29] nemo_: has joined #RubyOnRails
[04:48:01] ajb: Ok, generated migration and ran it, still getting the same "undefined method `leader_positions' for #<Club:0x007fbeb70798d8>" error
[04:49:18] Ropeney: did u restart server after it?
[04:49:30] Lytol: has joined #RubyOnRails
[04:50:15] trosborn: has joined #RubyOnRails
[04:51:38] RegulationD: has joined #RubyOnRails
[04:52:39] silverdust: I see activemodel folder in the rails repo. Where is it in my rails project?
[04:53:02] Ropeney: silverdust: in your gem directory
[04:53:28] shivil: has joined #RubyOnRails
[04:53:37] silverdust: okay. I just want to know how things are working
[04:55:02] silverdust: Ropeney: there's a ruby and specs folder in ~/.gem
[04:55:05] GriffinHeart: has joined #RubyOnRails
[04:55:06] p1k: is there a nice way to trace the entire callstack for a single request ?
[04:55:52] roshanavand: has joined #RubyOnRails
[04:56:03] silverdust: and going through ruby I land in a cache folder
[04:56:25] silverdust: through specs, too many things but still don't find the rails project structure
[04:57:11] Ropeney: silverdust: did you use rbenv or?
[04:57:40] annlewis: has joined #RubyOnRails
[04:58:08] smathy: p1k, raise an exception and either use the built-in Rails display of the backtrace, or use Exception#backtrace
[04:58:11] sevenseacat: 'rails project structure'? what are you looking for?
[04:58:17] ruurd: has joined #RubyOnRails
[04:58:40] silverdust: sevenseacat: The core of rails
[04:58:52] sevenseacat: http://github.com/rails/rails
[04:58:59] Ropeney: so its in ~/.rbenv/versions then your ruby version etc etc
[04:59:07] smathy: silverdust, it's in a library, the code is on your computer in a directory that's not part of your app directory.
[04:59:09] smathy: That's the idea of libraries.
[04:59:18] sevenseacat: on your computer, its in your gem folder, as you were told.
[04:59:20] p1k: smathy: that won't really work
[04:59:42] smathy: p1k, then I'm not clear what you were asking.
[04:59:52] nemo__: has joined #RubyOnRails
[04:59:58] silverdust: okay sounds like a great idea. Avoid overloading a repo with libraries that can be individually installed
[05:00:17] p1k: smathy: because you only get one level of nesting right, so if function x called (a->b->c) and returned c and then called y(c) (and you raise from within y) you don't get the a->b->c stack trace
[05:00:20] silverdust: more like how npm_modules are in .gitignore
[05:00:22] smathy: silverdust, just like libraries of code in any language/system/etc.
[05:00:42] sevenseacat: silverdust: so glad you came up with this great idea for rails :P
[05:00:42] smathy: silverdust, no, more like if you installed a node module in the global area.
[05:00:51] youngbaks: has joined #RubyOnRails
[05:00:56] wldcordeiro: has joined #RubyOnRails
[05:01:13] smathy: p1k, yes you do.
[05:01:49] nemo_: has joined #RubyOnRails
[05:01:50] silverdust: smathy: oh yes I see. Then each project do not need to download it if it's in the global storage
[05:01:56] stevenw_: when I call rails console on my server, I get this Ignoring json-1.8.3 because its extensions are not built. Try: gem pristine json --version 1.8.3. Doing gem pristine doesn't get rid of the message
[05:02:24] silverdust: such an impeccable framework
[05:02:26] mytrile: has joined #RubyOnRails
[05:02:31] smathy: silverdust, correct, or it can download it if you set your env up that way. The point isn't really to avoid downloads, the point is to have static, tested, shared libraries of code.
[05:02:35] kies^: has joined #RubyOnRails
[05:03:18] smathy: silverdust, it's common to all languages/frameworks. Even PHP has PECL.
[05:03:52] silverdust: Laravel isn't that way
[05:04:14] silverdust: composer installed libraries are in vendor of the project root
[05:04:26] thecyclone: has joined #RubyOnRails
[05:05:29] p1k: smathy: no you really don't
[05:05:32] smathy: silverdust, I don't want to spend the time educating you about other languages. So sure, have it your way, Rails is the best.
[05:05:37] smathy: p1k, yes you do.
[05:06:23] dopamean_: has joined #RubyOnRails
[05:06:48] p1k: smathy: http://pastebin.com/fzFcbe6k
[05:07:07] GriffinHeart: has joined #RubyOnRails
[05:07:20] p1k: sorry for pastebin: http://pastie.org/10499136
[05:07:31] bendangelo: has joined #RubyOnRails
[05:07:46] wldcordeiro: has joined #RubyOnRails
[05:08:01] lacuna: has joined #RubyOnRails
[05:08:10] p1k: bar has no stack-trace for a,b,c (since that has returned before bar was run) so to raise an exception is not sufficient to get the fullstacktrace of everything that was run for a request
[05:08:11] wldcordeiro: has joined #RubyOnRails
[05:08:21] stevenw_: Do you prefer rbenv or rvm on your servers?
[05:08:29] smathy: stevenw_, rbenv
[05:09:23] pontiki: has joined #RubyOnRails
[05:10:11] smathy: p1k, ok, I had misunderstood what you were suggesting. No, from callstack A you will never ever be able to see callstack B.
[05:10:29] smathy: p1k, A has no idea that B even exists.
[05:10:51] smathy: ...or in your example, `bar` has no idea that c was ever called.
[05:10:52] p1k: yes I realize this, so I'm wondering if I can get the full callstack for a request, from start to finish
[05:11:31] smathy: p1k, a callstack is, as its name suggests, a stack. It returns the layers of calls that led from the entrypoint to the current point in the heap.
[05:12:01] p1k: yes that wasn't well worded -- stacktrace
[05:12:09] p1k: e.g. is there a debugger I can run the server with or preload into rack ?
[05:15:04] hephaestus_rg: has joined #RubyOnRails
[05:16:17] nya: has joined #RubyOnRails
[05:16:26] smathy: p1k, http://ruby-doc.org/core-2.2.3/TracePoint.html
[05:17:30] ajb: How would I go about making a different model in the new controller/view of one?
[05:17:45] pydave6367: has joined #RubyOnRails
[05:18:34] ajb: e.g. creating a leader in a club in the new method of the club controller
[05:19:08] smathy: ajb, !associations
[05:19:08] helpa: ajb: http://guides.rubyonrails.org/association_basics.html - Active Record Association Basics by Mike Gunderloy
[05:19:39] lxsameer: has joined #RubyOnRails
[05:19:42] lacuna: has joined #RubyOnRails
[05:22:27] stardiviner: has joined #RubyOnRails
[05:22:45] ajb: that doesn't help me
[05:22:51] ajb: I read through the whole thing
[05:23:23] thecyclone: Radar: sevenseacat I need some help please
[05:23:30] jonee: has joined #RubyOnRails
[05:24:05] Radar: thecyclone: still busy, sorry.
[05:24:15] Radar: thecyclone: just direct your message at the channel and someone will help.
[05:24:17] chrissonar: has joined #RubyOnRails
[05:24:25] thecyclone: so first of all you have written an exceptionally detailed book. Congrats!
[05:24:44] moeabdol: has joined #RubyOnRails
[05:25:07] yogeshrt: has joined #RubyOnRails
[05:25:31] thecyclone: on page 58, when i run "rails g rspec:install", it gives me the msg "http://pastie.org/10499153"
[05:25:52] Gustavo: has joined #RubyOnRails
[05:25:59] thecyclone: I am missing something?
[05:26:06] beauby: has joined #RubyOnRails
[05:27:17] dan0034001: has joined #RubyOnRails
[05:27:28] dan0034001: hello, anyone using wicked_pdf?
[05:27:47] dan0034001: I cant get custom fonts to render, when i say use the font family the text wont display
[05:28:14] arup_r: quazimodo: question please
[05:28:17] smathy: thecyclone, you either didn't put `gem "rspec-rails"` in your Gemfile or you didn't run `bundle` after doing so.
[05:29:06] thecyclone: smathy: did both
[05:29:27] thecyclone: my gemfile :http://pastie.org/10499158
[05:31:00] smathy: thecyclone, show me the output of your `bundle`
[05:31:57] thecyclone: smathy: this http://pastie.org/10499161
[05:32:05] nemo_: has joined #RubyOnRails
[05:32:16] smathy: thecyclone, you just ran that now?
[05:33:01] smathy: thecyclone, rm -rf .bundle
[05:33:07] smathy: ...then re-run it.
[05:33:23] smathy: thecyclone, bundler remembers options that you've run before, you must have run with the --without option at some point.
[05:33:39] toy: has joined #RubyOnRails
[05:34:02] smathy: (I hope radar didn't tell you to do that in the book)
[05:34:17] riotjones: has joined #RubyOnRails
[05:34:42] thecyclone: smathy : I followed all the steps thoroughly . This is the new output http://pastie.org/10499165
[05:34:51] trautwein: has joined #RubyOnRails
[05:35:37] rakm: has joined #RubyOnRails
[05:36:07] nemo__: has joined #RubyOnRails
[05:36:39] GriffinHeart: has joined #RubyOnRails
[05:37:14] smathy: thecyclone, so you're saying that you have no .bundle/config file, and http://pastie.org/10499158 is the contents of the Gemfile file (case sensitive) ?
[05:37:30] rodfersou: has joined #RubyOnRails
[05:37:41] smathy: thecyclone, and you're in a terminal/console running `bundle` or `bundle install` ?
[05:38:07] hanss: has joined #RubyOnRails
[05:38:26] d34th4ck3r: has joined #RubyOnRails
[05:38:47] thecyclone: yes I am in a terminal
[05:38:53] danman: has joined #RubyOnRails
[05:39:15] ruurd: has joined #RubyOnRails
[05:39:51] smathy: thecyclone, I dunno then, the aliens have landed and we're all fucked.
[05:39:58] smathy: thecyclone, reboot.
[05:40:10] lukekhamilton: has joined #RubyOnRails
[05:40:25] tagrudev: has joined #RubyOnRails
[05:40:53] jenrzzz: has joined #RubyOnRails
[05:41:05] thecyclone: smathy: restarting the terminal
[05:41:45] techsethi: has joined #RubyOnRails
[05:42:49] wldcordeiro: has joined #RubyOnRails
[05:43:09] NBarnes: has joined #RubyOnRails
[05:43:36] thecyclone: smathy: working now!!! o.O
[05:43:43] thecyclone: smathy: working now!!! o.O/
[05:43:51] thecyclone: what sorcery is this?
[05:44:07] smathy: thecyclone, ok cool, I don't know why it did that. I can't even imagine how spring could do that.
[05:44:39] thecyclone: smathy: thanks for your help mate!
[05:45:29] rvanlieshout: has joined #RubyOnRails
[05:45:48] AnoHito: has joined #RubyOnRails
[05:48:17] moeabdol: has joined #RubyOnRails
[05:48:31] nemo_: has joined #RubyOnRails
[05:48:37] smathy: thecyclone, you're welcome.
[05:49:31] krz: has joined #RubyOnRails
[05:49:40] sadaf2606: has joined #RubyOnRails
[05:49:43] beauby: has joined #RubyOnRails
[05:54:46] techsethi: has joined #RubyOnRails
[05:58:24] annlewis: has joined #RubyOnRails
[05:58:50] yardenbar: has joined #RubyOnRails
[05:59:01] _djbkd: has joined #RubyOnRails
[06:03:36] Jameser`: has joined #RubyOnRails
[06:03:46] jglover: has joined #RubyOnRails
[06:05:54] simkessy: Should I be able to raise and error from a private service class method and rescue it in the controller?
[06:06:15] Kando: has joined #RubyOnRails
[06:06:46] arBmind: has joined #RubyOnRails
[06:06:51] Kando: So I have a general workflow question
[06:07:20] dhjondoh: has joined #RubyOnRails
[06:07:24] Kando: Let's say someone is developing a rails application, he decides to make a git branch to save the original branch from current changes.
[06:07:32] workmad3: has joined #RubyOnRails
[06:07:42] Kando: In the middle of his changes he decides to stop working on it for the day
[06:08:15] arup_r: simkessy: yes, you can using `rescue`
[06:08:16] Kando: so when he comes back the next day, his local files are changed to whatever he modified, but neither the master branch nor the branch he made prior were modified because he didn't commit/push anything
[06:08:45] Kando: so when he starts up again, he would have to navigate (using commands) to his new branch, and then commit/push the new stuff, yes?
[06:09:48] Kando: Okay I think I understood it when I just put it into words lol
[06:10:00] Kando: Trying to get used to the whole workflow thing
[06:13:56] GriffinHeart: has joined #RubyOnRails
[06:16:26] oflannabhra: has joined #RubyOnRails
[06:18:25] cstyles: has joined #RubyOnRails
[06:18:26] rvanlieshout: OH RIGHT.. LET'S NOT FORGET WHAT DAY IT IS TODAY
[06:19:13] Kando: Back to the future day?
[06:19:36] herbst: has joined #RubyOnRails
[06:19:44] rvanlieshout: INTERNATIONAL CAPPS LOCK DAY :)
[06:20:03] rhizome: that was anticlimactic
[06:20:28] rvanlieshout: true, but it's annyoing :)
[06:21:04] rvanlieshout: and the amount of syntax errors you get is just amazing
[06:21:19] rhizome: i think i'm starting to see where this is coming from
[06:22:49] arup_r: rvanlieshout: HOW ARE YOU ?
[06:24:29] USvER: has joined #RubyOnRails
[06:24:32] Jameser`: has joined #RubyOnRails
[06:24:33] based_pdev_: has joined #RubyOnRails
[06:25:05] rubyonrailed: has joined #RubyOnRails
[06:26:37] tjbiddle: has joined #RubyOnRails
[06:27:22] baweaver: http://capslockday.com/
[06:27:23] mrbubbles_: has joined #RubyOnRails
[06:27:45] rvanlieshout: got nothing to code?
[06:27:48] tjbiddle: thecyclone: Type everything in capslock - copy it into irb as a string, and downcase it.
[06:27:54] arup_r: got a lot to code.. :(
[06:28:13] thecyclone: tjbiddle: CANNOT THANK YOU ENOUGH FOR THIS (Y)
[06:28:34] arup_r: tjbiddle: nice nice ... hahaha
[06:29:00] arup_r: tjbiddle: which one should we use .. downcase or downcase! ?
[06:29:40] tjbiddle: arup_r: Either works as we're not saving into a variable and the result is outputted in irb
[06:30:37] LudicrousMango: has joined #RubyOnRails
[06:30:37] arup_r: oh. yeas.
[06:31:40] relix: has joined #RubyOnRails
[06:32:57] stannard: has joined #RubyOnRails
[06:33:46] arup_r: has joined #RubyOnRails
[06:34:36] luckyruby: has joined #RubyOnRails
[06:35:07] Criten: has joined #RubyOnRails
[06:35:25] jenrzzz: has joined #RubyOnRails
[06:35:28] Sigma00: has joined #RubyOnRails
[06:35:37] codelahoma: has joined #RubyOnRails
[06:36:00] jtperreault: has joined #RubyOnRails
[06:36:37] bodie_: has joined #RubyOnRails
[06:36:53] alexblom: has joined #RubyOnRails
[06:37:03] luckyruby: If I destroy a child record through a parent's accepts_nested_attributes_for with _destroy, the child model's validations don't run. Is that expected behavior?
[06:37:22] luckyruby: Rails 4.2.3 btw
[06:37:51] clamstar: has joined #RubyOnRails
[06:37:55] luckyruby: the parent's validation still runs though
[06:37:56] rvanlieshout: do validations ever run on destroy?
[06:37:56] arup_r: I think you need to enable validates option. did you ?
[06:37:58] Davey: has joined #RubyOnRails
[06:37:58] Davey: has joined #RubyOnRails
[06:38:25] luckyruby: arup_r: can you elaborate?
[06:38:58] arup_r: In # post.rb for example
[06:39:14] arup_r: has_many :comments, validate: true
[06:39:27] arup_r: luckyruby: http://apidock.com/rails/ActiveRecord/Associations/ClassMethods/has_many
[06:39:46] luckyruby: it's true by default
[06:40:03] arup_r: yes I misread
[06:41:33] Rin: has joined #RubyOnRails
[06:42:41] arup_r: luckyruby: There you go: "By default the associated records are protected from being destroyed. If you want to destroy any of the associated records through the attributes hash, you have to enable it first using the :allow_destroy option. This will allow you to also use the _destroy key to destroy existing records:"
[06:42:43] simkessy: Hi, I'm trying to return the result of a private method called by another private method to a variable but it keeps returning nil. I can't see why: https://gist.github.com/simkessy/940a54bab8aabed75334
[06:42:54] luckyruby: The real issue is, child.marked_for_destruction? isn't working from the parent model.
[06:42:58] tuelz: has joined #RubyOnRails
[06:43:03] krz: has joined #RubyOnRails
[06:43:06] arup_r: luckyruby: see what I said
[06:43:08] luckyruby: arup_r: yea, I have allow_destroy true for accepts_nested_attributes
[06:43:49] arup_r: luckyruby: May be you can arrange a gist to show the code.. and it will help to understand what you have in the code
[06:44:58] solars: has joined #RubyOnRails
[06:45:52] luckyruby: arup_r: https://gist.github.com/luckyruby/0d67e1d3f560c9dcf710
[06:46:45] arup_r: luckyruby: sorry for not being helpful till now. Look http://api.rubyonrails.org/classes/ActiveRecord/NestedAttributes/ClassMethods.html
[06:46:58] arup_r: **Validating the presence of a parent model**
[06:47:17] arup_r: ^^ this section
[06:48:01] ruurd: has joined #RubyOnRails
[06:48:05] eGGsha: has joined #RubyOnRails
[06:48:26] OyoKooN: has joined #RubyOnRails
[06:50:32] arup_r: simkessy: use create! and see what error it is throwing..
[06:50:53] simkessy: instead of build?
[06:51:21] arup_r: your record is not getting saved it seems for any reason and that is why you are getting `new_card.id` is `nil`
[06:51:46] arup_r: simkessy: https://gist.github.com/simkessy/940a54bab8aabed75334#file-payment-service-rb-L10
[06:52:04] arup_r: My guess, but create! will help you to debug it
[06:52:29] RegulationD: has joined #RubyOnRails
[06:52:49] simkessy: Ah okay, I'll give that a shot thanks!
[06:54:11] ruurd: has joined #RubyOnRails
[06:54:20] Kando: Does anyone know the approximate download size when installing ruby and Rails on ubuntu ?
[06:55:48] kp666: has joined #RubyOnRails
[06:55:55] simkessy: arup_r: create doesn't exist for the stripe api and that's what I'm working with
[06:56:01] simkessy: but I think I figure out the issue
[06:56:06] herbst: Kando: it will show that before you have to press [y]
[06:56:06] nhhagen: has joined #RubyOnRails
[06:56:09] simkessy: I'll update if I'm still stuck
[06:56:16] dan0034001: i am trying to convert a pdf to an image
[06:56:21] Kando: Alright, Thanks herb :)
[06:56:27] dan0034001: getting: Directory .gs not found
[06:56:44] dan0034001: and no images in this image list
[06:57:41] nfk|laptop: has joined #RubyOnRails
[06:57:50] dan0034001: https://gist.github.com/anonymous/d7e5a4d1598cd19ffe75
[06:58:33] trosborn: has joined #RubyOnRails
[06:59:10] annlewis: has joined #RubyOnRails
[06:59:23] GriffinHeart: has joined #RubyOnRails
[06:59:58] dan0034001: would you know anything arup_r?
[07:00:34] eoy: has joined #RubyOnRails
[07:01:59] youngbaks: has joined #RubyOnRails
[07:02:00] arup_r: dan0034001: No idea where is `.gs` in your code
[07:02:10] dan0034001: its no where
[07:02:17] dan0034001: its ghostscript i persume
[07:02:24] dan0034001: that error is in console
[07:02:37] dan0034001: and the no images in this image list is in browser
[07:04:28] trosborn: has joined #RubyOnRails
[07:05:34] Pazician: has joined #RubyOnRails
[07:06:35] Linuus: has joined #RubyOnRails
[07:06:53] gavit: has joined #RubyOnRails
[07:08:37] Didac: has joined #RubyOnRails
[07:09:43] GriffinHeart: has joined #RubyOnRails
[07:11:37] Gustavo: has joined #RubyOnRails
[07:12:19] jas02: has joined #RubyOnRails
[07:13:10] draken: where is my hoverboard
[07:13:38] smathy: Lexus has it.
[07:14:36] dan0034001: Radar, any good info on converting a pdf to image?
[07:14:45] Radar: dan0034001: !8ball
[07:14:51] Radar: HELPA HAS SPOKEN
[07:15:09] adac: has joined #RubyOnRails
[07:15:12] Radar: I have seriously blocked that from my memory.
[07:15:18] Radar: It was too traumatic.
[07:15:29] Radar: Anything to do with PDFs and Rails is... not my idea of fun.
[07:15:42] dan0034001: well i have got html -> PDF
[07:15:48] dan0034001: now i want to get PDF -> BMP
[07:16:00] dan0034001: to print out labels basically
[07:16:20] wpp: has joined #RubyOnRails
[07:16:20] dan0034001: im just having issues with ghost script i think...
[07:16:52] Pazician: has joined #RubyOnRails
[07:17:30] dan0034001: any idea how to fix this:
[07:17:31] Radar: seems like it
[07:17:33] dan0034001: Unable to load application: RuntimeError: This installation of RMagick was configured with ImageMagick 6.9.0 but ImageMagick 6.9.2-3 is in use.
[07:17:33] dan0034001: 02:17:05 web.1 | /Users/dan0034001/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require': This installation of RMagick was configured with ImageMagick 6.9.0 but ImageMagick 6.9.2-3 is in use. (RuntimeError)
[07:17:33] helpa: Do not beg / plead with people to help you. This includes asking questions like "Any ideas?" after posting your original question.
[07:17:36] Radar: dan0034001: !gist
[07:17:36] helpa: dan0034001: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[07:17:48] Radar: Step 1: burn it all down
[07:18:00] Radar: Oops sorry that's my moving out guide that I'm reading from there
[07:18:02] Ergo: has joined #RubyOnRails
[07:18:12] dan0034001: https://gist.github.com/anonymous/d7e5a4d1598cd19ffe75
[07:18:13] Radar: dan0034001: Looks like you'll need to ask Heroku about that.
[07:18:17] dopie: How would I write this where statement or find statement... I would like to search all Videos for a particular person
[07:18:35] dan0034001: Person.videos
[07:18:41] dan0034001: person has_many :videos
[07:18:57] dan0034001: Videos.where(:person => p)
[07:19:45] arup_r: or Person.find(person_id).videos
[07:20:03] dan0034001: arup_r thats what i mean lol
[07:20:10] dan0034001: less literal version haha
[07:20:12] arup_r: dan0034001: I got you..
[07:20:21] MartinEl_: has joined #RubyOnRails
[07:20:26] dan0034001: god damn this pdf -> image is killing me
[07:21:08] arup_r: dan0034001: :( sorry I wouldn't be helpful, that is why I am silent
[07:21:29] dan0034001: how about this:
[07:21:34] dan0034001: Unable to load application: RuntimeError: This installation of RMagick was configured with ImageMagick 6.9.0 but ImageMagick 6.9.2-3 is in use.
[07:21:34] dan0034001: 02:17:05 web.1 | /Users/dan0034001/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require': This installation of RMagick was configured with ImageMagick 6.9.0 but ImageMagick 6.9.2-3 is in use. (RuntimeError)
[07:21:43] dan0034001: just broke my server
[07:22:01] dan0034001: by messing with brew unlink and install of new version
[07:22:53] aganov: has joined #RubyOnRails
[07:23:15] sameerynho: has joined #RubyOnRails
[07:23:36] trosborn: has joined #RubyOnRails
[07:24:59] moeabdol: has joined #RubyOnRails
[07:27:31] DEA7TH: has joined #RubyOnRails
[07:27:41] trosborn: has joined #RubyOnRails
[07:30:35] GreatSage: has left #RubyOnRails: ()
[07:36:11] jenrzzz: has joined #RubyOnRails
[07:36:20] arBmind: has joined #RubyOnRails
[07:36:57] tjbiddle: has joined #RubyOnRails
[07:37:56] rromanch_: has joined #RubyOnRails
[07:38:31] chipotle: has joined #RubyOnRails
[07:38:56] trosborn: has joined #RubyOnRails
[07:42:02] roshanavand: has joined #RubyOnRails
[07:42:37] dionysus69: has joined #RubyOnRails
[07:42:58] trosborn: has joined #RubyOnRails
[07:45:32] tjbiddle: has joined #RubyOnRails
[07:46:35] darutoko: has joined #RubyOnRails
[07:49:44] luckyruby: arup_r: Figured it out. It's cause cart_add_on is a child of both cart and cart_skier and I was checking marked_for_destruction? through cart_skier instead of cart. ie, cart.add_ons.any?(&:marked_for_destruction?) #=> true while skier.add_ons.any?(&:marked_for_destruction?) #=> false
[07:50:23] sinkensabe: has joined #RubyOnRails
[07:51:16] sundhell: has joined #RubyOnRails
[07:52:11] eoy_: has joined #RubyOnRails
[07:54:04] comrad: has joined #RubyOnRails
[07:55:11] nya: has joined #RubyOnRails
[07:55:18] kalusn: has joined #RubyOnRails
[07:55:35] Ryan1013: has joined #RubyOnRails
[07:55:40] workmad3: has joined #RubyOnRails
[07:57:06] jxs_: has joined #RubyOnRails
[07:57:43] artto: has joined #RubyOnRails
[07:58:37] teclator: has joined #RubyOnRails
[07:59:01] mikecmpbll: has joined #RubyOnRails
[07:59:04] Pazician: has joined #RubyOnRails
[07:59:43] Pazician: has joined #RubyOnRails
[07:59:57] annlewis: has joined #RubyOnRails
[07:59:57] Gustavo: has joined #RubyOnRails
[08:00:03] vigintas: has joined #RubyOnRails
[08:01:24] Peg-leg: has joined #RubyOnRails
[08:05:12] nemo_: has joined #RubyOnRails
[08:06:08] Ryan1013: has left #RubyOnRails: ()
[08:07:56] gingray: has joined #RubyOnRails
[08:08:07] srinidhi: has joined #RubyOnRails
[08:08:40] lipoqil: has joined #RubyOnRails
[08:08:53] arup_r: luckyruby: cool
[08:12:46] mark2: has joined #RubyOnRails
[08:12:53] njero: has joined #RubyOnRails
[08:15:09] Ryan1013: has joined #RubyOnRails
[08:15:28] Ryan1013: has left #RubyOnRails: ()
[08:15:38] Takumo: has joined #RubyOnRails
[08:15:38] Takumo: has joined #RubyOnRails
[08:16:07] bennysan: has joined #RubyOnRails
[08:19:43] dopie: %H:%M includes hour and minute how do i include am/pm?
[08:20:34] czerasz: has joined #RubyOnRails
[08:20:58] elaptics: dopie: %p or %P - assuming you're talking about strftime formatting here
[08:21:28] elaptics: weirdly %P is for the lowercase version whilst %p is for the uppercase.....
[08:22:00] elaptics: ??\_(???)_/??
[08:22:03] arup_r: %P and %p reflects exactly opposite of what they do :p
[08:22:55] elaptics: yep - maybe it's a meta commentary on the absurdities of dates and times and the hassle it causes us programmers
[08:25:13] jsrn_: has joined #RubyOnRails
[08:27:12] srinidhi: has joined #RubyOnRails
[08:28:09] trosborn: has joined #RubyOnRails
[08:28:33] yfeldblum: has joined #RubyOnRails
[08:30:57] matthias__: has joined #RubyOnRails
[08:31:53] rvanlieshout: hmm. my rspec is unable to load my draper decorators
[08:32:07] roshanavand: has joined #RubyOnRails
[08:32:43] marr: has joined #RubyOnRails
[08:32:45] arup_r: hey, User and Group has HABTM. Now, little confused to take out only Groups which has no users. How to write the query ?
[08:33:37] rvanlieshout: Group.where('id NOT IN (select group_id from <join_table>)')
[08:33:59] jxs_: has joined #RubyOnRails
[08:34:39] arup_r: rvanlieshout: RAW SQL ? humm. I skipped that thought
[08:36:09] arup_r: That is why I like has_many through always.
[08:36:35] rvanlieshout: there is nothing wrong with a habmt
[08:38:06] Gustavo: has joined #RubyOnRails
[08:38:47] arup_r: that is true. but my bad feeling .. don't care that feeling though.
[08:39:00] arup_r: rvanlieshout: thanks for telling the trick
[08:39:17] rvanlieshout: back to my decorator issue :)
[08:39:35] arBmind: has joined #RubyOnRails
[08:41:36] trosborn: has joined #RubyOnRails
[08:41:41] Pumukel: has joined #RubyOnRails
[08:43:37] oflannabhra: has joined #RubyOnRails
[08:43:44] tuelz: has joined #RubyOnRails
[08:44:29] GriffinHeart: has joined #RubyOnRails
[08:45:17] wethu: has joined #RubyOnRails
[08:46:18] spijet: Finished my query generator, it seems to work. I'll see how it works when app finally gets the rows from the DB. :D
[08:46:28] Pazician: has joined #RubyOnRails
[08:46:43] voker57: has joined #RubyOnRails
[08:47:50] emilkarl: has joined #RubyOnRails
[08:49:33] tbuehlmann: spijet, couldn't read what you wrote before that and I'm interested about what you're doing. do you mind telling me? (query would be fine for me to not make noise in here)
[08:50:46] DEA7TH: has joined #RubyOnRails
[08:50:52] spijet: tbuehlmann: it's gonna be a webapp which extracts NAT event logs from a DB. DB server is low on RAM and the DB input rate is ~300K records per second, so it's really slow. :P
[08:51:08] rvanlieshout: ok. could somebody please share a min of their time? My draper rspec doesn't know about draper: https://gist.github.com/rvanlieshout/8b90bc5ae9bea4f24612
[08:51:27] bmalum: has joined #RubyOnRails
[08:52:15] tbuehlmann: rvanlieshout, do you need to require 'rails_helper' instead of 'spec_helper'?
[08:52:45] rvanlieshout: lemme check.. the file was generated by the draper gem
[08:53:08] rvanlieshout: that worked :) thanks. lemme create a pull request for that one then i guess
[08:53:20] RegulationD: has joined #RubyOnRails
[08:53:24] tbuehlmann: great. that's kind of new since rspec-rails version x
[08:53:35] rvanlieshout: oh. so that's why it might not be in the genrator
[08:54:24] trosborn: has joined #RubyOnRails
[08:54:28] arup_r: has joined #RubyOnRails
[08:54:55] tvw: has joined #RubyOnRails
[08:58:17] Pazician: has joined #RubyOnRails
[09:00:32] eGGsha: has joined #RubyOnRails
[09:00:43] annlewis: has joined #RubyOnRails
[09:01:30] jgt1: has joined #RubyOnRails
[09:02:04] jxs_: has joined #RubyOnRails
[09:03:30] spijet: Completed 200 OK in 1600469ms (Views: 67.4ms | ActiveRecord: 0.0ms)
[09:04:17] rvanlieshout: happy that your view only took 67.4ms :)
[09:04:35] dionysus69: has joined #RubyOnRails
[09:05:52] sheepman: I'm not happy, thats slow ;) Completed 200 OK in 8ms (Views: 5.5ms | ActiveRecord: 0.2ms)
[09:05:53] nya: has joined #RubyOnRails
[09:06:22] spijet: sheepman: that's one super slow DB
[09:06:46] sheepman: ha this is a dev site on my laptop using sqlite ;)
[09:06:46] workmad3: has joined #RubyOnRails
[09:08:21] spijet: sheepman: it's a NAT event log server with PgSQL DB
[09:08:32] spijet: and 300k records per seconf
[09:08:40] chipotle: has joined #RubyOnRails
[09:09:33] sheepman: pffft. I did mention mines running my laptop? Which was owned by Chuck Norris in the 80's? essentially... you always lose ;)
[09:10:52] spijet: sheepman: no, you, since it's an ancient piece of hardware running a gzip-9-compressed ZFS dataset on a single HDD :3
[09:12:08] spijet: the company has no monies to buy decent hardware, so ancient pc it is
[09:15:55] defsdoor: has joined #RubyOnRails
[09:17:40] moeabdol: has joined #RubyOnRails
[09:17:59] Pupeno: has joined #RubyOnRails
[09:18:43] roshanavand: has joined #RubyOnRails
[09:21:45] armyriad: has joined #RubyOnRails
[09:25:27] d34th4ck3r: Is there a way to pass command line arguments to a test when using rake test ?
[09:26:31] universa1: what are you trying to achieve?
[09:27:17] artto: has joined #RubyOnRails
[09:27:30] d34th4ck3r: I want to write a test that needs access_token . I don???t want to hard code it. Thinking of a way to pass it from the command line. Is there any better option?
[09:27:44] rvanlieshout: d34th4ck3r: use ENV variables
[09:28:13] universa1: secrets.yml in newer rails versions iirc
[09:29:38] d34th4ck3r: That???s a choice, I guess.
[09:30:06] GriffinHeart: has joined #RubyOnRails
[09:30:28] roshanavand: has joined #RubyOnRails
[09:31:19] naftilos76: has joined #RubyOnRails
[09:31:40] renegadeandy: has joined #RubyOnRails
[09:31:47] GriffinHeart: has joined #RubyOnRails
[09:32:37] Kando: has joined #RubyOnRails
[09:33:00] Kando: Trying out the user scaffolding, I can't believe just one command made all that for me :o
[09:33:10] Kando: https://rails-tutorial-ridwansameer-1.c9.io/users
[09:33:36] Kando: Someone make a user there :p
[09:33:44] TPBallbag: has joined #RubyOnRails
[09:34:29] spijet: I was really surprised when I saw '<<' as append operator for strings. Now I'm even more surprised, when I see a heredoc in SMTP example. :O
[09:35:40] sameerynho: has joined #RubyOnRails
[09:37:42] rodfersou: has joined #RubyOnRails
[09:38:20] stien: has joined #RubyOnRails
[09:39:34] p1k: has joined #RubyOnRails
[09:40:37] matthias__: has joined #RubyOnRails
[09:41:57] quazimodo: i have <4> environments on AWS EBS that have been unresponsive, 502'ing and generally fucked for the last hour and half stuck in 'updating'
[09:42:09] quazimodo: I don't even know how to turn the cunt off
[09:42:27] quazimodo: it has no power switch
[09:43:49] moeabdol: has joined #RubyOnRails
[09:51:41] jenrzzz: has joined #RubyOnRails
[09:52:59] Pazician: has joined #RubyOnRails
[09:54:23] dclo: has joined #RubyOnRails
[09:55:03] d34th4ck3r: Is it safe to keep config/secrets.yml public?
[09:56:44] FailBit: as long as your dev env isn't public and your production key isn't in there
[09:57:56] d34th4ck3r: Argh. I accidently pushed my secrets.yml to public. Now, I???m thinking of either deleting this file and/or creating new values. Is there a better way to solve this problem?
[09:58:37] riotjones: d34th4ck3r: whats the link of the repo?
[09:58:56] vigintas: has joined #RubyOnRails
[09:59:11] d34th4ck3r: I don???t think it???s such a good idea to tell, is it?
[09:59:21] riotjones: hehe, you're right ;)
[09:59:55] universa1: d34th4ck3r: usually you add secrets.yml to gitignore, have a secrets.yml.sample with dummy values checked in, which can be used to easily set up the dev env
[09:59:58] krz: has joined #RubyOnRails
[10:00:03] d34th4ck3r: Well, the application is still in its is initial phase with no important information, so I???m safe haha
[10:00:10] universa1: and in production you have created that file manually or on initial deployment ;)
[10:00:44] renews: has joined #RubyOnRails
[10:01:15] d34th4ck3r: universa1: Thanks!
[10:01:25] d34th4ck3r: but how do I deal with my current situation ?
[10:01:29] annlewis: has joined #RubyOnRails
[10:01:30] TPBallbag: has joined #RubyOnRails
[10:01:52] universa1: d34th4ck3r: or use env vars... remove the file from version control, generate a new one with new keys.
[10:02:06] universa1: d34th4ck3r: and also make sure you change the one on your deployment machine.
[10:03:08] d34th4ck3r: I don???t have the application deployed yet, so I???m safe. phew!
[10:03:12] d34th4ck3r: btw what is the way to generate a new file?
[10:03:34] universa1: d34th4ck3r: open your editor and change the values...
[10:03:49] universa1: rake secret will generate new tokens for you to insert into that file
[10:04:08] nhhagen: has joined #RubyOnRails
[10:05:02] d34th4ck3r: for both the values in development and test?
[10:05:46] sloggerkhan: has joined #RubyOnRails
[10:06:01] universa1: you can change all... but if you're using them only locally it doesn't matter anyways...
[10:06:20] bruno-: has joined #RubyOnRails
[10:06:54] d34th4ck3r: Yeah! But I just feel stupid now, so I???m being extra paraoid over each step haha
[10:07:53] vigasdeep: has joined #RubyOnRails
[10:08:08] beauby: has joined #RubyOnRails
[10:10:19] d34th4ck3r: Done! thanks! Is there any other security precaution(besides ignoring secrets.yml) you???d be recommending me to take when I???m writing a public rails application?
[10:10:34] teclator: has joined #RubyOnRails
[10:10:56] moeabdol: has joined #RubyOnRails
[10:11:27] universa1: d34th4ck3r: http://blog.codeship.com/preproduction-checklist-for-a-rails-app/
[10:15:23] d34th4ck3r: universa1: ah! Thanks but the article is more from vulnerabilities point of view. My question is more towards public repository point of view. if you know what I mean.
[10:15:50] GriffinHeart: has joined #RubyOnRails
[10:15:57] universa1: d34th4ck3r: anything that contains sensitive information like access tokens, database passwords should not be checked in.
[10:16:49] bruno-: has joined #RubyOnRails
[10:16:56] Rin: has left #RubyOnRails: ()
[10:18:47] cleopatra: has joined #RubyOnRails
[10:20:23] rickmasta: has joined #RubyOnRails
[10:20:38] cleopatra: any use acts_as_tree here?
[10:21:50] helpa: Don't ask "does anyone use <thing>?". It's better to just state your problem and if anyone has used <thing> they will most likely answer.
[10:22:12] universa1: and some people might be able to help even if they are not using <thing>
[10:22:21] bruno-: has joined #RubyOnRails
[10:22:35] cleopatra: sorry universa1
[10:23:21] cleopatra: as I can create a factory using acts tree !?
[10:23:46] nfk|laptop: has joined #RubyOnRails
[10:23:54] symbole: has joined #RubyOnRails
[10:24:56] Gustavo: has joined #RubyOnRails
[10:25:31] universa1: what are you trying to do?
[10:26:30] blackmesa: has joined #RubyOnRails
[10:27:22] d34th4ck3r: Now I can finally ask my real question. :D I have following test file: https://github.com/FreeFromBorders/f2b_website/blob/handling_facebook/test/controllers/posts_controller_test.rb but it gives me following error on running rake: https://gist.github.com/d34th4ck3r/d4a97a4e7916e08455b0
[10:27:50] bruno-: has joined #RubyOnRails
[10:28:10] universa1: d34th4ck3r: test and development use different databases.
[10:28:30] ldnunes: has joined #RubyOnRails
[10:28:33] universa1: d34th4ck3r: you either need to use fixtures or factories to "create" the objects you need for your tests.
[10:28:54] cleopatra: i want write a factory association in the same model using act_as_tree universa1
[10:29:28] trosborn: has joined #RubyOnRails
[10:29:38] krz: has joined #RubyOnRails
[10:30:13] arBmind: has joined #RubyOnRails
[10:30:33] cleopatra: I've seen how to do it!
[10:31:56] cornerma1: has joined #RubyOnRails
[10:33:14] mostlybadfly: has joined #RubyOnRails
[10:34:51] lukekhamilton: has joined #RubyOnRails
[10:36:26] yfeldblum: has joined #RubyOnRails
[10:37:31] gingray: has joined #RubyOnRails
[10:40:58] tuelz: has joined #RubyOnRails
[10:41:35] pwnd_nfsw: has joined #RubyOnRails
[10:41:36] renegadeandy: Hi folks, can somebody help with this question on devise : https://gist.github.com/renegadeandy/b7c7a71043fe6ac4fa16
[10:42:54] eikood: has joined #RubyOnRails
[10:42:58] pwnd_nfsw: I was pretty sure Devise did that by default
[10:43:37] bruno-: has joined #RubyOnRails
[10:43:54] renegadeandy: pwnd_nfsw: if it is???then im not getting that behaviour
[10:43:55] pwnd_nfsw: renegadeandy, however, after you save the user, you can do sign_in @model
[10:44:29] krz: has joined #RubyOnRails
[10:44:42] renegadeandy: pwnd_nfsw: cheers!
[10:45:03] renegadeandy: i replaced the create in registrations controller so ???default??? is not a thing for my project. However sign_in @model did it, thanks.
[10:45:57] AzaToth: has joined #RubyOnRails
[10:46:09] jammanbo: has joined #RubyOnRails
[10:47:06] Gustavo: has joined #RubyOnRails
[10:48:07] Pazician: has joined #RubyOnRails
[10:50:29] jammanbo: I've quite a specific issue but perhaps there's a simple solution. Using Devise and Sidekiq. Have mounted the Sidekiq Sinatra app and protected it with Devise as per instructions: `authenticate :user, ->(user) {...} do; mount Sidekiq::Web => '/sidekiq'; end`.
[10:50:47] jammanbo: A problem now arises upon asset precompilation during a `cap deploy`. See I'm using dotenv-rails to hold the Devise secret and it appears that the .env file is loaded during precompilation and thus Devise throws an error. Anyone advise on what to do here?
[10:51:15] jammanbo: the .env file *isn't loaded*
[10:53:38] Deck`: has joined #RubyOnRails
[10:54:15] RegulationD: has joined #RubyOnRails
[10:56:22] sadaf2605: has joined #RubyOnRails
[10:57:59] TPBallbag: has joined #RubyOnRails
[11:01:35] monq: has joined #RubyOnRails
[11:02:15] annlewis: has joined #RubyOnRails
[11:06:00] moeabdol: has joined #RubyOnRails
[11:06:27] arthurnn: has joined #RubyOnRails
[11:07:04] bruno-: has joined #RubyOnRails
[11:07:22] weihan: has joined #RubyOnRails
[11:11:55] spijet: One more question: what's the recommended/simplest ActiveJob queue? It seems that :inline makes the server wait for the job to finish before giving the page to the client, while I need it to start a job and output the page immediately (the page says something like "Thank you, your query will be processed soon.").
[11:12:04] jsrn_: has joined #RubyOnRails
[11:12:25] cswelin: has joined #RubyOnRails
[11:12:27] Linuus: has joined #RubyOnRails
[11:12:53] workmad3: spijet: sidekiq is a good choice nowadays
[11:13:17] spijet: workmad3: but it needs Redis. I think Redis is a bit of overkill for me. :(
[11:14:49] spijet: My goal is that these jobs are run separately from the web-app itself, so client sees confirmation as soon as he clicks "Submit" button, and gets an e-mail later.
[11:15:23] rvanlieshout: spijet: you could look at https://github.com/chanks/que
[11:15:25] rvanlieshout: but never used it
[11:15:28] rvanlieshout: always use sidekiq
[11:17:14] stamina: has joined #RubyOnRails
[11:17:28] workmad3: spijet: yeah... because redis is so super-complicated to set up and keep running... :)
[11:17:39] allcentury: has joined #RubyOnRails
[11:18:32] spijet: workmad3: I'd like to avoid installing yet more stuff to that server just for one little queue which is gonna be one-element-long most of the time anyway :)
[11:19:08] pawnbox: has joined #RubyOnRails
[11:19:28] spijet: anyway, my workday is over, so ttyl :)
[11:19:53] pawnbox: has joined #RubyOnRails
[11:20:33] pawnbox: has joined #RubyOnRails
[11:21:17] pawnbox: has joined #RubyOnRails
[11:22:41] artto: has joined #RubyOnRails
[11:23:22] universa1: delayed_job still works nicely.
[11:25:16] blackmesa: has joined #RubyOnRails
[11:25:51] mytrile: has joined #RubyOnRails
[11:27:22] ericjphillips: has joined #RubyOnRails
[11:27:52] Linuus: has joined #RubyOnRails
[11:28:07] chills42: has joined #RubyOnRails
[11:29:17] chills42_: has joined #RubyOnRails
[11:30:48] Palsson: has joined #RubyOnRails
[11:32:17] nhhagen: has joined #RubyOnRails
[11:33:15] pawnbox: has joined #RubyOnRails
[11:33:35] beauby: has joined #RubyOnRails
[11:34:01] nickenchuggets: has joined #RubyOnRails
[11:34:35] darrencauthon: has joined #RubyOnRails
[11:36:47] atzorvas: has joined #RubyOnRails
[11:38:03] artto: has joined #RubyOnRails
[11:41:41] ldnunes: has joined #RubyOnRails
[11:43:06] njero: has joined #RubyOnRails
[11:50:07] pwnd_nsfw: has joined #RubyOnRails
[11:52:33] beauby: has joined #RubyOnRails
[11:53:03] atzorvas: has joined #RubyOnRails
[11:53:08] jenrzzz: has joined #RubyOnRails
[11:56:13] Cervajz: has joined #RubyOnRails
[11:57:01] nhhagen: has joined #RubyOnRails
[11:58:06] stien: has joined #RubyOnRails
[12:00:19] symbole: has joined #RubyOnRails
[12:00:43] artto_: has joined #RubyOnRails
[12:02:58] pawnbox: has joined #RubyOnRails
[12:03:03] annlewis: has joined #RubyOnRails
[12:04:51] tuelz: has joined #RubyOnRails
[12:05:14] symbol: has joined #RubyOnRails
[12:06:46] kalusn: has joined #RubyOnRails
[12:07:55] Gustavo: has joined #RubyOnRails
[12:08:14] jgpawletko: has joined #RubyOnRails
[12:10:00] dionysus69: has joined #RubyOnRails
[12:11:56] bruno-: has joined #RubyOnRails
[12:13:04] atomical: has joined #RubyOnRails
[12:14:30] Cork: if a related nested model instance gets created through model.children_attributes, is there a way to find the ones created from model.children?
[12:15:00] Cork: model.children_attributes = array; model.save; model.children => only the new ones
[12:17:37] rvanlieshout: you can get that before save
[12:18:01] Cork: they don't have an id as they aren't saved yet
[12:18:27] Cork: (and it is just a hash not an active record instance)
[12:19:22] rvanlieshout: what do you want to achieve?
[12:19:35] Cork: i have a form that has a nested sub form
[12:19:53] Cork: i want to process the form and then check the new elements created
[12:20:38] Cork: but i don't see a way to know how things changed if you use accept_nested_attributes
[12:21:15] rvanlieshout: you could use the after_create callback in the child instatnces for that
[12:21:56] Cork: you mean something like @new_element = true ?
[12:22:08] Gustavo: has joined #RubyOnRails
[12:22:36] Cork: ya, that would work, i'm a bit surprised there isn't a built in way though
[12:23:17] n008f4g_: has joined #RubyOnRails
[12:23:44] CanTonic: has joined #RubyOnRails
[12:24:22] rvanlieshout: after save is built in
[12:24:22] adre: has joined #RubyOnRails
[12:25:26] CanTonic: has joined #RubyOnRails
[12:28:59] rrawlins: has joined #RubyOnRails
[12:29:59] pwnd_nsfw: has joined #RubyOnRails
[12:30:26] nertzy: has joined #RubyOnRails
[12:30:27] ericjphillips: has joined #RubyOnRails
[12:30:52] CanTonic: has joined #RubyOnRails
[12:34:34] pawnbox: has joined #RubyOnRails
[12:35:25] teclator: has joined #RubyOnRails
[12:35:45] Gustavo: has joined #RubyOnRails
[12:36:01] marr: has joined #RubyOnRails
[12:36:38] gustav__: has joined #RubyOnRails
[12:37:11] mag42c: has joined #RubyOnRails
[12:37:21] tvw: has joined #RubyOnRails
[12:38:01] rrawlins: Anyone have any idea how to access the name of the currently rendered template from a layout? i.e. In the controller I call "render 'exmaple'" - in my application layout I need access to the name of the rendered view.
[12:38:09] jxs_: has joined #RubyOnRails
[12:38:21] rrawlins: I've been Googling for a while, but yet to find anything which works.
[12:38:28] rvanlieshout: rrawlins: i don't think there is a way for that
[12:38:31] Gustavo: has joined #RubyOnRails
[12:38:37] rvanlieshout: because you can render several things in the layout
[12:38:47] rvanlieshout: it's not always just a simple string filename
[12:39:24] rrawlins: rvanlieshout: ah, yes, that would make sense.
[12:39:45] youngbaks: has joined #RubyOnRails
[12:39:46] rvanlieshout: the view is rendered BEFORE the layout though
[12:40:38] pawnbox: has joined #RubyOnRails
[12:41:07] rvanlieshout: so you could set an instance var if needed
[12:46:56] rrawlins: rvanlieshout: yeah a variable is most likely the route I'll go, just wanted something which worked generically across various views.
[12:49:46] Ergo: has joined #RubyOnRails
[12:50:32] rickmasta: has joined #RubyOnRails
[12:50:49] hfp: has joined #RubyOnRails
[12:51:27] hfp_work: has joined #RubyOnRails
[12:51:33] CanTonic: has joined #RubyOnRails
[12:51:45] sevenseacat: has joined #RubyOnRails
[12:51:52] Cervajz_: has joined #RubyOnRails
[12:53:00] nemo_: has joined #RubyOnRails
[12:53:47] annlewis: has joined #RubyOnRails
[12:55:05] RegulationD: has joined #RubyOnRails
[12:58:16] bruno-: has joined #RubyOnRails
[12:58:45] TPBallbag: has joined #RubyOnRails
[12:58:51] darrencauthon: has joined #RubyOnRails
[12:58:51] quazimodo: has joined #RubyOnRails
[13:00:39] t_mmyv: has joined #RubyOnRails
[13:00:44] sankaber: has joined #RubyOnRails
[13:01:49] sankaber: has joined #RubyOnRails
[13:02:06] Pupeno: has joined #RubyOnRails
[13:04:41] wldcordeiro: has joined #RubyOnRails
[13:05:15] jkamenik: has joined #RubyOnRails
[13:05:21] danielbucher: has joined #RubyOnRails
[13:06:06] pawnbox: has joined #RubyOnRails
[13:09:04] dionysus69: has joined #RubyOnRails
[13:12:57] cryptocronus: has joined #RubyOnRails
[13:14:07] chouhoul_: has joined #RubyOnRails
[13:14:20] lacrymology: has joined #RubyOnRails
[13:14:53] jbrinkmusic: if I iterate through a hash and try to save the values to a database table, will all the columns need to be t.string or can I convert them to another type on the fly?
[13:15:06] chrislotix: has joined #RubyOnRails
[13:15:23] rvanlieshout: jbrinkmusic: you don't have to convert them
[13:15:38] rvanlieshout: if you have an integer column you can just assign "123"
[13:15:45] syath: has joined #RubyOnRails
[13:16:11] nzst: has joined #RubyOnRails
[13:16:35] nzst: Hi, ActiveJob is just a wrapper around background workers, like sidekiq or delayed job, right?
[13:16:56] nzst: like, you add whatever tech you need and activejob is just an api to it for standardization
[13:17:35] jbrinkmusic: okay, what about dates? if I have dd.MM.YYYY, should I save it as t.string?
[13:18:35] nzst: thanks for the quick validation
[13:18:43] theblang: has joined #RubyOnRails
[13:22:42] pawnbox: has joined #RubyOnRails
[13:22:55] broman: has joined #RubyOnRails
[13:23:25] jgt1: has joined #RubyOnRails
[13:23:25] cryptocronus_: has joined #RubyOnRails
[13:23:51] atzorvas: has joined #RubyOnRails
[13:23:52] broman: can someone please help me? Im using unicorn and I'm trying to exec an ffmpeg command... locally it runs fine (rails s) but on the server (unicorn) it doesn't work and outputs nothing... what should i do?
[13:24:21] adaedra: Is ffmpeg installed and executable from server context?
[13:24:24] rvanlieshout: use full path to the binary
[13:24:37] pawnbox_: has joined #RubyOnRails
[13:25:00] broman: adaedra, yes! when i do rails s on the server and exec the same command it works
[13:25:04] broman: rvanlieshout, i will try it!
[13:26:52] workmad3: broman: are you using `exec` to run the ffmpeg command inside your rails code?
[13:27:17] broman: workmad3, yes...
[13:27:22] workmad3: broman: ok... stop doing that
[13:27:29] broman: workmad3, ?
[13:27:30] workmad3: broman: that *replaces* your process with the ffmpeg command
[13:27:44] workmad3: broman: meaning, you basically kill the worker process it's running in
[13:27:44] broman: sorry.. I'm using system
[13:28:03] broman: i tried exec and that happened.. so i switched to system
[13:28:06] workmad3: broman: ok... then don't say you're using `exec`
[13:28:24] broman: workmad3, Im sorry
[13:28:25] broman: rvanlieshout, Thank you!! It worked!
[13:29:52] Pazician: has joined #RubyOnRails
[13:30:01] dionysus69: has joined #RubyOnRails
[13:33:19] mikecmpbll: oauth is such a mindfuck.
[13:34:19] wldcordeiro: has joined #RubyOnRails
[13:34:29] mikecmpbll: "i'll implement it myself so i understand the security before i use any gems" ??? turns out that was a sadistic idea.
[13:34:31] dionysus69: what does it do differently than just setting bcrypt authentication manually? is it more secure?
[13:35:31] sdwrage: has joined #RubyOnRails
[13:35:35] mikecmpbll: i'm implementing it for an authentication server, so we can do single sign-on between different apps
[13:36:13] dionysus69: oh wow authentication server sounds like a huge web of things
[13:37:24] dionysus69: and so what if you setup a bcrypt authentication on the auth server wouldn't that do the job? I am using that one everytime pretty much
[13:37:46] Gustavo: has joined #RubyOnRails
[13:37:55] drbayer: has joined #RubyOnRails
[13:38:06] mikecmpbll: yeah the auth server is using bcrypt (has_secure_password), the complex stuff is how the other apps talk to the auth server
[13:38:13] orolo: has joined #RubyOnRails
[13:38:40] nzst: has left #RubyOnRails: ("ERC (IRC client for Emacs 24.5.1)")
[13:40:49] allcentury: has joined #RubyOnRails
[13:41:13] tuelz: has joined #RubyOnRails
[13:41:42] gustav__: has joined #RubyOnRails
[13:43:21] dionysus69: ugh ye sounds complicated
[13:43:32] ferr: has joined #RubyOnRails
[13:44:25] mikecmpbll: it's something like 1. user tries to access app. 2. app redirects user to the auth server to log in. 3. user logs in 4. auth server redirects user back to app callback uri. 5. app queries auth server directly to validate the authentication 6. app logs user in
[13:44:42] Encapsulation: has joined #RubyOnRails
[13:45:03] beauby: has joined #RubyOnRails
[13:45:18] lacrymology: I'm a python guy, and I'm reading the rails tutorial, and I can't get my head around all of the ruby syntax. What's with all the `@` and the globals, and when are hashes validly defined without {} syntax? anyone has a ruby crash-course to recommend for seasoned programmers that just need to learn the language?
[13:45:20] mikecmpbll: which in itself isn't that complicated, it's just that most of the examples use doorkeeper, devise and omniauth which obfuscates all the details
[13:45:22] symbol: has joined #RubyOnRails
[13:45:28] stardiviner: has joined #RubyOnRails
[13:45:52] youngbaks: has joined #RubyOnRails
[13:46:17] mikecmpbll: lacrymology: @ denotes an instance variable. hashes don't need { } when being passed as the last argument to a method
[13:47:11] lacrymology: mikecmpbll: just as the LAST argument?
[13:47:14] lacrymology: and just to a method
[13:47:32] lacrymology: ok, let me try that
[13:48:05] mwat: has joined #RubyOnRails
[13:48:20] mikecmpbll: it's a parser thing. foo(arg1, arg2, hash: 'here', more: 'stuff')
[13:48:20] ddv: lacrymology: so you are trying to use a framework even though you don't know the language it uses?
[13:48:38] lacrymology: mikecmpbll: got it
[13:49:18] lacrymology: ddv: I learned python because I needed to do something with twisted. I learned javascript because I needed to do something with node.. that's how I've worked, and it's been pretty good for me in the past 15 years, yes
[13:49:49] chills42: has joined #RubyOnRails
[13:49:57] lacrymology: ddv: so I come to people who know it, and I ask: where can I get a syntax and semantics crash-course that will not try to teach me *what* a loop is
[13:50:58] mikecmpbll: lacrymology: http://ruby-doc.org/docs/ruby-doc-bundle/Manual/man-1.4/syntax.html
[13:51:29] teclator: has joined #RubyOnRails
[13:51:38] lacrymology: mikecmpbll: is that 1.4 the version? I ask because I seem to be running 2.x
[13:51:54] pawnbox: has joined #RubyOnRails
[13:52:57] mikecmpbll: yes. but it's probably still a worthwhile reference
[13:53:19] surrealanalysis: has joined #RubyOnRails
[13:53:28] mikecmpbll: syntax changes don't happen often. be aware of keyword arguments though
[13:53:36] lacrymology: ok, sure the manpage is a resource :)
[13:53:52] banister: has joined #RubyOnRails
[13:54:26] lacrymology: what do you think of https://en.wikibooks.org/wiki/Ruby_Programming/Syntax ? A bit friendlier on the eye
[13:54:40] dici: has joined #RubyOnRails
[13:54:57] ddv: lacrymology: http://ethilien.net/ruby-a-lightning-tutorial/
[13:54:59] mikecmpbll: sure, looks fine
[13:55:29] mikecmpbll: also http://ruby-doc.org/core-2.2.0/doc/syntax_rdoc.html
[13:55:37] emilkarl: has joined #RubyOnRails
[13:56:02] RegulationD: has joined #RubyOnRails
[13:59:16] Kando: has joined #RubyOnRails
[13:59:28] jkamenik1: has joined #RubyOnRails
[13:59:55] Kando: Small question
[14:00:06] Kando: In the following app
[14:00:09] Kando: https://rails-tutorial-ridwansameer-1.c9.io/
[14:00:20] Kando: I want to add a little space between the name and the email (You can see their a bit close)
[14:00:39] Kando: I tried adding a tab character or adding &nbsp but it always adds it to the top the code
[14:00:56] Kando: <% @users.each do |user| %>
[14:00:57] Kando: <td><%= user.name %></td>
[14:00:57] Kando: <td><%= user.email %></td>
[14:00:57] rvanlieshout: tabs and spaces are ignored in html
[14:00:57] Kando: <td><%= link_to 'Show', user %></td>
[14:00:57] Kando: <td><%= link_to 'Edit', edit_user_path(user) %></td>
[14:00:58] rvanlieshout: as they should
[14:00:58] Kando: <td><%= link_to 'Destroy', user, method: :delete, data: { confirm: 'Are you sure?' } %></td>
[14:00:59] Kando: <% end %>
[14:01:02] Kando: Thats the code
[14:01:09] rvanlieshout: fix it using css
[14:01:14] rvanlieshout: read about padding and margin
[14:01:26] Kando: I know about that, just new to rails, let me see if I can find the css file this uses
[14:01:33] Kando: I did this via the User scaffolding
[14:01:43] Kando: Trying toe xperiment with different things :) Thank you ill give that a look and get back to you
[14:01:47] broman: now I'm getting a 502 from nginx because the process ffmpeg is taking too long.. how can i increase this timeout?
[14:02:06] ddv: broman: background your task maybe?
[14:02:07] Kando: this html file doesn't inherit from a stylesheer though...?
[14:02:36] GriffinHeart: has joined #RubyOnRails
[14:03:06] broman: ddv, cant... there are other commands after this one
[14:03:38] ddv: broman: change your design? sounds like you should background this anyways
[14:04:28] Kando: Yay, I used inline styling and fixed it. THank you rvanlieshout
[14:05:48] rvanlieshout: inline styling is like the worst solution though
[14:05:57] bratsche: has joined #RubyOnRails
[14:05:57] rvanlieshout: it's from the pre css time
[14:06:11] Kando: Yes I know
[14:06:35] Kando: I'm quite familiar wiht CSS and HTML thankfully, but I was actually following Michael hartl's tutorial on rails (Completely new)
[14:06:44] Kando: But I wanted to go out of the way and do something thats not listed in the book
[14:06:52] Kando: so just looked at this, thought I would fix it, and gave it a go
[14:07:04] Kando: Thank you so much!
[14:08:54] lacrymology: mikecmpbll, ddv: thank you both!
[14:11:20] tweeeaks: has joined #RubyOnRails
[14:12:41] umgrosscol: has joined #RubyOnRails
[14:12:53] chills42: has joined #RubyOnRails
[14:14:39] doublemalt_: has joined #RubyOnRails
[14:16:03] ddv: anyone know how I can improve this? User.joins(:companies).where(companies: {id: @companies.pluck(:id)}).distinct # collect all users from companies
[14:16:47] drbayer: has joined #RubyOnRails
[14:18:24] ddv: this is the sql: SELECT DISTINCT `users`.* FROM `users` INNER JOIN `memberships` ON `memberships`.`user_id` = `users`.`id` INNER JOIN `companies` ON `companies`.`id` = `memberships`.`company_id` WHERE `companies`.`id` IN (1, 2)
[14:18:30] rromanch_: has joined #RubyOnRails
[14:18:44] schu: has joined #RubyOnRails
[14:20:10] rvanlieshout: ddv: what's wrong with that one?
[14:21:18] sharkman: has joined #RubyOnRails
[14:21:35] rubyonrailed: has joined #RubyOnRails
[14:21:49] dionysus69: has joined #RubyOnRails
[14:22:07] ddv: rvanlieshout: dunno maybe there is a better way to achieve the same result
[14:22:28] rvanlieshout: a) don't worry about it unless it's a problem (or starts to be one)
[14:22:32] rvanlieshout: b) this is a sane way in doing this
[14:22:41] rvanlieshout: if you have @comapnies prefilled
[14:24:24] ddv: rvanlieshout: ok thanks, no before this query I do a @companies = current_user.companies
[14:24:44] rvanlieshout: and you're using @companies for something else?
[14:25:23] ddv: rvanlieshout: nope
[14:26:46] The_Phoenix: has joined #RubyOnRails
[14:27:01] ddv: rvanlieshout: so I could to this I guess: User.joins(:companies).where(companies: {id: current_user.companies.pluck(:id)}).distinct I tried doing: current_user.companies.select(:id), to turn the IN into a subquery, but didn't work I get nil returned
[14:27:44] rvanlieshout: User.joins(companies: :users).where(companies_users: { id: current_user.id })
[14:28:13] rvanlieshout: only i don't know the name of the join table
[14:28:19] dopamean_: has joined #RubyOnRails
[14:28:42] TDJACR: has joined #RubyOnRails
[14:29:39] ddv: rvanlieshout: https://gist.github.com/ddevaal/1ab223126a830d341bb9
[14:30:26] rvanlieshout: User.joins(companies: :users).where(users_companies: { id: current_user.id })
[14:30:27] dionysus69: has joined #RubyOnRails
[14:30:55] ddv: rvanlieshout: ah yes that is more sane
[14:30:58] macowie: has joined #RubyOnRails
[14:31:00] ddv: rvanlieshout: thanks
[14:32:05] CheckYourSix: has joined #RubyOnRails
[14:33:34] ddv: rvanlieshout: mr. bluerail ;)
[14:35:25] elektronaut: has joined #RubyOnRails
[14:37:18] mordocai: has joined #RubyOnRails
[14:38:37] chipotle: has joined #RubyOnRails
[14:39:14] banister: has joined #RubyOnRails
[14:40:42] kies^: has joined #RubyOnRails
[14:41:08] IFrank00: has joined #RubyOnRails
[14:41:08] hfp_work: has joined #RubyOnRails
[14:41:36] rvanlieshout: you're dutch, ddv?
[14:42:02] jobewan: has joined #RubyOnRails
[14:45:49] rvanlieshout: anyway.. going home
[14:45:51] rvanlieshout: back tomorrow
[14:46:03] cstyles: has joined #RubyOnRails
[14:47:38] hfp_work: has joined #RubyOnRails
[14:49:08] sunya7a: has joined #RubyOnRails
[14:51:01] polishdub: has joined #RubyOnRails
[14:51:16] londoncalling: has joined #RubyOnRails
[14:51:35] Fire-Dragon-DoL: has joined #RubyOnRails
[14:55:06] dopie: has joined #RubyOnRails
[14:55:25] tbuehlmann: has joined #RubyOnRails
[14:55:47] londoncalling: has left #RubyOnRails: ()
[14:56:53] axilla_: has joined #RubyOnRails
[14:56:53] AntiSpamMeta_: has joined #RubyOnRails
[14:56:58] bruno-_: has joined #RubyOnRails
[14:57:59] surrealanalysis_: has joined #RubyOnRails
[14:58:14] darrencauthon: has joined #RubyOnRails
[14:58:30] NaN|2: has joined #RubyOnRails
[14:59:06] Dreamer3_: has joined #RubyOnRails
[14:59:14] rubyonrailed: has joined #RubyOnRails
[14:59:32] jobewan: has joined #RubyOnRails
[14:59:34] ischwartz: has joined #RubyOnRails
[14:59:37] ELCALOR_: has joined #RubyOnRails
[15:00:34] agumon: has joined #RubyOnRails
[15:00:41] speaking2ode: has joined #RubyOnRails
[15:00:45] Skelz0r_: has joined #RubyOnRails
[15:00:46] rtl_: has joined #RubyOnRails
[15:00:50] kanzure_: has joined #RubyOnRails
[15:01:26] funnel_: has joined #RubyOnRails
[15:03:28] m_shir: has joined #RubyOnRails
[15:03:32] flxsource: has joined #RubyOnRails
[15:03:43] noah256_: has joined #RubyOnRails
[15:03:53] epochwolf|2: has joined #RubyOnRails
[15:03:56] Seich_: has joined #RubyOnRails
[15:03:57] DanKnox^: has joined #RubyOnRails
[15:04:03] nullwarp_: has joined #RubyOnRails
[15:04:03] urkle: has joined #RubyOnRails
[15:04:03] execute_: has joined #RubyOnRails
[15:04:04] jhass|off: has joined #RubyOnRails
[15:04:07] Derasi: has joined #RubyOnRails
[15:04:09] LBRapid_: has joined #RubyOnRails
[15:04:11] Sigma01: has joined #RubyOnRails
[15:04:15] Ankhers_: has joined #RubyOnRails
[15:04:15] targaf_: has joined #RubyOnRails
[15:04:17] iooner-: has joined #RubyOnRails
[15:04:19] CustosLimen: has joined #RubyOnRails
[15:04:21] Olipro_: has joined #RubyOnRails
[15:04:35] Emily_: has joined #RubyOnRails
[15:05:15] tuelz: has joined #RubyOnRails
[15:05:20] chopin: has joined #RubyOnRails
[15:05:23] Gustavo: has joined #RubyOnRails
[15:05:55] larissa_: has joined #RubyOnRails
[15:06:10] feignt_: has joined #RubyOnRails
[15:06:57] universal: has joined #RubyOnRails
[15:07:23] siddart: has joined #RubyOnRails
[15:08:00] nya: has joined #RubyOnRails
[15:08:39] george2: has joined #RubyOnRails
[15:09:04] RegulationD: has joined #RubyOnRails
[15:09:22] centrx: has joined #RubyOnRails
[15:10:43] lacrymology: what about params in the controller. Where is that defined?
[15:11:04] jwang: has joined #RubyOnRails
[15:11:13] lacrymology: ah, it's shorthand for self.params, right?
[15:11:16] amitchellbullard: has joined #RubyOnRails
[15:11:22] sunya7a: has joined #RubyOnRails
[15:12:00] Davey: has joined #RubyOnRails
[15:12:00] Davey: has joined #RubyOnRails
[15:12:28] Linuus: has joined #RubyOnRails
[15:12:33] n1lo: has joined #RubyOnRails
[15:12:36] booblabla: has joined #RubyOnRails
[15:12:42] FailBit: lacrymology: it's just a method
[15:13:03] booblabla: has left #RubyOnRails: ()
[15:13:04] pawnbox: has joined #RubyOnRails
[15:13:08] gingray: lacrymology: check this https://github.com/rails/rails/blob/857263445035404786e1f9785b76f3f4ddb7ca12/actionpack/lib/action_controller/metal.rb#L159
[15:13:28] Klumben: has joined #RubyOnRails
[15:13:37] lacrymology: ok, that makes sense
[15:15:26] lacrymology: self.params()[:key] => params[:key] <, this is a bit overstretched for my tastes, but I slowly come to understand. It's quite a leap from the totally-explicit world of python
[15:15:34] skmp: has joined #RubyOnRails
[15:15:52] jameswork: has joined #RubyOnRails
[15:16:08] towler: has joined #RubyOnRails
[15:16:13] sfr^: has joined #RubyOnRails
[15:17:29] syath: has joined #RubyOnRails
[15:18:51] lindii_: has joined #RubyOnRails
[15:19:47] TDJACR_: has joined #RubyOnRails
[15:19:51] teclator: has joined #RubyOnRails
[15:20:07] larissa_: has left #RubyOnRails: ()
[15:20:19] tubbo: lacrymology: `self.` is a code smell in ruby :)
[15:20:42] larissa: has joined #RubyOnRails
[15:20:47] larissa: has left #RubyOnRails: ("Leaving")
[15:21:15] youngbaks: has joined #RubyOnRails
[15:22:51] dionysus69: has joined #RubyOnRails
[15:22:53] nemo__: has joined #RubyOnRails
[15:25:00] lacrymology: 'code smell'?
[15:25:14] lacrymology: tubbo: I think I understand what you mean, but I don't know the phrase
[15:25:29] riotjones: has joined #RubyOnRails
[15:26:25] tubbo: lacrymology: https://en.wikipedia.org/wiki/Code_smell
[15:26:30] tubbo: it's kind-of a colloquial term
[15:27:09] mary5030: has joined #RubyOnRails
[15:28:06] atomical: has joined #RubyOnRails
[15:29:13] jobewan: has joined #RubyOnRails
[15:29:31] mary5030: has joined #RubyOnRails
[15:29:56] beauby: has joined #RubyOnRails
[15:30:33] nemo_: has joined #RubyOnRails
[15:30:40] srinidhi: has joined #RubyOnRails
[15:31:40] disgrntld: has joined #RubyOnRails
[15:33:00] woods: has joined #RubyOnRails
[15:33:40] Cache_Money: has joined #RubyOnRails
[15:33:59] nemo__: has joined #RubyOnRails
[15:36:15] A124: has joined #RubyOnRails
[15:36:44] Ergo: has joined #RubyOnRails
[15:37:09] chills42: has joined #RubyOnRails
[15:37:33] capin: afternoon, any suggestions for this, http://stackoverflow.com/questions/33272559/
[15:39:26] moss: has joined #RubyOnRails
[15:41:22] pawnbox: has joined #RubyOnRails
[15:43:20] dionysus69: has joined #RubyOnRails
[15:44:15] A124: has joined #RubyOnRails
[15:44:49] Silex: has joined #RubyOnRails
[15:45:11] sloggerkhan: has joined #RubyOnRails
[15:45:13] Ergo: has joined #RubyOnRails
[15:46:01] skarn: has joined #RubyOnRails
[15:46:41] andatche: has joined #RubyOnRails
[15:46:57] ericjphillips: has joined #RubyOnRails
[15:47:43] drbayer: has joined #RubyOnRails
[15:48:36] herbst: has joined #RubyOnRails
[15:48:43] herbst: has joined #RubyOnRails
[15:48:43] herbst: has joined #RubyOnRails
[15:49:21] theblang: has joined #RubyOnRails
[15:49:43] tubbo: capin: had no idea refile didn't preserve file names...
[15:49:50] tubbo: tbh i haven't deployed with it yet, just used it recently
[15:50:00] smathy: As are ()s
[15:50:03] danoph: has joined #RubyOnRails
[15:50:03] Senjai: has joined #RubyOnRails
[15:50:46] smathy: Fully explicit calling of params[:key] would actually be self.params.[](:key)
[15:50:53] tpendragon_: has joined #RubyOnRails
[15:51:22] capin: tubbo: apparently the file name is metadata according to refile, https://github.com/refile/refile#additional-metadata
[15:52:38] ldnunes: has joined #RubyOnRails
[15:54:04] pramsky: has joined #RubyOnRails
[15:54:22] jenrzzz: has joined #RubyOnRails
[15:54:37] reptilain_brain: has joined #RubyOnRails
[15:54:51] tubbo: capin: so refile isn't setting csv_file_filename? or it's setting filename to the id?
[15:56:22] capin: tubbo, when i upload a file, it uploads, but the csv_file_filename is null
[15:56:29] nemo_: has joined #RubyOnRails
[15:56:36] tubbo: capin: oh that's very strange.
[15:56:44] `based_pdev`: has joined #RubyOnRails
[15:57:06] capin: do you think it would have something to do with the logic in the controller?
[15:58:49] wldcordeiro: has joined #RubyOnRails
[15:59:42] smathy: capin, are you doing things the way the gem told you to?
[16:00:04] rromanch_: has joined #RubyOnRails
[16:01:07] errakeshpd: has joined #RubyOnRails
[16:01:21] markelite: has joined #RubyOnRails
[16:01:35] capin: smathy: im trying too, i've read the documentation on the github page a few times now :)
[16:02:36] towski_: has joined #RubyOnRails
[16:02:39] dionysus69: has joined #RubyOnRails
[16:03:27] ericjphillips: has joined #RubyOnRails
[16:03:45] jameswork: has joined #RubyOnRails
[16:04:23] gabeodess: has joined #RubyOnRails
[16:04:42] OyoKooN: has joined #RubyOnRails
[16:04:48] n00bDev: has joined #RubyOnRails
[16:05:59] snockerton: has joined #RubyOnRails
[16:06:19] smathy: capin, just make a quick little dummy project, and try doing it exactly as they've said to.
[16:06:28] gabeodess: I have a BlendItem that belongs to a Coffee and belongs to a Blend where the ???Blend??? is actually a reference to the coffees table. How do I tell my migration to reference the coffees table for the blend_id foreign key? Maybe something like this: t.belongs_to :blend, index: true, foreign_key: true, table: coffees ?
[16:06:48] dionysus69: has joined #RubyOnRails
[16:07:24] m_shir: has left #RubyOnRails: ()
[16:07:27] tubbo: gabeodess: you don't need to, the migration doesn't care. you just have to tell belongs_to in your model what class to instantiate with the id given in the database
[16:07:43] jxs_: has joined #RubyOnRails
[16:08:07] nogic: has joined #RubyOnRails
[16:08:09] tubbo: gabeodess: but you could call it t.references :shmoopy_doops and as long as you have something like `belongs_to :shmoopy_doops, class_name: 'Coffee'`, it will try to do Coffee.find shmoopy_doops_id
[16:08:10] gabeodess: tubbo: but doesn???t Postgres create a foreign_key constraint in the DB?
[16:08:47] rubypie713: has joined #RubyOnRails
[16:08:55] tubbo: gabeodess: it does...not sure how you'd configure that to look in your table. never needed to do that. i also don't know if its necessary. my advice would be to not configure it until you need to :P
[16:09:14] herbst: has joined #RubyOnRails
[16:10:41] gabeodess: tubbo: so you???re saying don???t use ???belongs_to??? in my migration and just setup in the indexes manually?
[16:10:59] tubbo: gabeodess: that's not what i said at all.
[16:11:16] tubbo: gabeodess: i just said you don't need to configure which table that belongs_to is referencing.
[16:12:07] gabeodess: tubbo: the problem is I can???t run my migration with belongs_to :blend. Postgres chokes saying ???relation ???blends??? does not exist???
[16:15:03] rubypie713: hi, im working with casein module and if I created a model to associate with the belongs_to :admin_user, :class_name => Casein::AdminUser, how could I write the vice versa association?
[16:15:43] _djbkd: has joined #RubyOnRails
[16:19:11] rubypie713: would I refer to the root namespace ::Call from the Casein::AdminUser model for the has_many relation?
[16:20:19] dionysus69: has joined #RubyOnRails
[16:20:45] n008f4g_: has joined #RubyOnRails
[16:21:10] smathy: rubypie713, the argument/value for :class_name shouldn't be a class constant, it should be a string.
[16:22:11] smathy: rubypie713, and remove the whole "casein" aspect from your question, if I understand you correctly you're just asking how to associate two models. Just explain what you want, what you're trying, and what you're getting that you don't want.
[16:24:09] n00bDev: So my staging server on heroku is returning a 404 error on a delete action, but it works locally? any ideas on how to tackle this?
[16:24:21] dionysus69: has joined #RubyOnRails
[16:26:23] symbol: Recently implemented devise two factor auth...it's working for most people but a for some people it'll just randomly stop working. It seems like their code is wrong, but there's literally no way for me to debug this.
[16:26:34] mwlang: has joined #RubyOnRails
[16:26:36] symbol: Curious if anyone has tips for debugging this.
[16:26:47] smathy: n00bdev, what's in the logs?
[16:27:12] workmad3: symbol: chances are, the time has gotten out of sync
[16:27:33] symbol: workmad3: Tried the whole phone restart.
[16:27:45] workmad3: symbol: have you double-checked your server time?
[16:27:47] chills42: has joined #RubyOnRails
[16:28:10] symbol: I have not...but wouldn't bad server cause falure for everyone?
[16:28:16] symbol: *server time
[16:28:30] n00bDev: so paper trail is showing that its trying to do a GET request... but on local it shows DELETE and the route names are identical
[16:28:36] rubypie713: well basically associate two models in different namespaces
[16:28:48] workmad3: symbol: depends on if the phones have correct time too, and which one drifted out of sync
[16:28:56] drbayer: has joined #RubyOnRails
[16:29:00] n00bDev: ActionController::RoutingError (No route matches [GET]
[16:29:09] workmad3: symbol: 'randomly stopped working' reeks of 'something time-related is out of sync' when dealing with TOTP though
[16:29:20] symbol: That's my hunch...didn't consider the server
[16:29:35] workmad3: symbol: also, restarting the phone won't do much if it's not updating time from the network
[16:29:36] jameswork: has joined #RubyOnRails
[16:29:53] workmad3: symbol: so double check that too, if you have access to the phone (or tell users to double-check that)
[16:30:45] symbol: Hmm - my next door desk neighbor was able to log in using it.
[16:30:58] symbol: So that rules out the server?
[16:31:01] workmad3: symbol: you may be able to increase the validity period of tokes too
[16:31:37] workmad3: symbol: try a code at the start of a refresh cycle and the end of a refresh cycle (or as close as you can manage to both)
[16:32:18] workmad3: symbol: if it's the server drifting, not individual phones, that should let you know... if you can log in with a fresh token but not one that's about to refresh (or vice-versa), then that would indicate server has drifted, IMO
[16:32:18] gustav__: has joined #RubyOnRails
[16:32:32] Lytol: has joined #RubyOnRails
[16:32:32] workmad3: symbol: especially if you can replicate that with multiple token generators
[16:34:08] symbol: workmad3: No luck :/
[16:34:30] EminenceHC: has joined #RubyOnRails
[16:34:31] symbol: It's odd that it's isolated to a few individuals
[16:35:02] workmad3: symbol: can you increase the validity period for your tokens? see if that helps?
[16:35:44] symbol: workmad3: Worth a try
[16:35:58] stevenw_: has joined #RubyOnRails
[16:36:05] woods: has joined #RubyOnRails
[16:36:53] OyoKooN_: has joined #RubyOnRails
[16:37:37] farkerhaiku: has joined #RubyOnRails
[16:38:05] gabeodess: tubbo: so should I just use t.integer in my migration instead of t.belongs_to?
[16:38:28] mwat: has joined #RubyOnRails
[16:39:40] dmarr: has joined #RubyOnRails
[16:39:50] Pazician: has joined #RubyOnRails
[16:40:26] orolo: has joined #RubyOnRails
[16:40:31] dmarr: was wondering if there is a cleaner way to write this https://gist.github.com/marr/65559d6cb0fd8b8e5106
[16:41:04] drbayer: has joined #RubyOnRails
[16:41:08] stien: has joined #RubyOnRails
[16:41:26] atomical: has joined #RubyOnRails
[16:41:55] matthewd: dmarr: `Flow.all.group_by(&:country)` ?
[16:44:12] dmarr: matthewd++
[16:44:20] sandstrom: has joined #RubyOnRails
[16:44:27] jocuman: has joined #RubyOnRails
[16:44:58] sandstrom: has left #RubyOnRails: ()
[16:45:20] farkerhaiku: I've got a problem with tons of gems after updating xcode and command line tools. I accepted the agreement by opening xcode, but I still get the error "You have to install development tools first." Any thoughts on what might be causing this problem/
[16:45:25] dmarr: updated gist with entire model
[16:46:02] The_Ball: If I would like to decorate core/lib/spree/core/search/base.rb where would I put base_decorator.rb?
[16:46:17] tubbo: gabeodess: i've explained what to do twice already...
[16:46:25] PhaseCode: has joined #RubyOnRails
[16:46:27] ngscheurich: has joined #RubyOnRails
[16:46:33] tubbo: gabeodess: oh sorry i didn't see the last message!
[16:46:57] safety_cut: has joined #RubyOnRails
[16:46:57] tubbo: gabeodess: perhaps not configuring `foreign_key: true` would solve it? i'm not sure...never had this issue before.
[16:47:16] tubbo: i know foreign_key: is used to create a postgres foreign key, but it's not really necessary
[16:47:17] dmarr: matthewd: where would i read about that & syntax
[16:47:19] gabeodess: tubbo: ah, that???s a good thought. Thanks
[16:47:24] tubbo: only for indexing purposes when your data gets a little bigger
[16:47:52] A124: has joined #RubyOnRails
[16:48:19] matthewd: dmarr: It's Symbol#to_proc
[16:48:43] DEA7TH: has joined #RubyOnRails
[16:48:58] tubbo: The_Ball: you can put decorated classes anywhere in your app/ folder.
[16:49:07] tubbo: i used app/patches last time with spree bceause app/decorators was taken
[16:49:31] The_Ball: tubbo, ah I thought they folder structure had to match somehow, thanks
[16:49:55] tubbo: i typically make it match so that it's easier to determine
[16:49:56] hanss: has joined #RubyOnRails
[16:50:29] lytol_: has joined #RubyOnRails
[16:50:35] The_Ball: tubbo, that makes sense
[16:50:54] dmarr: matthewd: thanks, any comments on that gist.. like do you know if i can remove anything?
[16:51:15] The_Ball: tubbo, trying to make a patch to make multiple taxons filter/intersect
[16:51:24] n00bDev: has anyone encountered a issue where heroku will call a different CRUD action on a route that doesnt have that action? my route is supposed to DELETE a user but its calling GET
[16:51:39] n00bDev: as a result its returning 404
[16:51:51] n00bDev: works locally
[16:51:52] dmarr: seems as though I can remove all but the :status attr_accessor
[16:51:53] tubbo: n00bdev: do you have method: :delete in your link_to?
[16:52:21] arthurix: has joined #RubyOnRails
[16:52:41] n00bDev: i pass the user object into the route, stating a delete method
[16:52:52] n00bDev: with data: confirm are you sure
[16:52:59] n00bDev: so bizzare
[16:53:34] mikecmpbll: has joined #RubyOnRails
[16:54:19] workmad3: n00bdev: are you potentially clicking the link before the JS has a chance to download and set up the handlers on the page?
[16:54:30] Pupeno: has joined #RubyOnRails
[16:55:04] n00bDev: i didnt really understand that but that could be a possibility?
[16:55:31] EminenceHC: has joined #RubyOnRails
[16:55:53] nemo__: has joined #RubyOnRails
[16:56:05] blackmesa: has joined #RubyOnRails
[16:56:14] IFrank00: has joined #RubyOnRails
[16:57:02] Maletor: has joined #RubyOnRails
[17:00:06] Moeh: has joined #RubyOnRails
[17:01:18] bojanuana: has joined #RubyOnRails
[17:01:25] Lytol: has joined #RubyOnRails
[17:01:27] Moeh: Can someone tell me how I can set custom layout for the different actions of the devise_invitable (https://github.com/scambra/devise_invitable) gem? For instance I want /users/invitation to use "account" and /users/invitation/accept to use "public".
[17:02:50] mcnesium: has joined #RubyOnRails
[17:03:40] jessemcgilallen: has joined #RubyOnRails
[17:04:31] mcnesium: how do I do this right, so that it returns this array element? https://gist.github.com/a242d40af5bfed7b6873 ?
[17:06:03] tuelz: has joined #RubyOnRails
[17:06:18] acti0nman: has joined #RubyOnRails
[17:06:39] jtb__: has joined #RubyOnRails
[17:07:59] cryptocronus: has joined #RubyOnRails
[17:08:28] woods: has joined #RubyOnRails
[17:09:36] VeryBewitching: has joined #RubyOnRails
[17:10:09] matthewd: dmarr: Ah, yes, actually... `attr_accessor` -- what's that supposed to be doing?
[17:11:38] matthewd: dmarr: You could obviously extract the split into a private method, but I think I'd probably leave it as is: it's duplicating a bit of knowledge (the structure of `code`), but the alternative seems needlessly complicated
[17:11:57] siddart: has joined #RubyOnRails
[17:12:17] NBarnes: has joined #RubyOnRails
[17:12:49] yardenbar: has joined #RubyOnRails
[17:13:13] arthurix_: has joined #RubyOnRails
[17:13:16] matthewd: dmarr: Personally, I might omit by_country altogether, and let the caller do the group_by instead, as it's only a couple more characters... but it is arguably better encapsulation to keep it
[17:13:51] matthewd: ... and I just realised you already mentioned the attr_accessor bit, so please do ignore me :)
[17:14:51] smathy: mcnesium, .where performs an SQL query, by the look of it your object in event_participations hasn't been saved yet, there's no way for a query to find it in the DB.
[17:15:37] mcnesium: smathy: ok makes sense. how can I get this thing then, any idea?
[17:15:42] dmarr: matthewd: thanks, yeah in the caller i do update the status
[17:15:53] dmarr: so I think I need to keep that. its a derived field, not stored in db
[17:16:11] smathy: mcnesium, well how did it get there in the first place? I'd take a reference to it before adding it to the collection.
[17:16:47] jameswork: has joined #RubyOnRails
[17:16:47] mcnesium: smathy: sent by http POST and yet to be stored in the db
[17:17:12] vigintas: has joined #RubyOnRails
[17:17:34] dmarr: another question re, migrations. when I rebased there was a conflict in the schema.db file, just in the line around the version. .define(version:..timestamp..)
[17:18:18] rubyonrails739: has joined #RubyOnRails
[17:18:36] smathy: mcnesium, I'd need to see what you're doing first, but you can .to_a it and use array methods like `detect`
[17:19:11] dmarr: I went with the newer timestamp to resolve the conflict. the value is still older than the db/migrate/..timestamp.. so, will that be an issue or is that how rails works and it knows if there is a newer db/migrate timestamp than what is in schema.rb that there is an outstanding migration?
[17:19:51] rubyonrails739: has left #RubyOnRails: ()
[17:20:00] kidoz: has joined #RubyOnRails
[17:20:16] antg85: has joined #RubyOnRails
[17:20:22] matthewd: dmarr: The timestamp in schema.rb is used only when doing a fresh schema load (where it's assumed that any prior-dated migration must've been run)
[17:21:02] nergdnulg: has joined #RubyOnRails
[17:21:23] nemo_: has joined #RubyOnRails
[17:21:53] matthewd: You should generally commit the change to schema.rb in the same commit that adds the migration -- so it would normally only differ from the highest-known migration (locally) when you're in the middle of writing one
[17:22:30] OyoKooN: has joined #RubyOnRails
[17:22:33] dionysus69: has joined #RubyOnRails
[17:22:52] antg85: afternoon I've written an app thats a rails backend and angular frontend angular doesn't like being compressed so I'm trying to serve it uncompress however everything I do isnt working, tried various config variation I've tried using a custom js compressor it just won't seem to work
[17:23:59] smathy: antg85, are you using https://github.com/hiravgandhi/angularjs-rails ?
[17:24:57] annlewis: has joined #RubyOnRails
[17:25:44] antg85: @smathy no I'm the rails-assets-angular gem
[17:25:55] tubbo: i love how angular "doesn't like being compressed" what a fucking joke
[17:26:06] drbayer: has joined #RubyOnRails
[17:26:51] mcnesium: smathy: .detect is perfect, thx!
[17:26:59] mcnesium: has left #RubyOnRails: ("Weechat part")
[17:27:50] smathy: antg85, ok, not sure about that gem - so try forming your question in these three things: what you're doing, what you're expecting, what you're seeing.
[17:28:21] rrawlins: has joined #RubyOnRails
[17:30:31] brenop: has joined #RubyOnRails
[17:30:55] antg85: smathy I'm trying to deploy the app I've built I'm trying to config my production env to serve my application.js file un-minfied, I can seeing the minified version instead of the uniminified version
[17:31:11] jameswork: has joined #RubyOnRails
[17:31:31] DoubleMalt: has joined #RubyOnRails
[17:31:55] goldbug: has joined #RubyOnRails
[17:32:47] based_pdev_: has joined #RubyOnRails
[17:32:53] sharkman: i did sudo gem install rails, and get this error, zlib is missing; necessary for building libxml2
[17:32:53] sharkman: *** extconf.rb failed ***
[17:32:56] sharkman: any advice on what i need to do?
[17:33:26] antg85: sharkman brew install zlib?
[17:33:38] tubbo: it's breaking b/c it can't build a native extension
[17:33:40] sharkman: why brew? can i do apt-get install zlib?
[17:33:47] goldbug: Can someone tell me why I am getting the error "stack level too deep" when submitting the following form? (Needs one of the name fields and 'gender' filled out): https://xcds-classicgoldbug.c9.io/people/new
[17:33:50] tubbo: sharkman: yeah are you on ubuntu? :)
[17:33:54] EminenceHC: has joined #RubyOnRails
[17:33:55] sharkman: what does "native extension" mean?
[17:33:55] tubbo: or whatever linux that can support APT
[17:33:56] antg85: assumed osx sorry
[17:34:13] tubbo: sharkman: yeah i guess do sudo apt-get install -y zlib or whatever the package name is called for your distro.
[17:34:37] tubbo: sharkman: https://en.wikibooks.org/wiki/Ruby_Programming/C_Extensions
[17:34:40] tubbo: it's a feature of Ruby
[17:35:39] ddv: has joined #RubyOnRails
[17:35:56] Caseh: has joined #RubyOnRails
[17:35:59] rubyonrailed: has joined #RubyOnRails
[17:37:25] dmarr: matthewd: so i wrote a migration, but someone upstream did too. when i rebased their changes the schema.rb conflicted.
[17:38:05] goldbug: Also why is the gender radio button not checked when you click on 'edit' of this record? https://xcds-classicgoldbug.c9.io/people/2
[17:39:21] tubbo: goldbug: am i supposed to see something other than a login scren?
[17:39:35] smathy: antg85, I meant the problem that led to this solution of trying to serve the file un-minified. Just so you know, no one else has to do that, this is not "a thing" with Rails and angular.
[17:39:55] bricker: has joined #RubyOnRails
[17:40:11] dmarr: so the result of that was the rest of the schema.rb was cleanly merged, except for the version at the top
[17:40:41] sharkman: lol okay i got any package with zlib in it
[17:40:45] sharkman: and now rails seems to be installing
[17:41:04] goldbug: tubbo: Yes /:
[17:41:05] corioliss: has joined #RubyOnRails
[17:42:31] smathy: has joined #RubyOnRails
[17:43:14] antg85: smathy the issue caused by the way angular handles inject so I run into the following error https://docs.angularjs.org/error/$injector/unpr?p0=e
[17:43:19] symbol: has joined #RubyOnRails
[17:43:54] antg85: this only happens when its compressed
[17:44:13] matthewd: dmarr: Right, so you want to end up with the higher of the two values in there
[17:44:28] theblang: has joined #RubyOnRails
[17:45:32] dmarr: ok thanks,
[17:46:40] kies^: has joined #RubyOnRails
[17:46:50] dmarr: when i db:seed, I do a Flow.delete_all, and then create. the id's on the newly created items always starts where the previously deleted ones left off. Is there a way to get that starting anew?
[17:46:52] OyoKooN: has joined #RubyOnRails
[17:47:22] drbayer: has joined #RubyOnRails
[17:48:28] annlewis: has joined #RubyOnRails
[17:49:20] antg85: dmarr which database are you using
[17:50:39] The_Phoenix: has joined #RubyOnRails
[17:50:43] antg85: dmarr run ActiveRecord::Base.connection.reset_pk_sequence!('table_name') in the console
[17:50:49] n1lo: has joined #RubyOnRails
[17:51:30] sharkman: if my sudo gem install rails is pausing for 5+ minutes on this, Parsing documentation for rails-4.2.4
[17:51:30] sharkman: Installing ri documentation for rails-4.2.4
[17:51:36] sharkman: should i cntr-c and restart??
[17:51:49] smathy: No, just wait.
[17:51:52] smathy: It takes that long.
[17:52:10] smathy: You might want to switch off rdoc and/or ri generation in ~/.gemrc
[17:52:36] sharkman: why does it take that long? isnt document just text? shouldnt that be the fastest part?
[17:52:49] dopie: hey guys currently i have post.date that returns OCTOBER 22, 2015 how would i make it return the Month and Date only?
[17:53:20] antg85: google rails date format dopie
[17:53:23] goldbug: tubbo: Here's the error I'm getting: http://imgur.com/iEPaJKR
[17:53:31] willardg: has joined #RubyOnRails
[17:54:48] goldbug: I'm getting that on a create or update.
[17:54:51] eikood: has joined #RubyOnRails
[17:55:09] goldbug: And I'm not sure where the error is coming from.
[17:55:39] OyoKooN: has joined #RubyOnRails
[17:55:44] EminenceHC: has joined #RubyOnRails
[17:56:24] IFrank00: has joined #RubyOnRails
[17:57:53] smathy: goldbug, !code
[17:57:53] helpa: goldbug: 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.
[17:58:05] stien: has joined #RubyOnRails
[17:58:29] smathy: goldbug, also from your rails server window, or logs, please also paste the textual stacktrace.
[17:59:03] baweaver: has joined #RubyOnRails
[18:00:06] goldbug: smathy: Not even sure which file has the relevant code in it - that's kind of what I'm trying to figure out!
[18:00:29] tubbo: goldbug: is that even in your app?
[18:00:31] smathy: goldbug, well, let's start with the stacktrace from your logs.
[18:00:36] solars: has joined #RubyOnRails
[18:01:49] goldbug: The full trace says merely: actionpack (4.2.0) lib/action_dispatch/middleware/reloader.rb:79
[18:02:14] tubbo: goldbug: is that `rescue Exception` bit of code actually in your app anywhere? or is it coming from a gem?
[18:02:21] rrawlins: When dealing with Timezones, do people prefer to use the softer Rails names .i.e. "Central Time (US & Canada)" or the more official "America/Chicago"?
[18:02:45] rrawlins: I currently have mix within the codebase / database and I'm looking to standardize it.
[18:02:54] goldbug: tubbo: It's a gem, I believe. Certainly not something I've created.
[18:04:13] draig: has joined #RubyOnRails
[18:04:44] barhum2013: has joined #RubyOnRails
[18:04:58] barhum2013: has left #RubyOnRails: ()
[18:05:29] antg85: smathy check this out http://stackoverflow.com/questions/25818632/angularjs-rails-is-not-working-in-production
[18:05:50] goldbug: This is what the console said when the web server generated that message: https://gist.github.com/anonymous/a2f93685f47d56aa5f8d
[18:05:56] The_Ball: In Spree::Core::Search::Base.retrieve_products what makes "page" a variable that can be used, but what I thought was a global variable "params" can't be used?
[18:06:14] nemo__: has joined #RubyOnRails
[18:06:54] tubbo: goldbug: add the contents of PeopleController to that gist.
[18:06:59] tubbo: goldbug: you can edit gists and append files.
[18:07:55] drbayer: has joined #RubyOnRails
[18:08:14] arBmind: has joined #RubyOnRails
[18:09:54] cryptocronus: has joined #RubyOnRails
[18:10:54] chrislotix: has joined #RubyOnRails
[18:13:56] OyoKooN: has joined #RubyOnRails
[18:14:32] polishdub_: has joined #RubyOnRails
[18:15:14] youngbaks: has joined #RubyOnRails
[18:15:34] choke: has joined #RubyOnRails
[18:15:50] arup_r: has joined #RubyOnRails
[18:16:03] n00bDev: damn it found the answer
[18:16:15] n00bDev: didnt precomile my js file for that specfic part
[18:19:08] baweaver: has joined #RubyOnRails
[18:22:13] Synthead: has joined #RubyOnRails
[18:22:39] targaf_: has left #RubyOnRails: ()
[18:24:11] targaf: has joined #RubyOnRails
[18:25:52] cpruitt: has joined #RubyOnRails
[18:25:57] Lightsword: has joined #RubyOnRails
[18:27:21] choke: has joined #RubyOnRails
[18:27:27] arBmind: has joined #RubyOnRails
[18:28:11] loc22: has joined #RubyOnRails
[18:28:22] loc22: Hi guy, anyone knows when Rails 5 is comming out?
[18:29:42] Papierkorb: loc22: iirc I read some months ago that rails5 is estimated to be released around christmas
[18:30:24] loc22: Papierkorb: Thanks!
[18:30:54] EminenceHC: has joined #RubyOnRails
[18:31:16] tubbo: loc22: http://rails5countdown.com
[18:31:25] VeryBewitching: has joined #RubyOnRails
[18:32:06] loc22: tubbo: It says 182 days :/
[18:32:11] kadoppe: has joined #RubyOnRails
[18:32:34] havenwood: loc22: The Oracle has spoken.
[18:32:35] krz: has joined #RubyOnRails
[18:32:54] tubbo: loc22: i know, i'm from the future also.
[18:33:04] tubbo: loc22: https://github.com/platzhirsch/rails5countdown/blob/master/server.go#L64-L88
[18:33:12] The_Phoenix: has joined #RubyOnRails
[18:33:14] tubbo: that's the function that makes it work
[18:33:47] loc22: tubbo: haha :)
[18:33:49] tubbo: it's analyzing the speed at which pull requests get closed and averaging that against the amount of open pull requests left to make a guesstimate
[18:33:54] Aherin: has joined #RubyOnRails
[18:33:56] adrian11: has joined #RubyOnRails
[18:34:42] adrian11: has left #RubyOnRails: ()
[18:34:44] baweaver: has joined #RubyOnRails
[18:37:21] VeryBewitching: 15.10 upgrade success!
[18:37:35] VeryBewitching: And hello denizens.
[18:37:39] acti0nman: has joined #RubyOnRails
[18:37:43] VeryBewitching: Kubuntu, but ya.
[18:37:48] woods: ahh, good deal
[18:37:56] woods: is that on KDE 5?
[18:38:15] woods: good deal
[18:38:42] gingray: has joined #RubyOnRails
[18:39:17] tubbo: yeah i guess i have to upgrade this thing to os x el capitan soon
[18:39:29] woods: i did it last week, not bad
[18:39:33] Pupeno: has joined #RubyOnRails
[18:39:48] youngbaks: has joined #RubyOnRails
[18:39:56] IFrank00: Quick question I'm trying to have a dynamic link_to. example if a project has task go to task dashboard else go to task create view.
[18:40:07] Galas: has joined #RubyOnRails
[18:41:01] choke: has joined #RubyOnRails
[18:41:20] jenrzzz: has joined #RubyOnRails
[18:41:59] IFrank00: got it working :)
[18:42:50] dopie: has joined #RubyOnRails
[18:43:55] symbol: has joined #RubyOnRails
[18:47:15] baweaver: Anyone know of a way to stub multiple methods with the allow syntax?
[18:47:45] smathy: Stupid El Capitan, I'll be resisting for as long as I can.
[18:48:03] baweaver: using this for now: {a: 1, b: 2}.each { |meth, val| allow(subject).to receive(meth) { val } }
[18:48:44] smathy: Seems like a good solution to me baweaver
[18:48:59] baweaver: yeah, wondering if there's a built-in I missed to shorthand it
[18:49:07] drbayer: has joined #RubyOnRails
[18:49:07] baweaver: might just make my own matcher to cheat :D
[18:49:55] polishdub: has joined #RubyOnRails
[18:50:28] chopin: has joined #RubyOnRails
[18:51:16] raunicolae: has joined #RubyOnRails
[18:52:32] ericjphillips: has joined #RubyOnRails
[18:52:43] `based_pdev`: has joined #RubyOnRails
[18:52:49] arthurix: has joined #RubyOnRails
[18:55:13] weaksauce: has joined #RubyOnRails
[18:55:17] tubbo: i typically use `yy` in vim and then s/the_old_attribute/the_new_attribute/g
[18:55:21] brendan-: has joined #RubyOnRails
[18:55:54] shibabu: has joined #RubyOnRails
[18:56:29] macowie: has joined #RubyOnRails
[18:57:30] raunicolae: has joined #RubyOnRails
[18:57:37] raunicolae: has left #RubyOnRails: ()
[19:00:49] capin: well it looks like refile stores the filename of an uploaded file as an attribute in a column, in the DB, but the actual filename is still a hash value, if they makes sense.
[19:02:17] smathy: capin, I thought you understood that already and that the problem was that it *wasn't* storing the filename in the DB column you had set up.
[19:02:38] macowie: has joined #RubyOnRails
[19:03:44] safety_cut: has joined #RubyOnRails
[19:03:52] capin: smathy: no i did not understand that, and it appears to be storing the filename now, but I would still like to preserve the filename to the actual uploaded file if possible :/
[19:04:26] jholm: has joined #RubyOnRails
[19:04:46] smathy: "to the actual uploaded file" - what do you mean? You want the filename of the file that's actually stored in the file system by refile?
[19:04:50] rhizome: wait, so storing the filename of the item just stores the post-hash name?
[19:05:26] rhizome: no, he wants the original filename as uploaded
[19:05:37] capin: rhizome: indeed
[19:05:48] smathy: Right, I'm confused again. Isn't that what they just said they were getting?
[19:06:03] rhizome: Sales_Projections_2014.xls
[19:06:09] smathy: This would be so much easier with gists.
[19:06:30] rhizome: if capin is on the up and up, it sounds like refile is a POS in this matter
[19:06:55] smathy: ...probably explains why I'd never heard of it.
[19:07:26] rhizome: i mean, i guess it might be good in some situations to save an fstat by caching the filename, but...
[19:08:01] yfeldblum: has joined #RubyOnRails
[19:08:17] dikaio: has joined #RubyOnRails
[19:08:35] EminenceHC: has joined #RubyOnRails
[19:08:41] cstyles: capin, is there any particular reason why you???d want that?
[19:09:24] loc22: has joined #RubyOnRails
[19:09:25] smathy: Wow, the fact that it stores the files in a flat directory alone turns me off.
[19:09:38] atmosx: has joined #RubyOnRails
[19:09:51] rhizome: ~smathy/Pictures
[19:09:52] drbayer: has joined #RubyOnRails
[19:10:01] loc22: It is possible to have a backend admin on a rails api project? Or it is necesarry to have 2 apps?
[19:10:04] capin: well i was recommended to check out / use refile by the users of this room, cstyles so when I import the file back into the mobile app, i can search for the file by it's name
[19:11:21] manfrin: has joined #RubyOnRails
[19:11:23] Lightsword: has joined #RubyOnRails
[19:11:39] smathy: There's no way I'd read https://github.com/refile/refile#additional-metadata as that it was going to store the generated id filename.
[19:12:28] capin: smathy: thanks for the suggestion, I've read that several times now ;)
[19:12:48] smathy: Yeah I know. I've pointed you to it at least once. I think it's fucking up.
[19:13:20] capin: you think what is fucking up?
[19:13:48] acti0nman: has joined #RubyOnRails
[19:14:31] amortimer: I take relfies and post them on instagram.
[19:14:49] based_pdev_: has joined #RubyOnRails
[19:15:20] sharkman: when i do rails new xx, it pauses for over a minute on run bundle install
[19:15:26] sharkman: should i keep waiting? does this take a long time?
[19:15:34] amortimer: How???s your internet connection?
[19:15:36] cstyles: capin: you can save/import the file with any filename you want. it???s arbitrary
[19:16:03] scpike: has joined #RubyOnRails
[19:16:11] cstyles: but storing it with an id helps with caching and ensures it???s unique
[19:16:13] rhizome: capin: original filename should be in params, at any rate
[19:16:24] smathy: Definitely seems to have the logic for extracting the original_filename.
[19:16:28] sharkman: amortimer, its okay, im at a cafe. its fast but not lightening fast
[19:16:33] smathy: capin, yes, if what you say is true.
[19:16:40] sharkman: i already did gem install bundle and that worked
[19:16:43] willardg: has joined #RubyOnRails
[19:16:44] sharkman: so not sure what the hold up would be
[19:16:45] amortimer: @sharkman that???s one thing it could get hung up on.
[19:17:11] cstyles: yeah, capin if you add the metadata columns, it _just works_, there???s nothing more you have to do to store the filename column
[19:17:27] smathy: sharkman, the install does take some time, and there's no progress output.
[19:17:37] sharkman: okay ill wait
[19:17:41] sharkman: and see what happens
[19:17:50] smathy: sharkman, might also be generating rdoc or ri (unnecessarily if you don't use either of those)
[19:18:18] rhizome: http://www.rubydoc.info/github/refile/refile/Refile.extract_filename
[19:18:50] smathy: capin, are you on the latest version? https://github.com/refile/refile/blob/07165d5adc03e8c83b2014bcf0d4ae1d4c56e440/History.md#060
[19:18:57] capin: cstyles: there's an instance variable called @original_filename , can I not use that var to store the filename on the server?
[19:19:01] smathy: ...there's a bug about incorrect filename sometimes being extracted.
[19:19:17] capin: smathy: yes using the latest github master release of refile
[19:19:32] smathy: capin, and you wrote the dummy app I suggested?
[19:20:15] capin: smathy: not really :l just modified the existing app i have been working with.
[19:20:27] capin: it's hosted on github
[19:20:44] smathy: Ok, I'd do the dummy app if I were you. As simple as you can.
[19:20:48] smathy: See if refile works on that.
[19:21:01] mustmodify: has joined #RubyOnRails
[19:21:37] capin: refile is working, just not the way I want it too, the files are being uploaded in all
[19:21:49] macowie: has joined #RubyOnRails
[19:21:55] mustmodify: I just opened up the production log on a rails 4.2.3 app and noticed that the last few requests came (presumably incorrectly) from -- is that a known issue? If not, any thoughts on ... uh ... that?
[19:22:15] d5sx43: has joined #RubyOnRails
[19:23:17] capin: rhizome: thanks for that link
[19:23:20] nfk|laptop: has joined #RubyOnRails
[19:23:35] smathy: mustmodify, sounds like it's not receiving the X-Forwarded-For or something.
[19:24:09] smathy: capin, is something being stored in that _filename field? Or nil ?
[19:24:20] mustmodify: smathy: Ah, that could be.
[19:24:23] mustmodify: ok let me set that up.
[19:25:00] marr: has joined #RubyOnRails
[19:25:33] capin: smathy: yes the filename of the file is being stored in the 'csv_file_filename' field
[19:26:50] rhizome: smathy: it's the after-save filename
[19:26:54] smathy: capin, just not the original name of the file you uploaded?
[19:27:23] capin: no it's saving the original filename in that filed
[19:27:23] smathy: rhizome, yeah, I just wasn't sure if nothing was being saved (and so a reader was defaulting to the ID string) or the actual ID string was being saved in the DB.
[19:27:31] smathy: capin, heh :) Ok.
[19:27:42] rhizome: WTF. capin you're all over the place
[19:27:51] smathy: capin, so, you actually have "foo_bar.csv" stored in your csv_file_filename field?
[19:28:03] cryptojuice: has joined #RubyOnRails
[19:28:12] smathy: capin, so, to repeat: what are you trying, what are you expecting, what are you getting?
[19:28:23] capin: rhizome: sorry for the confusion
[19:28:25] smathy: capin, !gist please
[19:28:25] helpa: capin: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[19:28:40] rhizome: apparently it's all working as desired now
[19:28:53] capin: rhizome: not exactly
[19:29:05] rhizome: capin: it's ok to describe things with more than one sentence
[19:29:22] stevenw_: if I setup rack-cors in my app, do I need to do any configuration in nginx or passenger?
[19:29:43] mustmodify: smathy: Yep, I think that did it.
[19:29:49] capin: the filename of the file stored on the remote file system is still a hash with no extension ...does that make sense
[19:30:00] cstyles: capin: that???s the way refile is supposed to work
[19:30:32] cstyles: capin: https://github.com/refile/refile#1-backend
[19:30:48] capin: cstyles: so i need to reference the file from the field in the DB storing the filename
[19:31:43] cstyles: when you say ???reference the file??? what do you mean? just displaying an image?
[19:31:54] cryptojuice: I have a method that gets called on another class during the "before_save" lifecycle of my model, how to I mock? spy? double? this class during my test using RSPec::Mock ? I want to return pre-defined information without the actual class method being called.
[19:32:29] smathy: mustmodify, great.
[19:33:01] Pazician: has joined #RubyOnRails
[19:34:11] smathy: capin, if refile used the name from the user's file, then files with the same name would overwrite previous ones.
[19:34:15] mustmodify: has left #RubyOnRails: ()
[19:34:51] ja: is there a way to specify the default column limit? so I don't have to write e.g. `limit: 256` on *every* *single* *line* of string columns in my migrations?
[19:35:15] ests: has joined #RubyOnRails
[19:35:18] meoblast001: has joined #RubyOnRails
[19:35:53] capin: smathy: yeah i was wondering about that one
[19:38:05] NBarnes: has joined #RubyOnRails
[19:39:07] stannard_: has joined #RubyOnRails
[19:42:42] MrJoshua: has joined #RubyOnRails
[19:42:43] jgt1: has joined #RubyOnRails
[19:42:44] rhizome: ja: well, the :string datatype is (usually) a VARCHAR(255) if that helps at all
[19:43:10] ischwartz: has joined #RubyOnRails
[19:43:33] rhizome: :text is the larger one
[19:44:38] stamina: has joined #RubyOnRails
[19:46:10] ja: rhizome: Oh, yeah, I just saw that in AR's source. I thought the default was 50 in Rails migrations.
[19:46:35] ja: rhizome: Do you have any idea why it's 255 and not 256, btw? (Not important. Just curious.)
[19:49:11] symbol: has joined #RubyOnRails
[19:49:27] macowie: has joined #RubyOnRails
[19:50:07] Pazician_: has joined #RubyOnRails
[19:50:25] baweaver: has joined #RubyOnRails
[19:51:13] bhegel: has joined #RubyOnRails
[19:51:13] EminenceHC: has joined #RubyOnRails
[19:51:13] manfrin_: has joined #RubyOnRails
[19:51:20] brenop: has left #RubyOnRails: ()
[19:52:43] bhegel: Trying to allow a user to click a link and have a large file download, While file is downloading, want user to be able to make other requests without interrupting the download. Can Rails do this? X-Sendfile doesn???t seem to accomplish it.
[19:53:11] pontiki: has joined #RubyOnRails
[19:55:00] shinnya: has joined #RubyOnRails
[19:56:19] DoubleMalt: has joined #RubyOnRails
[19:57:29] aarkerio: has joined #RubyOnRails
[19:58:09] `based_pdev`: has joined #RubyOnRails
[19:59:29] shibabu: has joined #RubyOnRails
[19:59:43] willardg: has joined #RubyOnRails
[19:59:46] davispuh: has joined #RubyOnRails
[19:59:46] capin: https://github.com/refile/refile/blob/07165d5adc03e8c83b2014bcf0d4ae1d4c56e440/lib/refile/backend_macros.rb#L37
[20:01:16] sharkman: has joined #RubyOnRails
[20:01:27] mwlang: has joined #RubyOnRails
[20:03:37] safety_cut: has joined #RubyOnRails
[20:04:04] mwlang: I???m trying to add the draper gem to my Rails 4.1.x project. I added ???draper??? to Gemfile and ???bundle install??? I successfully generated a new decorator with: ???rails g decorator item??? and added a method and called it from my view. All???s fine there. However, when I attempt to add rspec tests for the decorator, I get ???uninitialized constant ItemDecorator??? error.
[20:04:07] arthurix_: has joined #RubyOnRails
[20:04:27] mwlang: I???m not finding anything in the docs saying I should add something to rails_spec or spec_helper, so a little stumped.
[20:06:10] mwlang: I was hopeful it was one of those spring oddities, but ???spring stop && rspec ./spec/decorators/item_decorator_spec.rb??? still produces the error.
[20:06:36] matthewd: mwlang: Your spec needs to require rails_helper instead of spec_helper
[20:06:54] dopie: has joined #RubyOnRails
[20:08:24] mwlang: matthewd: spot on! sheez. Totally missed that.
[20:09:40] tercenya: has joined #RubyOnRails
[20:10:12] trautwein: has joined #RubyOnRails
[20:10:59] nfk|laptop: has joined #RubyOnRails
[20:11:13] jeffleeismyhero: has joined #RubyOnRails
[20:12:07] Ryan1013: has joined #RubyOnRails
[20:12:24] GregUK: has joined #RubyOnRails
[20:16:18] trautwein: has joined #RubyOnRails
[20:17:47] awoods_: has joined #RubyOnRails
[20:18:40] _djbkd: has joined #RubyOnRails
[20:19:13] jessemcgilallen: has joined #RubyOnRails
[20:19:54] Sigma01: has left #RubyOnRails: ()
[20:20:10] Sigma00: has joined #RubyOnRails
[20:22:16] relix: has joined #RubyOnRails
[20:22:46] ngscheur1: has joined #RubyOnRails
[20:24:50] Pazician_: has joined #RubyOnRails
[20:24:50] ja: # File activesupport/lib/active_support/core_ext/module/method_transplanting.rb, line 5
[20:24:53] ja: def foo; end
[20:24:54] ja: lol wot
[20:25:10] baweaver: has joined #RubyOnRails
[20:25:52] tw1sted: has joined #RubyOnRails
[20:27:49] Coldblackice: has joined #RubyOnRails
[20:27:51] mwlang: quick question on draper in general: Suppose the model, say Book, has a column publication_year that returns integer value of 2015 and you want the decorated publication year to be ???(2015)??? - that is, a string that encases the year in parentheses. I can see from my test specs that if I call item.publication_year before decorating, I get the integer value and if I call same after decorating that I get the string version. This is as
[20:27:52] mwlang: expected, but it???s it a good idea that decorator methods have same name as method? Or should I be giving it a slightly different name (like ???year_of_publication???) for the decorator method?
[20:28:21] mwlang: I can???t quite decide if I???m introducing a code smell or not.
[20:29:08] mwlang: or at least violating the principle of least surprise.
[20:29:58] mwlang: after all, you???re only supposed to decorate *after* you done all the processing you need to on the models and right before presentation in the views.
[20:32:56] Sigma00: has left #RubyOnRails: ()
[20:32:56] MrPunkin: has joined #RubyOnRails
[20:32:58] Sigma00: has joined #RubyOnRails
[20:33:28] MrPunkin: has left #RubyOnRails: ()
[20:38:09] farkerhaiku: has joined #RubyOnRails
[20:38:40] `based_pdev`: has joined #RubyOnRails
[20:38:41] wharr: has joined #RubyOnRails
[20:39:25] Ryan1013: has left #RubyOnRails: ()
[20:41:04] acti0nman: has joined #RubyOnRails
[20:41:55] mary5030: has joined #RubyOnRails
[20:42:41] arthurix: has joined #RubyOnRails
[20:43:02] smathy: mwlang, give it a different name.
[20:43:16] atomical_: has joined #RubyOnRails
[20:43:26] jgt1: has joined #RubyOnRails
[20:43:37] mwlang: smathy: what???s your reasoning?
[20:43:52] wa_r_ch_i__ld1: has joined #RubyOnRails
[20:44:23] EdwardIII: has joined #RubyOnRails
[20:44:33] wa_r_ch_i__ld1: hey, anyone know how to completely clear/reset all queues and jobs for the Minion gem?
[20:44:36] robbyoconnor: has joined #RubyOnRails
[20:45:17] smathy: mwlang, the method represents the name of something, you've changed what that thing is, so give it a different name.
[20:45:37] mitchless: has joined #RubyOnRails
[20:45:41] smathy: mwlang, also, it's better to be able to get to the original value using the original method if you need to.
[20:47:04] jeffleeismyhero: I???m having some trouble with adding an x-axis using Rubyvis. I can add the X values to the bottom of the bars, but cannot seem to figure out how to add an x-axis: https://gist.github.com/jeffleeismyhero/3831c96d6beb0e9f729a
[20:47:25] rhizome: ja: newline? dunno
[20:49:07] arup_r: wa_r_ch_i__ld1: seems you can't. Ha
[20:49:28] mwlang: smathy: first reason is a good one I didn???t think of. the 2nd point was what I was essentially waivering over as I couldn???t decide that I would actually need such access once I???m at the point of drawing the views.
[20:51:28] smathy: has joined #RubyOnRails
[20:52:01] hephaestus_rg: has joined #RubyOnRails
[20:54:56] wldcordeiro: has joined #RubyOnRails
[20:56:00] mrbubbles: has joined #RubyOnRails
[20:56:49] gabeodess: has joined #RubyOnRails
[20:57:02] GregUK: has left #RubyOnRails: ()
[20:57:14] ja: rhizome: huh? I just thought it was weird that there was an empty method called `foo` in Rails
[20:57:26] ja: rhizome: oh! Sorry!
[20:58:23] smathy: ja, you can see what it's doing though, right?
[20:58:34] polishdub_: has joined #RubyOnRails
[20:59:08] smathy: mwlang, maybe, but what about a form somewhere that needs the real value?
[20:59:19] smathy: mwlang, but yeah, the first reason would be enough of an argument for me.
[20:59:29] ja: smathy: no. which?
[21:01:57] safety_cut: has joined #RubyOnRails
[21:01:58] smathy: ja, testing whether a method is transferrable from one module to another.
[21:02:56] ja: intriguing, smathy
[21:02:57] ja: I missed that
[21:03:16] mrbubbles: I???m trying to reduce the number of times that a DB is hit in an import script. I???ve just realised that an ActiveRecord function is being called 6 times when the data shouldn???t change between each call??? the top is before, the bottom is what I???m tryign to do but I don???t think I???m doing it quite right https://gist.github.com/joeczucha/b57a59b80f61b6a21010
[21:03:21] ja: just noticed it in the corner of my eye and got all ???wtf???
[21:04:02] mrbubbles: basically I want to store the result in an instance var and only do the AR request if it doesn???t already exist
[21:05:46] blackmesa: has joined #RubyOnRails
[21:06:16] smathy: ja, makes this code much nicer in non 1.9 - https://goo.gl/owftS1
[21:06:48] smathy: ja, it's definitely weird that Module#foo wasn't `:nodoc:`ed :)
[21:07:03] dideler: has joined #RubyOnRails
[21:07:37] smathy: mrbubbles, ||= not ||
[21:08:25] smathy: mrbubbles, also you want to use `begin/end` not `{/}`
[21:09:54] polishdub: has joined #RubyOnRails
[21:10:40] mrbubbles: ah okay, yes probably
[21:10:57] safety_cut: has joined #RubyOnRails
[21:11:20] mrbubbles: thanks smathy
[21:11:58] mikecmpbll: also, you're not taking in to account different arguments
[21:12:08] KensoDev: has joined #RubyOnRails
[21:12:13] mikecmpbll: you presumably don't want the cached result if you pass a different period?
[21:12:45] mrbubbles: oh yes, good point
[21:12:49] mrbubbles: my brain must be tired
[21:13:14] mrbubbles: hmm okay maybe I???ll just leave that then
[21:13:18] mikecmpbll: you could use a hash and key with the arguments
[21:13:29] yfeldblum: has joined #RubyOnRails
[21:14:11] mrbubbles: Actually just looking though and it???s getting called 10 times but with 5 separate meter_id???s
[21:14:13] symbol: has joined #RubyOnRails
[21:14:20] Pupeno: has joined #RubyOnRails
[21:14:21] mrbubbles: so actually I could only reduce it by half, probably not worth worrying about
[21:14:35] jholm: has joined #RubyOnRails
[21:14:54] mikecmpbll: also, you don't need || nil
[21:15:20] mikecmpbll: seeing as the left side of the || will never result in false, the only time the right will be evaluated is if it's nil
[21:15:59] arup_r: yes, use .try() :p
[21:16:33] jessemcgilallen: has joined #RubyOnRails
[21:18:31] tvw: has joined #RubyOnRails
[21:18:33] ajb: has joined #RubyOnRails
[21:19:52] mikecmpbll: did you see they're adding a new operator to ruby so instead of a.try(:b).try(:c) or a && a.b && a.c, etc, you can do a.?b.?c
[21:20:09] ajb: has joined #RubyOnRails
[21:20:34] MartinEl_: has joined #RubyOnRails
[21:21:37] smathy: has joined #RubyOnRails
[21:21:46] defsdoor: we could always just use perl
[21:22:12] choke: has joined #RubyOnRails
[21:22:53] mikecmpbll: inspired by Groovy, apparently.
[21:22:57] kies^: has joined #RubyOnRails
[21:24:04] smathy: Then you have 0b10 problems.
[21:24:04] arup_r: mikecmpbll: yes
[21:24:19] arup_r: like Coffeescript has
[21:24:20] defsdoor: in a.?b.?c what is b referring to ? (I know its a method) but what if b is a variable ?
[21:24:23] Maletor: has joined #RubyOnRails
[21:24:49] centrx: What is that
[21:24:52] arup_r: defsdoor: https://bugs.ruby-lang.org/issues/11537?utm_source=rubyweekly&utm_medium=email
[21:24:58] defsdoor: how do to tell it b isnt the method name but something that returns the method name
[21:25:10] defsdoor: seem to break some fundamental expectations
[21:25:42] Pupeno: has joined #RubyOnRails
[21:26:13] centrx: defsdoor, Is this supposed to be valid Ruby? - a.?b.?c
[21:26:27] workmad3: centrx: new operator being introduced :(
[21:26:35] workmad3: well, not operator, syntax
[21:26:58] workmad3: it's basically a ruby syntax for `a.try(:b).try(:c)`
[21:27:12] bruno-: has joined #RubyOnRails
[21:27:18] workmad3: defsdoor: you'd do it the same way you'd do normal dynamic method dispatch... with send
[21:27:28] workmad3: defsdoor: a.?send(b).?send(c)
[21:28:27] defsdoor: whats up with try ?
[21:28:37] hephaestus_rg: has joined #RubyOnRails
[21:28:51] defsdoor: I'd rather be able to read the code
[21:29:04] workmad3: defsdoor: I'd rather not let nils leak into my code
[21:29:28] arup_r: Go to the link and say there. WE HATE this new syntax
[21:29:36] defsdoor: how does an alternative syntax help that ?
[21:29:49] workmad3: defsdoor: it doesn't... I actually don't like the new syntax
[21:29:59] adaedra: I'm the only being ok with this new syntax?
[21:30:19] smathy: try is too verbose and having to create a stupid symbol - blergh
[21:30:38] centrx: It could work
[21:30:48] defsdoor: smathy, ruby doesnt provide many other non-evaluated way to refer to something
[21:31:36] smathy: defsdoor, not sure what you mean by "non-evaluated"
[21:31:43] d5sx43: has joined #RubyOnRails
[21:32:02] defsdoor: you need a way to say "im referring to a method name - dont evaluate this"
[21:32:40] workmad3: defsdoor: ??
[21:32:48] defsdoor: it's either :b or 'b' - everything else will be evaluated
[21:33:02] workmad3: defsdoor: are you claiming that ruby doesn't have 'send'?
[21:33:04] defsdoor: i.e. a.try(b) will trty the result of b
[21:33:09] smathy: defsdoor, I don't think they're removing try
[21:33:17] workmad3: defsdoor: right... because it's implemented using send
[21:33:25] workmad3: defsdoor: it's *send* you're talking about, not try
[21:33:40] baweaver: has joined #RubyOnRails
[21:33:52] workmad3: smathy: considering `try` is added by rails, I doubt they will too :)
[21:33:56] defsdoor: workmad3, no - I'm trying to say why it's :b - theres little other option other than :b or 'b' in the current ruby syntax
[21:34:17] htmldrum: has joined #RubyOnRails
[21:34:52] smathy: ACTION has no idea what point defsdoor is try(:ing) to make
[21:34:53] workmad3: defsdoor: right... and I already pointed out that a.?send(b) would do the same
[21:34:59] capin: anyone know how i can store cache files in a "cache" dir using the refile gem, https://gist.github.com/ipatch/93c6ae71a237eb313696
[21:35:22] defsdoor: workmad3, I'm just rying to reply to the dislike of :b
[21:35:34] workmad3: defsdoor: who dislikes symbols???
[21:35:46] defsdoor: <smathy> try is too verbose and having to create a stupid symbol - blergh
[21:35:57] chipotle: has joined #RubyOnRails
[21:35:58] smathy: Is it all symbols you dislike, or just :b ?
[21:35:59] workmad3: defsdoor: yeah, he was meaning `.?` syntax I believe
[21:36:15] smathy: Correct ^
[21:36:24] defsdoor: smathy, you are the one that dislikes symbols not me
[21:36:34] smathy: .?b is cool because try(:b) is too verbose and you have to create a symbol.
[21:37:28] Jasaka: has joined #RubyOnRails
[21:37:51] woods: has joined #RubyOnRails
[21:37:57] smathy: defsdoor, I love symbols, I just don't like having to create them just to write code resilient to nil receiver or missing method.
[21:37:59] workmad3: smathy: not having a chance of a 'nil' there would be better :)
[21:38:16] workmad3: oh gods, I'm gonna start spouting the benefits of `Maybe` monads soon!
[21:38:18] jobewan: has joined #RubyOnRails
[21:39:30] smathy: Maybe only protects you from nil receiver though (right?) not the missing method.
[21:39:59] mikecmpbll: yes, that's the plan afaik.
[21:40:44] smathy: mikecmpbll, I meant a Maybe monad. You're saying that .?b will still raise on missing b ?
[21:40:52] workmad3: smathy: right... you'd need Either to handle missing method
[21:41:07] mikecmpbll: and yes, i think so
[21:41:17] pontiki: has joined #RubyOnRails
[21:41:32] smathy: Perhaps .!b could do both ;)
[21:41:45] smathy: "Just fucking call it!"
[21:41:51] workmad3: smathy: so .? replaces try! and .! replaces try? :)
[21:42:02] mikecmpbll: i wonder what nil.?nil? would do ?
[21:42:08] mikecmpbll: that's just blown my mind
[21:42:10] workmad3: mikecmpbll: call nil?
[21:42:45] smathy: workmad3, that's a _kind_ of symmetry.
[21:43:00] jenrzzz: has joined #RubyOnRails
[21:43:21] workmad3: mikecmpbll: hmm, actually it seems that nil.?nil? would be nil
[21:43:25] pontiki: Q: I want to use a concern, but it's defined in a namespace, a la "Etl::Loader", the file would somehow be 'etl/loader.rb', but i'm not sure where to put that in under app/models/. Currently, there's an app/models/etl/product.rb for the model which is going to include Etl::Loader, but I can't figure out where to put it for Rails' autoloading to work.
[21:43:52] IFrank00: has joined #RubyOnRails
[21:44:05] EminenceHC: has joined #RubyOnRails
[21:44:06] jgt1: has joined #RubyOnRails
[21:44:07] pontiki: I've tried app/models/concerns/etl/loader.rb, app/models/etl/concerns/etl/loader.rb, and app/models/etl/loader.rb
[21:44:18] Pupeno: has joined #RubyOnRails
[21:44:18] Pupeno: has joined #RubyOnRails
[21:44:33] workmad3: pontiki: my guess would be app/models/concerns/etl/loader.rb
[21:44:33] smathy: pontiki, Rails would have you put it in app/models/concerns/etl/loader.rb
[21:44:40] mary5030: has joined #RubyOnRails
[21:44:42] workmad3: pontiki: or maybe app/concerns/etc/loader.rb
[21:44:57] pontiki: that's what i thought too...
[21:45:19] smathy: pontiki, what's happening that you didn't expect.
[21:45:21] drupald: has joined #RubyOnRails
[21:45:38] pontiki: it can't find Etl::Loader (const undefined)
[21:45:42] workmad3: pontiki: personally, I'd probably end up with it in `lib` and explicitly require it... but I'm old and boring like that :)
[21:45:57] workmad3: pontiki: what rails version?
[21:45:59] pontiki: oh! it worked (sorta)
[21:46:17] workmad3: pontiki: what does 'sorta' mean? :)
[21:46:46] mary5030: has joined #RubyOnRails
[21:47:02] workmad3: pontiki: also, in situations where something isn't loading and you think it should... start with a `spring stop`
[21:47:06] arup_r: sleep time
[21:47:23] mary5030_: has joined #RubyOnRails
[21:47:51] pontiki: ok, this work as far as finding the module: app/models/concerns/etl/loader.rb
[21:48:04] pontiki: it finds the constant, anyway. now i have to fix something else :)
[21:48:57] mois3x: has joined #RubyOnRails
[21:49:23] mary5030_: has joined #RubyOnRails
[21:50:00] pontiki: workmad3: we have officially eschewed spring here.
[21:52:16] FailBit: https://github.com/juokaz/pyhp.js
[21:52:26] FailBit: and it's still faster than /usr/bin/php!
[21:53:12] sharkman: if you guys had to start up an instance on amazon web server, and install rails, a server, a db, an get it set up to show a basic HTML page. how long would that take you?
[21:54:01] FailBit: pretty much as long as it takes to set up the environment
[21:54:03] n1lo: has joined #RubyOnRails
[21:54:39] jgt1: has joined #RubyOnRails
[21:54:41] sharkman: what do you mean by, "environment"?
[21:54:52] sharkman: im doing this now. its the first time for me. its gonna take me 15+ hours. just curious how im doing
[21:54:57] smathy: sharkman, like an hour.
[21:54:59] sharkman: 10+ hours at least
[21:55:05] shibabu: has joined #RubyOnRails
[21:55:05] simi: has joined #RubyOnRails
[21:55:25] FailBit: sharkman: I mean like to get keys set up to pull from my repo, to install ruby, and to do the first deploy
[21:55:47] FailBit: I use rbenv for ruby, which means fun with ruby-build
[21:56:16] montagesoftware: has joined #RubyOnRails
[21:56:17] MrJoshua_: has joined #RubyOnRails
[21:56:33] sharkman: too bad i cant do this in an hour. i am slower than you by a factor of at least ten
[21:56:33] safety_cut: has joined #RubyOnRails
[21:57:24] woods: i discovered last night that it takes an incredibly long time to install ruby on a raspberry pi
[21:57:31] smathy: sharkman, such is the benefit of experience.
[21:57:39] SteenJobs: has joined #RubyOnRails
[21:57:51] smathy: sharkman, unfortunately I probably don't get paid 10x you.
[21:58:07] montagesoftware: has joined #RubyOnRails
[21:58:44] smathy: woods, you were compiling ruby from source?
[21:58:47] _djbkd: has joined #RubyOnRails
[21:59:28] sharkman: how much do senior ruby people get paid, like 100k a year?
[21:59:33] woods: it was with rvm
[21:59:46] bhegel: has joined #RubyOnRails
[21:59:50] woods: curl -L get.rvm.io | bash -s stable rails
[21:59:51] rodfersou: has joined #RubyOnRails
[21:59:53] Aeyrix: sharkman: Entirely depends.
[22:00:07] smathy: woods, ok so yeah, I think that's building from source. Makes sense for it to take a while on a Pi.
[22:00:24] woods: yeah, luckily i set up SSH before, so it wasn't tying up my monitor
[22:00:51] woods: i was trying to use artoo on the pi
[22:00:52] smathy: Could have just disconnected the monitor once it had started anyway.
[22:00:59] woods: fair enough
[22:01:13] woods: ssh feels cooler though :)
[22:01:20] smathy: Absolutely :)
[22:01:21] smathy: So you have a Rails server in your pocket now?
[22:01:23] dikaio: has joined #RubyOnRails
[22:01:33] woods: actually, it froze, so i have to redo it tonight after work
[22:01:39] montagesoftware: has joined #RubyOnRails
[22:01:49] woods: i ran that command inside a VM on my windows machine
[22:01:58] woods: and for some reason, windows froze
[22:02:08] woods: so, i lost access to the vm, and subsequently my ssh session
[22:02:22] yfeldblum: has joined #RubyOnRails
[22:02:33] jgpawletko: has joined #RubyOnRails
[22:06:46] smathy: woods, your next project: http://likemagicappears.com/projects/raspberry-pi-cluster/
[22:07:22] smathy: woods, run it in tmux or screen next time so you'll be able to re-connect to the ssh session and your stuff will still be running.
[22:07:42] bhegel: has joined #RubyOnRails
[22:07:53] willardg: has joined #RubyOnRails
[22:08:19] darrencauthon: has joined #RubyOnRails
[22:08:45] bendangelo: has joined #RubyOnRails
[22:09:44] baweaver: has joined #RubyOnRails
[22:10:15] drbayer_: has joined #RubyOnRails
[22:11:40] sharkman: so i ssh into the server as admin. then do sudo -i -u postgres. then do createdb mydb. how do i give user admin full permissions over this database? so i can access it from the admin user
[22:11:43] drbayer__: has joined #RubyOnRails
[22:13:04] ebbflowgo: has joined #RubyOnRails
[22:13:54] robbyoconnor: has joined #RubyOnRails
[22:14:00] woods: smathy: just saw your post to me, one minute while i review
[22:14:59] _djbkd: has joined #RubyOnRails
[22:15:25] ibouvousaime: has joined #RubyOnRails
[22:15:31] _djbkd: has joined #RubyOnRails
[22:15:40] woods: smathy: that is awesome! also thanks for the tip about tux
[22:15:52] drbayer: has joined #RubyOnRails
[22:15:53] smathy: woods, np.
[22:15:56] woods: what i really need to do is get it setup so i can ssh into it when I'm not at home
[22:16:06] mois3x: has joined #RubyOnRails
[22:16:45] riotjones: has joined #RubyOnRails
[22:17:03] ebbflowgo: has joined #RubyOnRails
[22:17:22] willardg: has joined #RubyOnRails
[22:17:42] ibouvousaime: I installed ruby on rails with rvm but when I try to use rails commands on the terminal Im told that the command isnt found
[22:17:48] ibouvousaime: cansomeone help me ?
[22:17:55] symbol: has joined #RubyOnRails
[22:17:57] smathy: Next server I put up will be HTTP/2
[22:18:27] robbyoconnor: has joined #RubyOnRails
[22:18:33] robbyoconnor: has joined #RubyOnRails
[22:20:59] havenwood: ibouvousaime: Have you selected an RVM Ruby? What do you get for?: rvm current
[22:21:12] havenwood: ibouvousaime: v
[22:21:15] havenwood: ibouvousaime: https://rvm.io/rubies/default
[22:21:41] montagesoftware: has joined #RubyOnRails
[22:25:41] dawidof: has joined #RubyOnRails
[22:26:07] WillAmes: has joined #RubyOnRails
[22:26:15] rickmasta: has joined #RubyOnRails
[22:27:03] FailBit: you know you're mlg when you do math and you get 4*105
[22:28:14] Emily_: has left #RubyOnRails: ()
[22:28:20] Ergo: has joined #RubyOnRails
[22:28:50] smathy: This channel is getting weirder.
[22:29:23] robbyoconnor: has joined #RubyOnRails
[22:29:56] woods: has joined #RubyOnRails
[22:30:59] rhizome: may i mambo to the banana patch?
[22:31:59] workmad3: rhizome: only if you then shimmy the strawberries
[22:32:18] mrbubbles: has joined #RubyOnRails
[22:35:39] Emily: has joined #RubyOnRails
[22:36:30] wethu: has joined #RubyOnRails
[22:36:50] chipotle: has joined #RubyOnRails
[22:37:27] arthurix_: has joined #RubyOnRails
[22:39:41] willardg: has joined #RubyOnRails
[22:40:53] drbayer_: has joined #RubyOnRails
[22:42:22] sharkman: im trying to set up rails and connect it to postgres... if i run bundle exec rails c, i get this error, /var/lib/gems/2.1.0/gems/execjs-2.6.0/lib/execjs/runtimes.rb:48:in `autodetect': Could not find a JavaScript runtime.
[22:42:27] sharkman: any thoughts on what i should do?
[22:42:30] baweaver: has joined #RubyOnRails
[22:42:51] smathy: sharkman, install a javascript runtime.
[22:43:10] sharkman: what does runtime mean in this context
[22:43:14] woods: execjs or nodejs
[22:43:19] woods: what OS are you using?
[22:43:33] smathy: execjs isn't a runtime
[22:43:34] woods: apt-get install nodes
[22:43:44] smathy: (which is why *it's* giving this error)
[22:43:46] woods: ahh, i stand corrected, thanks smathy
[22:43:54] woods: nodejs will do it though
[22:44:03] woods: apt-get install nodejs*
[22:44:14] woods: OS X loves to correct my spelling
[22:44:32] smathy: sharkman, there's actually a comment in the generated Gemfile linking to the readme for what to do.
[22:45:29] smathy: sharkman, reading the comments in various files Rails generates for you is a habit you want to get into.
[22:45:51] smathy: (I'm waiting for the next question, about SECRET_KEY_BASE
[22:46:13] nettoweb: has joined #RubyOnRails
[22:47:07] hansss: has joined #RubyOnRails
[22:48:15] sharkman: ok thanks smathy i will check that out
[22:48:51] yfeldblum: has joined #RubyOnRails
[22:50:01] ibouvousaime: haverwood RVM current outputs ruby-2.2.1
[22:50:13] Scriptonaut: has joined #RubyOnRails
[22:50:13] havenwood: ibouvousaime: and?: ruby -v
[22:50:39] ibouvousaime: ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux]
[22:50:57] adaedra: ibouvousadore: you can use tab to complete nicks and not make typos while typing them.
[22:51:00] havenwood: ibouvousaime: and?: echo $PATH
[22:51:37] ibouvousaime: ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux]
[22:52:13] nya: has joined #RubyOnRails
[22:52:33] jessemcgilallen: has joined #RubyOnRails
[22:54:42] adaedra: try adding a second / in front.
[22:54:47] slothbear: has joined #RubyOnRails
[22:55:00] quazimodo: has joined #RubyOnRails
[22:55:04] ibouvousaime: havenwood, http://pastie.org/10500817
[22:55:58] havenwood: ibouvousaime: So guessing if you `which ruby` it's: /usr/local/bin/ruby
[22:56:27] havenwood: ibouvousaime: Or: /usr/bin/ruby
[22:56:45] havenwood: ibouvousaime: RVM expects to be first in your PATH.
[22:57:17] ibouvousaime: sbin instead of bin
[22:57:23] slothbear: If you have seed data (say typical Favorite Colors) and allow users to create and own new colors (color belongs_to :user) what user should own the seed data Colors? nil? (yuck?) or some seed Admin user?
[22:57:29] wethu: has joined #RubyOnRails
[22:58:40] FailBit: "it depends"
[22:59:04] havenwood: ibouvousaime: \curl -sSL https://get.rvm.io | bash -s -- --auto-dotfiles
[22:59:15] smathy: ACTION wonders in which secluded part of the tech industry favorite colors is a typical data seed
[22:59:46] quazimod1: has joined #RubyOnRails
[22:59:58] drbayer: has joined #RubyOnRails
[23:00:03] woods: smathy, my living room
[23:00:32] NBarnes: I was making a paint web app
[23:00:40] drbayer: has joined #RubyOnRails
[23:00:45] ibouvousaime: havenwood, its done installing that
[23:00:48] NBarnes: And users can make their own color palettes, but there's a default palette
[23:01:09] ibouvousaime: but rails isnt still working :/
[23:01:11] NBarnes: I assigned that palette to my admin account
[23:01:15] havenwood: ibouvousaime: restart your terminal and see if it setting up your dotfiles got it in front of the PATH
[23:01:32] smathy: nbarnes, did you just assume the identity of slothbear ?
[23:01:36] havenwood: ibouvousaime: you may still be stomping on PATH after RVM sets it up
[23:01:54] NBarnes: smathy; yes, I was talking to slothbear
[23:02:12] NBarnes: Which I failed to flag properly because I can hardly see for the headache I'm nursing.
[23:02:16] NBarnes: I blame postgres.
[23:02:25] smathy: Fair enough :)
[23:02:37] smathy: It just seemed like you actually became the same person and began describing the problem ;)
[23:02:41] woods: it's not a hangover?
[23:02:52] smathy: pg parties hard
[23:03:06] ibouvousaime: havenwood, /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/home/ibouvousaime/.rvm/bin:/home/ibouvousa
[23:03:08] NBarnes: I don't think it's a hangover. I didn't do anything that fun last night.
[23:03:30] woods: maybe you will tonight to forget your pg troubles?
[23:03:45] havenwood: ibouvousaime: So yeah, check your dotfiles for: PATH=
[23:03:45] NBarnes: If I drank every time postgres and I fought, my liver would explode.
[23:03:51] lukekhamilton: has joined #RubyOnRails
[23:03:58] woods: you must be 21+ in the US to use postgres
[23:04:05] havenwood: ibouvousaime: Seems you're overwriting your PATH.
[23:04:44] ibouvousaime: check dotfiles? how ?
[23:05:06] safety_cut: has joined #RubyOnRails
[23:05:49] havenwood: ibouvousaime: OS/distro? Bash?
[23:06:00] slothbear: I still assume my own identify. But I think I got the gist. (and am glad my random example amused). Perhaps there's a product. Instead of becoming mayor of your favorite coffee shop... you own colors?
[23:06:12] Or1on: has joined #RubyOnRails
[23:06:22] smathy: ibouvousaime, havenwood, we've fully exhausted the relevance of this rvm setup conversation to the #RubyonRails channel. If you need to continue can you guys take this to #rvm or a private chat.
[23:06:23] drbayer: has joined #RubyOnRails
[23:07:17] smathy: slothbear, just messing, it was just a funny comment that this was a typical data seed ;)
[23:07:32] KnownSyntax_: has joined #RubyOnRails
[23:08:08] slothbear: oh yeah... I edited in "typical" at the end after I changed examples. I see what you mean.
[23:08:29] havenwood: smathy: Not everyone is a guy. ;)
[23:08:40] pydave6367: has joined #RubyOnRails
[23:09:23] smathy: havenwood, "guys" doesn't mean males in many dialects.
[23:09:39] Or1on: havenwood, 2. guys Informal Persons of either sex. http://www.thefreedictionary.com/guys
[23:09:56] mikecmpbll: just don't start this discussion over in #ruby
[23:10:00] Scriptonaut: they're crazy about using "guys" in #ruby
[23:10:01] mikecmpbll: please, god.
[23:10:05] Scriptonaut: lol true that mikecmpbll
[23:10:23] smathy: Heh :) Some people are pretty crazy here too mikecmpbll :)
[23:10:25] Pazician: has joined #RubyOnRails
[23:10:29] svkurowski: has joined #RubyOnRails
[23:10:33] mikecmpbll: true enough.
[23:10:34] woods: has joined #RubyOnRails
[23:10:36] smathy: There's a bot command for it.
[23:10:43] mikecmpbll: oh, in here too?
[23:10:48] helpa: We're not all guys here - while you probably don't meant to be exclusive, not everybody feels that way. Maybe consider using "folks", "y'all" or "everyone" instead?
[23:10:59] smathy: ACTION rolls eyes so hard they hurt
[23:11:22] mikecmpbll: bizarre old world aint it.
[23:11:44] smathy: People just don't have enough to worry about.
[23:11:53] woods: just discovered that slash quit disconnects you from irc, and not just the room you are in
[23:11:55] smathy: There needs to be more leopards.
[23:12:04] smathy: woods, :)
[23:12:09] bricker: woods: we call that "learning the hard way"
[23:12:12] Scriptonaut: /wc to leave the room you're in
[23:12:28] Scriptonaut: in my client at least (irssi)
[23:12:30] woods: i have learned the lesson
[23:12:35] smathy: An old IRC trick was to teach people about the Special Interest Group command, you just type /sig and a topic
[23:12:42] woods: Scriptonaut, thanks!
[23:13:33] havenwood: smathy: http://devblog.avdi.org/2015/10/02/an-alternative-to-puts-in-ruby/
[23:14:15] mrbubbles: HEY Y???ALL
[23:14:30] mrbubbles: but yeh, seriously
[23:14:56] smathy: havenwood, not sure what your goal was there?
[23:15:35] mrbubbles: mikecmpbll: quick question??? you said earlier I could use a hash and key with the arguments for my method
[23:15:50] Aeyrix: That definition is simply due to forced use.
[23:16:18] mrbubbles: I know that one of the parameters never changes, but the other two do, is there a way to do a dictionary where you look up 2 values and it returns something?
[23:16:18] smathy: Aeyrix, as opposed to other words? Where do you think definitions come from?
[23:16:21] Or1on: Aeyrix, what?
[23:16:24] Aeyrix: Kind of like how "retard" is now ill advised to be used as a medical term.
[23:16:30] Aeyrix: Because it was overused by 14-year olds in Call of Duty.
[23:16:33] smathy: Anyway, no - no more talk about this shit. Take it to -offtopic if you want.
[23:16:38] taiar: has joined #RubyOnRails
[23:16:44] FailBit: well I was just about to type something but then
[23:16:49] Synthead: has joined #RubyOnRails
[23:17:14] mrbubbles: This appeared in my work last week??? https://monosnap.com/file/w3cP4s0VFtT9B9ayRyR1LqQmXZ6hAX
[23:17:19] mrbubbles: Not sure how I feel about it tbh
[23:17:36] mrbubbles: Haha okay smathy fair enough
[23:17:44] smathy: mrbubbles, to -offtopic please.
[23:18:16] rubyonrailed: has joined #RubyOnRails
[23:18:19] smathy: (didn't see your last until after I sent mine, sorry for being redundant)
[23:18:23] mikecmpbll: mrbubbles: sure. you can key your hash @cache with arrays
[23:18:33] mikecmpbll: @cache[[arg1, arg2]] ||= ...
[23:18:44] Maletor: has joined #RubyOnRails
[23:18:45] mrbubbles: oh winner, never knew that. thanks mikecmpbll
[23:18:52] darrencauthon: has joined #RubyOnRails
[23:18:55] mikecmpbll: or even (@cache ||= {})[[arg1, arg2]] ||= ... ;)
[23:20:35] blackhuey: has joined #RubyOnRails
[23:21:32] IFrank00: has joined #RubyOnRails
[23:22:13] oflannabhra: has joined #RubyOnRails
[23:23:07] vigintas: has joined #RubyOnRails
[23:23:27] allcentury: has joined #RubyOnRails
[23:23:52] quazimodo: has joined #RubyOnRails
[23:23:54] quazimod1: has joined #RubyOnRails
[23:25:41] mary5030: has joined #RubyOnRails
[23:25:49] Palsson: has joined #RubyOnRails
[23:25:57] iamjarvo_: has joined #RubyOnRails
[23:26:16] adrian11: has joined #RubyOnRails
[23:27:15] adrian11: has left #RubyOnRails: ()
[23:27:49] dopamean_: has joined #RubyOnRails
[23:28:20] wethu: has joined #RubyOnRails
[23:29:41] Ropeney: has joined #RubyOnRails
[23:30:08] EminenceHC: has joined #RubyOnRails
[23:31:07] Lightsword: has joined #RubyOnRails
[23:32:04] havenwood: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[23:36:20] symbol: has joined #RubyOnRails
[23:38:29] rustymyers: has joined #RubyOnRails
[23:42:04] daffy_duck: has joined #RubyOnRails
[23:42:24] KnownSyntax: has joined #RubyOnRails
[23:42:24] KnownSyntax: has joined #RubyOnRails
[23:43:58] baweaver: has joined #RubyOnRails
[23:47:14] EminenceHC: has joined #RubyOnRails
[23:48:58] atomical: has joined #RubyOnRails
[23:50:14] mrbubbles: Booooooya thanks mikecmpbll - your array cache idea bought the CSV import down from 2mins17sec to 51secs
[23:51:30] mikecmpbll: been working on our data import process recently too .. need to speed it up, might drop activerecord all together, heh.
[23:51:51] bricker: mrbubbles: are you using the built-in CSV module?
[23:52:13] nettoweb: has joined #RubyOnRails
[23:52:18] mrbubbles: bricker: errr yes, but it does a load of calculations when the data arrives too, hence why it was slow
[23:52:57] bricker: mrbubbles: well there are a bunch of C extensions for CSV parsing, look into those, they are much faster than the built-in one
[23:53:06] mrbubbles: ah okay thanks bricker
[23:54:22] EminenceHC: has joined #RubyOnRails
[23:54:56] bungoman: has joined #RubyOnRails
[23:57:45] shibabu: has joined #RubyOnRails
[23:58:19] rickmasta: has joined #RubyOnRails
[23:58:57] willardg: has joined #RubyOnRails
[23:59:31] one_zero: has joined #RubyOnRails