« Back to channel list

#RubyOnRails - 16 June 2015

« Back 1 day Forward 1 day »
[00:00:21] tedstriker: has joined #RubyOnRails
[00:01:06] allcentury: has joined #RubyOnRails
[00:01:29] pragmatism: has joined #RubyOnRails
[00:02:29] qejk: has joined #RubyOnRails
[00:02:30] simplyianm: has joined #RubyOnRails
[00:06:13] renews: has joined #RubyOnRails
[00:06:20] Axsuul: has joined #RubyOnRails
[00:10:36] beneggett: has joined #RubyOnRails
[00:11:56] krisquigley: has joined #RubyOnRails
[00:12:15] Coldblackice: has joined #RubyOnRails
[00:13:27] workmad3: has joined #RubyOnRails
[00:14:15] Coldblackice_: has joined #RubyOnRails
[00:18:48] pragmatism: has joined #RubyOnRails
[00:20:03] beneggett: has joined #RubyOnRails
[00:20:35] Scripore: has joined #RubyOnRails
[00:20:43] IFrank00: bricker If I made 1 table User and 3 table Member, Client and Admin and association belongs to a User
[00:22:01] starfox_sf: has joined #RubyOnRails
[00:25:47] twilling: I suspect I???m missing something obvious here but I???m getting an uninitialized constant error in the following scenario and I???m not able to determine why: https://gist.github.com/tylerwillingham/97d6575ddd244336a773 - I would really appreciate a shove in the right direction if you can spare it
[00:27:06] twilling: I forgot to mention that I???m using ActiveModel serializers.. let me add the serializer in real fast
[00:27:53] centrx: A route does not define the class
[00:28:11] yaw: has joined #RubyOnRails
[00:28:22] sevenseacat: has joined #RubyOnRails
[00:29:10] twilling: @centrx I don???t think that it does
[00:29:26] centrx: twilling, Are you using autoload? Is this with the rails-api gem?
[00:29:42] centrx: twilling, Generally, for directories, you want an api.rb and a v1.rb, with autoload statements
[00:30:08] twilling: no rails-api gem (using ActiveAdmin so i decided against it). i assumed Rails would pick up the files through its default autoloading in those subdirs
[00:30:25] twilling: centrx: do you have an example of what one of those files might look like?
[00:30:58] centrx: twilling, https://github.com/rails/rails/blob/master/activerecord/lib/active_record.rb
[00:31:24] centrx: twilling, just the top, with the module, the extend, and the autoload's. it doesn't have to be as complicated as Rails
[00:32:45] twilling: centrx: it looks like the upcase symbol-passed to `autoload` is the name of the subdirectory to autoload. does that seem right?
[00:32:51] towski_: has joined #RubyOnRails
[00:34:47] centrx: twilling, it's the class/module name
[00:35:08] centrx: twilling, Sometimes that will be a module with a corresponding directory, other times it will be a class defined in a plain file with no corresponding directory
[00:35:42] twilling: centrx: you mentioned rails-api before does it do something to handle this kind of nesting automatically?
[00:35:44] hotpancakes: has joined #RubyOnRails
[00:35:51] jenrzzz_: has joined #RubyOnRails
[00:36:51] robustus: has joined #RubyOnRails
[00:36:59] bronson: has joined #RubyOnRails
[00:37:19] centrx: twilling, I don't know if it does. 'rails-api' and 'grape' are two major gems/frameworks for serving APIs, something to look into
[00:38:43] cirn0_: has joined #RubyOnRails
[00:39:47] centrx: twilling, Here's a link with some good ideas, without those gems/frameworks - http://railsware.com/blog/2013/04/08/api-with-ruby-on-rails-useful-tricks/
[00:39:59] twilling: centrx: very cool, thank you
[00:40:13] recurrence: has joined #RubyOnRails
[00:42:31] justintv90: has joined #RubyOnRails
[00:44:21] EasyCo: has joined #RubyOnRails
[00:45:27] dopie: has joined #RubyOnRails
[00:47:15] GPrime: has joined #RubyOnRails
[00:48:44] pontiki: has joined #RubyOnRails
[00:48:53] wwalker: I'm using devise. I need to pass a variable into the sign_in view. I've read the docs multiple times, but I'm missing something. Does anyone have a reference to an example that gets a value into the login page?
[00:49:50] cirn0: has joined #RubyOnRails
[00:51:05] aloneintheworld: has joined #RubyOnRails
[00:52:22] Pupeno_: has joined #RubyOnRails
[00:52:36] Arnie25: has joined #RubyOnRails
[00:55:28] cnk: has left #RubyOnRails: ()
[00:57:20] Pazician: has joined #RubyOnRails
[00:57:45] cirn0: has joined #RubyOnRails
[00:58:45] pragmatism: has joined #RubyOnRails
[00:59:21] jjasonclark: has joined #RubyOnRails
[01:01:32] dopie: has joined #RubyOnRails
[01:07:00] culturelabs: I'm retrieving a Postgres money type value of 525.00 and it's returning as 525.0 big decimal... any ideas?
[01:08:04] one_zero: has joined #RubyOnRails
[01:09:08] Axsuul: has joined #RubyOnRails
[01:10:33] jacaho0: has joined #RubyOnRails
[01:11:43] crevax: has joined #RubyOnRails
[01:11:55] TaylorHu: has joined #RubyOnRails
[01:14:57] centrx: culturelabs, money is a decimal type no?
[01:15:07] simplyianm: has joined #RubyOnRails
[01:15:22] cirn0: has joined #RubyOnRails
[01:16:27] mingsheng: has joined #RubyOnRails
[01:16:28] centrx: has joined #RubyOnRails
[01:17:28] TaylorHu: Anyone have any insite as to why a form, that works locally, wouldn't load on Heroku?
[01:17:43] ivan__: has joined #RubyOnRails
[01:17:47] hotpancakes: has joined #RubyOnRails
[01:18:36] shyshy: has joined #RubyOnRails
[01:19:13] shock_one: has joined #RubyOnRails
[01:21:22] rromanchuk: has joined #RubyOnRails
[01:23:26] mtchllbr_: has joined #RubyOnRails
[01:25:15] krz: has joined #RubyOnRails
[01:25:20] sung: has joined #RubyOnRails
[01:25:20] sung: has joined #RubyOnRails
[01:26:25] philcrissman: has joined #RubyOnRails
[01:27:10] edwinrozario: has joined #RubyOnRails
[01:29:46] beauby: has joined #RubyOnRails
[01:32:35] Axsuul: has joined #RubyOnRails
[01:36:23] chipotle: has joined #RubyOnRails
[01:37:53] pontiki: what does "wouldn't load on Heroku" mean, exactly?
[01:38:31] TaylorHu: I get a generic 'We're sorry, but something went wrong.' message when trying to load the page that it is on
[01:39:03] eggoez: has joined #RubyOnRails
[01:39:15] pontiki: have you checked the logs?
[01:40:31] TaylorHu: Heroku Logs is telling me status 500 on that page
[01:40:49] TaylorHu: It was working yesterday though, and I haven't changed anything since (no pushes to Heroku)
[01:41:36] pontiki: any changes in data?
[01:42:02] pontiki: do you get a stacktrace?
[01:42:30] TaylorHu: No and who with the what now?
[01:43:50] sevenseacat: there has to be a stacktrace
[01:43:56] humancool: has joined #RubyOnRails
[01:44:36] TaylorHu: No new data, don't know how to run a stacktrace on Heroku?
[01:44:39] yaw: has joined #RubyOnRails
[01:45:16] pontiki: you don't run it, it comes with the error
[01:46:25] TaylorHu: Oh right. No it's not giving me that. Here's the link: https://willcodeforfood.herokuapp.com/jobs/new
[01:47:19] pontiki: there's not a chance in hell anyone can help you be looking at that
[01:47:29] TaylorHu: Yeah I know, it's not helpful at all
[01:47:29] pontiki: the stacktrace is in the log
[01:47:32] sevenseacat: please gist the logs
[01:47:34] TaylorHu: Hence my problem.
[01:48:05] pontiki: or change the environment in heroku to development so you get error pages
[01:48:40] TaylorHu: https://gist.github.com/TaylorHuston/d7f31cdbc90bfa7b09c0
[01:49:04] pontiki: wrong logs
[01:49:35] MrWharfsnort: has joined #RubyOnRails
[01:49:45] rickmasta: has joined #RubyOnRails
[01:49:49] bruno-: has joined #RubyOnRails
[01:50:23] TaylorHu: Oh, so I just changed the environment to development and it works fine
[01:50:34] sevenseacat: don't run in development on heroku :/
[01:50:41] TaylorHu: Which would make sense as to why it works on my local machine, as that is also development.
[01:51:04] mtchllbr_: has joined #RubyOnRails
[01:51:27] m0r0n: Hello can someone help me debug this? Capybara isn't able to find any elements in my nav. I'm not sure why. http://stackoverflow.com/questions/30856425/capybara-element-not-found-no-a-tags-are-able-to-be-found-in-the-nav\
[01:51:30] m0r0n: Here is my gist https://gist.github.com/Zilenc3/a8a46e3bcaddbab46d57
[01:51:50] TaylorHu: Any idea why a (relatively) simple page would load in dev but not in production?
[01:51:58] pontiki: you're probably missing gems
[01:51:59] MrWharfsnort: has left #RubyOnRails: ()
[01:52:17] rhizome: TaylorHu: read log
[01:52:18] sevenseacat: many reasons. we can't know why without seeing the error
[01:53:02] yfeldblum: has joined #RubyOnRails
[01:53:27] TaylorHu: I tried reading heroku logs, but apparently that wasn't the correct one, what logs should I look at?
[01:53:41] TaylorHu: I mean, running 'heroku logs' from the CLI
[01:53:56] mike___1234: has joined #RubyOnRails
[01:54:05] TaylorHu: It shouldn't be a gem issue, I don't have any development specific gems that aremn
[01:54:09] TaylorHu: aren't in production or anything
[01:54:17] pontiki: m0r0n: your spec isn't looking for any links
[01:54:41] pontiki: m0r0n: no, sorry, i see it now
[01:55:21] cirn0: has joined #RubyOnRails
[01:56:19] pontiki: m0r0n: could the link in the nav bar be collapsed?
[01:56:54] m0r0n: pontiki, collapsed? What do you mean by that? As in the CSS is hiding it? If so, I don't think it should matter
[01:57:37] TaylorHu: Oh I know what I did last, I added the reCAPTCHA gem to the form. Mayhaps that's the issue
[01:59:15] merryfett: has joined #RubyOnRails
[02:00:06] m0r0n: pontiki, Removing the CSS hasn't changed anything if you were interested
[02:00:08] RegulationD: has joined #RubyOnRails
[02:00:58] krisquigley: has joined #RubyOnRails
[02:01:08] pontiki: remove the JS too
[02:01:57] pontiki: your navigation bar is in the <head>
[02:02:02] pontiki: it needs to be in the <body>
[02:02:13] workmad3: has joined #RubyOnRails
[02:03:13] bmurt: has joined #RubyOnRails
[02:03:43] m0r0n: pontiki, I owe you hours of my time.
[02:03:48] m0r0n: Thank you sir/madam
[02:04:28] TaylorHu: Well I fixed it. All I did was make a change in the Gemfile (moved one line) so Git would see that it had been changed, commited it and re-pushed it to Heroku
[02:04:32] TaylorHu: Working fine now
[02:04:41] TaylorHu: Go home Heroku you're drunk
[02:07:47] joaomdmoura: has joined #RubyOnRails
[02:08:45] pontiki: opinions saught: i'm fixing a bug, and thinking, should i patch an existing scenario, or create one specifically for this regression (stuck with using cucumer, sadly)
[02:08:55] beauby: has joined #RubyOnRails
[02:09:32] pontiki: i'm thinking create a new one specifically for this situation
[02:11:15] mary5030: has joined #RubyOnRails
[02:13:30] recurrence: has joined #RubyOnRails
[02:16:11] rhizome: do you mean there's a bug and also a test that should but doesn't catch it?
[02:18:25] SteenJobs: has joined #RubyOnRails
[02:20:41] Spami: has joined #RubyOnRails
[02:23:14] x1337807x: has joined #RubyOnRails
[02:29:21] djbkd: has joined #RubyOnRails
[02:31:03] fedexo: has joined #RubyOnRails
[02:31:11] renews: has joined #RubyOnRails
[02:34:29] cirn0: has joined #RubyOnRails
[02:36:19] MrWharfsnort: has joined #RubyOnRails
[02:36:57] earthquake: has joined #RubyOnRails
[02:39:15] MrWharfsnort: has left #RubyOnRails: ()
[02:41:21] beneggett: has joined #RubyOnRails
[02:41:32] Jagst3r15: has joined #RubyOnRails
[02:42:38] Jagst3r15: Hi, I am looking to build a web control panel for web hosting...would rails be suitable for that?
[02:43:00] Jagst3r15: (I am well versed in PHP, but I am not convinced PHP is right for it)
[02:43:51] pipework: Jagst3r15: Sure.
[02:44:06] x1337807x: has joined #RubyOnRails
[02:44:28] Jagst3r15: now the question is how much work will it require XD
[02:45:04] pipework: Jagst3r15: About as long as a string.
[02:48:25] teufelChiCoder: has joined #RubyOnRails
[02:49:11] SteenJobs: pipework: question for you about a freelance job???i don???t know the industry super well and was hoping for some insight, mind if i shoot you a PM?
[02:49:24] pipework: SteenJobs: Um, why can't you ask here?
[02:49:53] SteenJobs: pipework: because there???s some information i don???t want to publicly broadcast
[02:49:56] SteenJobs: pipework: but nvrm i guess
[02:50:20] pipework: SteenJobs: Give it a shot, but I don't know if I can help you any.
[02:50:49] mtchllbr_: has joined #RubyOnRails
[02:50:50] SteenJobs: pipework: and because it???s not about rails questions specifically, it???s job related, so don???t want to inundate everyone with personal questions that aren???t relevant to anyone else. aka don???t want to annoy anyone
[02:51:23] pipework: SteenJobs: #1 "fuck you, pay me". #2 Fuck everyone else. But feel free to shoot me a message.
[02:52:25] GPrime: has joined #RubyOnRails
[02:53:31] beauby: has joined #RubyOnRails
[02:55:54] Anakat: has joined #RubyOnRails
[02:56:47] sye: has joined #RubyOnRails
[02:57:09] cha1tanya: has joined #RubyOnRails
[03:00:29] baweaver: has joined #RubyOnRails
[03:06:57] krz: has joined #RubyOnRails
[03:09:42] beauby: has joined #RubyOnRails
[03:12:48] edwinrozario: has joined #RubyOnRails
[03:12:56] braincrash: has joined #RubyOnRails
[03:13:43] charliesome: has joined #RubyOnRails
[03:14:13] mheld: has joined #RubyOnRails
[03:16:09] neanderslob: hi all, I'm trying to iterate over multiple entries in multiple tables, but I'm having a hard time applying the local variables necessary to do this.
[03:16:27] neanderslob: more info here: https://gist.github.com/BigMcLargeHuge/fb3a1ce27c5bbf9f2975 if anyone feels like taking a crack at it
[03:18:12] michael_mbp: has joined #RubyOnRails
[03:18:27] lathiat: neanderslob: that example is a bit incomplete but two notes
[03:19:12] lathiat: neanderslob: @farm.animal_type will not lookup the variable animal_type on @farm
[03:19:23] lathiat: neanderslob: secondly you are missing a "do" between "each" and |animal|
[03:19:32] lathiat: neanderslob: lastly your puts weight/age should be scoped on something, e.g. animal.. puts animal.weight
[03:20:05] lathiat: neanderslob: do you have an Animal model?
[03:20:13] neanderslob: lathiat: sorry, for the sloppiness on my part, let me clean it up
[03:20:17] lathiat: neanderslob: and does Farm have_many Animals?
[03:20:30] neanderslob: lathiat: it sure does!
[03:20:32] shock_one: has joined #RubyOnRails
[03:21:32] neanderslob: lathiat: I do have an animal model
[03:21:42] neanderslob: the issue I'm having is on line 7
[03:21:59] dopie: has joined #RubyOnRails
[03:23:30] lathiat: neanderslob: i commented on your gist
[03:23:41] highcup: has joined #RubyOnRails
[03:24:14] lathiat: excep trmy markdown is messed up
[03:24:16] lathiat: trying to fix
[03:24:46] neanderslob: lathiat: ah shoot, I told you I have an animal model; I don't
[03:24:48] lathiat: fixed, refresh
[03:25:01] neanderslob: each model pig, cow and chicken is separate
[03:25:11] neanderslob: that's the trick
[03:25:29] lathiat: so, generally, i would suggest you consider not doing that
[03:25:36] lathiat: or, consider a polymorphic association
[03:25:45] lathiat: but if you did want to do that
[03:25:53] lathiat: that requires some meta magic i can't tell you off the top of my head
[03:26:02] neanderslob: lathiat: ok, good to know
[03:26:26] nobitanobi: has joined #RubyOnRails
[03:26:26] neanderslob: lathiat: I should probably stop trying to do it and come up with a better method of organization
[03:26:32] neanderslob: lathiat: thanks
[03:26:34] Spami: has joined #RubyOnRails
[03:26:48] lathiat: neanderslob: generally i would suggest to have an Animal model, with a type column, maybe... though depends a bit on your application
[03:27:00] lathiat: you might really want a separte model for each animal of thats your general domain
[03:29:19] dopieee: has joined #RubyOnRails
[03:30:43] lathiat: here we go neanderslob
[03:31:54] krz: has joined #RubyOnRails
[03:34:28] ducklobster: has joined #RubyOnRails
[03:34:42] lathiat: neanderslob: this might help if you really want separate models: https://upcase.com/videos/polymorphic-finder-with-joe-ferris, see comments for a readable version you can get without a subcription
[03:38:34] bruno-: has joined #RubyOnRails
[03:40:39] kochis: has joined #RubyOnRails
[03:42:06] jcaho: has joined #RubyOnRails
[03:43:46] edwinrozario: has joined #RubyOnRails
[03:44:10] Casty: has joined #RubyOnRails
[03:45:42] michael_mbp: has joined #RubyOnRails
[03:45:54] arup_r: has joined #RubyOnRails
[03:47:14] nobitanobi: has joined #RubyOnRails
[03:48:51] RegulationD: has joined #RubyOnRails
[03:49:09] arup_r: any idea why am I getting this error ? http://stackoverflow.com/questions/30858269/sshkitrunnerexecuteerror-exception-while-running-cap-production-deployc
[03:49:32] crankharder: has anyone gotten rabl to extend a different template per object in a collection? in other words, iterate over a collection of different object types and render a given template for each fo those types
[03:49:42] krisquigley: has joined #RubyOnRails
[03:49:47] attlasbot: has joined #RubyOnRails
[03:50:59] workmad3: has joined #RubyOnRails
[03:53:43] givanse: has joined #RubyOnRails
[03:54:11] dopieee: has joined #RubyOnRails
[03:54:59] kies: has joined #RubyOnRails
[03:56:05] jcaho: has joined #RubyOnRails
[03:59:11] djbkd: has joined #RubyOnRails
[04:03:58] mike___1234: has joined #RubyOnRails
[04:05:02] krz: arup_r: can you ssh into the instance fine?
[04:05:34] arup_r: manual is working
[04:05:43] merryfett: has joined #RubyOnRails
[04:07:10] krz: arup_r: what about sshing with -i some.pem key?
[04:07:21] arup_r: if I do `ssh user@ip` it is working.. I am doing SSH to an AWS ec2 instance
[04:07:49] krz: you should ssh with a pem key to ec2
[04:08:14] krz: something along the lines of ssh -i foo.pem ec2-user@123.123.123.123
[04:08:21] arup_r: krz: Yes I used to do `ssh-add` then `ssh -i some.pem user@ip`
[04:08:28] arup_r: but after doing
[04:08:51] arup_r: cat ~/.ssh/id_rsa.pub | ssh ubuntu@25.51.106.160 -p 22 'cat - >> ~/.ssh/authorized_keys'
[04:08:59] arup_r: and sudo chmod 600 ~/.ssh/authorized_keys && chmod 700 ~/.ssh/
[04:09:20] arup_r: I am now able to login `ssh user@ip` to log in there.
[04:09:37] arup_r: but from my console or terminal
[04:09:45] arup_r: But not from Capistrano.
[04:10:22] krz: is the can you ssh -i with capistrano and see if that works?
[04:10:28] krz: -is the
[04:10:58] arup_r: tell me the command.. or what I need to change in my deploy.rb file ?
[04:11:31] krz: you need to generate a key pair via IAM first
[04:11:40] krz: http://docs.aws.amazon.com/opsworks/latest/userguide/security-settingsshkey.html
[04:12:00] krz: thats for opsworks. but should be the same process for ec2
[04:12:04] arup_r: you mean the `.pem` file ?
[04:12:11] arup_r: I have it
[04:12:36] krz: and youve verified that ssh -i foo.pem user@ip works?
[04:12:47] arup_r: yes it worked
[04:13:00] arup_r: Because I was doing manual deployment since last week
[04:13:00] krz: then try executing that in capistrano
[04:13:09] theery: has joined #RubyOnRails
[04:13:19] krz: btw, where are you deploying to? just ec2?
[04:13:34] krz: elastic beanstalk, opsworks, ECS, cloudformation?
[04:13:43] arup_r: only to Ec2
[04:13:48] crodjer: has left #RubyOnRails: ()
[04:13:50] krz: i highly recommend opsworks
[04:13:53] krz: it uses Chef
[04:14:29] neanderslob: lathiat: hey, just got back from dinner; thanks for the link
[04:14:32] arup_r: for now can I make this vaniall capistrano working ?
[04:15:09] arup_r: krz: Bcoz here the author said it work : http://robmclarty.com/blog/how-to-deploy-a-rails-4-app-with-git-and-capistrano
[04:15:11] krz: sorry cant help you. not an capistrano guy. try the business support at aws. they do chat too
[04:16:13] krz: but really. look into opsworks or elastic beanstalk. if your into docker, then ECS
[04:16:57] braincra-: has joined #RubyOnRails
[04:17:00] krz: im an opsworks guy. deployments are a breeze. theres a steep learning curve. but it pays off
[04:17:09] krz: even works with ember + rails deployments :D
[04:19:28] arup_r: no idea how to get rid of it........
[04:19:39] renews: has joined #RubyOnRails
[04:21:48] krz: get rid of what?
[04:22:12] raunicolae: has joined #RubyOnRails
[04:22:25] krz: arup_r: do you intend on having an ELB infront of your ec2 instances?
[04:22:26] raunicolae: has left #RubyOnRails: ()
[04:22:59] ylla: has joined #RubyOnRails
[04:23:47] arup_r: trying each options ...... http://stackoverflow.com/a/22037756/2767755 not able to get rid.
[04:27:44] krz: arup_r: go with the business support. itll save you a lot of time
[04:28:04] krz: it could be something on the aws side, that you arent noticing
[04:28:08] tobobo: has joined #RubyOnRails
[04:28:09] cirn0: has joined #RubyOnRails
[04:30:38] gambl0r3: has joined #RubyOnRails
[04:31:29] JoshGlzBrk: has joined #RubyOnRails
[04:33:42] tds5016: has joined #RubyOnRails
[04:34:04] tds5016: hi all. I have a ror service that uses a few gems that have css files.
[04:34:13] tds5016: I want to stop using asset pipeline and switch to grunt.
[04:34:28] tds5016: I need to figure out how I'd get access to those css files so I can import them with grunt.
[04:34:34] tds5016: does anyone know how I'd go about that?
[04:34:54] dopieee: has joined #RubyOnRails
[04:36:41] Scripore: has joined #RubyOnRails
[04:38:52] Oog_: has joined #RubyOnRails
[04:39:09] rickmasta: has joined #RubyOnRails
[04:40:01] steve_mc: has joined #RubyOnRails
[04:40:55] Oog_: what pattern do you recommend in terms of validating api call post parameters? someone is recommending ViewObject but that doesnt seem right. it seems I want a ControllerObject...?
[04:41:15] krz: tds5016: not compiled? it app/assets
[04:41:15] tds5016: has left #RubyOnRails: ()
[04:41:39] ivan__: has joined #RubyOnRails
[04:42:37] gambl0r3: has left #RubyOnRails: ()
[04:42:46] higuys: has joined #RubyOnRails
[04:44:49] gambl0re: has joined #RubyOnRails
[04:55:01] jenrzzz: has joined #RubyOnRails
[04:56:41] givanse: has joined #RubyOnRails
[04:57:09] givanse: has joined #RubyOnRails
[04:57:50] yfeldblum: has joined #RubyOnRails
[04:59:18] simplyianm: has joined #RubyOnRails
[05:03:16] sarink: has joined #RubyOnRails
[05:05:24] SteenJobs: has joined #RubyOnRails
[05:09:41] Guest60: has joined #RubyOnRails
[05:09:53] Guest50: has joined #RubyOnRails
[05:10:22] neanderslob: has joined #RubyOnRails
[05:13:34] krz: has joined #RubyOnRails
[05:13:49] shock_one: has joined #RubyOnRails
[05:13:53] renews: has joined #RubyOnRails
[05:24:01] ubear: has joined #RubyOnRails
[05:24:19] Axsuul: has joined #RubyOnRails
[05:24:22] mingsheng: has joined #RubyOnRails
[05:26:16] arup_r: krz: I am not seeing the chat link there ......
[05:26:54] bronson: has joined #RubyOnRails
[05:28:18] Pharaoh2: has joined #RubyOnRails
[05:29:44] krz: arup_r: you need to have business support
[05:29:47] krz: its paid
[05:29:53] x-light: has joined #RubyOnRails
[05:29:57] krz: but its worth it IMO
[05:30:20] ProLoser: has joined #RubyOnRails
[05:35:40] lxsameer: has joined #RubyOnRails
[05:35:57] arup_r: The thing is if I do ssh deploy@one-of-my-servers.com 'hostname; uptime' as mentioned http://capistranorb.com/documentation/getting-started/authentication-and-authorisation/ .. I am getting the output..
[05:36:28] arup_r: But the Authentication problem is some where else.. it seems
[05:37:30] arup_r: well.. time to go..Don't know how I'll do it.. I have no clue right now
[05:37:42] RegulationD: has joined #RubyOnRails
[05:38:10] rvanlieshout: has joined #RubyOnRails
[05:38:35] krisquigley: has joined #RubyOnRails
[05:38:39] towski_: has joined #RubyOnRails
[05:38:42] tagrudev: has joined #RubyOnRails
[05:39:47] workmad3: has joined #RubyOnRails
[05:46:38] pragmatism: has joined #RubyOnRails
[05:48:42] arkiver: has joined #RubyOnRails
[05:51:01] nothingmuch: has joined #RubyOnRails
[05:51:18] SteenJobs: has joined #RubyOnRails
[05:53:51] riotjones: has joined #RubyOnRails
[05:54:06] edwinvdg_: has joined #RubyOnRails
[05:55:55] comrad: has joined #RubyOnRails
[05:56:06] metus_violarium: has joined #RubyOnRails
[05:57:22] krokuz: has joined #RubyOnRails
[05:57:53] joaomdmoura: has joined #RubyOnRails
[05:58:50] arkiver: has joined #RubyOnRails
[05:59:00] ProLoser: has joined #RubyOnRails
[06:01:00] arBmind: has joined #RubyOnRails
[06:01:26] sinkensabe: has joined #RubyOnRails
[06:02:08] shock_one: has joined #RubyOnRails
[06:02:23] masone: has joined #RubyOnRails
[06:04:50] roolo: has joined #RubyOnRails
[06:07:05] emilkarl: has joined #RubyOnRails
[06:07:16] dopieee: morning rvanlieshout
[06:07:49] dopie: hey rvanlieshout
[06:07:57] renews: has joined #RubyOnRails
[06:09:25] eoy: has joined #RubyOnRails
[06:10:03] Scriptonaut: has joined #RubyOnRails
[06:10:46] emilkarl: has joined #RubyOnRails
[06:10:55] kochis: has joined #RubyOnRails
[06:13:40] alankrita: has joined #RubyOnRails
[06:13:44] michael_mbp: has joined #RubyOnRails
[06:15:42] alankrita: has joined #RubyOnRails
[06:16:20] sandstrom: has joined #RubyOnRails
[06:20:21] alankrita: has joined #RubyOnRails
[06:21:35] solars: has joined #RubyOnRails
[06:23:14] alankrita: Hi. I have a doubt regarding rendering in rails.
[06:24:01] alankrita: How exactly is an html.erb rendered if I have render js in my controller?
[06:25:12] mauro1254: has joined #RubyOnRails
[06:25:22] ramfjord: has joined #RubyOnRails
[06:25:30] solars: has joined #RubyOnRails
[06:25:37] alankrita: even if the html.erb contains javascript?
[06:25:56] aganov: has joined #RubyOnRails
[06:26:09] rvanlieshout: !gist the controller action
[06:26:09] helpa: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[06:26:14] rvanlieshout: if you render js there, it's going to render that
[06:26:25] rvanlieshout: not the html format
[06:26:27] mauro1254: Hi guys, I'm using fragment caching on a backoffice application. The app will be used by a staff of 15 persons. Which ActiveSupport::Cache::Store would you use?
[06:26:39] mauro1254: FileStore ?
[06:26:55] rvanlieshout: mauro1254: how much information are you going to cache?
[06:27:35] mauro1254: Not so much, it is just one view (twice, because you can access it as user or admin)
[06:28:05] bruno-: has joined #RubyOnRails
[06:28:10] rvanlieshout: don't forget to add some expire in it though
[06:28:22] mauro1254: I read that if I use FileStore than I need to take care of diskspace
[06:28:54] rvanlieshout: and if it's not that much data you could consider using redis
[06:29:04] mauro1254: What about MemStore
[06:29:05] rvanlieshout: it'll clean it up for you IF you add an expire to it
[06:29:36] mauro1254: http://guides.rubyonrails.org/caching_with_rails.html#activesupport-cache-memorystore
[06:30:08] rvanlieshout: that one doesn't work well if you use multiple server processes
[06:30:23] rvanlieshout: https://github.com/redis-store/redis-rails
[06:30:34] rvanlieshout: but you'll have to have redis running
[06:30:59] mauro1254: I have a server with a dozen of apps
[06:31:32] mauro1254: The cache doesn't need to be shared with other apps
[06:32:02] rvanlieshout: multiple rails servers != multiple apps
[06:32:49] rromanchuk: has joined #RubyOnRails
[06:33:01] mauro1254: This means I have multiple processes
[06:33:13] rvanlieshout: depends on how you serve your application
[06:33:19] kies: has joined #RubyOnRails
[06:33:52] mauro1254: One server, multiple apps, muliple processes per app
[06:34:03] rvanlieshout: if that's the case you shouldn't use memstore
[06:34:19] rvanlieshout: that's described in that guide
[06:34:46] mauro1254: I can live with FileStore, but then I need to remove expired cache with cron, is it right?
[06:34:53] mauro1254: Is there an example?
[06:35:10] rvanlieshout: why not the redis store?
[06:35:26] rvanlieshout: mauro1254: !g bash removing files older then
[06:38:11] Oog: validates_numericality_of :fixed_cost, greater_than_or_equal_to: 0 - problem is if i do attr_reader :fixed_cost for read only the validation tests fail - any fix?
[06:38:37] rvanlieshout: why would you nave a attr_reader?
[06:38:44] rvanlieshout: and why would you need a validation if it's readonly?
[06:39:18] mauro1254: rvanlieshout: THX
[06:39:23] Oog: well its still initialized
[06:39:48] rvanlieshout: you have a model with an attribute that should be readonly?
[06:39:48] markit: has joined #RubyOnRails
[06:39:49] Oog: this is on a class with include ActiveModel::Model - not activerecord
[06:40:02] rvanlieshout: having an attr_reader doesn't make something readonly
[06:40:05] rvanlieshout: it adds a reader-method
[06:40:22] Oog: well if there is no setter then its read only publicly right?
[06:40:49] Oog: maybe its time to use Virtus
[06:41:10] Oog: so that is what i tried just using attr_reader instead of attr_accessor but then my test breaks
[06:41:12] rvanlieshout: or don't make this any more complex then it already is
[06:41:15] rvanlieshout: why do the validation test fail?
[06:41:21] Oog: it { should validate_numericality_of(:fixed_cost).is_greater_than_or_equal_to(0) }
[06:41:23] rvanlieshout: and why do you have validation tests for readonly things?
[06:41:41] quazimodo: i have a rack middleware that's busting up my stack
[06:41:47] quazimodo: anyone know's how tomake it fantastic?
[06:42:02] Oog: rvanlieshout: it is read only but still initializable - need to make sure it is initialized correctly
[06:42:12] rvanlieshout: Oog: that's not a validation
[06:42:48] Oog: validates_numericality_of :fixed_cost, greater_than_or_equal_to: 0
[06:42:51] lxsameer: has joined #RubyOnRails
[06:42:59] rvanlieshout: that would imply you have a setter
[06:43:09] rvanlieshout: and that doesn't check for the initialized state
[06:43:45] Oog: however the initializer works it seems to run through validations
[06:43:54] rvanlieshout: it's just wrong
[06:44:08] rvanlieshout: a validation is something totally different
[06:44:12] rvanlieshout: a rails validatino that is
[06:44:19] Oog: on activemodel? ar eyou sure?
[06:44:31] rvanlieshout: a validation checks an attribute when calling .valid?
[06:44:36] rvanlieshout: it does not care about the initialized state
[06:44:37] maz-dev: has joined #RubyOnRails
[06:44:51] Oog: oh right well im calling valid
[06:45:02] rvanlieshout: to test initialized states?
[06:45:04] Oog: anyway the problem is attr_reader breaks the test...
[06:45:09] konsolebox: has joined #RubyOnRails
[06:45:34] pppt: has joined #RubyOnRails
[06:45:36] rvanlieshout: that's because that reader returns @attirbute, and not the one stored
[06:45:46] rvanlieshout: create the reader method yourself
[06:46:27] Oog: oh so if there is no writer where is the value stored...?
[06:46:30] quazimodo: http://oi61.tinypic.com/5x1lpv.jpg
[06:46:38] quazimodo: my rack middleware is not showing stack trace!
[06:46:43] rvanlieshout: well.. that's something the reader should know
[06:46:45] rvanlieshout: and this one doesn't
[06:48:08] Oog: so youre saying maybe if there is no setter the value just int being set...?
[06:48:08] rvanlieshout: how is this value even initialized?
[06:48:25] rvanlieshout: basically i'm saying it's just wrong to use validation methods to test the initialized state
[06:48:28] Oog: i have a class i initialize via super(hash)
[06:48:42] rvanlieshout: then just test that?
[06:48:51] rvanlieshout: create a test that initializes a new instance
[06:48:54] rvanlieshout: and verify the value
[06:49:00] Oog: i still want to test the validator...
[06:49:23] Oog: imagine the object is initialized with an incorrect value. i want .valid? to work and falg it
[06:49:34] rvanlieshout: it should not initialize with an incorrect value
[06:49:39] rvanlieshout: it should break there
[06:49:48] SteenJobs: if i have a JSON output with multiple top level items, {}???s, what???s the best way to fix the file so it can be parsed?
[06:50:02] Oog: why would i want to rewrite validators...?
[06:50:04] rvanlieshout: SteenJobs: !gist it
[06:50:04] helpa: SteenJobs: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[06:50:11] rvanlieshout: Oog: you should't
[06:50:17] rvanlieshout: but you also shouldn't use them incorrectly
[06:50:32] SteenJobs: rvanlieshout: the file is massive. can???t gist. but my explanation should be sufficient???i???ll give you an example if you???d like.
[06:50:45] rvanlieshout: well.. a valid json != {} {} {}
[06:51:00] rvanlieshout: so it's not even a valid json response
[06:51:10] SteenJobs: i???m aware
[06:51:12] SteenJobs: but that???s the file i get
[06:51:18] SteenJobs: so i have to deal with it unfortunately
[06:51:26] rvanlieshout: isn't it one json per line?
[06:51:39] Oog: on { stack.push, on } stack.pop - when the stack is empty you have a new object, repeat
[06:52:07] rvanlieshout: Oog: i think i've los you there
[06:52:14] rvanlieshout: aren't you making something really simple a bit too complex?
[06:52:33] SteenJobs: i just get this masssssive file from a web crawler composed of a {} for each url that???s crawled, which is why it???s not able to be parsed, but i???m not sure how to deal with it and i need the data.
[06:52:35] rvanlieshout: you just need 2 tests. initialize with valid params -> check it, initialize with invalid params -> ensure that it fails
[06:52:57] rvanlieshout: SteenJobs: is each {} on one line? then you can use each_line to iterate over the lines
[06:53:18] SteenJobs: ha! i stand by my calling you a walking API doc
[06:53:21] SteenJobs: gonna give it a go
[06:54:28] Oog: how should i do the fail when i initialize with invalid params?
[06:54:45] rvanlieshout: raise an exception
[06:55:00] Oog: if i dont use validators i have to rewrite them right? raise 'error' if fixed_cost < 0 etc right? that is rewriting the validators
[06:55:02] Oog: that sounds like a bad idea
[06:55:17] rvanlieshout: they should not even be in there
[06:55:20] rvanlieshout: it's not a validation
[06:55:28] rvanlieshout: it's something that needs to be checked on initialization
[06:55:31] rvanlieshout: that's not what validations do
[06:55:52] Oog: think about activerecord - you have validations it doesnt let you save an object with invalid properties
[06:55:55] Oog: but it doesnt fail on assign
[06:55:57] shortCircuit__: has joined #RubyOnRails
[06:55:59] Oog: or on new etc
[06:56:22] alankrita: Sorry, was away. I'll describe my problem. I have a controller looking like this - https://gist.github.com/anonymous/6f0c380cb5e5b3129409
[06:56:26] ndrei: has joined #RubyOnRails
[06:56:26] rvanlieshout: yeah. it doesn't let you save something when it's invalid
[06:56:33] rvanlieshout: but it doesn't check if it was saved invalid before
[06:56:36] rvanlieshout: and thus loaded with invalid data
[06:56:39] rvanlieshout: ergo, the initialization
[06:56:45] benhuda: has joined #RubyOnRails
[06:56:51] Oog: thats what i want
[06:56:52] alankrita: I have 2 views that essentially have the same code - some_action.html.erb, some_action.js.erb
[06:56:54] Oog: my problem is just the test!
[06:56:59] rvanlieshout: Oog: exactly, so remove validations
[06:57:01] rvanlieshout: cause it's something else
[06:57:05] rvanlieshout: it's something not designed for that task
[06:57:23] rvanlieshout: and really really easy check that value on initialization of the instance and raise an error if it's invalid
[06:57:29] shortCircuit__: https://github.com/rails-api/active_model_serializers/issues/624#issuecomment-55060205 what is this view_context ?
[06:57:33] rvanlieshout: alankrita: and why do you have that?
[06:57:45] alankrita: some_action.js.erb is rendered on an ajax call.
[06:57:52] silverdust: Does the default rails test have a name
[06:57:57] rvanlieshout: alankrita: do you even want that?
[06:58:07] rvanlieshout: silverdust: what default rails test?
[06:58:27] silverdust: The test that comes with rails
[06:58:28] alankrita: Without it, I saw a template error.
[06:58:38] rvanlieshout: alankrita: then remove the format.js
[06:58:38] sooli: has joined #RubyOnRails
[06:58:44] rvanlieshout: or even that respond_to
[06:58:45] silverdust: similar to rspec which has to be installed
[06:58:48] rvanlieshout: so it'll just render the html
[06:58:56] rvanlieshout: silverdust: unit test
[06:59:19] rvanlieshout: but iirc rspec is more common these days.. at least it looks like more people are using rspec
[06:59:19] silverdust: Doesn't it have like a unique name similar to rspec?
[06:59:24] rvanlieshout: silverdust: unit test
[06:59:58] shortCircuit__: hi rvanlieshout, howzya!!
[07:00:20] silverdust: ok. I've not been in the habit of testing and I'm just trying to get into it. Do you recommend I do the unit test or move to rspec already?
[07:00:23] michaeldeol: has joined #RubyOnRails
[07:00:30] alankrita: @rvanlieshout: uhm... I am confused. How is this rendering done? If I only have one some_action.html.erb, does formatt.js do nothing? Even though the client expects js not html?
[07:01:19] strixd: has joined #RubyOnRails
[07:01:41] rvanlieshout: alankrita: if you have a format.js AND a format.js is requested it'll render the js
[07:01:49] SteenJobs: rvanlieshout: your answer solves my error problem!! but for some reason the output in irb is still json..
[07:02:08] renews: has joined #RubyOnRails
[07:04:24] alankrita: Doesn't an ajax call requests for js?
[07:04:28] alankrita: Also, I am only updating a div on the page, so commenting out format.js (which updates the div) renders the whole page inside the div.
[07:05:54] rvanlieshout: alankrita: but you can still just respond with html
[07:06:18] rvanlieshout: alankrita: ah right. so then you could use if request.xhr? to render the partial
[07:06:23] rvanlieshout: else render the full page
[07:07:30] rvanlieshout: SteenJobs: what output in irb?
[07:07:52] SteenJobs: rvanlieshout: that???s where i???m trying to get the parsing to work, but it???s just returning the json file
[07:08:07] SteenJobs: rvanlieshout: but know that i know they???re all on their own lines, i???ll do some online digging
[07:08:18] rvanlieshout: SteenJobs: ah right. know that if you have an .each in a irb the end statement there would return the collection
[07:08:22] rvanlieshout: thus showing it
[07:08:38] rvanlieshout: @users.all.each{ |user| user.foobar } will show you @users.all in irb
[07:08:43] rvanlieshout: cause that's the return statement of the each
[07:09:01] SteenJobs: rvanlieshout: so even if i save it to a variable, the variable will still have the class of the returned object?
[07:11:16] pppt: has joined #RubyOnRails
[07:11:46] alankrita: @rvanlieshout: I'll try that. Thanks!
[07:13:12] qejk: has joined #RubyOnRails
[07:17:46] Pharaoh2: has joined #RubyOnRails
[07:19:27] stardiviner: has joined #RubyOnRails
[07:20:24] alex88: has joined #RubyOnRails
[07:23:17] duderonomy: has joined #RubyOnRails
[07:23:57] Sylario: has joined #RubyOnRails
[07:26:20] darutoko: has joined #RubyOnRails
[07:26:39] RegulationD: has joined #RubyOnRails
[07:27:10] livathinos: has joined #RubyOnRails
[07:27:39] krisquigley: has joined #RubyOnRails
[07:27:44] edwinvdgraaf: has joined #RubyOnRails
[07:28:01] cornerma1: has joined #RubyOnRails
[07:28:33] workmad3: has joined #RubyOnRails
[07:30:13] Forgetful_Lion: has joined #RubyOnRails
[07:31:03] antgel: has joined #RubyOnRails
[07:31:24] benhuda: has joined #RubyOnRails
[07:31:29] Pazician: has joined #RubyOnRails
[07:33:51] sandstrom: has joined #RubyOnRails
[07:40:05] dhjondoh: has joined #RubyOnRails
[07:40:26] sooli: has joined #RubyOnRails
[07:43:58] jgt: has joined #RubyOnRails
[07:44:41] futilegames: has joined #RubyOnRails
[07:44:53] Macaveli: has joined #RubyOnRails
[07:46:29] Macaveli: Is it possible to detect Arabic charset ?
[07:46:46] Macaveli: on input, we want toblock these :)
[07:47:27] Macaveli: It's a request from the business
[07:47:32] michaeldeol: has joined #RubyOnRails
[07:47:32] Macaveli: they don't want them :p
[07:47:35] sevenseacat: I don't think there's a non-problematic answer to that one
[07:47:36] Macaveli: it's for a recruiting website (a)
[07:47:37] ChargedLight: has joined #RubyOnRails
[07:48:50] pwnz0r: has joined #RubyOnRails
[07:48:50] x-light: has joined #RubyOnRails
[07:51:20] puppeh: has joined #RubyOnRails
[07:51:51] puppeh: do you recommend upgrading a big monolithic app with lots of dependencies from 3.2.20 to 4.0.x or 4.1 or 4.2 straight?
[07:52:04] Hates_: has joined #RubyOnRails
[07:52:34] Hates_: has joined #RubyOnRails
[07:53:10] sevenseacat: 4.0.latest, then 4.1.latest, then 4.2.latest
[07:54:14] artto: has joined #RubyOnRails
[07:57:03] Pupeno: has joined #RubyOnRails
[07:57:03] Pupeno: has joined #RubyOnRails
[07:58:49] bruno-: has joined #RubyOnRails
[08:01:53] Hates__: has joined #RubyOnRails
[08:02:03] puppeh: I see, thanks
[08:02:24] krisquigley: has joined #RubyOnRails
[08:03:42] DEA7TH: has joined #RubyOnRails
[08:04:49] pwnz0r: has joined #RubyOnRails
[08:05:10] jsrn_: has joined #RubyOnRails
[08:05:44] tedstriker: has joined #RubyOnRails
[08:06:52] intinig: has joined #RubyOnRails
[08:09:35] Papipo: has joined #RubyOnRails
[08:10:11] tcarter1719: has joined #RubyOnRails
[08:10:25] Papipo: do you know if there is any open source alternative to contentful? I would like to add some features to a rails website but anything I do is just plain worse UI-wise than something like a wordpress admin.
[08:10:57] Papipo: So I would like to have a headless CMS and query it using REST
[08:16:50] bronson: has joined #RubyOnRails
[08:19:37] axl_: has joined #RubyOnRails
[08:23:08] AnoHito: has joined #RubyOnRails
[08:24:19] Ratler: has joined #RubyOnRails
[08:24:19] Ratler: has joined #RubyOnRails
[08:24:42] marr: has joined #RubyOnRails
[08:24:56] silverdust: rvanlieshout: name I was trying to get when you said Unit test was minitest
[08:25:11] Liothen: has joined #RubyOnRails
[08:25:44] rvanlieshout: oh right. that one indeed
[08:26:22] sameerynho: has joined #RubyOnRails
[08:28:00] x-light: has joined #RubyOnRails
[08:29:46] adre: has joined #RubyOnRails
[08:34:56] bin_005: has joined #RubyOnRails
[08:37:26] charliesome: has joined #RubyOnRails
[08:37:56] dionysus69: has joined #RubyOnRails
[08:44:46] emilkarl: has joined #RubyOnRails
[08:46:00] workmad3: has joined #RubyOnRails
[08:47:14] ndrei: has joined #RubyOnRails
[08:50:40] futilegames: has joined #RubyOnRails
[08:52:45] ndrei: has joined #RubyOnRails
[08:54:11] jenrzzz: has joined #RubyOnRails
[08:55:43] hakunin: has joined #RubyOnRails
[08:58:21] srinidhi: has joined #RubyOnRails
[09:02:37] Cork: i'm slowly losing my mind here... is there no way to check if a route matching exists?
[09:03:01] Cork: only way i can find is begin rescue ActionView::Template::Error but that is way to broad
[09:03:30] rvanlieshout: what information do you have to match a route?
[09:03:40] Cork: ex. url_for({ action: "does-not-exist" })
[09:04:45] rvanlieshout: run that and rescue a ActionController::RoutingError
[09:04:55] Cork: it doesn't catch the error
[09:05:23] rvanlieshout: hmm.. it raises an error here if i use some url that doesn't exist
[09:05:30] Cork: in a view?
[09:05:39] creature: has joined #RubyOnRails
[09:05:59] Cork: https://pastebin.mozilla.org/8836939
[09:06:07] Cork: that is a helper i've tried with
[09:06:38] rvanlieshout: even in a view
[09:06:54] rvanlieshout: ah. you already catch a routingerror
[09:08:01] Cork: ah there we go
[09:08:04] Cork: ActionController::UrlGenerationError works
[09:09:05] Cork: to make the helper work
[09:09:14] rvanlieshout: but what's wrong with the helper?
[09:09:29] rvanlieshout: in what case does it return the wrong statement?
[09:09:31] Cork: the exception thrown by url_for(route) isn't catched
[09:09:43] Cork: it doesn't return anything cause the exception isn't caught
[09:09:52] rvanlieshout: what exception is thrown?
[09:10:07] Cork: as i just found out ActionController::UrlGenerationError
[09:10:18] Cork: so this works https://pastebin.mozilla.org/8836940
[09:10:21] rvanlieshout: ah right. it's a routingerror here
[09:10:42] rvanlieshout: got a rails 3 project in front of me, so that could be different
[09:10:50] Cork: ya, rails 4.1 here
[09:11:14] mager: has joined #RubyOnRails
[09:11:34] Rubie: has joined #RubyOnRails
[09:11:56] mager: what's the recommended option nowadays to deploy Ruby on Rail webapps ? Unicorn, Puma, Phusion Passenger, Thin, ... ?
[09:12:13] Aeyrix: Unicorn's fine mostly.
[09:12:14] rvanlieshout: the one that fit your needs
[09:12:17] Cork: i would recommend thin
[09:12:21] rvanlieshout: i prefer passenger
[09:12:45] mager: and Heroku recommends Puma :p
[09:12:47] Aeyrix: The reason I use Unicorn is because I've always used it, and now it's in the Rails Gemfile by default.
[09:12:47] Cork: thin is nice if you need to distribute the load
[09:12:49] Aeyrix: Heroku's wrong.
[09:13:06] rvanlieshout: they all have their benefits
[09:13:06] Aeyrix: mage_: The rule of thumb I go by is
[09:13:09] Aeyrix: if you have to ask that question
[09:13:11] Aeyrix: roll with Unicorn
[09:13:15] Aeyrix: it's probably the easiest.
[09:13:39] Aeyrix: Cork rvanlieshout: Any performance benchmarks I can look at?
[09:13:45] Aeyrix: I just use Unicorn because I'm a lazy shitlord.
[09:13:47] rvanlieshout: all different
[09:14:09] mager: my context is many small webapps (rails 2.x, 3.x) with not the much load
[09:14:09] Aeyrix: Any anecdotal experiences?
[09:14:12] Aeyrix: What's Puma like?
[09:14:24] rvanlieshout: cause different scenario's have different requirements
[09:14:40] Cork: Aeyrix: nope, all i can say we switched from passanger to thin about half a year ago and not having to hassle with the recompilation of apache/nginx is nice
[09:14:54] rvanlieshout: recompilation is only an nginx thing
[09:14:54] Aeyrix: Cork: Wait, can't Passenger just do sockets?
[09:14:58] rvanlieshout: cause nginx doesn't support modules
[09:15:08] Aeyrix: mage_: https://www.engineyard.com/articles/rails-server
[09:15:10] rvanlieshout: i like passenger within apache to handle a bunch of apps
[09:15:15] Cork: Aeyrix: sure if you compile it into a stand alone nginx server
[09:15:20] rvanlieshout: and divide the amount of server instances
[09:15:25] Aeyrix: Cork: Welp, it's a "no" from me.
[09:15:28] RegulationD: has joined #RubyOnRails
[09:15:29] mager: Aeyrix: thanks for the link??!
[09:15:31] Aeyrix: Might look into Puma.
[09:15:41] silverdust: I'm writing a test for a devise authenticated page (before_action !authenticate) . How can I assert that I get the NoMethodError exception
[09:16:00] rvanlieshout: why would you have a nomethoderror?
[09:16:02] silverdust: I tried assert_raises :NoMethodError
[09:16:26] silverdust: Because the method isn't available to test I guess
[09:16:33] leex: Hi, I would like to have obfuscated id in my rails app and my question is: where is the right place to do the deobfuscation of the incoming ids? (outgoing I can just do that easily in the active model serializer)
[09:16:49] rvanlieshout: silverdust: if it's there for dev it should also be there for test
[09:17:03] arup_r: has joined #RubyOnRails
[09:20:49] silverdust: Am I supposed to have a before_action :authenticate_user! in the test controller ?
[09:20:59] rvanlieshout: silverdust: you have a testcontroller?
[09:22:07] silverdust: nope. I have a accounts_controller_test.rb as this http://pastie.org/10242646
[09:22:56] rvanlieshout: so you would expect a normal user to get a NoMethodError when he visits that page?
[09:23:51] dici: has joined #RubyOnRails
[09:24:02] silverdust: I wouldn't. When I tried a asserts_response :success, it gave NoMethodError so I wanted to to see what it's like with a NoMethodError assertion
[09:25:12] ndrei: has joined #RubyOnRails
[09:25:15] rvanlieshout: i think you should find out why it triggered a nomethoderror
[09:25:43] sevenseacat: because there's no such method called "asserts_response", likely
[09:26:05] sevenseacat: or assert_railses
[09:26:43] universa1: whaaaaat? i can't assert my code is railsing? :(
[09:28:13] stardiviner: has joined #RubyOnRails
[09:28:18] workmad3: universa1: `def assert_railses(expected, actual, message="You're railsing badly today"); assert_equal(expected, actual, message); end` <-- there you go, assert your code is railsing
[09:28:30] universa1: workmad3: <3
[09:29:35] bruno-: has joined #RubyOnRails
[09:29:48] silverdust: When users visit the page they are redirected if they aren't designers by their usertype
[09:31:36] startupality: has joined #RubyOnRails
[09:34:58] Papipo: has left #RubyOnRails: ()
[09:35:30] silverdust: I think it's a common thing if you don't have this https://github.com/plataformatec/devise#test-helpers
[09:36:15] arup_r: Any body here use capistrano for deployment ?
[09:36:24] universa1: arup_r: !anyone ;)
[09:36:24] helpa: arup_r: Nope. No one. Ever. In the history of the world.
[09:36:35] rvanlieshout: silverdust: !gist the full error
[09:36:35] helpa: silverdust: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[09:36:35] universa1: silverdust: http://guides.rubyonrails.org/testing.html#functional-tests-for-your-controllers
[09:36:36] arup_r: ;) ok universa1
[09:36:41] rvanlieshout: no assumptions
[09:37:36] silverdust: Devise advised to add test helper in test_helpers.rb but I didn't have that earlier
[09:40:42] arup_r: any body knows how to solve this ? http://stackoverflow.com/questions/30858269/sshkitrunnerexecuteerror-exception-while-running-cap-production-deployc
[09:41:21] arup_r: I don't know where I lost myself....
[09:41:55] mbuf: has joined #RubyOnRails
[09:43:46] ddv: arup_r: look at the errors
[09:44:28] mbuf: I am using "bundle exec thin start -e production" to start the server, but, I don't see a log/thin.log being created; is there a way to print the log to STDOUT?
[09:44:38] renews: has joined #RubyOnRails
[09:45:21] leex: mbuf: look at the development/production log
[09:46:25] mbuf: leex, that exists
[09:47:59] atmosx: arup_r: can you ssh without issuing a password?
[09:48:05] yoongkang: has joined #RubyOnRails
[09:48:40] arup_r: Yes.. I do
[09:48:59] arup_r: Manually only I was doing depolyment till now..
[09:49:11] rvanlieshout: and is it using the same username?
[09:49:16] bruno-: has joined #RubyOnRails
[09:49:20] arup_r: Thought automation and stuck since last 1 days
[09:49:24] arup_r: rvanlieshout: yes
[09:49:54] arup_r: I was following http://robmclarty.com/blog/how-to-deploy-a-rails-4-app-with-git-and-capistrano tuto
[09:50:06] arup_r: server is Ubuntu on Amazon Ec2
[09:50:30] rvanlieshout: the error contains 'for user @25.51.106.160'
[09:50:37] rvanlieshout: i would expect a username there
[09:50:42] rvanlieshout: how do you know it's using the proper username?
[09:50:48] arup_r: rvanlieshout: Yes that I also noticed..
[09:50:49] hardlin3r: has joined #RubyOnRails
[09:50:55] arup_r: why it is so _blank_
[09:51:06] rvanlieshout: where did you specify the username?
[09:51:10] arup_r: But yo can see my script I set the user
[09:51:27] arup_r: set :user, "ubuntu"
[09:51:33] arup_r: in my deploy.rb file
[09:51:42] arup_r: http://stackoverflow.com/questions/30858269/sshkitrunnerexecuteerror-exception-while-running-cap-production-deployc
[09:51:52] rvanlieshout: yeah. had to scroll up again :) didn't notice that part
[09:52:16] arup_r: The tutorial I was looking based on old Cap.. But I installed Cap 3+
[09:52:27] arup_r: and there was lots of syntax issue I got
[09:52:35] rvanlieshout: so find a different tutorial or the capistrano 3 docs?
[09:52:40] arup_r: those I managed
[09:52:52] arup_r: Others are very diff to follow..
[09:53:10] rvanlieshout: where did you find it should be set :user?
[09:53:13] arup_r: the one I shown has very baby steps ... how to do stuff
[09:53:24] arup_r: In the tutorial only
[09:53:31] rvanlieshout: and that tutorial is for capistrano 2
[09:53:53] rvanlieshout: so either use capistrano 2
[09:53:58] rvanlieshout: or find a different tutorial
[09:54:55] arup_r: I found one more.. http://www.zodiacmedia.co.uk/blog/capistrano-3-tutorial-series-part-2 but it says a lot and most are going above my head!
[09:55:05] rvanlieshout: then use capistrano 2?
[09:55:06] arup_r: Well.. Need to look into it
[09:55:19] arup_r: humm.. that will be good idea think
[09:55:34] arup_r: I will revert the Gem to older one
[09:55:51] arup_r: before installing I was not aware of these many changes will be there
[09:55:52] Papierkorb: has joined #RubyOnRails
[09:58:46] arup_r: my day is bad.. I installed this https://libraries.io/rubygems/api_taster and found it don't support Rails 4.2 yet.. as the right hand screen is not coming when I am hitting the API.. :/
[09:58:54] DLSteve: has joined #RubyOnRails
[09:59:16] arup_r: Now I can't downgrade Rails.. And I have lots of code.. :/
[09:59:31] rvanlieshout: the best thing now would to revert all changes
[09:59:35] rvanlieshout: and follow a proper cap 3 tutorial
[09:59:38] rvanlieshout: or the documentation
[09:59:47] rvanlieshout: the difference between 2 and 3 is just to big
[09:59:55] rvanlieshout: and they've made it way easier
[10:00:27] arup_r: easier in 3 ?
[10:01:04] arup_r: I have no experience with this tool.. pretty new.. so googled a lot and got confused finally..
[10:01:45] rvanlieshout: you've googled too much then
[10:02:15] starfox_sf: has joined #RubyOnRails
[10:03:30] blackmesa: has joined #RubyOnRails
[10:03:45] rvanlieshout: something like http://www.sitepoint.com/deploy-rails-capistrano-3/
[10:07:02] catphish: has joined #RubyOnRails
[10:07:55] catphish: is it possible to set the database character set (mysql) for an app? changes i make to the character set of tables aren't recorded in db/schema.rb
[10:08:33] rhinon: has joined #RubyOnRails
[10:11:54] LiquidInsect: has joined #RubyOnRails
[10:14:34] cac_: has joined #RubyOnRails
[10:14:44] ProLoser: has joined #RubyOnRails
[10:17:06] pontiki: has joined #RubyOnRails
[10:19:19] sameerynho: guys, Rails routes.rb run only on rails app booting time right ? I mean once when app server started
[10:20:27] rickmasta: has joined #RubyOnRails
[10:20:52] stamina: has joined #RubyOnRails
[10:21:04] rvanlieshout: that depends on the environment
[10:21:04] Hates_: has joined #RubyOnRails
[10:21:13] rvanlieshout: and what you exactly mean by 'run'
[10:21:18] Pazician: has joined #RubyOnRails
[10:22:17] rickmasta: has joined #RubyOnRails
[10:23:56] sameerynho: rvanlieshout: hmmm My english is not that good. I mean how often does rails execute the routes block /
[10:26:28] cac_: has joined #RubyOnRails
[10:26:32] emilkarl: has joined #RubyOnRails
[10:26:39] jesterfraud: has joined #RubyOnRails
[10:33:13] rvanlieshout: every change for dev environment
[10:33:15] rvanlieshout: once for production
[10:33:22] darrencauthon: has joined #RubyOnRails
[10:33:42] sameerynho: rvanlieshout: thanks
[10:38:54] renews: has joined #RubyOnRails
[10:39:25] futilegames: has joined #RubyOnRails
[10:40:22] mostlybadfly: has joined #RubyOnRails
[10:42:26] mfoo: Does anybody have experience with rolling out a new API version? I have some questions that I posted on SO yesterday but haven't had an answer to yet
[10:42:28] allcentury: has joined #RubyOnRails
[10:42:40] jenrzzz: has joined #RubyOnRails
[10:42:40] arup_r: has joined #RubyOnRails
[10:43:29] maz-dev: has joined #RubyOnRails
[10:43:45] mathie: has joined #RubyOnRails
[10:47:28] jesterfraud: ACTION listens intently
[10:47:38] platzhirsch: has joined #RubyOnRails
[10:48:09] mfoo: just in case anybody does have experience and would like to answer, http://stackoverflow.com/questions/30852006/the-correct-way-to-version-rails-3-apis
[10:48:15] qsun: has joined #RubyOnRails
[10:48:31] platzhirsch: Event.where(:event_attendance_status includes user.id and is true) => give me all users where there is an event_attendance_status status is true and has user.id... how could I write this in a where statement?
[10:50:02] itsgokul: has joined #RubyOnRails
[10:50:24] DoubleMalt: has joined #RubyOnRails
[10:51:07] itsgokul: help!! @student.photo = archived_student.photo line returns error cannot convert nil to integer
[10:51:25] jesterfraud: itsgokul, nowhere near enough context for anyone to help
[10:51:47] jesterfraud: platzhirsch, which properties are you checking exactly? I don't understand the schema.
[10:51:56] blackmesa: has joined #RubyOnRails
[10:52:25] platzhirsch: jesterfraud: event_attendance_status has a column "status" which needs to be "attending" and then event_attendance_status has a column user.id
[10:52:38] platzhirsch: one event has many event_attendance_statuses
[10:53:35] jesterfraud: Now, I need to make sure I'm clear on joins, but I believe this should handle it: EventAttendanceStatus.where(user_id: @array_of_user_ids_or_just_one, status: 'attending').joins(:events).map(&:event)
[10:53:41] jesterfraud: someone please correct me if I'm wrong
[10:54:33] jesterfraud: EventAttendanceStatus.where(user_id: @array_of_user_ids_or_just_one, status: 'attending').includes(:event).map(&:event)
[10:54:38] jesterfraud: that should do the trick
[10:54:54] nonparfumee: has joined #RubyOnRails
[10:55:22] jesterfraud: so, if you replace @array... with User.first.id, that will get all events the first user attended
[10:55:47] platzhirsch: yeah I try to write this as a scope on events, so that I am maybe able to write user.event.attending
[10:55:48] jesterfraud: and if you do it with a heap of users (User.pluck(:id), it'll still do it in two queries
[10:56:31] jesterfraud: I'm still not fully rails-informed, so I couldn't help you with that. I'd probably be boring and do it as a method.
[10:57:02] platzhirsch: that's fine, thanks a lotm that gives me a good direction
[10:57:22] jesterfraud: tell me if it doesn't work, I didn't exactly have a rails app handy to test it with
[10:58:13] bin_005_r: has joined #RubyOnRails
[11:01:06] rvanlieshout: EventAttendanceStatus.where(user_id: @array_of_user_ids_or_just_one, status: 'attending').includes(:event).map(&:event)
[11:01:32] bmurt: has joined #RubyOnRails
[11:01:57] rvanlieshout: Event.includes(:event_attendance_statusses).where(event_attendance_statusses: { user_id: @array_of_user_ids_or_just_one, status: 'attending'})
[11:02:00] rvanlieshout: fetch what you need
[11:02:57] ndrei: has joined #RubyOnRails
[11:03:04] rvanlieshout: or even Event.where(id: ventAttendanceStatus.where(user_id: @array_of_user_ids_or_just_one, status: 'attending').
[11:03:09] rvanlieshout: select('event_id'))
[11:03:23] Scott2619: has joined #RubyOnRails
[11:03:44] jesterfraud: rvanlieshout, noted!
[11:03:49] rodfersou: has joined #RubyOnRails
[11:04:23] RegulationD: has joined #RubyOnRails
[11:04:45] mager: has left #RubyOnRails: ()
[11:05:03] Detch: has joined #RubyOnRails
[11:05:43] Scott2619: I have a table with some logs on, on this table is an account number of a supplier. On another table I have a list of all the suppliers details, address name etc. I want to get a count of how many times that suppliers account number has been logged and then get the supplier name from the supplier table using the account number that was logged. How can I do this please?
[11:06:00] DysonReturns: has joined #RubyOnRails
[11:06:47] emilkarl: has joined #RubyOnRails
[11:07:36] platzhirsch: rvanlieshout: nice
[11:07:48] n008f4g_: has joined #RubyOnRails
[11:08:05] erichu: has joined #RubyOnRails
[11:09:43] bruno-: has joined #RubyOnRails
[11:10:10] maz-dev: has joined #RubyOnRails
[11:10:46] drale2k: has joined #RubyOnRails
[11:11:09] AugustoCesar: has joined #RubyOnRails
[11:12:24] dideler: has joined #RubyOnRails
[11:15:14] chipotle: has joined #RubyOnRails
[11:15:54] edwinvdgraaf: has joined #RubyOnRails
[11:16:13] cac_: has joined #RubyOnRails
[11:17:12] psmolen: has joined #RubyOnRails
[11:20:59] rodfersou: has joined #RubyOnRails
[11:22:20] quazimodo: has joined #RubyOnRails
[11:25:51] trollga: has joined #RubyOnRails
[11:27:37] bmalum: has joined #RubyOnRails
[11:27:55] tsvenson: has joined #RubyOnRails
[11:28:49] thatkid_: has joined #RubyOnRails
[11:28:57] thatkid_: has left #RubyOnRails: ()
[11:30:20] Abhijit: has joined #RubyOnRails
[11:30:56] platzhirsch: rvanlieshout: This works great, thanks.. the only issue left is that currently it only works as: Events.attending(user.id). Is there a way to get it to work as user.events.attending? Because the original events associating has a condition which I would need to clear off
[11:31:00] platzhirsch: otherwise it gets the event creators
[11:31:13] platzhirsch: any idea except creating another events association in users?
[11:31:39] rvanlieshout: how did you made that attending?
[11:32:09] rustymyers: has joined #RubyOnRails
[11:33:50] qwertme: has joined #RubyOnRails
[11:34:13] srinidhi: has joined #RubyOnRails
[11:34:51] yottanami1: has joined #RubyOnRails
[11:34:55] Ergo: has joined #RubyOnRails
[11:38:29] platzhirsch: rvanlieshout: as a scope in Event, with a lambda { |user| clause and the expression you crafted
[11:39:00] rvanlieshout: ah right. that requires a user to be present indeed
[11:39:14] rvanlieshout: you could make that user optional
[11:39:18] quazimodo: my colleague is a mobile dev
[11:39:26] rvanlieshout: and assume it's already joined
[11:39:30] rvanlieshout: might work :)
[11:39:40] quazimodo: or the last 5 months i've watched him scream at his monitor
[11:40:16] quazimodo: an active form of anger
[11:40:21] quazimodo: he recently started web
[11:40:32] _2easy: has joined #RubyOnRails
[11:40:35] quazimodo: now i regularly see him doing those sad man sobs
[11:40:42] cac_: has joined #RubyOnRails
[11:40:57] quazimodo: a passive form of grief and anger - usually for when you feel helpless
[11:41:31] quazimodo: in other news
[11:41:49] quazimodo: it occurs to me that js developers are for the most part bat shit crazy
[11:43:02] quazimodo: web dev is pretty goddam non trivial at times
[11:43:29] cac__: has joined #RubyOnRails
[11:44:04] nickjj: has joined #RubyOnRails
[11:44:31] pontiki: and yet, all it is is moving data around and formatting it....
[11:45:32] jsrn_: has joined #RubyOnRails
[11:46:11] leex: Hi, I would like to have obfuscated ids in my rails app and my question is: where is the right place to do the deobfuscation of the incoming ids? (outgoing was easy I have an deobfuscation active model serializer)
[11:47:17] quazimodo: instead of id = 5 using somtehing like identifier = 98eou9U09eUx692e or so?
[11:47:31] Hates_: leex: why?
[11:47:33] leex: I would like to have xyz as model id so that you do /record/xyz instead of /record/1
[11:47:51] leex: I would like to do == the client wants to have it ;)
[11:47:52] quazimodo: there's a gem that lets you use an arbitrary unique slug
[11:47:58] pontiki: actually, there are good reasons for obfuscating table ids, using a UUID for example
[11:48:03] Hates_: leex: use to_param
[11:48:16] quazimodo: Hates_: is it just to_param?
[11:48:19] leex: I just checking out hashids as gem
[11:48:22] quazimodo: will that work really well?
[11:48:32] quazimodo: do the form builders and stuff all get it?
[11:48:38] Hates_: leex: keep your ids and add a new friendly id or something
[11:49:08] quazimodo: leex: yeah don't remove your id field
[11:49:11] leex: it's a completely new app
[11:49:16] arup_r: has joined #RubyOnRails
[11:49:19] leex: quazimodo: I won't :)
[11:49:21] rvanlieshout: there are gems that handle friendly_id stuff
[11:49:25] quazimodo: Hates_: how does active record deal with associations?
[11:49:31] quazimodo: say you have a nested form
[11:49:51] ekain: has joined #RubyOnRails
[11:50:09] leex: internally I will use just the normal ids, but I would like to do a before_action or monkeypatch to_param(?) to handle the decoding
[11:50:15] leex: and the encoding already works
[11:50:20] knikolov: has left #RubyOnRails: ("WeeChat 1.3-dev")
[11:51:03] starfox_sf: has joined #RubyOnRails
[11:51:06] leex: to_params seems to only be available until 3.1
[11:51:17] Pazician: has joined #RubyOnRails
[11:51:36] quazimodo: leex: you don't monkey patch, you inherit and override
[11:51:40] rvanlieshout: to_parm is still available in rails 4.2
[11:51:51] rvanlieshout: http://api.rubyonrails.org/classes/ActiveRecord/Integration/ClassMethods.html#method-i-to_param
[11:51:56] quazimodo: just don't break liskov substitution and you'll be fine
[11:52:04] quazimodo: I wann switch from dvorak to colemak
[11:52:05] Hates_: you probably want to just use friendly_id
[11:52:10] arup_r: has joined #RubyOnRails
[11:52:28] leex: rvanlieshout: thank you :)
[11:53:46] Hates_: quazimodo: been a while since I used it but I would have thought to_param would work with nested forms, unless you're explicitly using the object ids
[11:54:04] Hates_: I could be wrong
[11:54:50] renews: has joined #RubyOnRails
[11:54:53] bronson: has joined #RubyOnRails
[11:57:54] jcaho: has joined #RubyOnRails
[11:59:27] quazimodo: yeah i think forms might use to_param
[11:59:37] quazimodo: though I don't know about accepts_nested_attributes
[11:59:43] quazimodo: perhaps that uses to_param too
[12:00:46] jkamenik: has joined #RubyOnRails
[12:02:00] ldnunes: has joined #RubyOnRails
[12:02:47] jmignault: has joined #RubyOnRails
[12:04:46] arcaos: has joined #RubyOnRails
[12:05:34] pwnz0r: has joined #RubyOnRails
[12:07:07] scottmatheina: has joined #RubyOnRails
[12:07:56] allcentury: has joined #RubyOnRails
[12:09:29] scottmatheina: has joined #RubyOnRails
[12:10:21] yoongkang: has joined #RubyOnRails
[12:10:23] diegoviola: has joined #RubyOnRails
[12:10:31] acovrig: has joined #RubyOnRails
[12:13:40] Trefex: has joined #RubyOnRails
[12:19:32] spyderman4g63: has joined #RubyOnRails
[12:23:24] symbol: has joined #RubyOnRails
[12:23:40] bhorn1: has joined #RubyOnRails
[12:25:52] srinidhi1: has joined #RubyOnRails
[12:26:12] srinidhi: has joined #RubyOnRails
[12:27:20] jamiely: has joined #RubyOnRails
[12:27:47] vedu: Hello. What is the correct way to include the google maps javascript i.e. add a src="https://maps.googleapis.com/maps/api/js?key=..." ?
[12:29:25] sjeijk: has joined #RubyOnRails
[12:31:25] nonparfumee: has joined #RubyOnRails
[12:31:30] IFrank00: has joined #RubyOnRails
[12:32:09] thebatu1: has joined #RubyOnRails
[12:33:14] DysonReturns: has joined #RubyOnRails
[12:33:32] thebatu1: hello I am getting the error "undefined method: image_will_change" any idea ? I added a model called comments and when I try to upload an image I get that error https://github.com/thebatu/blog/commit/99b591ee14aa0ca7fd9e90564ac6e3680d870337#diff-3b4cc13a815e6a32db590e41f5d00d49
[12:33:58] cac_: has joined #RubyOnRails
[12:34:43] justintv90: has joined #RubyOnRails
[12:35:00] DysonReturns: has joined #RubyOnRails
[12:35:42] jesterfraud: thebatu1, I don't see anything to actually store the image
[12:35:48] jesterfraud: no fields on the model or anything
[12:36:16] thebatu1: jesterfraud, there is a column called image in the post model
[12:36:35] thebatu1: it was working fine until I added the model comments
[12:37:08] eyck: has joined #RubyOnRails
[12:38:02] diegoviola: hrm, this company I'm working for is clearly mistreating their people, when on earth have you seen a boss demanding their people to clean the office at the end of day?
[12:38:07] bruno-_: has joined #RubyOnRails
[12:38:43] jesterfraud: diegoviola, it's probably part of a healthy employees system - it's company sponsored exercise!
[12:38:48] diegoviola: s/when/where/
[12:38:50] DylanJ: diegoviola: i pay for coffee at the company i work at.
[12:38:55] diegoviola: jesterfraud: lol
[12:39:02] diegoviola: DylanJ: what? really?
[12:39:07] codeurge: has joined #RubyOnRails
[12:39:34] DylanJ: yeah. bad company. didn't do my research when i applied a year or so ago.
[12:39:52] bmurt: has joined #RubyOnRails
[12:40:22] diegoviola: I don't have much patience with these kind of idiots, honestly
[12:40:25] DylanJ: i gave my notice the other day and when i was writing the official letter of resignation i realllly wanted to put something about coffee not being free in there. but instead i kept it professional :(
[12:41:03] diegoviola: DylanJ: you should put all that into your letter, screw "professionalism"
[12:41:18] DylanJ: but i mean, if i was your boss and your office looked like a war zone i'd ask you to clean it up.
[12:41:32] diegoviola: DylanJ: they won't think about proffesionalism when they decide to screw you over
[12:42:05] k4nd4lf: has joined #RubyOnRails
[12:42:35] diegoviola: I shouldn't have said that about professionalism
[12:42:39] DylanJ: despite how unprofessional people around you might be. you should be better.
[12:43:27] thebatu1: but how will the people around you learn if u dont say something about the coffee ?
[12:43:57] thebatu1: we run on coffee and pizza, they should be free
[12:44:07] diegoviola: the boss demands every employees clean the office here on different days, they even have a sheet for that, I don't think that's reasonable?
[12:44:28] diegoviola: they should have a cleaning persone
[12:44:28] rvanlieshout: why's that not reasonable?
[12:44:36] DylanJ: thebatu1: i had a conversation with the ceo of the company explaining coffee should be free.
[12:44:45] ddv: rvanlieshout demands that from his employees also
[12:44:48] DylanJ: she was like "yeah sure that sounds fine lets do it"
[12:44:49] thebatu1: DylanJ, ah good.
[12:44:53] diegoviola: rvanlieshout: well, are we programmers or sanitors?
[12:44:58] DylanJ: but still no free coffee.
[12:45:05] rvanlieshout: diegoviola: are you willing to get paid less so they can hire somebody?
[12:45:17] DylanJ: talked to her again. "we dont have it in the budget". get real..
[12:45:36] elaptics: DylanJ: is it a large company?
[12:45:42] DylanJ: 40 employees in the office.
[12:45:43] mfoo: this isn't the garbage collection conversation I was expecting
[12:45:47] diegoviola: rvanlieshout: I'm sure they make plenty of money with our work
[12:45:52] diegoviola: rvanlieshout: come on
[12:46:00] DysonReturns: has joined #RubyOnRails
[12:46:02] rvanlieshout: well.. with 40 you would expect they can pay that
[12:46:03] jesterfraud: diegoviola, how big is the company, and why is it honestly that big a deal?
[12:46:10] jesterfraud: does it take hours to clean the office?
[12:46:18] jesterfraud: do you only ever do programming beside that?
[12:46:25] artto: has joined #RubyOnRails
[12:46:49] jesterfraud: and am I really the only programmer who doesn't drink coffee?
[12:47:03] DylanJ: yeah i saved the company like 2 grand a month by telling our head of marketing to cancel our adwords campaign until they have the ability to figure out where our customers are from.
[12:47:06] elaptics: jesterfraud: yes. yes you are :)
[12:47:35] DylanJ: all our tech here is trash. adwords campaign was a total waste of cash. still no free coffee!
[12:47:36] acovrig: ACTION doesn???t drink coffee either...
[12:47:42] centrx: has joined #RubyOnRails
[12:47:47] mfoo: has anybody here had experience with releasing version 2 of an API in rails?
[12:47:50] diegoviola: jesterfraud: well, it's disappointing
[12:47:53] jesterfraud: acovrig, I think we should start a support group or something
[12:48:03] ddv: mfoo: pretty easy to do with grape
[12:48:11] DylanJ: jesterfraud: acovrig: i think it's time you guys started drinking coffee.
[12:48:16] DylanJ: *one of us*
[12:48:18] DylanJ: *one of us*
[12:48:21] diegoviola: at what point the boss will also ask their employees to clean their car too?
[12:48:23] thebatu1: jesterfraud, I found this answer http://stackoverflow.com/questions/7491595/carrierwave-rails-3-1-undefined-method-image-will-change but I have a column image in my posts model already !!
[12:48:31] mfoo: ddv: but must I copy all of my v1 controllers that aren't changing?
[12:48:51] jesterfraud: diegoviola, not a good comparison - the office is a collective area and responsibility. His car is not.
[12:48:53] centrx: diegoviola, When you didn't clean it right the first time!
[12:48:59] diegoviola: it's humiliating
[12:49:01] mfoo: ddv: what about running specs on the new api? do I copy the v1 specs and make a tiny change? what about code duplication?
[12:49:05] renews: has joined #RubyOnRails
[12:49:11] diegoviola: jesterfraud: sure
[12:49:17] diegoviola: but "cleaning"?
[12:49:24] Rubie: has joined #RubyOnRails
[12:49:25] diegoviola: I think it's reasonable to clean our desk
[12:49:30] startupality: has joined #RubyOnRails
[12:49:43] centrx: diegoviola, Is this a budget-strapped startup?
[12:49:56] mfoo: we must clean our desks due to a security policy (at least, keep them clear, not wash them)
[12:50:17] DylanJ: well if the company can't afford a janitor to come in every other day to clean up. then it's on you guys to keep your office presentable.
[12:50:22] maz-dev: has joined #RubyOnRails
[12:50:40] jesterfraud: do you honestly think you're such a fine sample of humanity as a programmer that you're above menial work? It's not humiliating...
[12:50:44] quazimodo: do we have a way to keep a largish collection in memory with indexing in ruby?
[12:50:46] diegoviola: well, this boss demanded to clean around the coffee machine or something like that, who knows if it's the bathroom?
[12:50:51] quazimodo: say, 500000 records
[12:51:04] DylanJ: quazimodo: how big is a record?
[12:51:04] quazimodo: anyone wrote a gem?
[12:51:22] jesterfraud: coffee machine is a hygiene issue
[12:51:22] elaptics: quazimodo: collection of what?
[12:51:23] quazimodo: DylanJ: lets say 5-8 columns of strings, ints and floats?
[12:51:34] quazimodo: whatever is the cheapest object i suppose
[12:51:39] jesterfraud: have you ever seen a coffee machine that hasn't been cleaned and has just been left for weeks/months instead?
[12:51:39] dopie: has joined #RubyOnRails
[12:51:45] elaptics: quazimodo: why are you asking?
[12:52:01] elaptics: quazimodo: I mean, what is it you're looking to do?
[12:52:24] Valien: has joined #RubyOnRails
[12:52:43] quazimodo: elaptics: well we have some files of csv with a couple thousand rows, i'm going to parse it into a collection of objects and just use it, that'll be fine with a few thousand and no database is obviously needed (these are tables from partner companies to build quotes from)
[12:52:47] quazimodo: then i thought
[12:52:54] quazimodo: what if it was 100000 rows
[12:52:59] quazimodo: and curiousity got me
[12:53:15] RegulationD: has joined #RubyOnRails
[12:53:30] jesterfraud: quazimodo, do you have to load them all into memory at once?
[12:53:41] quazimodo: jesterfraud: lets do that for fun
[12:53:41] mello: has joined #RubyOnRails
[12:54:01] jesterfraud: I'm not sure we agree on the definition of fun :P
[12:54:25] quazimodo: i just instantiated about half a million objects into an array
[12:54:37] jesterfraud: SQLite can be done in-memory, not sure there are really any benefits of having some 'indexed' memory system where that wouldn't be a solid option
[12:54:39] quazimodo: array[n] accessing is ast as
[12:55:17] diegoviola: they just mentioned I have to clean the coffee machine *phew*
[12:55:51] jesterfraud: oh, that's right, there are locations on the planet where it's not 22:55
[12:56:44] quazimodo: i was curious any how
[12:56:50] ujvaljoshi: has joined #RubyOnRails
[12:56:59] quazimodo: i wonder what the cheapest 'record' in ruby is
[12:57:15] elaptics: quazimodo: I'd use #foreach and process it line by line, that'll keep memory usage low
[12:57:43] actiondispawhat: has joined #RubyOnRails
[12:58:14] quazimodo: elaptics: well I'm going to load the files into ram so that my access and calculations are ast
[12:58:31] elaptics: there's a "fancy" trick you can do with enumerators then
[12:58:37] acovrig: what about putting it in a DB so you can run queries against it???
[12:58:52] jesterfraud: acovrig, sorry, not interested in sensible solutions here
[12:58:55] elaptics: quazimodo: this is what I was looking for http://www.sitepoint.com/guide-ruby-csv-library-part-2/
[12:59:04] elaptics: quazimodo: look for the large files bit
[12:59:33] quazimodo: going to the db is a good idea if relational mathematics makes sense, you have heavy, heavy queries involving interactions (read joins) or massive data sets
[12:59:39] quazimodo: none of those apply here
[13:00:13] elaptics: quazimodo: you can read the whole file in and then create an enumerator to iterate on demand
[13:00:28] quazimodo: elaptics: yeah im about to read that right now :)
[13:01:47] earthquake: has joined #RubyOnRails
[13:02:03] quazimodo: I actually really like the idea of in memory data caches
[13:02:11] quazimodo: makes a lot of sense in some cases
[13:02:18] quazimodo: but actually I still don't know
[13:02:28] quazimodo: what's the 'lightest' structured record we can have in ruby?
[13:02:54] jkamenik: has joined #RubyOnRails
[13:02:58] rvanlieshout: redis is awesome for in memory cache
[13:04:01] Rubie: has joined #RubyOnRails
[13:04:04] melter: has joined #RubyOnRails
[13:04:26] quazimodo: rvanlieshout: yeah I was thinking about using that in some manner
[13:04:28] doodlehaus: has joined #RubyOnRails
[13:04:28] darrencauthon: has joined #RubyOnRails
[13:04:54] coderhs: has joined #RubyOnRails
[13:06:43] quazimodo: ohhh redis is written in c!
[13:06:51] quazimodo: i thought it was some other funky language
[13:06:56] quazimodo: no wonder it's blazing
[13:06:59] SeanLazer: has joined #RubyOnRails
[13:07:01] griffindy: has joined #RubyOnRails
[13:07:27] jesterfraud: redis vs. memcached?
[13:07:44] quazimodo: isn't memcach faster?
[13:08:16] fryguy: it's often not faster, and it has a different featureset
[13:08:40] quazimodo: I've limited experience with both
[13:08:54] thelastinuit: has joined #RubyOnRails
[13:08:57] raunicolae: has joined #RubyOnRails
[13:09:06] raunicolae: has left #RubyOnRails: ()
[13:09:44] JoshL: has joined #RubyOnRails
[13:10:10] Or1on: has joined #RubyOnRails
[13:10:25] Pazician: has joined #RubyOnRails
[13:11:40] FCser: has joined #RubyOnRails
[13:13:13] corehook: has joined #RubyOnRails
[13:13:15] cac_: has joined #RubyOnRails
[13:14:35] krokuz_: has joined #RubyOnRails
[13:16:42] XThief: has joined #RubyOnRails
[13:16:50] XThief: has left #RubyOnRails: ()
[13:17:07] xIzIv: has joined #RubyOnRails
[13:17:09] Olork: has joined #RubyOnRails
[13:17:42] xIzIv: has left #RubyOnRails: ()
[13:17:56] xIzIv: has joined #RubyOnRails
[13:18:24] xIzIv: has left #RubyOnRails: ()
[13:18:38] k4nd4lf: has joined #RubyOnRails
[13:19:32] l0oky: has joined #RubyOnRails
[13:19:39] xIzIv: has joined #RubyOnRails
[13:22:10] lalalaaa: has joined #RubyOnRails
[13:22:12] supra: has joined #RubyOnRails
[13:22:15] lalalaaa: Hi! Anybody have experience using a non-Docker install of Discourse?
[13:22:24] lalalaaa: Having some trouble getting it to send emails in production via localhost, not sure how to debug.
[13:23:22] zo_0: has joined #RubyOnRails
[13:23:28] l0oky: Is that email sender gem?
[13:24:29] l0oky: What does session_path("current") do?
[13:24:37] zevs: has joined #RubyOnRails
[13:24:38] l0oky: cant find API of the method
[13:24:54] zevs: has left #RubyOnRails: ()
[13:25:44] acovrig: Is it possible to list IPs on a page?
[13:26:04] centrx: l0oky, It's probably this - http://guides.rubyonrails.org/routing.html#path-and-url-helpers
[13:26:10] symbol: has joined #RubyOnRails
[13:26:11] DylanJ: acovrig: anything is possible. the only limit is yourself.
[13:26:20] centrx: l0oky, dynamic methods based on your controller/route names _path
[13:26:26] garrypolley: has joined #RubyOnRails
[13:26:30] acovrig: ACTION likes DylanJ???s quote
[13:26:38] l0oky: http://apidock.com/rails/ActionController/Resources/resource It's a helper method for a resouce
[13:26:41] l0oky: yes thank you
[13:27:08] ndrei: has joined #RubyOnRails
[13:27:09] acovrig: I would like to be able to query what IPs/Users are on what page(s).
[13:27:20] diegoviola: my boss demanded I research about natural language processing but I don't think I'm up for the task, that subject is way too complex, they apparently want to build a chat service for their customers, I suggested they add full text search to their web site so their clients can find content relatively easy, but they said they need some chat with some AI on it, I seriously don't know what to do now
[13:27:28] Scripore: has joined #RubyOnRails
[13:27:31] DylanJ: that's trickier. possible though.
[13:27:36] l0oky: centrx, but what does it mean when I pass a string to _path? like session_path("current")
[13:27:38] DylanJ: depends how realtime you want it.
[13:27:59] mary5030: has joined #RubyOnRails
[13:28:00] DylanJ: you could log the ip/action of every request and see when someone was on a page.
[13:28:08] DylanJ: if you need to know if someone is on the page _right now_
[13:28:42] DylanJ: you'll need some js that opens a socket when a user connects.
[13:28:53] allcentury: has joined #RubyOnRails
[13:28:54] DylanJ: and when that socket closes you know they left the page.
[13:28:57] startupality_: has joined #RubyOnRails
[13:29:20] acovrig: Since this is internal only with DHCP reservations, I should be able to determine who is on what page; yes, I presume there is a JS element to it; I???m wondering if there is a simple gem for it, or if I would need to craft something myself.
[13:29:40] lalalaaa: l0oky: i think its just actionmailer
[13:29:40] centrx: l0oky, it might add it to the query string. I see some examples at http://api.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html
[13:29:45] lalalaaa: if that was intended for me
[13:29:46] centrx: l0oky, but none with a string
[13:29:49] DylanJ: i don't know of anything off hand acovrig.
[13:30:13] DylanJ: shouldn't be to challenging to whip up some websocket thing.
[13:31:40] l0oky: centrx, I was following this tutorial and wondering how to make a link to destroy session path of my session resource
[13:31:41] l0oky: https://youtu.be/Hw6WtWJwRtU?t=9m1s
[13:31:41] lalalaaa: isnt websocket in rails in its infancy? i mean i hear a lot of people saying its way more complicated than it has to be
[13:32:01] lalalaaa: my friend recommended i just use js for that kinda stuff, idk
[13:32:14] l0oky: That's the context of that helper method. Why is he puting an argument "current"?
[13:33:04] centrx: l0oky, It sounds like something peculiar to the session controller
[13:33:17] centrx: l0oky, He says specifically that the actual value does not matter, it just expects something
[13:33:25] centrx: l0oky, which is ignored
[13:33:41] l0oky: I wonder why I need it?
[13:34:25] DylanJ: lalalaaa: i wouldn't write any websocket code /in/ rails. i'd have a seperate process doing websocket stuff. and if it's written in ruby i'd just pull in active record if i need to talk to a database.
[13:34:46] acovrig: DylanJ: I knew of websockets, just didn???t make the connection of using it here for some reason: https://github.com/websocket-rails/websocket-rails looks good :D
[13:34:47] l0oky: Oh he said that helper method expects some id parameter
[13:35:05] l0oky: you type in there what ever you want :D
[13:35:11] Parker0: has joined #RubyOnRails
[13:35:11] l0oky: thanks centrx
[13:35:43] l0oky: DylanJ, I use NodeJS for that socket.io stuff. It's really cool
[13:36:08] devdazed: has joined #RubyOnRails
[13:37:39] corehook: has joined #RubyOnRails
[13:37:54] ndrei: has joined #RubyOnRails
[13:38:22] mtchllbr_: has joined #RubyOnRails
[13:38:47] l0oky: I get "undefined method `helper_metod' for ApplicationController:Class
[13:38:47] l0oky: " for doing this in my ApplicationController https://gist.github.com/l0oky/97f98ce8ced7ca65a317
[13:38:53] l0oky: why is that
[13:38:58] diegoviola: has joined #RubyOnRails
[13:39:05] granthatcher: has joined #RubyOnRails
[13:39:17] centrx: l0oky, check the spelling
[13:39:32] l0oky: oh *facepalm*
[13:39:44] l0oky: sorry for being ignorant
[13:39:48] starfox_sf: has joined #RubyOnRails
[13:39:51] lalalaaa: DylanJ: sounds great!
[13:39:59] l0oky: should've double checked myself
[13:40:21] acovrig: has left #RubyOnRails: ()
[13:40:35] acovrig: has joined #RubyOnRails
[13:42:53] thalassa: has joined #RubyOnRails
[13:43:15] renews: has joined #RubyOnRails
[13:44:08] xIzIv: has joined #RubyOnRails
[13:44:16] exadeci: has joined #RubyOnRails
[13:44:41] andywww: has joined #RubyOnRails
[13:45:30] andywww: what would be the best way to store a number which i need to increment
[13:46:03] andywww: in fact no that was a stupid question ignore me
[13:46:15] andywww: has left #RubyOnRails: ()
[13:46:25] jesterfraud: has joined #RubyOnRails
[13:46:33] xIzIv: how can I check is my record already commited or no?
[13:46:43] livathinos: has joined #RubyOnRails
[13:47:10] Ropeney: has joined #RubyOnRails
[13:47:32] xIzIv: can I do it with new_record?
[13:48:31] xIzIv: I'm not sure but looks like new_record? return false even before after_commit callback
[13:48:32] l0oky: What does ||= mean in ruby language?
[13:48:42] rvanlieshout: Isthar: .nnew_record?
[13:49:20] Hates_: l0oky: same as - my_var = my_var || something else
[13:49:32] Hates_: l0oky: my_var ||= something_else
[13:49:54] l0oky: Hates_: Thank you :)
[13:50:00] erichu: has joined #RubyOnRails
[13:50:22] rvanlieshout: quite commin in slow methods
[13:50:29] rvanlieshout: @foo ||= do some magic
[13:51:02] Hates_: apparently it's more like my_var || my_var = something_else
[13:51:14] umgrosscol: has joined #RubyOnRails
[13:51:16] diegoviola: my boss is driving me insane with a request, he wants some "chat service" for the company' clients, I asked what he means and then he ask me to research about NLP (Natural Language Processing) wtf? Seriously, this topic is incredibly complex. I suggested to implement full text search to make content more easily accessible to clients, but he still insist he wants a bot with AI and something more complex
[13:51:22] diegoviola: what do I tell this person?
[13:51:29] xIzIv: rvanlieshout: but why new_record? return false before after_commit callback?
[13:51:38] scottmatheina: has joined #RubyOnRails
[13:51:44] rvanlieshout: before after_commit callback = ?
[13:51:55] catphish: has left #RubyOnRails: ("Leaving")
[13:52:12] diegobiavati: has joined #RubyOnRails
[13:52:14] Hates_: diegoviola: tell him you'll implement a mind reading tool instead
[13:52:27] diegoviola: Hates_: lmao
[13:52:42] Hates_: diegoviola: but seriously, perhaps something like Elasticsearch is a good medium as it can parse out the "natural languge" stuff
[13:52:45] xIzIv: rvanlieshout: new_record? return false, and just then I have after_commit tiggered
[13:52:56] rvanlieshout: xIzIv: where are you calling new_record?
[13:53:03] l0oky: What's the difference between user = User.find_by_email(params[:email]) and @user = User.find_by_email(params[:email])? When defining variables in ruby?
[13:53:03] rvanlieshout: how are you calling it just before after_commit?
[13:53:05] scottmat_: has joined #RubyOnRails
[13:53:20] centrx: l0oky, user is a local variable, @user is an instance variable
[13:53:20] diegoviola: Hates_: I mentioned elasticsearch but he said "I don't think Elasticsearch is the right choice, I want something that talks back to the client" LOL
[13:53:21] rvanlieshout: l0oky: the variable scope
[13:53:34] xIzIv: rvanlieshout: carrierwave, after store
[13:53:54] l0oky: So instance variable is seen globaly?
[13:53:54] Hates_: diegoviola: oh god
[13:54:04] RegulationD: has joined #RubyOnRails
[13:54:12] rvanlieshout: xIzIv: there is quite much that happens between after store and after commit
[13:54:16] Hates_: diegoviola: I'd ask him to show you a good example of what he wants
[13:54:19] diegoviola: Hates_: he wants me to implement BonziBuddy it seems
[13:54:25] rvanlieshout: l0oky: !g ruby variable scope
[13:54:41] l0oky: nice command
[13:54:43] sandelius: has joined #RubyOnRails
[13:54:44] Hates_: diegoviola: the 90s called, they want their annoying software back
[13:55:04] rvanlieshout: l0oky: !popcorn
[13:55:04] helpa: l0oky: http://i.imgur.com/tyViD.gif
[13:55:23] xIzIv: rvanlieshout: I have some case when after store happens before after commit, I should handle it
[13:55:34] rvanlieshout: xIzIv: true, but there is more between that
[13:55:47] diegoviola: Hates_: I think me asking the boss once again will annoy him
[13:56:08] Hates_: diegoviola: well if he can't give you solid requirements, how can you implement what he wants
[13:56:26] Hates_: diegoviola: sounds like you need to write that mind reading tool then run it on your boss :P
[13:56:55] diegoviola: I think he wants a bot, but I know this request is stupid
[13:57:16] xIzIv: rvanlieshout: yes, but can I somehow detect that commit is not passed yet
[13:57:29] Rubie: has joined #RubyOnRails
[13:57:30] Hates_: diegoviola: yeah, I guess he wants something Siri like
[13:57:53] rvanlieshout: xIzIv: if .new_record? returns true, it's not saved
[13:58:06] l0oky: that was a test :P
[13:58:08] Hates_: diegoviola: just return some results and put "Here's what I found!" in front of them :P
[13:58:12] diegoviola: Hates_: I already asked if he wants a full text search and he said "that's not what I want"
[13:58:41] DylanJ: his request is unreasonable and its your job to tell him that. the hell is he gonna do about it
[13:59:19] xIzIv: rvanlieshout: anyway thanks!
[13:59:20] Hates_: DylanJ: Find someone else willing to respond to vague requests :S
[14:00:37] DylanJ: Hates_: in that case you didn't explain why it's unreasonable well enough.
[14:00:50] DylanJ: it's not hard to explain why something isn't possible.
[14:01:02] volk_: has joined #RubyOnRails
[14:01:04] DylanJ: s/possible/feasible
[14:01:14] Hates_: diegoviola: the thing is NLP is just about how you processes what the user inputs. got nothing to do with how the information is presented back
[14:02:38] diegoviola: Hates_: right, but NLP can get complex as a subject, and I don't think I have much time to dig into that atm, provided also the boss needs the task to be done "ASAP"\
[14:02:52] diegoviola: from what I can tell
[14:03:03] dstarh: has joined #RubyOnRails
[14:03:11] Ergo^: has joined #RubyOnRails
[14:03:59] Hates_: diegoviola: I did something sort of like that on Elasticsearch for a book site, and it would return results along the lines of "Here are some authors you might have meant" along with "And some topics" and "And some books"
[14:04:35] chelbs: has joined #RubyOnRails
[14:04:54] acovrig: has joined #RubyOnRails
[14:05:08] diegoviola: if they gave me 5 years "deadline" and paid me for all that to just research on NLP and natural languages, sure, that sounds more reasonable
[14:05:31] diegoviola: Hates_: interesting, I'll look into that
[14:06:01] Hates_: good luck -_-
[14:06:25] Hates_: but it's better to annoy your boss now, rather than for them to be more annoyed when you don't deliver what they wanted
[14:06:47] sinkensabe: has joined #RubyOnRails
[14:07:01] Hates_: whenever I get a crazy request I just break it down and say "Well as phase 1 lets do X, then we can build on that to achieve Y"... builld X then forget about Y :P
[14:07:12] emilkarl: has joined #RubyOnRails
[14:08:23] paulcsmith: has joined #RubyOnRails
[14:08:24] xIzIv: nice strategy
[14:09:05] tvw: has joined #RubyOnRails
[14:09:06] diegoviola: Hates_: interesting
[14:09:47] diegoviola: Hates_: I think that happened with this project recently, boss gave me one task and then he just forgot about it, hopefully that happens often with his crazy requests
[14:10:21] Hates_: yeah, I find most of the time once there's something that achieves the basics they forget about what they really wanted
[14:10:35] Hates_: as they'll want something else
[14:10:36] diegoviola: I even reminded him about it and he said it's not priority for now
[14:12:46] diegoviola: Hates_: or the boss might be thinking in terms of a super AI or Siri like functionality (think of the Hackers film) when in reality something simpler might do the job for them as well :P
[14:13:42] diegoviola: I'll build something quickly and I'll show him something simple
[14:13:49] bmalum: has joined #RubyOnRails
[14:14:00] joaomdmoura: has joined #RubyOnRails
[14:15:01] diegoviola: "Natural Language Processing"... lol
[14:15:24] emilkarl: has joined #RubyOnRails
[14:15:35] dopie: has joined #RubyOnRails
[14:15:46] highcup: has joined #RubyOnRails
[14:15:58] acovrig_: has joined #RubyOnRails
[14:16:38] thebatu1: has joined #RubyOnRails
[14:17:15] darrencauthon: has joined #RubyOnRails
[14:18:17] byprdct: has joined #RubyOnRails
[14:19:57] bratsche: has joined #RubyOnRails
[14:20:24] diegoviola: Hates_: I think what I'll build will annoy him though, because he has said that he wants a "chat"
[14:20:54] diegoviola: so I'm really not sure what to do, sigh
[14:20:57] Hates_: what are you searching for?
[14:21:31] l0oky: diegoviola: That's why I work for myself. :D
[14:21:38] Abhijit: has joined #RubyOnRails
[14:21:50] diegoviola: Hates_: I don't know, he has said I have to build something from scratch, so I'm thinking to create a new app and then add a bunch of content to a model and then use elasticsearch or something else to do a full text search
[14:21:53] jenrzzz: has joined #RubyOnRails
[14:22:07] JakFrist: has joined #RubyOnRails
[14:22:08] Or1on: has joined #RubyOnRails
[14:25:37] benhuda: has joined #RubyOnRails
[14:25:40] Lightsword: has joined #RubyOnRails
[14:25:49] xIzIv: hello Abhijit
[14:27:23] kies: has joined #RubyOnRails
[14:28:37] l0oky: What's the best way to update/add model fields to already existing ones?
[14:28:56] l0oky: to already existing models*
[14:28:59] DylanJ: l0oky: migrations
[14:29:23] l0oky: I did a rails g resource user email password_digest
[14:29:30] l0oky: and I want to add firstname now
[14:29:43] l0oky: What's the best way to do that?
[14:29:57] DylanJ: add_column :table_name, :firstname, :string
[14:30:02] DylanJ: in a migration you create
[14:30:07] DylanJ: or you can try the rails magic.
[14:30:08] nonparfumee: has joined #RubyOnRails
[14:30:16] DylanJ: rails g AddUsernameToModel username:string
[14:30:24] l0oky: that second one sounds better :D
[14:30:35] DylanJ: second one works for simple scenarios
[14:30:59] DylanJ: but it's important you understand how to create migrations
[14:31:08] Abhijit: in any case we have to type the columnname and its datatype. where is the magic?
[14:31:16] l0oky: Well see I am not good with migrations.. :D
[14:31:22] Spami: has joined #RubyOnRails
[14:31:26] l0oky: What do I have to know about them?
[14:31:30] DylanJ: Abhijit: wheres the model specified
[14:31:54] DylanJ: l0oky: http://api.rubyonrails.org/classes/ActiveRecord/Migration.html
[14:32:03] DylanJ: l0oky: everything ;)
[14:32:32] l0oky: Do I manualy add a migration file or what?
[14:33:17] startupality: has joined #RubyOnRails
[14:33:19] l0oky: Does Rails have migration file generator?
[14:33:37] centrx: l0oky, http://edgeguides.rubyonrails.org/active_record_migrations.html
[14:33:44] DylanJ: l0oky: just do rails g migration WoopWoopMyMigration
[14:33:48] l0oky: oh I just had to scroll down
[14:33:51] DylanJ: creates a file for you
[14:37:25] renews: has joined #RubyOnRails
[14:37:38] xIzIv: new_record? return false but inside worker I have Can't find Image with id:...
[14:37:49] haz111: has joined #RubyOnRails
[14:37:58] xIzIv: how It can be possible?
[14:38:18] l0oky: Wow migrations sound so cool with rails
[14:38:43] GPrime: has joined #RubyOnRails
[14:38:53] sarink: has joined #RubyOnRails
[14:39:31] treehug88: has joined #RubyOnRails
[14:40:20] xIzIv_: has joined #RubyOnRails
[14:41:02] maia: has joined #RubyOnRails
[14:41:23] mikecmpbll: has joined #RubyOnRails
[14:42:11] dreatn: has joined #RubyOnRails
[14:43:45] op84: has joined #RubyOnRails
[14:44:04] maia: Hello. I???m struggling with ???Circular dependency detected while autoloading constant??? in my app when a rake task is run on heroku. Not always, but from time to time.
[14:44:11] maia: The error is referencing an ActiveRecord model, non namespaced. The code is run in parallel threads using the parallel gem.
[14:44:36] maia: I???m not requiring any class from my app. Any suggestions what could be the cause, or how to debug it?
[14:44:59] JakFrist: has joined #RubyOnRails
[14:45:12] GPrime: has joined #RubyOnRails
[14:45:30] thebatu1: I am unable to fix an error " image_will_change for Posts"!! why I am still getting the same error after making sure that I have a migration that adds :image column to Posts ? https://github.com/thebatu/blog
[14:45:40] Ray`: has joined #RubyOnRails
[14:45:47] silverdust: Setting up puma for heroku. With this in the procfile web: bundle exec puma -C config/puma.rb
[14:46:36] l0oky: How can i define a method to be used in model classes?
[14:46:48] l0oky: like a default has_secure_password method
[14:47:19] acovrig: has joined #RubyOnRails
[14:47:31] l0oky: or like a validates_format_of ...
[14:47:31] silverdust: wouldn't that ty to create the puma.rb each time
[14:48:14] Rubie: has joined #RubyOnRails
[14:48:37] haz111_: has joined #RubyOnRails
[14:48:42] givanse: has joined #RubyOnRails
[14:48:46] DylanJ: l0oky: those are class methods
[14:48:50] DylanJ: def self.mymethod
[14:49:43] xIzIv_: has left #RubyOnRails: ()
[14:49:49] xIzIv_: has joined #RubyOnRails
[14:50:19] rickmasta: has joined #RubyOnRails
[14:50:37] l0oky: Im sorry for asking this, but where should I define class methods? (in what folder)
[14:51:15] xIzIv_: has left #RubyOnRails: ()
[14:51:35] DylanJ: put it in your_model.rb silly
[14:51:50] ogpastaling: has joined #RubyOnRails
[14:52:01] l0oky: but that will bloat my model :(
[14:52:02] DylanJ: if it's a method to be shared with many models put it in a "concern"
[14:52:10] rickmasta: has joined #RubyOnRails
[14:52:27] xIzIv: has joined #RubyOnRails
[14:52:30] DylanJ: which is just a module +some magic (makes in a concern) that you include in your class.
[14:52:35] DylanJ: makes it a*
[14:52:36] hotpancakes: has joined #RubyOnRails
[14:52:45] ogpastaling: has joined #RubyOnRails
[14:52:50] l0oky: Thank you!
[14:53:10] DylanJ: those generally go in app/models/concerns/my_cocern.rb
[14:53:12] teufelChiCoder: has joined #RubyOnRails
[14:54:02] rickmasta: has joined #RubyOnRails
[14:54:05] gambl0re: has joined #RubyOnRails
[14:54:26] thebatu1: any ideas guys ?
[14:54:44] l0oky: my concern should extend a class?
[14:55:09] centrx: thebatu1, You haven't supplied much information about the error or where it comes from, all you did was link to your entire project
[14:56:19] ChargedLight: has joined #RubyOnRails
[14:57:59] xIzIv: 10oky: yes
[14:58:13] thebatu1: centrx, alright I will try to make it clearer. I am getting this error """undefined method `image_will_change!' for #<Post:0x00000008029218> """ the project is a classic blog with comments and users. the error happens when I try to submit a form with an image.
[14:58:35] xIzIv: 10oky: include <YourConcern>
[14:58:36] centrx: thebatu1, post the stacktrace at gist.github.com
[14:59:07] centrx: l0oky, include not extend
[14:59:10] Pazician: has joined #RubyOnRails
[14:59:10] acti0nman: has joined #RubyOnRails
[14:59:36] rickmasta: has joined #RubyOnRails
[14:59:37] ktshan: has joined #RubyOnRails
[15:00:13] RegulationD: has joined #RubyOnRails
[15:00:28] xIzIv: guys, new_record? return false but in background worker Cant find File by id:..
[15:00:35] thebatu1: centrx, I have added the error trace to https://gist.github.com/thebatu/a738c9c2af37549f2d3c and the code can be found https://github.com/thebatu/blog. what do u think doctor ?
[15:00:35] joaomdmoura: has joined #RubyOnRails
[15:00:36] xIzIv: any idea?
[15:00:58] ktshan: hey all, i'm having an annoying situation where my login sessions no longer stay active, tried removing all cookies and blasting any cached data, but still having issue, has anyone seen this before?
[15:01:07] diegoviola: Hates_: do you think something like a wizard with full-text-search could satisfy his requirements? I personally hate wizards myself but I can't think about nothing else
[15:02:03] jmignault: has joined #RubyOnRails
[15:02:08] centrx: thebatu1, Google searched for 'image_will_change', missing column? - http://stackoverflow.com/questions/5481331/undefined-method-image-will-change-for-carrierwave-on-heroku
[15:02:17] diegoviola: wizards also usually have specific steps, I don't think that will work very well
[15:02:25] diegoviola: I think this boss is just trolling me or something
[15:02:33] Synthead: is there an AR-only way I can do an OR clause on two columns in Rails 4.x ?
[15:03:06] Synthead: like Foobar.where(foo: 5) or Foobar.where(bar: 5)
[15:04:07] Hates_: diegoviola: that's really a questiuon for your boss :(
[15:04:29] diegoviola: Hates_: right
[15:04:33] diegoviola: I will ask him
[15:04:38] mikecmpbll: ktshan: "login sessions no longer stay active"?
[15:05:00] thebatu1: centrx, yea I read many answers on stackoverflow. mainly they all point to not adding a column to db but I have added it early on. thats why I am super confused https://github.com/thebatu/blog/blob/batu/db/migrate/20150515144159_add_image_to_posts.rb
[15:05:05] ktshan: mikecmpbll: yeah, I'll login and when I refresh the page it's no longer logged in
[15:05:19] xIzIv: Synthead: in new version of rails you should be able write something like Foobar.where(foo:5).or.where(bar:5)
[15:05:33] kahuna_: has joined #RubyOnRails
[15:05:41] ktshan: people said deleting the cookies should fix it, but i haven't been so lucky
[15:05:47] greengriminal: has joined #RubyOnRails
[15:06:31] centrx: thebatu1, but did you actually run this migration?
[15:06:48] Synthead: xIzIv: is there a 4.x way?
[15:06:59] mikecmpbll: ktshan: anything in log file?
[15:07:48] thebatu1: centrx, yes I ran it. actually everything was working normally until I added a comments model. can the problem be coming from there ? if so how ?? https://github.com/thebatu/blog/commit/99b591ee14aa0ca7fd9e90564ac6e3680d870337
[15:08:08] Hates_: Synthead: you can fall back to AREL to do it if you don't want to write write("foo = ? OR bar = ?", foo, bar)
[15:08:16] xIzIv: Synthead: have you tried it in 4.2?
[15:08:27] centrx: thebatu1, maybe it's trying to use images with the comments, but the comments don't have images?
[15:08:31] Synthead: Hates_: I was hoping to write it in AR syntax and not SQL
[15:08:43] Synthead: xIzIv: yeah, I get a NoMethodError
[15:09:15] Hates_: seems that new syntax is going in rails 5
[15:09:19] centrx: Synthead, limited SQL fragments like an OR in a where are normal and easy to maintain
[15:09:52] disgrntld: has joined #RubyOnRails
[15:10:49] ktshan: mikecmpbll: unfortunately no
[15:11:09] xIzIv: Synthead: maybe something like where.or(boo:5) i'm not sure
[15:11:19] hotpancakes: has joined #RubyOnRails
[15:11:36] mikecmpbll: ktshan: suggest you do some debugging then
[15:11:36] chelbs: has joined #RubyOnRails
[15:11:44] Hates_: Synthead: Foo.where(Foo.arel_table[:foo].eq(5).or(Foo.arel_table[:bar].eq(5)))
[15:11:56] allcentury: has joined #RubyOnRails
[15:12:01] Hates_: not that that's any clearer than writing the SQL fragment
[15:12:04] ktshan: mikecmpbll: yeah, :-/ stupid computers
[15:12:24] Synthead: xIzIv: .or doesn't seem to be an AR method in rails 4.2
[15:12:43] Hates_: .or is coming in rails 5 I believe
[15:13:17] mikecmpbll: https://github.com/rails/rails/commit/9e42cf019f2417473e7dcbfcb885709fa2709f89
[15:13:48] thebatu1: centrx, yea probably I will look into it
[15:14:43] bashusr: has joined #RubyOnRails
[15:15:10] Hates__: has joined #RubyOnRails
[15:15:51] nikhgupta: has joined #RubyOnRails
[15:17:17] maia: retrying my question: any suggestions on how to debug/fix ???Circular dependency detected while autoloading constant???? I???m encountering it when running multiple threads (via grosser/parallel gem) from a rake task on heroku.
[15:17:44] workmad3: maia: make sure your environment is fully loaded before any threads are started
[15:17:55] workmad3: maia: code-loading is *not* thread-safe
[15:18:19] maia: workmad3: how can I do so? I???m only encountering this problem occasionally on production environment on heroku when running something via rake
[15:18:27] shinnya: has joined #RubyOnRails
[15:18:43] maia: workmad3: is there a way to force loading the entire environment?
[15:19:18] workmad3: maia: you'd need to go through and make sure your threads are being started after the environment is loaded, and you'd need to dig through your code and make sure you're not relying on autoloading or dynamic requires
[15:19:41] Synthead: Hates__: yeah that's pretty gross
[15:20:30] xIzIv: guys, why new_record? return false if baground worker can't then find record
[15:20:30] Synthead: Hates__: it works, though, heh
[15:20:41] xIzIv: any idea?
[15:20:44] bashusr: has joined #RubyOnRails
[15:21:03] isjaylee: has joined #RubyOnRails
[15:21:10] maia: workmad3: I???m not using autoload or require anywhere, other than require 'active_support/concern' in my concerns. How can I make sure the entire environment is loaded before I???m starting threads? (I???m polling multiple urls in parallel threads and saving results in an activerecord class)
[15:21:53] xIzIv: what I can use instead new_record? for checking exists record or no in this case?
[15:22:36] maia: workmad3: or would using config.eager_load = false in production.rb solve the issue?
[15:22:44] isjaylee: has left #RubyOnRails: ()
[15:23:14] baron: has joined #RubyOnRails
[15:23:54] sp1rs: has joined #RubyOnRails
[15:23:56] fryguy: xIzIv: when are you firing off the background worker?
[15:24:43] thebatu1: centrx, I cant see the problem :(
[15:24:46] kinduff: has joined #RubyOnRails
[15:25:02] workmad3: maia: unfortunately, we're hitting the limit of the general advice that can be given for that sort of problem without digging into the code... you're in a threaded environment, you're getting an intermittent error with circular dependencies which sounds very like two connected dependencies are trying to autoload in separate threads and causing issues, so about the only advice that can be given is tha
[15:25:04] erts: has joined #RubyOnRails
[15:25:08] workmad3: t you need to figure out what's getting autoloaded and make sure it's loaded before threads start
[15:25:21] workmad3: maia: without knowing the details of your system rather intimately, I can't help beyond that :(
[15:25:35] pipework: Autoload => Autolol'd
[15:26:17] centrx: thebatu1, Check the database to verify the column actually exists
[15:26:29] guest123: has joined #RubyOnRails
[15:26:39] ertse: has joined #RubyOnRails
[15:26:46] thebatu1: centrx, good idea
[15:26:49] michael_mbp: has joined #RubyOnRails
[15:26:57] maia: workmad3: I very much appreciate your help and am aware that I need to hunt down the problem myself. I just couldn???t find any advice regarding debugging yet. I assume there is a way to log what is autoloaded when which I could add for debugging?
[15:27:03] kinduff: Hey guys and gals, good morning
[15:27:05] xIzIv: fryguy: I want to check existence of record before shedule shedule worker, but new_record? doesn't help, I do it inside after store (carrierwave) callback
[15:27:20] gambl0re: guys when i upload my rails project to heroku, i get a "we're sorry something went wrong" error. but when i test it on my local machine everything works fine. do you guys know what could be the issue? https://floating-peak-6711.herokuapp.com/
[15:27:28] workmad3: xIzIv: Foobar.where(id: blah).exists?
[15:27:43] granthatcher_: has joined #RubyOnRails
[15:27:53] lake: has joined #RubyOnRails
[15:28:03] zeknox: hey fellas, im running rails 4.2 and running into this issue where i use a select form helper with mutltiple: true and it will always send the first element of the array empty, I've checked out this post here, but even with passing in the option include_hidden true or false there is no change, any ideas? http://stackoverflow.com/questions/8929230/why-is-the-first-element-always-blank-in-my-rails-multi-select-using-an-embedde
[15:28:26] xIzIv: workmad3: yes I think about it too, aditional query but..
[15:28:31] starfox_sf: has joined #RubyOnRails
[15:28:49] gambl0re: any suggestions guys, thanks
[15:29:09] fryguy: xIzIv: sounds like you are still inside of a transaction
[15:29:13] sonofdirt: has joined #RubyOnRails
[15:29:34] platzhirsch: has left #RubyOnRails: ()
[15:29:40] fryguy: gambl0re: look at your logs
[15:30:17] Cache_Money: has joined #RubyOnRails
[15:30:54] xIzIv: fryguy: yes, but not always
[15:31:00] workmad3: xIzIv: fryguy may have a point... if you trigger a job in an `after_save` then the job can be started and try to find a record before the save has been committed
[15:31:21] workmad3: xIzIv: to which the solution is to not trigger jobs in after_save callbacks ;)
[15:31:32] gambl0re: i dont understand my log file..
[15:31:39] renews: has joined #RubyOnRails
[15:31:49] xIzIv: workmad3: no, it is carrierwave after store callback
[15:31:52] fryguy: there's after_commit for that, but generally it's a bad practice to do this sort of thing anyway, because you are highly coupling two sort-of-unrelated things together
[15:32:10] andatche: has joined #RubyOnRails
[15:32:10] fryguy: xIzIv: and is after_store analogous to after_save, or after_commit?
[15:32:13] momomomomo: has joined #RubyOnRails
[15:32:46] xIzIv: fryguy: carrierwave trigger it after uploading file to aws
[15:32:57] fryguy: xIzIv: you are missing the point of the question
[15:33:04] fryguy: is after_store still happening inside of a transaction?
[15:33:55] maxshelley: has joined #RubyOnRails
[15:34:35] leekme: has joined #RubyOnRails
[15:35:12] xIzIv: looks like yes
[15:36:25] cogsbox: has joined #RubyOnRails
[15:36:29] xIzIv: in this case I don't need after store callback
[15:36:59] fryguy: so, if the save is still inside of a transaction, it's not visible to any database threads outside of that transaction (aka your background workers)
[15:37:27] fryguy: so you need to commit the transaction before it becomes visible to the outside world, or change the transaction isolation level for your queries (don't do this unless you really know what you are doing)
[15:37:38] gambl0re: im getting this error msg "We're sorry, but something went wrong. If you are the application owner check the logs for more information." when testing in heroku
[15:37:39] paulcsmith: has joined #RubyOnRails
[15:37:48] fryguy: gambl0re: you need to show us the logs
[15:37:56] fryguy: we can't debug generic error messages
[15:37:59] fryguy: it could be basically anything
[15:38:04] granthatcher: has joined #RubyOnRails
[15:38:11] paulcsmith_: has joined #RubyOnRails
[15:38:12] fryguy: xIzIv: http://www.postgresql.org/docs/9.1/static/transaction-iso.html
[15:38:47] granthatcher: has joined #RubyOnRails
[15:38:47] momomomomo: has joined #RubyOnRails
[15:39:27] ght: Question: I have an API that takes incoming requests and passes them off to another internal server. I would like to add a bit of internal throttling to the request processing mechanism. What gem would be best for putting tasks in a queue and executing?
[15:39:29] granthatcher: has joined #RubyOnRails
[15:40:09] granthatcher: has joined #RubyOnRails
[15:40:31] fryguy: ght: resque and/or sidekiq are the standard gotos for deferred execution in rails
[15:40:43] ght: fryguy: thank you, will research.
[15:40:48] granthatcher: has joined #RubyOnRails
[15:40:52] xIzIv: fryguy: if file always is uploaded inside transaction I will try general after commit callback instead carrierwave callback, thanks
[15:41:06] tobobo: has joined #RubyOnRails
[15:41:07] cogsbox_: has joined #RubyOnRails
[15:41:29] granthatcher: has joined #RubyOnRails
[15:42:12] granthatcher: has joined #RubyOnRails
[15:42:51] granthatcher: has joined #RubyOnRails
[15:43:56] cac: has joined #RubyOnRails
[15:45:55] Olork: has joined #RubyOnRails
[15:46:15] RxDx: has joined #RubyOnRails
[15:46:18] xIzIv: fryguy: shouldn't new_record? return true if transaction is still open?
[15:46:40] blackhuey: has joined #RubyOnRails
[15:46:45] fedexo: has joined #RubyOnRails
[15:46:53] scottmatheina: has joined #RubyOnRails
[15:47:12] annlewis: has joined #RubyOnRails
[15:47:22] Pazician: has joined #RubyOnRails
[15:47:42] fryguy: xIzIv: not if you've called save on it
[15:47:45] RxDx: please.. i have a model called Drop, that has :latitude, :longitude (floats) and :book (another model).. How can I create a Drop that contains a book in a single JSON POST request?
[15:47:52] RxDx: hi cogsbox_ ;)
[15:48:07] fryguy: RxDx: active_model_serializers handle that pretty reasonably
[15:48:29] ght: Question: In my development rails site, I'm usddenly noticing that coffeescript assets are being cached and code changes are not being reflected on the test client.
[15:48:31] RxDx: fryguy, ill search it.. thanks
[15:48:38] blackhuey: has left #RubyOnRails: ()
[15:48:53] ght: Should I execute rails.cache.clear after making changes to coffeescript files to ensure they're updated on the test client?
[15:49:38] The_Phoenix: has joined #RubyOnRails
[15:51:19] blahwoop: has joined #RubyOnRails
[15:52:49] blahwoop: hi all. im trying to figure out how i would be able to create an app that keeps track of a github repo and if a new issue is created my app will do something
[15:53:23] nonparfumee: has joined #RubyOnRails
[15:53:27] blahwoop: would i need to do long polling? and hit the github api every minute or something like that
[15:53:28] nikhgupta: has joined #RubyOnRails
[15:54:19] sandstrom: has joined #RubyOnRails
[15:54:45] JakFrist: has joined #RubyOnRails
[15:55:11] philcrissman: has joined #RubyOnRails
[15:56:19] xIzIv: fryguy: I'm not sure that understand `called save on it`)
[15:56:27] yoongkang: has joined #RubyOnRails
[15:56:29] aarkerio: has joined #RubyOnRails
[15:56:34] workmad3: blahwoop: it might be possible to set up a webhook on the repository that gets notifications of new issues, which you could set up as an API call to your app
[15:56:48] fryguy: xIzIv: it's possible for a record to be not new in a transaction, but new outside of the transaction
[15:57:10] workmad3: blahwoop: and then your app could push the notifications to browsers using something like long-polling, websockets, SSEs, or your browsers could do the dirt-simple solution of polling for an update every 10 seconds or something
[15:57:27] blahwoop: workmad3: ok ill take a look at that thanks
[15:57:28] startupality: has joined #RubyOnRails
[15:57:53] Rubie: has joined #RubyOnRails
[15:59:25] SteenJobs: has joined #RubyOnRails
[15:59:54] xIzIv: fryguy: oh, got it, transaction has own life)
[16:00:09] towski_: has joined #RubyOnRails
[16:00:26] fryguy: xIzIv: yep, you should review MVCC and ACID for more information about how relational databases actually work
[16:00:35] thebatu1: has joined #RubyOnRails
[16:00:52] fryguy: it'll help you debug this things in the future, and create more efficient processes overall
[16:00:58] fryguy: these things*
[16:02:32] xIzIv: new abbreviation;) thanks
[16:03:12] nikhgupta: has joined #RubyOnRails
[16:03:45] pontiki: has joined #RubyOnRails
[16:05:41] diegoviola: do you think is rude or unprofessional if you are American and you work for a company from Europe and the boss keeps referring to you as "The American"? e.g. "Give that information to The American."
[16:05:46] recurrence: has joined #RubyOnRails
[16:05:52] diegoviola: I'm going through exactly like that with this company, it sucks
[16:06:24] pipework: diegoviola: Depends, really.
[16:06:40] diegoviola: pipework: depends?
[16:07:14] ciree: diegoviola: this might be really messed up logic but I think there are a few countries that it doesn't come off as hostile?
[16:07:15] diegoviola: it's rude not to use one's name
[16:07:37] laut: has joined #RubyOnRails
[16:07:40] laut: has left #RubyOnRails: ()
[16:07:57] Rubie: has joined #RubyOnRails
[16:08:13] pipework: diegoviola: I mean, you can get offended at it, but whether it was intended as rude or not is a whole different matter.
[16:08:21] pipework: Maybe ask to be referred to as something else.
[16:08:52] justintv90: has joined #RubyOnRails
[16:09:21] dopie: has joined #RubyOnRails
[16:09:37] michaeldeol: has joined #RubyOnRails
[16:10:07] eddie_v9: has joined #RubyOnRails
[16:11:39] n1x: has joined #RubyOnRails
[16:12:15] jenrzzz: has joined #RubyOnRails
[16:12:28] neanderslob: has joined #RubyOnRails
[16:13:03] smathy: has joined #RubyOnRails
[16:13:17] Zadrel: has joined #RubyOnRails
[16:14:09] Zadrel: hello there, anyone knows how do i set focus in a div(scroll to it) using <a href=""></a>?
[16:14:24] Godel108: has joined #RubyOnRails
[16:14:27] slash_nick: diegoviola: pipework is right... it's not polite, but it may not have been intended as rude. chalk it up as impersonal, but don't be too hurt by it.
[16:15:16] Godel108: hey everyone
[16:15:18] centrx: diegoviola, Ask to be referred to as "The Native American"
[16:15:26] diegoviola: slash_nick: yeah I could care less about it, I will leave this company after the probationary period is over and then I'll take it as experience
[16:15:43] michael_mbp: has joined #RubyOnRails
[16:15:56] jxpx777: has joined #RubyOnRails
[16:16:06] diegoviola: centrx: I'm not American or Native American, I just used that as an example
[16:16:28] centrx: diegoviola, Tell the Europeans they stole your land and you want it back
[16:16:45] thebatu1: centrx, I have checked the DB and the column image does not exist. since I am new, I used the command \d posts and image does not exist. what can I do ?
[16:16:59] centrx: thebatu1, How did you run the migration in the first place?
[16:17:01] simplyianm: has joined #RubyOnRails
[16:17:09] centrx: thebatu1, Is the migration number/date listed in the schema_versions table
[16:17:16] thebatu1: centrx, rake db:migrate
[16:17:23] ciree: diegoviola: i take your your hispanic
[16:17:35] diegoviola: ciree: it doesn't matter what I am
[16:17:45] slash_nick: ciree: he's diego
[16:17:46] diegoviola: or where I'm from
[16:17:49] tercenya_: has joined #RubyOnRails
[16:18:17] centrx: thebatu1, schema_migrations
[16:18:42] centrx: He's from San Diego and he plays the Viola!
[16:19:40] m0r0n: has joined #RubyOnRails
[16:19:40] nobitanobi: has joined #RubyOnRails
[16:19:56] diegoviola: this is the internet, nationality is irrelevant
[16:20:45] diegoviola: or maybe not
[16:22:44] JakFrist: has joined #RubyOnRails
[16:22:46] s2013: has joined #RubyOnRails
[16:23:17] centrx: Universalism
[16:25:01] slash_nick: i'm an intercontinental
[16:25:41] nikhgupta: has joined #RubyOnRails
[16:25:44] renews: has joined #RubyOnRails
[16:26:58] bricker: has joined #RubyOnRails
[16:27:46] sooli: has joined #RubyOnRails
[16:28:05] pixelhandler: has joined #RubyOnRails
[16:28:22] bmalum: has joined #RubyOnRails
[16:28:27] sdwrage: has joined #RubyOnRails
[16:28:43] paulcsmith_: has joined #RubyOnRails
[16:29:54] bruno-: has joined #RubyOnRails
[16:31:21] towski_: has joined #RubyOnRails
[16:31:35] benhuda: has joined #RubyOnRails
[16:32:18] nikhgupta: has joined #RubyOnRails
[16:34:28] sarink: has joined #RubyOnRails
[16:35:18] MEATCHICKEN: What sort of exception should I raise in model to cause an application error?
[16:36:22] simplyianm: has joined #RubyOnRails
[16:36:27] sp1rs: has joined #RubyOnRails
[16:36:44] bricker: meatchicken: What is the cause of the error?
[16:37:11] MEATCHICKEN: Invalid column content
[16:37:15] n1x: has joined #RubyOnRails
[16:37:20] MEATCHICKEN: Just say..it somehow got through
[16:37:24] MEATCHICKEN: and the column is inconsistent
[16:37:48] MEATCHICKEN: Would ActiveRecord::RecordInvalid be okay?
[16:38:05] arkiver: has joined #RubyOnRails
[16:38:07] smathy: meatchicken, a subclass of RuntimeError
[16:38:20] tubbo: has joined #RubyOnRails
[16:38:29] MEATCHICKEN: smathy, wouldn't it be better to raise a rails-specific exception?
[16:38:35] smathy: Yeah, you could subclass that too.
[16:38:40] starfox_sf: has joined #RubyOnRails
[16:39:07] bmalum: has joined #RubyOnRails
[16:39:12] thebatu1: has joined #RubyOnRails
[16:39:34] MEATCHICKEN: smathy, but I shouldn't use it directly?
[16:39:44] MEATCHICKEN: can't I just -> raise "ActiveRecrod::RecordInvalid
[16:39:54] MEATCHICKEN: and let it bubble up to a 404 ?
[16:40:04] MEATCHICKEN: well..not 404..whatever the http status code is
[16:41:10] Zadrel: hello there, anyone ot any ideas?
[16:41:36] null__: is authenticity_token in forms the same thing as the authenticity_token in the meta csrf tags?
[16:41:52] thebatu1: centrx, what do I do with schema_migrations ? and how do I check for the number/date list in the schem versions table
[16:42:09] centrx: thebatu1, compare it to the number in the filename of the migration
[16:42:16] rromanchuk: has joined #RubyOnRails
[16:42:51] centrx: thebatu1, it's also possible some other migration removed that column, or it was done out-of-band, in the database directly
[16:42:56] smathy: meatchicken, I would still subclass it, unless you're sure that you want any rescue behavior that may exist anywhere.
[16:43:10] centrx: thebatu1, in that case, (find out what happened and) just create another migration to add the column back
[16:43:43] Abhijit: Zadrel, i think CSS related questions can be asked in #CSS and #HTML
[16:43:50] smathy: meatchicken, well actually, the subclass won't help that. So what I mean is that I'd only use that (or a subclass of it) if you're sure you want any other behavior associated with that exception.
[16:44:07] MEATCHICKEN: Oh okay smathy
[16:44:32] smathy: meatchicken, I always work with subclasses so that if you want to you can rescue just your own exception without affecting Rails's exceptions.
[16:44:39] smathy: (or Ruby's)
[16:45:54] xcesariox: has joined #RubyOnRails
[16:45:56] smathy: null__, not the same, but related.
[16:46:07] smathy: null__, the meta tag defines the name for Rails to look for in the form.
[16:46:22] smathy: null__, the form has the value.
[16:48:06] pppt: has joined #RubyOnRails
[16:49:03] AzaToth: has joined #RubyOnRails
[16:50:16] Xiti: has joined #RubyOnRails
[16:50:34] bmalum_: has joined #RubyOnRails
[16:50:43] null__: so, if I wanted to create a form with reactjs, for example, could I take the content of meta[name="csrf-token"] and provide that as the token?
[16:51:09] null__: or do I have to render the hidden input with the rails helpers?
[16:51:38] GPrime: has joined #RubyOnRails
[16:51:55] weckl: has joined #RubyOnRails
[16:52:38] weckl_: has joined #RubyOnRails
[16:52:44] fryguy: null__: you can provide it as the token
[16:53:30] null__: thanks I'll give it a try
[16:53:39] weckl: has joined #RubyOnRails
[16:54:23] weckl_: has joined #RubyOnRails
[16:54:33] annlewis: has joined #RubyOnRails
[16:55:48] weckl: has joined #RubyOnRails
[17:01:52] simplyianm: has joined #RubyOnRails
[17:02:33] meoblast001: has joined #RubyOnRails
[17:02:46] JoshL: has joined #RubyOnRails
[17:05:15] jxpx777: has joined #RubyOnRails
[17:05:43] batasrki: has joined #RubyOnRails
[17:09:11] roolo_: has joined #RubyOnRails
[17:10:02] x1337807x: has joined #RubyOnRails
[17:10:03] hsps_: has joined #RubyOnRails
[17:10:04] startupality: has joined #RubyOnRails
[17:10:58] bruno-: has joined #RubyOnRails
[17:11:33] towski_: has joined #RubyOnRails
[17:11:51] n1x: has joined #RubyOnRails
[17:12:44] hotpancakes: has joined #RubyOnRails
[17:12:46] beneggett: has joined #RubyOnRails
[17:14:11] nobitanobi: has joined #RubyOnRails
[17:14:34] djbkd: has joined #RubyOnRails
[17:16:29] Moonlight-Angel: has joined #RubyOnRails
[17:17:24] Olork: has joined #RubyOnRails
[17:18:48] DrShoggoth: has joined #RubyOnRails
[17:18:49] jenrzzz: has joined #RubyOnRails
[17:19:39] tubbo: god zsh's vim mode is so god damn inconsistent
[17:20:00] renews: has joined #RubyOnRails
[17:20:20] nonparfumee: has joined #RubyOnRails
[17:20:32] treehug88: got himself is inconsistent
[17:20:39] treehug88: and/or herself
[17:22:04] Pazician: has joined #RubyOnRails
[17:23:06] tubbo: that's not true
[17:23:12] tubbo: god is very consistent. consitently nonexistant.
[17:25:08] krisquigley: has joined #RubyOnRails
[17:25:24] Spami: has joined #RubyOnRails
[17:25:42] maxshelley: has joined #RubyOnRails
[17:26:01] thebatu1: has joined #RubyOnRails
[17:26:38] FCser: has joined #RubyOnRails
[17:29:01] SeanLazer: has joined #RubyOnRails
[17:29:26] nixmaniack: has joined #RubyOnRails
[17:31:56] djbkd: has joined #RubyOnRails
[17:33:08] tcarter1719: has joined #RubyOnRails
[17:34:03] mikecmpbll: has joined #RubyOnRails
[17:34:44] baweaver: has joined #RubyOnRails
[17:35:13] sarink: has joined #RubyOnRails
[17:36:18] RegulationD: has joined #RubyOnRails
[17:37:10] sandstrom: has joined #RubyOnRails
[17:39:27] gaboesquivel: has joined #RubyOnRails
[17:41:46] corehook: has joined #RubyOnRails
[17:44:20] sdwrage: has joined #RubyOnRails
[17:45:05] maxshelley: has joined #RubyOnRails
[17:46:10] arBmind: has joined #RubyOnRails
[17:46:38] nixmaniack: has joined #RubyOnRails
[17:48:04] Sdwrage_: has joined #RubyOnRails
[17:48:13] edwinvdgraaf: has joined #RubyOnRails
[17:51:10] blackmesa: has joined #RubyOnRails
[17:51:11] treehug88: years ago I was a partly line operator (true story) and my name on the system was "lord"
[17:52:10] bamorim: has joined #RubyOnRails
[17:52:12] svoop: has joined #RubyOnRails
[17:52:51] rickmasta: has joined #RubyOnRails
[17:53:18] alfie_max15: has joined #RubyOnRails
[17:53:51] alfie_max15: i have got a quick question
[17:54:06] alfie_max15: I've got my application running on an amazon ec2 instance
[17:54:09] nothingmuch: has joined #RubyOnRails
[17:54:17] rickmasta: has joined #RubyOnRails
[17:54:30] alfie_max15: and want to setup redis server too, is it okk if i set it up within this instance?
[17:56:12] fryguy: alfie_max15: sure
[17:56:16] sinkensabe: has joined #RubyOnRails
[17:56:25] edwinvdgraaf: has joined #RubyOnRails
[17:56:33] tercenya: has joined #RubyOnRails
[17:57:16] tlarevo: has joined #RubyOnRails
[17:57:25] momomomomo: has joined #RubyOnRails
[17:57:51] DaniG2k: has joined #RubyOnRails
[17:58:27] teufelChiCoder: has joined #RubyOnRails
[17:58:34] alfie_max15: But is it better to have it running on a separate server?
[17:58:34] bmalum: has joined #RubyOnRails
[17:58:37] sarink: has joined #RubyOnRails
[17:58:41] alfie_max15: https://github.com/mperham/sidekiq/wiki/Using-Redis#life-in-the-cloud
[17:58:53] alfie_max15: seeing this it seems it could cause some latency issues
[17:59:56] fryguy: alfie_max15: yes it's better on a separate server
[18:00:38] alfie_max15: fryguy, but then i'm getting time out errors when i do so
[18:01:00] DaniG2k: if I have two calls to a db like
[18:01:12] DaniG2k: Article.where(:editors_pick => true); Article.where(:featured => true)
[18:01:27] DaniG2k: how can I combine them in 1 db call and separate the results as two variables?
[18:01:52] DaniG2k: Article.where(:editors_pick => true, :featured => true) seems to return an activerecord relation
[18:02:03] DaniG2k: not sure what the best way to split it is
[18:02:23] batasrki: alfie_max15: that means that the port you're expecting to be open between the aws nodes is actually closed
[18:02:42] batasrki: alfie_max15: ensure that port 6379 is available for access
[18:03:02] alfie_max15: how may i do that?
[18:03:03] DaniG2k: ah wait my bad
[18:03:09] DaniG2k: that finds an intersection
[18:04:04] smathy: DaniG2k, yeah, any combination into a single query using ActiveRecord like that will `AND` the conditions.
[18:05:19] batasrki: alfie_max15: look at security groups
[18:05:43] batasrki: DaniG2k: how would you get these two distinct sets in one query in straight sql?
[18:06:19] smathy: DaniG2k, there's no simple way to do what you want, the best you could do would be to use an `OR` clause, and then order by one or the other field, and then use `group_by` to create two different groups out of the results. But that's basically just going to iterate over the whole array, testing each element.
[18:06:37] smathy: DaniG2k, is each query really *that* expensive?
[18:07:32] mattbillock: has joined #RubyOnRails
[18:07:35] alfie_max15: batasrki, Parameter Group Status??? It says in-sync
[18:07:53] alfie_max15: batasrki, Parameter Group Status??? It says in-sync
[18:08:14] batasrki: alfie_max15: security group != parameter group status
[18:08:26] alfie_max15: ok, let me check
[18:08:47] batasrki: smathy and if it is, shouldn't that be resolved first by DaniG2k?
[18:09:12] smathy: batasrki, yeah, that's much easier to resolve, cough indexes cough
[18:09:31] cac: has joined #RubyOnRails
[18:09:52] diegoviola: so this company has asked me to write some web based bot that takes input from the user and request data from their API, wtf are they trying to do is beyond me?
[18:10:08] batasrki: smathy: would you like some water for that cough?
[18:10:50] smathy: batasrki, no, just indexes :)
[18:10:51] batasrki: diegoviola: correct me if I'm wrong, but isn't that another definition of a website?
[18:11:12] sooli: has joined #RubyOnRails
[18:11:23] diegoviola: batasrki: not sure
[18:11:24] smathy: "web based bot" :)
[18:11:25] SteenJobs: has anyone used best_in_place before?
[18:11:32] alex88: has joined #RubyOnRails
[18:11:40] smathy: SteenJobs, !ask
[18:11:40] helpa: SteenJobs: How to ask good questions and get great answers: http://www.mikeash.com/getting_answers.html
[18:11:50] smathy: Err, not what I wanted.
[18:12:04] smathy: I hate those stupid commands.
[18:12:41] nobitano_: has joined #RubyOnRails
[18:12:50] smathy: Too much to remember :)
[18:12:51] pontiki: has joined #RubyOnRails
[18:12:52] diegoviola: SteenJobs: basically something lik a IRC bot but on the web
[18:13:28] dseitz: has joined #RubyOnRails
[18:13:36] diegoviola: smathy: they're trying to create something like an auto-atendant for their clients
[18:13:50] SteenJobs: there???s a bug it seems: when new lines are created, they???re only seen when the page is refreshed - i used the ajax:success hook however to have the new lines show immediately upon edit, but when the page is refreshed, the text structure changes
[18:14:05] antivert: has joined #RubyOnRails
[18:14:09] renews: has joined #RubyOnRails
[18:14:15] SteenJobs: let???s say it???s hello<br><br><br>smathy, it changes to <br>hello<br><br>smathy<br>
[18:14:17] smathy: diegoviola, generally what defines a bot is that it simulates a human operator in some way. What you're talking about just sounds like a website/page.
[18:15:03] diegoviola: smathy: well, they plan on simulating an operator in some way
[18:15:19] mattbillock: has joined #RubyOnRails
[18:16:34] arpegius: has joined #RubyOnRails
[18:16:49] [H]unt3r: has joined #RubyOnRails
[18:17:34] tubbo: has joined #RubyOnRails
[18:18:22] arpegius: i feel like there must be a javascript lib out there that takes a rails-helpers generated <form> (object[nested_attributes][0][property] syntax) and turn it into JSON? anyone know of something like this?
[18:18:30] diegoviola: smathy: imagine you're talking to a bot over IRC, you ask questions to the bot and the bot finds repsonses through an api or database, they want the same but on the web
[18:18:49] SteenJobs: smathy: in essence, how do i keep the edit made by binding ajax:success with a format change to persist upon a page refresh?
[18:18:51] beneggett: has joined #RubyOnRails
[18:19:08] SteenJobs: ???$('.best_in_place').bind('ajax:success', function(){ this.innerHTML = this.innerHTML.replace(/\n/g, '<br />') });???
[18:20:07] smathy: diegoviola, right, and here on IRC "bot" makes sense, because that program appears the same as any other user on the system.
[18:20:12] ramfjord: has joined #RubyOnRails
[18:20:25] diegoviola: smathy: right
[18:20:26] smathy: diegoviola, it's no big deal, just a weird term to use.
[18:20:30] baweaver: has joined #RubyOnRails
[18:20:30] antivert: hey guys, I'm stuck on this: Undefined method "klass" for nil:NilClass when trying to update https://gist.github.com/anonymous/b74e2b2554c3edd28074
[18:20:51] diegoviola: smathy: I'm not sure how to go in coding this, it's a strange request
[18:20:52] antivert: I have another controller where it works fine, something got screwy on this one
[18:21:10] alfie_max15: has left #RubyOnRails: ("Ex-Chat")
[18:21:18] smathy: diegoviola, all you're really talking about is a web page that has some sort of natural language processing, or some rich search syntax perhaps, and it parses that and then makes API calls based on that input, right?
[18:23:21] hardtail: does anyone know if Fedora is a good platform for Rails development?
[18:24:19] diegoviola: do you have any idea where how can I start with this?
[18:24:40] sinkensabe: has joined #RubyOnRails
[18:24:43] arpegius: i think this is what i was looking for???
[18:24:44] arpegius: https://github.com/maxatwork/form2js
[18:24:55] hotpancakes: has joined #RubyOnRails
[18:25:22] Pharaoh2: has joined #RubyOnRails
[18:26:45] tubbo: hardtail: sure why not :)
[18:27:02] workmad3: has joined #RubyOnRails
[18:27:25] SeanLazer: has joined #RubyOnRails
[18:27:29] Hates_: has joined #RubyOnRails
[18:28:00] ramfjord: has joined #RubyOnRails
[18:28:31] batasrki: hardtail: why wouldn't it be?
[18:28:52] batasrki: arpegius: I'm confused, why do you need something like this?
[18:29:00] djbkd: has joined #RubyOnRails
[18:29:30] arpegius: @batasrki is there an easier way to turn a form with nested objects to JSON for an ajax post?
[18:29:31] smathy: antivert, add your model code for Simple to your gist.
[18:29:58] smathy: diegoviola, well, have they given you examples of the sorts of queries they want to submit?
[18:30:24] hardtail: batasrki I am just new to Linux and do not know what to look for. Currently on OSX but I am trying to make the switch.
[18:30:28] hardtail: tubbo thank you
[18:30:31] Valien: has joined #RubyOnRails
[18:30:40] smathy: hardtail, use whichever distro you're most familiar with.
[18:30:54] tubbo: hardtail: yeah, i'm on OS X too and i've been thinking of switching to native linux for a number of reasons
[18:30:59] tubbo: most importantly, native container support
[18:31:16] Olork: has joined #RubyOnRails
[18:31:33] hardtail: tubbo my laptop is a macbook pro but it is dying, so I have a surface pro 3 that I am going to test this with to see how it goes and possibly replace the mbp with
[18:32:05] hardtail: smathy I have limited distro exp, primarily with ubuntu. was advised to try something else ^_^
[18:32:12] hakunin: has joined #RubyOnRails
[18:32:13] sinkensabe: has joined #RubyOnRails
[18:32:20] RegulationD: has joined #RubyOnRails
[18:32:52] towski_: has joined #RubyOnRails
[18:33:23] sonOfRa: has joined #RubyOnRails
[18:33:29] antivert: smathy: sure one sec
[18:34:11] smathy: hardtail, I use ubuntu and always have and I'd recommend it to anyone who didn't have specific experience with another distro.
[18:34:20] smathy: hardtail, why did whomever advised against it do so?
[18:34:50] smathy: diegoviola, so is it just a rich syntax, or do they really want an AI system to process natural language>
[18:35:10] hahuang65: has joined #RubyOnRails
[18:35:17] batasrki: smathy: I'm going to go with "systemd is root of all evil" as the answer to your question posed to hardtail, :D
[18:35:27] diegoviola: smathy: they want some AI thing
[18:35:53] tubbo: ACTION has found that typically, people will diss or recommend certain distros based on an arbitrary feature/bug that will never be encountered by the person who's actually using the machine
[18:36:06] tubbo: like for the systemd thing...as if some linux newbie even gives a shit about that
[18:36:19] tubbo: who cares? how do i start daemons, that's all i need to know to get work done. :P
[18:36:49] jkwood: I think the main problem most non-Ubuntu users have with it is that the Ubuntu folks have major not-invented-here syndrome.
[18:36:55] tubbo: (not that it's the case here)
[18:37:13] jkwood: If they do use other people's stuff, they proceed to fiddle with it in strange ways.
[18:37:24] hardtail: smathy, I think it was personal preference on their part with not liking Unity. I have always enjoyed Ubuntu. I have been learning more about terminal and mostly using the commands on OSX.
[18:37:28] smathy: tubbo, yeah, me too.
[18:37:50] rhizome: diegoviola: that sounds essentially what ask jeeves was
[18:38:04] tubbo: jkwood: i think it's less about ubuntu committing logical fallacies and more about a practical approach to development
[18:38:21] smathy: My main point here was that hardtail should know/ask why someone advises against something before just deciding to abandon something he's familiar with. /cc tubbo jkwood
[18:38:32] bmurt: has joined #RubyOnRails
[18:38:47] tubbo: jkwood: let's say you are leading GNOME, and i don't like something you released. *my* product shouldn't suffer because *you* can't get off your ass and fix something, right?
[18:38:47] jkwood: smathy: A fair point, for sure.
[18:38:58] smathy: diegoviola, well, if you've not done AI or NLP before, then you should hire someone or punt.
[18:39:23] tubbo: i'm all for reusing software when you can, but when you're a company like apple or even canonical, you can't afford to make mistakes that you can't control.
[18:39:43] hardtail: smathy I am sort of unbiased because I do not have much experience with Linux. I am eager to test out multiple distros though and see which I prefer.
[18:39:48] tubbo: for the rest of us, NIH is a real thing. but when you're a company that's so large you have your own code ecosystem/frameworks/languages/etc....it doesn't apply anymore.
[18:40:07] tubbo: people used to (still?) say these things about redhat.
[18:40:16] sdwrage: has joined #RubyOnRails
[18:40:19] smathy: hardtail, fair enough, so then any distro will run Rails.
[18:40:47] rhizome: unity isn't ubuntu. you can run xfce or any other WM/DE on ubuntu
[18:41:00] antivert: smathy: alright one sec, I've narrowed it down to which association is causing it. it's weirx
[18:41:49] batasrki: hardtail: you can develop on OSX and deploy to Ubuntu. The Ubuntu server is unlikely to have Unity installed, which makes your colleague's argument irrelevant
[18:42:26] Surt_Q: has joined #RubyOnRails
[18:42:31] hardtail: I am basically interested in getting comfortable with Linux because I may not replace my laptop with an Apple laptop. With no OSX I will need to develop on Linux.
[18:42:52] sandstrom: has joined #RubyOnRails
[18:43:02] djbkd: has joined #RubyOnRails
[18:43:13] Axsuul: has joined #RubyOnRails
[18:43:19] batasrki: hardtail: right, so try out a few distros, no prob. Ubuntu can be run without Unity, that's how one of my machines is set up
[18:43:37] Scripore: has joined #RubyOnRails
[18:43:56] hardtail: batasrki, okay. thank you very much
[18:44:00] annlewis: has joined #RubyOnRails
[18:44:24] towski_: has joined #RubyOnRails
[18:44:36] tubbo: hardtail: if you can, consider using KVM and trying each OS out as a virtual machine
[18:45:23] antivert: smathy: https://gist.github.com/anonymous/3370934b7b6dfff3d941
[18:45:40] antivert: I've got two models that both inherit from the main model. One works, one doesn't
[18:45:53] diegoviola: smathy: the parsing stuff doesn't sound too complicated, I'm not sure how I'd go into designing the GUI though
[18:46:01] Frem: has joined #RubyOnRails
[18:46:02] hardtail: tubbo I will look into this, thanks
[18:46:08] antivert: and afaik the one stopped working without code changes, but there were db changes
[18:47:13] hahuang65: has joined #RubyOnRails
[18:47:38] diegoviola: I'd probably need some JS for this crap too, no?
[18:47:52] antivert: it turns out it's not the image that's the problem, it's the attribute_values attributes it's trying to update that causes it
[18:48:00] smathy: antivert, why are the indexes for attribute_values_attributes messed up? 3 and 4 ?
[18:48:05] smathy: antivert, should be zero based.
[18:48:10] antivert: smathy: hmm let me check
[18:48:13] jenrzzz: has joined #RubyOnRails
[18:49:12] sniperh4x0r: has joined #RubyOnRails
[18:49:35] srinidhi: has joined #RubyOnRails
[18:50:49] batasrki: diegoviola: I'd get the core nailed first
[18:50:55] workmad3: has joined #RubyOnRails
[18:51:05] batasrki: diegoviola: receive an input, do magic, ...., profit?
[18:52:03] antivert: smathy: ah that could be the problem! it would explain why it didn't come up before, I'll fix that code and see what happens
[18:52:10] hakunin: has joined #RubyOnRails
[18:52:49] Pazician: has joined #RubyOnRails
[18:53:18] sinkensabe: has joined #RubyOnRails
[18:54:28] corehook: has joined #RubyOnRails
[18:54:41] cirn0: has joined #RubyOnRails
[18:56:12] stamina: has joined #RubyOnRails
[18:57:10] workmad3: has joined #RubyOnRails
[18:58:23] simplyianm: has joined #RubyOnRails
[18:58:52] uris: has joined #RubyOnRails
[19:00:42] erts: has joined #RubyOnRails
[19:01:34] smathy: diegoviola, I can't tell you how many people before you have thought that NLP didn't sound too complicated, but it's great if the UI is really the hardest part.
[19:03:06] griffindy: has joined #RubyOnRails
[19:03:13] antivert: smathy: that array is coming from the frontend, it's a dumb javascript reason why it isn't zero-based, thanks I'll fix it. that must be it
[19:03:17] diegoviola: smathy: well, this sounds really stupid
[19:03:34] diegoviola: smathy: they could save a lot of time by just entering some user code in a form and then find the relevant info, instead of going through this stupid shit
[19:04:24] cirn0: has joined #RubyOnRails
[19:04:28] smathy: antivert, gotcha, I'm not sure because the error is weird, but I'd definitely start there.
[19:04:57] antivert: yep, it's the only thing that's different between the working and non-working model
[19:05:10] antivert: and it makes sense, that's a db change only that would cause the bug
[19:06:50] antivert: I appreciate your help sir
[19:07:39] l0oky: has joined #RubyOnRails
[19:08:04] smathy: diegoviola, yeah, there's a reason why things like NLP are reserved for really heavily used systems like Siri, google search, etc., to get it even close to usable is prohibitively expensive unless you happen to be in one of those tiny niches like iOS or google.
[19:08:17] GPrime: has joined #RubyOnRails
[19:08:17] renews: has joined #RubyOnRails
[19:08:28] smathy: antivert, you're welcome.
[19:09:54] diegoviola: smathy: those people asking me this really deserve death
[19:10:41] rickmasta: has joined #RubyOnRails
[19:10:41] diegoviola: I will not write this crap
[19:11:12] smathy: diegoviola, seems extreme.
[19:11:20] diegoviola: smathy: what seems?
[19:11:28] smathy: Deserving death.
[19:11:34] diegoviola: sorry for saying this
[19:12:00] smathy: diegoviola, this is client work?
[19:13:20] cirn0: has joined #RubyOnRails
[19:13:22] diegoviola: more like employment, but I don't plan to stay
[19:14:07] krisquigley: has joined #RubyOnRails
[19:14:16] Papierkorb: What's the easiest way to let my rails app handle 404 errors?
[19:14:35] hakunin: has joined #RubyOnRails
[19:14:49] netzfisch: has joined #RubyOnRails
[19:14:58] Papierkorb: I was thinking about just having a route like "match '/(*not_found_path)', via: :all" at the bottom of routes.rb
[19:15:43] diegoviola: sorry I don't think my employer should die or anyone else, I just think what they ask me to do is stupid but I shouldn't have reacted that way
[19:16:05] corehook: has joined #RubyOnRails
[19:16:27] Papierkorb: Err, just pretend I didn't write the parantheses in the match path
[19:17:12] tubbo: Papierkorb: there's a few different ways. by default, rails will load public/404.html if there's nothing handling the 404
[19:17:13] edgarjs: has joined #RubyOnRails
[19:17:14] antivert: smathy: unfortunately, that wasn't the problem :/
[19:17:22] edwinvdgraaf: has joined #RubyOnRails
[19:17:27] antivert: now what! hrmph
[19:17:32] Papierkorb: tubbo: Yeah, but I want it to run inside my app
[19:17:44] tubbo: Papierkorb: you can also use rescue_from to catch ActiveRecord::RecordNotFound exceptions and render an action
[19:17:50] nertzy2: has joined #RubyOnRails
[19:17:56] siaw23: has joined #RubyOnRails
[19:18:12] tubbo: i typically sync up the name of the action with the status symbol
[19:18:13] cirn0: has joined #RubyOnRails
[19:18:13] siaw23: can someone please tell me why my @client_ip variable is not showing https://gist.github.com/siaw23/764e3a930758d45ed0f3
[19:18:19] Papierkorb: tubbo: I did that in my ApplicationController, but no dice, it's just not used it seems. I still see the default 404 help page in development environment
[19:18:20] tubbo: so :forbidden, :not_found, :unauthorized, etc.
[19:18:23] tubbo: they resolve to HTTP status codes
[19:18:31] tubbo: Papierkorb: !gist or it didn't happen
[19:18:31] helpa: Papierkorb: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[19:19:28] antivert: I think I'll go debug the part of activerecord that's failing
[19:19:42] rickmasta: has joined #RubyOnRails
[19:20:17] Papierkorb: tubbo: https://gist.github.com/Papierkorb/f310e6efe5d1d6e8938c
[19:20:38] bin_005: has joined #RubyOnRails
[19:21:56] tubbo: Papierkorb: definitely don't do `rescue_from Exception, with: ...`
[19:22:07] rhizome: topic needs update http://weblog.rubyonrails.org/2015/6/16/Rails-3-2-22-4-1-11-and-4-2-2-have-been-released-and-more/
[19:22:22] tubbo: Papierkorb: that will rescue every exception ever, including stuff like NoMemoryError and SystemStackError
[19:22:28] tubbo: which are errors you probably want to know about
[19:22:28] Papierkorb: tubbo: How else should I catch otherwise catch uncaught exceptions outside the dev env?
[19:23:18] Papierkorb: tubbo: I want to know about all of them and thus ease tracking for me. And I want to show the user a more decent 500 page with the applications' layout
[19:23:37] tubbo: Papierkorb: this actually hides them from your view
[19:23:44] hakunin: has joined #RubyOnRails
[19:23:48] SteenJobs: if a user has many events (wedding, date, concert, work), and each of those events have different sub options (wedding: black tie, semi-fomal, casual), what???s the best way to structure the events table?
[19:24:03] tubbo: Papierkorb: let's say this app is deployed in production, and i cause something to happen which raises an exception. how do you know about it?
[19:24:21] phat4life: tubbo: honeybadger?
[19:24:26] Papierkorb: tubbo: because of the logged data and the complete description inside the DB from the admin view
[19:24:27] sinkensabe: has joined #RubyOnRails
[19:24:40] tubbo: Papierkorb: wouldn't it be better to let the app throw the exception and catch it in an error handler like errbit, airbrake, or the aforementioned honeybadger?
[19:24:45] rhizome: i use exception_notification
[19:24:51] tubbo: or exception_notification
[19:24:54] Papierkorb: tubbo: I don't know of any of those
[19:25:18] Papierkorb: It's just that I'm fine with having 5-10 lines for something instead of adding another gem which does things I don't completely understand
[19:25:35] tubbo: Papierkorb: get learning. you're reinventing the wheel here. but back to what i was going to say earlier...if you ever want to rescue exceptions you should use StandardError since it traps mostly everything you would want to know about.
[19:25:36] rhizome: well it's not like you're an expert on rescue either :P
[19:26:21] cirn0: has joined #RubyOnRails
[19:26:25] phat4life: if you rescue exception, you must re raise it
[19:27:00] tubbo: Papierkorb: also, in `rescue_from Exception, with: :error_page` you are attempting to call a method that has arguments defined, but you're not passing any arguments
[19:27:22] Papierkorb: tubbo: A quick test showed me that the first argument passed is the exception itself
[19:27:30] tubbo: oh cool :)
[19:28:05] podman: has joined #RubyOnRails
[19:28:25] tubbo: Papierkorb: hey btw what happens in your app if your database crashes? db throws an exception, your app handles it, it gets to the error page, attempts to write into the db, throws an exception, ad nauseum...
[19:28:34] Papierkorb: what the hell, honeybadger pumps data across the internet?! *next*
[19:28:53] Papierkorb: tubbo: In that case, let's just pray the HDD is not full and the log is still written
[19:29:09] tubbo: Papierkorb: prayer gets you nowhere because god doesn't exist.
[19:29:10] Papierkorb: if both fail, my service is fucked anyway I guess
[19:29:13] tubbo: so you're fucked
[19:29:22] tubbo: yeah but the worst part is your service is dead, and you don't know about it
[19:29:32] rhizome: if disk is full you still have ram and network
[19:29:37] tubbo: so you're sitting here la dee da dee da working along and then suddenly your friend IMs you saying "hey your service has been down for 3 days"
[19:29:41] jxpx777: has joined #RubyOnRails
[19:29:57] chelbs: has joined #RubyOnRails
[19:30:01] phat4life: Papierkorb: its in the cloud tho nothign bad can happen
[19:30:07] tubbo: instead of praying i'd rather know.
[19:30:17] tubbo: Papierkorb: you can use Errbit so that all errors are sent in your own network, because you run your own Errbit serer
[19:30:18] rhizome: that's true. the cloud makes all of this irrelevant
[19:30:40] rhizome: might as well be complaining about bent punch cards
[19:30:49] phat4life: i mean, you can use third party services to store your data, and still be compliant
[19:31:06] Papierkorb: phat4life: as a German service I already have to seriously make sure not to store sensitive data and shit, sending internal data through the NSA net to some random other service won't make it easier ..
[19:31:19] k4nd4lf: has joined #RubyOnRails
[19:31:22] sypheren: has joined #RubyOnRails
[19:31:22] phat4life: as long as its encrypted i wouldn't worry abou it
[19:31:25] alex88: has joined #RubyOnRails
[19:31:42] phat4life: the nsa, to my knowledge, can't crack 4096bit rsa
[19:32:17] hakunin: has joined #RubyOnRails
[19:32:21] Papierkorb: phat4life: So, where's the key for the encryption stored? Ooohh .. - I'm really not a fan of stuff like that.
[19:32:59] phat4life: i mean, prviate/public keys are used all the time and are secure
[19:33:03] tubbo: Papierkorb: https://github.com/errbit/errbit
[19:33:09] phat4life: if you private key is compromised you have other problems
[19:33:13] tubbo: just use the airbrake gem to send to it
[19:33:38] benhuda: has joined #RubyOnRails
[19:33:46] Papierkorb: I'm planning on using a 3 lines bash script with netcat to pipe the logs into a file out of reach of anyone who managed to break into the service. If there's a even simpler solution, I'm all ears
[19:33:54] tubbo: gem 'airbrake'
[19:33:58] tubbo: <set up errbit server>
[19:34:05] rhizome: out of reach of hackers is a good place to put things
[19:34:10] tubbo: that's what we do here
[19:34:15] teufelChiCoder: has joined #RubyOnRails
[19:34:26] tubbo: the errbit server is isolated to only in the LAN here
[19:35:20] rhizome: hacks never cross the wire so you're good :P
[19:35:40] boom1992: has joined #RubyOnRails
[19:36:13] SteenJobs: actually there???s an additional level of categories. events have (1) details, (2) who you???re going with, (3) more but different details???, and each of those things have multiple hard coded choices. what???s best practice for the db structure?
[19:36:15] Papierkorb: rhizome: it's impossible to make it perfect. Instead, I'll make a best-effort attempt.
[19:36:30] rhizome: we don't disagree
[19:36:47] phat4life: just store your rsa keys in a safe
[19:36:48] a1fa: has joined #RubyOnRails
[19:36:55] phat4life: a physical safe
[19:37:15] greengriminal: has joined #RubyOnRails
[19:37:19] Papierkorb: phat4life: .. I do that.
[19:38:07] a1fa: i have a "complex" sql query i need to run it involves two tables via left join.
[19:39:09] a1fa: should i use scope or Joins?
[19:39:39] cirn0_: has joined #RubyOnRails
[19:39:43] phat4life: a1fa: maybe use arel??
[19:39:47] hakunin: has joined #RubyOnRails
[19:40:10] chelbs: has joined #RubyOnRails
[19:40:13] rhizome: scopes and joins are not mutually exclusive
[19:41:23] phat4life: we have some realy complex joins, like 4-5 tables in a single query, we just made a query class and wrote raw sql
[19:41:34] erictheise_: has joined #RubyOnRails
[19:41:53] jgt: has joined #RubyOnRails
[19:42:01] dopie: anyone here also good with sass?
[19:42:09] a1fa: phat4life: that almost feels like cheating :)
[19:42:12] cac: has joined #RubyOnRails
[19:42:29] phat4life: a1fa: yeah but it was signficanly faster to remove the ruby abstraction layer
[19:42:30] doodlehaus: has joined #RubyOnRails
[19:42:37] a1fa: but that would probably be the easiest thing to do
[19:43:14] a1fa: i'm going to try it with Find first
[19:43:26] ProLoser: has joined #RubyOnRails
[19:43:29] phat4life: arel is probably a better bet
[19:43:42] fryguy: haha 4-5 tables, you have a long ways to go
[19:43:42] a1fa: if that does not yield success, i'll just opt for raw swl
[19:44:08] phat4life: fryguy: i lied, it is 9 tables
[19:44:33] phat4life: of the most terrifying schema i have ever seen
[19:45:20] siaw23: i have installed a gem using `bundle` but when I load a page from my rails app I get `cannot load such file -- geocoder` what can i do to fix it?
[19:45:42] momomomomo: has joined #RubyOnRails
[19:46:00] fryguy: siaw23: did you restart your rails server after installing
[19:46:07] siaw23: fryguy: no
[19:46:11] fryguy: siaw23: you need to
[19:46:14] siaw23: fryguy: i???m doing it now
[19:46:51] siaw23: fryguy: thanks it works :)
[19:46:53] arup_r: has joined #RubyOnRails
[19:47:52] Papierkorb: Is it btw possible to automatically inject the user id to all log messages?
[19:48:01] cirn0: has joined #RubyOnRails
[19:48:06] m0r0n: has joined #RubyOnRails
[19:48:12] diegoviola: lol this company is asking me to write php code now... I wonder what's next
[19:48:26] Papierkorb: So when I do "logger.info 'foo'" it writes "[USER 123] foo" to the log?
[19:48:55] rhizome: charge double
[19:49:06] fryguy: Papierkorb: you'll want to look at log formatters and probably write a custom one
[19:49:32] qwertme: has joined #RubyOnRails
[19:49:52] eggoez: has joined #RubyOnRails
[19:50:24] arup_r: I am getting error https://gist.github.com/aruprakshit/d41eea5d504dd21577a0 while trying to run cap -T ....... after doing some google.. got to know one fix -- https://github.com/everzet/capifony/issues/495#issuecomment-40689039
[19:51:09] arup_r: Did the commenter mean on roles(:app) do instead of on roles(:web) do ?
[19:51:17] erictheise_: has joined #RubyOnRails
[19:51:30] arup_r: That's what I am not getting it... Any clue
[19:51:53] Papierkorb: fryguy: thanks
[19:52:10] ndrei: has joined #RubyOnRails
[19:53:16] siaw23: i have a field that looks like this: `<%= f.text_field :country %>` how do i have rails fill that with some text that i define once the form load?
[19:53:37] fryguy: siaw23: add a value parameter
[19:53:51] siaw23: fryguy: how?
[19:53:58] fryguy: value: "whatever"
[19:54:18] fryguy: optionally, fill out the value of the country attribute on whatever you specified in fields_for
[19:54:26] fryguy: or form_for, whichever you are using
[19:54:49] tubbo: has joined #RubyOnRails
[19:55:20] jgt: has joined #RubyOnRails
[19:55:28] siaw23: fryguy: like this `<%= f.text_field :country, :value "sometext" %>`?
[19:55:42] siaw23: forgot the arrow
[19:55:55] fryguy: well, you should be using rails2 style hashes, so value: "whatever"
[19:56:02] fryguy: but yah, the arrow way should work as well
[19:56:03] Rubie: has joined #RubyOnRails
[19:56:18] beneggett: has joined #RubyOnRails
[19:56:30] siaw23: i used <%= f.text_field :country, :value => "#{@country}" %>
[19:57:29] baweaver: has joined #RubyOnRails
[19:58:08] rhizome: you don't need to use interpolation
[19:58:32] DysonReturns: has joined #RubyOnRails
[19:58:55] cirn0: has joined #RubyOnRails
[20:00:40] dopie: https://gist.github.com/staycreativedesign/3ede9fafa5fcd39c3a86
[20:00:57] corehook: has joined #RubyOnRails
[20:01:00] ramfjord: has joined #RubyOnRails
[20:01:57] baweaver: has joined #RubyOnRails
[20:02:31] renews: has joined #RubyOnRails
[20:03:06] kadoppe: has joined #RubyOnRails
[20:03:35] cornerma1: has joined #RubyOnRails
[20:03:58] blahwoop: has joined #RubyOnRails
[20:04:27] Lightsword: has joined #RubyOnRails
[20:08:14] corehook: has joined #RubyOnRails
[20:09:38] bmalum: has joined #RubyOnRails
[20:10:03] hakunin: has joined #RubyOnRails
[20:12:27] bendangelo: has joined #RubyOnRails
[20:13:03] cirn0_: has joined #RubyOnRails
[20:14:15] mrbubbles: has joined #RubyOnRails
[20:14:33] mrbubbles: I???m trying to use Rails.logger.debug in a rake task
[20:14:48] mrbubbles: It works fine on development but when I try and deploy with capistrano I get the error: NoMethodError: undefined method `debug' for nil:NilClass
[20:14:52] mrbubbles: CAn anyone help please?
[20:15:28] ogpastaling: has joined #RubyOnRails
[20:16:29] slash_nick: mrbubbles: Rails.logger returns nil, so you can't call debug... you don't have the logger, maybe because you have not invoked rails... can you share your rake task?
[20:17:06] tjbiddle: has joined #RubyOnRails
[20:17:28] mrbubbles: slash_nick: it???s basically: https://gist.github.com/joeczucha/335d0929e6d444a1ffbc
[20:17:35] tweeeaks: has joined #RubyOnRails
[20:17:48] hakunin: has joined #RubyOnRails
[20:17:50] mrbubbles: I???ve truncated it for brevity
[20:19:38] slash_nick: mrbubbles: if you call Rails.logger within the task block, does it work?
[20:19:45] jenrzzz_: has joined #RubyOnRails
[20:20:20] nonparfumee: has joined #RubyOnRails
[20:21:16] yfeldblum: has joined #RubyOnRails
[20:21:21] mrbubbles: slash_nick: ah, yes it does
[20:21:52] slash_nick: mrbubbles: what if you move the `def` to below the task block?
[20:22:24] a1fa: NoMethodError (undefined method `Find'
[20:22:35] a1fa: does this mean i didnt link two models?
[20:22:47] a1fa: trying to access another models data
[20:23:02] a1fa: Model.Find(..)
[20:23:08] Hates_: lowercase f
[20:23:09] slash_nick: a1fa: methods must begin with lower case letters... so @some_object.find(...), not @some_object.Find(...)
[20:23:35] ogpastal_: has joined #RubyOnRails
[20:23:47] slash_nick: whoops... good thing classes are objects, or i'd be wrong ^.... SomeModel.find(..)
[20:25:13] dopie: Maybe one of you guys can help me here with this sass problem I'm having , Im trying to create a mixing thats called margin and it takes 2 variables $direction and $size, $direction is top bottom left right and then the size is whatever size and format how can I do this mixin ?
[20:25:20] phat4life: a1fa: you can always do my_obj.public_methods.grep /find/
[20:25:30] phat4life: replace /find/ withthat regex
[20:25:44] rhizome: ducking mozilla
[20:26:38] jenrzzz: has joined #RubyOnRails
[20:26:54] rhizome: dopie: that doesn't seem like a very good use case when margin-left etc. exist
[20:27:22] dopie: is it possible?!@
[20:27:27] a1fa: thats what i have
[20:27:32] rhizome: don't know, don't care
[20:27:45] a1fa: @models = Model.Find(..)
[20:28:01] a1fa: but pulling it outside of a different controller
[20:28:02] Hates_: a1fa: you have an uppercase F
[20:28:43] sinkensabe: has joined #RubyOnRails
[20:28:55] JoshL_: has joined #RubyOnRails
[20:29:04] Hates_: dopie: http://sass-lang.com/documentation/file.SASS_REFERENCE.html#interpolation_
[20:29:20] Hates_: dopie: but I don't see why you'd use a mixin for what you want to do
[20:29:57] dopie: because some things require margins and different size margins
[20:30:10] Hates_: dopie: yeah but how is a mixing better than margin-left: 10px ?
[20:30:33] dopie: its shorter
[20:30:37] a1fa: i now dont get an error ;( and the app is not starting
[20:31:56] a1fa: in find( can you have multiple where: ..., where: ... )
[20:31:58] Hates_: dopie: @include margin('left', 10px); seems longer than margin-left: 10px;
[20:32:27] x1337807x: has joined #RubyOnRails
[20:32:51] dopie: Hates_, why would I need an include why can't i just do a +margin(left, 10px)
[20:33:06] slash_nick: mrbubbles: that's kind of weird... you can't even do `def log(logger, message); logger.warn(message); end`
[20:33:49] Hates_: dopie: ahhh sorry, I assumed scss
[20:34:38] Hates_: dopie: each to their own, but I don't see a benefit hiding standard css behind a mixin
[20:35:03] jenrzzz: has joined #RubyOnRails
[20:35:14] pontiki: has joined #RubyOnRails
[20:35:38] djbkd: has joined #RubyOnRails
[20:35:40] dopie: Hates can you help me do that sass I'm struggling with the sassmeister here
[20:35:45] rhizome: it just doesn't seem to enhance reuse at all, just an alternate syntax for the same thing
[20:35:52] doodlehaus: has joined #RubyOnRails
[20:36:09] dopie: rhizome, isn't quicker better?!
[20:36:13] rhizome: how is it quicker?
[20:36:29] djbkd: has joined #RubyOnRails
[20:37:16] eddie_v9: how can i get rid of the label in the select builder
[20:37:34] rhizome: the what in the who
[20:37:36] dopie: its quicker by 1
[20:37:49] rhizome: see how silly it sounds now?
[20:37:59] toretore: has joined #RubyOnRails
[20:37:59] dopie: sounds a bit dopie
[20:38:21] rhizome: if you're just looking for an excuse to use sass features, there are better outlets
[20:39:27] jgpawletko: has joined #RubyOnRails
[20:39:57] dopie: rofl... so my pull(left) implementation isn that good either huh?
[20:40:26] diegoviola: I'm not very happy at this company, they treat the employees like shit, should I tell this to the manager?
[20:41:07] rhizome: dopie: pull is a bootstrap idiom or something, right?
[20:41:11] baweaver: has joined #RubyOnRails
[20:41:40] momomomomo: has joined #RubyOnRails
[20:44:33] __butch__: has joined #RubyOnRails
[20:45:20] fatephd: has joined #RubyOnRails
[20:45:24] ProLoser: has joined #RubyOnRails
[20:45:56] workmad3: has joined #RubyOnRails
[20:46:06] ght: Question: Suddenly, and for no apparent reason, my development rails site is perma-caching my coffeescript. I'm accessing the site in FireFox using firebug with cache disabled, the browser is set to clear all cache on exit, and no matter if I kill the tab or kill the browser and reload, the coffeescript is not updating.
[20:46:19] ght: I've tried Rails.cache.clear from rails console, no effect.
[20:46:28] ght: It just suddenly started doing this.
[20:46:42] nottombrown: has joined #RubyOnRails
[20:47:00] solars: has joined #RubyOnRails
[20:47:06] ght: Anyone seen such behavior? The host is CentOS 7 x64, the Rails version is 4.2.1, the Ruby version is 2.2.1
[20:47:34] ght: Using apache 2.2.15 with passenger 5.0.8.
[20:47:58] phat4life: are you compiling assets in public somehow?
[20:48:07] DLSteve: has joined #RubyOnRails
[20:48:50] slash_nick: diegoviola: it's tough... one the one hand, you should be able to speak up... on the other hand, will that manager be able to affect the things you have a problem with? is he/she responsible for those things?... sometimes it's better just to remain positive while you look for other options. may be that your manager hates it, too. you two start complaining together and you're both a little *more* miserable.
[20:48:53] ght: Even cycling httpd is having no effect.
[20:48:59] ght: phat4life: certianly shouldn't be.
[20:49:34] ght: config.action_controller.perform_caching = false is set in development.rb
[20:49:50] fryguy: ght: is there anything in /public in your source tree
[20:49:55] fryguy: that might be affecting it
[20:50:11] fryguy: did you recently move your home directory to nfs or have any weird time/date issues with file access time
[20:50:21] fryguy: remove atime from your fstab or anything like that
[20:50:32] diegoviola: slash_nick: this manager is higly disrespecful, he calls me immigrant, etc, and not by my name
[20:50:33] smathy: ght, sounds like you've run assets:precompile at some point and not cleared it out.
[20:50:37] diegoviola: it's getting really annoying
[20:50:41] ght: nothing in mysite/public, only the stock 404 422 and 500.html, favicon.ico, and robots.txt
[20:50:44] fryguy: diegoviola: so go get a new job
[20:50:50] trollga: has joined #RubyOnRails
[20:50:52] hnanon: has joined #RubyOnRails
[20:51:01] slash_nick: diegoviola: that's despicable :/
[20:51:07] smathy: ght, rake assets:clobber
[20:51:15] diegoviola: slash_nick: indeed
[20:51:15] ght: smathy: unless I had a stroke, I haven't done that, but say I wanted to clear those compiled assets, how would one go about that?
[20:51:20] ght: smathy: trying that now, thank you.
[20:51:34] smathy: ght, other thing, just for giggles, `spring stop`
[20:51:34] diegoviola: should I tell him that I have a name? or no need to discuss with a moron like this?
[20:51:41] hnanon: Can I do the following to update an attribute to a nil value: premier_branded.update(amount: 10, status: nil)
[20:51:57] fatephd: For RVM and jruby 1.7.19
[20:51:58] fatephd: What tools are recommended for debugging?
[20:51:58] fatephd: pry? something else
[20:51:58] fatephd: pry seems to be fine, but pry-nav blows up for me.
[20:52:27] fatephd: hnanon: you want to .update_attributes(amount: 10, status: nil)
[20:53:21] Etriaph: has joined #RubyOnRails
[20:54:08] hnanon: Doesn't .update worj in Rails 4?
[20:54:22] ght: Christ, my cheese has slid off my cracker
[20:54:37] ght: It was because I backed up the legacy coffeescript to /assets/backups
[20:54:45] ght: and the require_tree directive was presumably loading that asset
[20:54:51] ght: Thanks for the help smathy.
[20:55:16] slash_nick: diegoviola: i'd hate to tell you to just put up with it... what would people normally do? confront the manager, notify HR, consult a lawyer?... before starting any of that, I'd start looking for a new job
[20:55:28] smathy: ght, heh, I didn't suggest that :) But glad you nailed it.
[20:55:32] jenrzzz: has joined #RubyOnRails
[20:55:41] Etriaph: Does anyone know if there's a channel where bootstrap-sass is supported?
[20:56:05] bronson: has joined #RubyOnRails
[20:56:10] diegoviola: slash_nick: I don't need a new job, I'm perfectly fine with freelance and I've been fine with that for over 2 years, if this moron manager thinks I need this job too much to disrespect me he is wrong
[20:56:31] rhizome: tell him how you'd like to be addressed
[20:56:36] diegoviola: in fact, I've been earning more with freelance than what I'm making at this shitty job
[20:56:41] renews: has joined #RubyOnRails
[20:56:51] diegoviola: I won't take his shit lightly
[20:57:00] diegoviola: I'm confronting him today before I go home
[20:57:01] rhizome: take it lightly. be diplomatic, but firm
[20:57:34] rhizome: in the US this would veer towards creating a hostile work environment. not sure if there are laws for that there.
[20:57:35] smathy: diegoviola, where is this job / you?
[20:57:40] diegoviola: smathy: Brazil
[20:58:01] diegoviola: but the "where" part doesn't have anything to do with this
[20:58:04] diegoviola: there are jerks everywhwere
[20:58:52] smathy: diegoviola, well, it has a lot to do with your legal options, which was why I was asking.
[20:59:28] Etriaph: diegoviola: I would state plainly, but politely, how you wish to be addressed and treated; if that statement is met with hostility or any kind of disrespect, if it were me I would quit in that instant.
[21:00:10] boom1992: has joined #RubyOnRails
[21:00:18] Etriaph: diegoviola: No job is worth pain, ever, at all.
[21:00:20] slash_nick: Etriaph: I'd want to send resignation to my manager's superior in that case...
[21:00:30] sniperh4x0r: Yo guys, I want to start busting out rails apps and want to do some freelance stuff. Anyone know of a place or site that allows newbie rails devs to work on projects?
[21:00:38] bamorim: has joined #RubyOnRails
[21:00:47] GPrime: has joined #RubyOnRails
[21:00:47] Etriaph: slash_nick: If you don't make headway with your manager, then yes, that's a keen move too.
[21:01:08] rickmasta: has joined #RubyOnRails
[21:01:16] Etriaph: sniperh4x0r: Build an OSS project yourself and put it out on Github
[21:01:37] Etriaph: sniperh4x0r: Or fork someone's and add to it.
[21:02:00] nym: has joined #RubyOnRails
[21:02:09] rhizome: bust out some dank appz
[21:02:09] sniperh4x0r: Etriaph: I honestly have 0 creative ability haha
[21:02:20] sniperh4x0r: and most of the stuff I find fun would probably look bad to clients
[21:02:25] rhizome: sounds like you have more learning to do
[21:02:26] sniperh4x0r: I'd probably make something with gaming or something
[21:02:37] Etriaph: sniperh4x0r: I can't design worth shit, I use bootstrap LOL
[21:02:55] krisquigley: has joined #RubyOnRails
[21:03:30] Etriaph: ACTION is also blue-green color blind.
[21:03:44] sniperh4x0r: I also like having someone kick my butt and give me a challenge or something that needs to get done
[21:04:34] slash_nick: sniperh4x0r: just make something up... make an app that displays content generated using this gem: https://github.com/stympy/faker#faker ... but translate it all to h4x0r sp3k :)
[21:04:39] Etriaph: sniperh4x0r: How much of the rails guides have you gone through?
[21:04:44] bin_005_i: has joined #RubyOnRails
[21:04:57] s2013: has joined #RubyOnRails
[21:05:21] sniperh4x0r: Etriaph: only the getting started with rails one
[21:05:27] blackmesa: has joined #RubyOnRails
[21:05:30] sniperh4x0r: I feel liked i'd learn more just making something
[21:05:50] Etriaph: sniperh4x0r: No, go through the guides, do your penance, that's my best advice right now.
[21:06:11] Etriaph: Make the best damned blorgh you can muster.
[21:06:25] slash_nick: long live blorgh
[21:06:31] Etriaph: sniperh4x0r: You can't build a house if you don't know what's in your toolbox
[21:06:32] SteenJobs: has joined #RubyOnRails
[21:06:44] sniperh4x0r: what's blorgh
[21:06:59] Etriaph: sniperh4x0r: Go through the rails guides to find out :D
[21:07:09] slash_nick: sniperh4x0r: i know it from the rails guides on engines: http://guides.rubyonrails.org/engines.html
[21:07:29] a1fa: what am i doing wrong here? http://pastebin.com/raw.php?i=68qNV5vT
[21:07:46] Etriaph: !gist a1fa
[21:07:46] helpa: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[21:08:08] a1fa: https://gist.github.com/anonymous/3baa29e1879bede69f0f
[21:08:10] ozialien: has joined #RubyOnRails
[21:08:14] slash_nick: a1fa: share the error... i'm out of the loop
[21:08:28] slash_nick: a1fa: or expected/actual if there's no error
[21:08:34] a1fa: ActiveRecord::RecordNotFound (Couldn't find all Issues with 'id':
[21:08:45] a1fa: (found 0 results, but was looking for 2)):
[21:09:29] Etriaph: I've never seen AR used in that way a1fa
[21:09:43] a1fa: i'm open for suggestions
[21:09:47] sooli1: has joined #RubyOnRails
[21:09:54] a1fa: does AR let you write raw sql?
[21:10:10] baweaver: has joined #RubyOnRails
[21:10:34] a1fa: but, i'd try to do it recommended way first
[21:10:39] rhizome: are you using rails 2.x?
[21:11:36] rhizome: there wasn't a rails 1.9.1
[21:11:43] workmad3: has joined #RubyOnRails
[21:11:50] Etriaph: Ruby 1.9.1 maybe?
[21:12:00] Etriaph: What version of Rails a1fa?
[21:12:29] Etriaph: While we wait, I'll go have a smoke
[21:12:35] baweaver: has joined #RubyOnRails
[21:12:44] edwinrozario: has joined #RubyOnRails
[21:13:01] a1fa: 4.2 i guess
[21:13:49] x-light: has joined #RubyOnRails
[21:13:54] spyderman4g63: has joined #RubyOnRails
[21:13:56] baweaver: So, fun hypotheticals time! (There is no code currently existing for this one.) How would you define getters and setters for polymorphic associations?
[21:14:11] _2easy: has joined #RubyOnRails
[21:14:25] rhizome: rails 4 requires ruby 1.9.3 or higher
[21:14:58] baweaver: 5 requires 2.2+
[21:15:17] baweaver: ACTION is thumbing through polymorphic guides
[21:15:31] a1fa: i have multiple versions of ruby installed
[21:15:32] sniperh4x0r: Did you guys read each and every rails guide? They're pretty long and some seem unnnecessary
[21:15:36] a1fa: let me check
[21:15:40] a1fa: i inherited this from someone
[21:15:47] slash_nick: sniperh4x0r: when i was in the stage you seem to be in, i read as many as i could
[21:15:51] rhizome: baweaver: why would you need to define them?
[21:16:05] smathy: baweaver, huh? They're defined for you by your association declarations.
[21:16:17] smathy: ...or, umm, what rhizome said ;)
[21:16:24] baweaver: Someone mentioned a very odd way of doing it by grokking through the files and I'm researching a disproof of it
[21:16:36] sniperh4x0r: slash_nick: how much time did you have to work on rails stuff in your days? i'm literally learning this stuff in the down time i have at work lol
[21:16:42] baweaver: so I'm finding the right way
[21:16:51] baweaver: figured I'd ping here first to sanity check
[21:16:59] a1fa: ruby 2.1.5 and rails /rails-4.2.0.rc2
[21:17:05] baweaver: as my knowledge of polymorphics is a tinge low
[21:17:07] rhizome: baweaver: you can add associations for each of the polys if you want to be able to access them by name, but that's different
[21:17:19] baweaver: Yeah, I think that's what they were after.
[21:17:32] rhizome: different, and probably a codesmell, though I've done it.
[21:17:37] bamorim: has joined #RubyOnRails
[21:17:49] baweaver: Trying to find a better way to manage the complexity there
[21:17:50] smathy: Why would you do that?
[21:18:05] baweaver: Changelog has_many changeable objects
[21:18:11] baweaver: that's the gist of it
[21:18:34] baweaver: so they want to be able to do: changelog.user and changelog.user=
[21:18:37] rhizome: smathy: convenience. it wasn't permanent
[21:18:42] baweaver: which I still think is nightmarish
[21:18:58] Coldblackice_: has joined #RubyOnRails
[21:19:09] slash_nick: sniperh4x0r: i'd read them until you understand the entire http request/response lifecycle and can describe it using rails terminology... model, view, controller, routes... request, response...
[21:19:10] baweaver: and I have to somehow convince them it's a bad idea with a better way before they try merging / pr'ing it.
[21:19:39] a1fa: https://gist.github.com/anonymous/3baa29e1879bede69f0f < so how should i re-write this with AR
[21:19:54] rhizome: right, that's essentially the case i found myself in. you don't have to define getters and setters, just teh association
[21:20:11] mrbubbles: has joined #RubyOnRails
[21:20:18] _2easy: hi guys, i have a question regarding deploying Rails application: in database.yml I have set password: <%= ENV['CLIMBEAST_DATABASE_PASSWORD'] %>, what is best practice to set up this env var on production server?
[21:20:22] smathy: rhizome, I can't imagine a situation where: foo.polyable = a_bar is less convenient than foo.bar = a_bar
[21:21:15] _2easy: cause now i got "export PASS=kfjdkfj" in .profile, but that doesn't work: PG::ConnectionBad: fe_sendauth: no password supplied
[21:21:27] baweaver: well, more of foo.user = user vs foo.changeable_objects.find_by(type: User) = user
[21:21:50] baweaver: and I am perfectly alright with someone saying that's absolutely stupid
[21:21:59] _2easy: (deploying with capistrano)
[21:22:01] baweaver: I just can't immediately think of a retort to it
[21:22:21] rickmasta: has joined #RubyOnRails
[21:22:52] smathy: a1fa, why would you have an issue_id in the issues table?
[21:23:18] otherj: has joined #RubyOnRails
[21:23:23] a1fa: i'll need to find the guy that wrote the schema, and ask him
[21:23:34] a1fa: its not what the name suggests
[21:23:53] a1fa: its a varchar
[21:24:35] a1fa: it's actually ticket_id not issues_id anyway
[21:25:15] nikhgupta: has joined #RubyOnRails
[21:25:20] baweaver: Anyways, still reading through polymorphic tutorials as my knowledge there is lacking.
[21:25:33] rickmasta: has joined #RubyOnRails
[21:25:46] a1fa: https://gist.github.com/anonymous/650de39a833b1ea53b90
[21:26:15] cogsbox_: has joined #RubyOnRails
[21:26:56] mike___1234: has joined #RubyOnRails
[21:27:08] smathy: a1fa, so just: Ticket.joins(:issue).pluck(:id)
[21:27:36] smathy: ...drop the `.pluck(:id)` if you want the Ticket objects themselves.
[21:28:19] a1fa: how do i filter that out further
[21:28:34] a1fa: i need to filter on created date and null on tickets
[21:29:05] nottombrown: has left #RubyOnRails: ()
[21:29:52] rickmasta: has joined #RubyOnRails
[21:30:00] baweaver: Model.where(created_at: 1.week.ago..Time.now)
[21:30:22] a1fa: do i append that after pluck?
[21:30:37] baweaver: pluck returns an array
[21:30:40] a1fa: or before pluck
[21:30:43] baweaver: so any other AR methods will error there
[21:30:46] yfeldblum: has joined #RubyOnRails
[21:31:05] rickmasta: has joined #RubyOnRails
[21:31:08] baweaver: as you'd be calling them on an array
[21:31:30] a1fa: i would also need to do distinct call on those ids
[21:32:14] a1fa: https://gist.github.com/anonymous/650de39a833b1ea53b90
[21:32:17] theery: has joined #RubyOnRails
[21:32:39] baweaver: http://guides.rubyonrails.org/active_record_querying.html
[21:32:45] baweaver: Honestly I'd just grok that
[21:32:52] baweaver: as most of this will be covered there.
[21:36:13] a1fa: this abstraction is killin' me
[21:37:07] smathy: a1fa, why are you using it then?
[21:37:31] simplyianm: has joined #RubyOnRails
[21:37:58] a1fa: taking over someone elses project
[21:38:12] erictheise_: has joined #RubyOnRails
[21:38:17] greengriminal: has joined #RubyOnRails
[21:38:27] smathy: a1fa, and you don't know Rails?
[21:39:39] a1fa: Rails piece is not that complicated
[21:39:43] baweaver: a1fa: https://gist.github.com/anonymous/650de39a833b1ea53b90
[21:39:48] baweaver: something like that
[21:39:50] a1fa: it's this sql thing thats bugging the shit out of me
[21:40:39] a1fa: if i could visualize it, as to what sql query it will generate, i think i could deal with it
[21:40:44] hnanon: I have this import method I need help with: https://gist.github.com/anonymous/c01246d8d18a6d3a9a3a
[21:41:08] hnanon: The goal is to allow preexisting rows to just be updated and not to add new records.
[21:41:14] smathy: a1fa, you're not playing with this in your `rails console` and seeing the generated SQL?
[21:41:29] baweaver: Model.where(foo: bar).to_sql
[21:41:29] hnanon: Currently, line 7 is preventing that.
[21:41:31] shock_one: has joined #RubyOnRails
[21:41:33] Axy: has joined #RubyOnRails
[21:41:35] a1fa: unfortunatley no, i'm restarting passenger/nginx
[21:41:51] a1fa: and watching app log like a fool
[21:42:05] baweaver: definitely will save you a lot of nightmares to start up ``rails c``
[21:42:24] hnanon: New records (in the imported csv) will not have a "sequence" value.
[21:42:28] shock_one: has joined #RubyOnRails
[21:42:54] kalusn: has joined #RubyOnRails
[21:42:55] hnanon: So, I initially set the records that meet certain conditions to a sequence value of 1.
[21:43:12] smathy: a1fa, well there's your problem right there.
[21:43:17] Pazician: has joined #RubyOnRails
[21:43:18] Etriaph: Someone's having a bad day: http://nhchockey.com/
[21:43:23] smathy: a1fa, get this working locally, and have a better day.
[21:43:37] powersurge: has joined #RubyOnRails
[21:44:00] powersurge: so I'm receiving a raw xml file posted over the wire and it's being converted into params automatically by rails
[21:44:04] powersurge: how can I replicate that in my spec?
[21:44:07] smathy: hnanon, line 7 is the if statement.
[21:44:18] hnanon: Then I create an identical record with sequence value of 2 (as well as creating another record with a different payment_type name with no sequence value).
[21:44:22] powersurge: I tried setting the raw data and the content type but it's not showing up in params
[21:44:27] powersurge: I have to deserialize it manually
[21:44:29] hnanon: smathy: Yes.
[21:44:47] powersurge: on rails 3 if that matters
[21:45:08] baweaver: powersurge: VCR
[21:45:16] hnanon: If I import the same records, only changing the phone_number in the csv, I want to just update the existing records.
[21:45:18] baweaver: https://github.com/vcr/vcr
[21:45:20] a1fa: smathy: there is a challenge with that for sure
[21:45:28] s2013: has joined #RubyOnRails
[21:45:28] hnanon: Currently, it's creating new records.
[21:46:46] a1fa: default ruby points to 1.9.1
[21:46:50] smathy: hnanon, where is it creating new records? Within that conditional block?
[21:47:01] a1fa: the rails one is on 2.1.5
[21:47:16] smathy: a1fa, default ruby in your local machine?
[21:47:28] hnanon: smathy: Yes, at "find_or_inititalize_by"
[21:47:35] workmad3: has joined #RubyOnRails
[21:47:37] smathy: a1fa, so install a new ruby, the simplest way is using a tool like rbenv, chruby or rvm
[21:47:46] GPrime: has joined #RubyOnRails
[21:47:56] AndroidLoverInSF: has joined #RubyOnRails
[21:47:59] smathy: hnanon, of course, because you have `phone_number: row["phone_number"]` in there as one of the fields.
[21:48:06] GPrime: has joined #RubyOnRails
[21:48:11] smathy: hnanon, so if you change the phone number in the CSV then it will create a new record.
[21:48:13] baweaver: smathy: what is the flavor of the day there anyways? RVM is getting a lot of hate as of late it seems.
[21:48:30] a1fa: how will that affect passenger?
[21:48:31] smathy: baweaver, I've never liked rvm.
[21:48:37] hnanon: My conditions are not correct. I can't find the right combination to make it work.
[21:48:39] baweaver: point in case :D
[21:48:40] yfeldblum: has joined #RubyOnRails
[21:48:50] smathy: a1fa, you need to adjust your passenger_ruby setting.
[21:48:56] rhizome: rvm gets "a lot of hate?"
[21:49:03] blackmesa: has joined #RubyOnRails
[21:49:10] a1fa: ruby 1.9.1 is ubuntu package, so how is that going to mess with rvm?
[21:49:25] baweaver: rhizome: every time I mention it there are at least 3 people who chime in and regale me with it being horrid
[21:49:33] centrx: has joined #RubyOnRails
[21:49:35] rhizome: those are just the loud people
[21:49:44] baweaver: ACTION shrugs
[21:49:49] baweaver: never had an issue with it myself.
[21:49:51] GPrime: has joined #RubyOnRails
[21:50:01] a1fa: does rvm just change PATH for ruby?
[21:50:08] baweaver: pretty much
[21:50:19] a1fa: can i not just export that myself
[21:50:32] hnanon: smathy: Yes, if I change the phone number it should create a new record.
[21:50:41] baweaver: you could, but then you're reinventing a wheel
[21:50:45] baron: has joined #RubyOnRails
[21:50:47] griffindy: has joined #RubyOnRails
[21:50:48] hnanon: smathy: But not if I change the "amount" attribute.
[21:50:50] smathy: hnanon, well, you're saying you want to change the phone number without creating a new record, but your code explicitly says to create a new record if the phone number is different. I assume from your code that you know enough to remove the phone_number: row["phone_number"] field from your `find_or_initialize_by` and put it in your `update` if that was the only problem.
[21:51:20] hnanon: smathy: I mean if I want to change the amount, not phone number.
[21:51:21] smathy: hnanon, above you said: "[15:48:10] smathy: hnanon, so if you change the phone number in the CSV then it will create a new record."
[21:52:03] smathy: hnanon, so now you're saying that if you change the amount field then it creates a new record within that `if` block?
[21:52:20] smathy: hnanon, I don't believe you.
[21:52:26] smathy: hnanon, I think you're changing the wrong field.
[21:52:50] smathy: hnanon, I've written the same sort of code as this hundreds of times. `find_or_intiialize_by` does just what it says it will do.
[21:53:25] hnanon: smathy: Ok, let me double check.
[21:53:25] smathy: Your CSV has something different in it, maybe it doesn't have sequence: 2
[21:53:27] benanne: has joined #RubyOnRails
[21:53:52] smathy: In fact it definitely doesn't have sequence: 2
[21:54:04] a1fa: what paths need to be changed?
[21:54:05] smathy: ...because we're in a conditional of `if dealer_commission.sequence == nil`
[21:54:19] hnanon: smathy: My CSV has no sequence column.
[21:54:22] cac: has joined #RubyOnRails
[21:54:55] hnanon: smathy: I'm updating the sequence attribute with that block.
[21:55:18] smathy: hnanon, oh right, sorry - yeah, that won't be it. I was confusing myself there.
[21:55:27] m0r0n: has joined #RubyOnRails
[21:55:52] smathy: hnanon, so yeah, one of those other fields is different than in your DB.
[21:57:14] hnanon: It doesn't exist in my CSV.
[21:57:16] baweaver: hnanon: That, and update is a bad idea in that
[21:57:23] baweaver: call save at the end
[21:57:28] hnanon: So, I made some changes to the csv values.
[21:57:31] baweaver: otherwise you're wasting massive cycles on SQL queries
[21:58:13] hnanon: The initial value is updated correctly.
[21:58:17] smathy: hnanon, let me try to make this simple for you.
[21:58:43] hnanon: The created record (sequence = 2) is not updated to reflect the amount changes in the initial value.
[21:59:04] hnanon: In other words, the math on line 10 is not ran.
[22:00:29] duderonomy: has joined #RubyOnRails
[22:00:46] hnanon: So, it appears the whole if block is not ran because in the updated instance, the sequence values are not nil.
[22:01:12] Guest38514: has left #RubyOnRails: ()
[22:01:15] hnanon: Records with sequence values will not get updated.
[22:01:26] bar0n: has joined #RubyOnRails
[22:01:31] smathy: hnanon, so your problem is not actually that a duplicate record is being created?
[22:01:32] hnanon: That's the problem, I think.
[22:01:40] hnanon: smathy: Right.
[22:01:48] allcentury: has joined #RubyOnRails
[22:02:10] hnanon: The duplicate record was a problem before I posted the updated code. Sorry.
[22:02:20] ChadyG: has joined #RubyOnRails
[22:03:06] rickmasta: has joined #RubyOnRails
[22:03:07] smathy: hnanon, it seems that I just need to tell you that I don't believe you, and that your code is working perfectly well, then you go and actually check. Maybe I should just do that again.
[22:03:46] hnanon: smathy: I just checked again.
[22:04:03] hnanon: When I update the values in a csv, the code-created records are not updated.
[22:04:05] simplyianm: has joined #RubyOnRails
[22:04:29] hnanon: (upon import)
[22:04:40] rickmasta: has joined #RubyOnRails
[22:05:02] jgpawletko: has joined #RubyOnRails
[22:05:22] raspy: has joined #RubyOnRails
[22:05:53] hnanon: The conditional is not executed because I currently have (dealer_commission.sequence == nil) as part of it.
[22:06:41] borodin_: anybody know if I can set root_url to be an explicit URL including protocol://hostname/ ?
[22:07:30] borodin_: My server is http behind an https proxy, so redirect_to root_path breaks it
[22:07:46] Zen-Zen: has joined #RubyOnRails
[22:08:24] smathy: hnanon, so that's not nil then.
[22:08:28] a1fa: rvm is being a pain
[22:08:39] a1fa: RVM is not a function, selecting rubies with 'rvm use ...' will not work.
[22:09:16] mrbubbles: has joined #RubyOnRails
[22:10:40] hnanon: smathy: Right, I'm setting their values when I import the records.
[22:10:48] jgpawletko: has joined #RubyOnRails
[22:11:09] hnanon: smathy: So, I guess my question is how do I update the values of the existing records that are not nil?
[22:11:21] simplyianm: has joined #RubyOnRails
[22:11:30] simplyianm: has joined #RubyOnRails
[22:12:52] Etriaph: has joined #RubyOnRails
[22:14:53] simplyianm: has joined #RubyOnRails
[22:15:38] smathy: hnanon, right, so if the `dealer_commission` is found then it'll have a sequence set.
[22:15:42] smathy: I thought that's what you wanted.
[22:16:06] aloneintheworld: has joined #RubyOnRails
[22:19:29] l0oky: Can I make my own model class methods that modifies a string before It is saved to database?
[22:19:35] hnanon: smathy: Yes, but if I update a row (amount attribute) in the CSV file and import it, it will already have a set sequence. It won't be nil and thus the conditional won't be ran and the record created on line 9 won't be updated to have a new amount (calculated on line 10, based on the new amount in the CSV).
[22:19:56] bmurt: has joined #RubyOnRails
[22:20:11] smathy: hnanon, right, so why do you have that boolean clause in your `if` ??
[22:20:29] l0oky: So for instance If I have user model, I want to make class method that is called filter firstname that will upper case firstname before saving to db
[22:22:03] qwertme: has joined #RubyOnRails
[22:22:12] Rubie: has joined #RubyOnRails
[22:22:15] bricker: l0oky: yes, read here: http://guides.rubyonrails.org/active_record_callbacks.html
[22:23:17] djbkd: has joined #RubyOnRails
[22:23:54] l0oky: bricker, Thank you. :)
[22:23:56] ProLoser: has joined #RubyOnRails
[22:23:58] hnanon: smathy: because of line 8.
[22:24:14] hnanon: The first record needs a sequence of 1.
[22:24:26] smathy: hnanon, seriously?
[22:24:50] smathy: hnanon, I can't believe you need me to say this... put the `== nil` condition on that line!
[22:25:43] enape_101: has joined #RubyOnRails
[22:25:50] hnanon: Shoot me.
[22:26:09] hnanon: Let me try that.
[22:27:08] Rubie: has joined #RubyOnRails
[22:27:37] edwinrozario: has joined #RubyOnRails
[22:27:42] yfeldblum: has joined #RubyOnRails
[22:28:14] simplyianm: has joined #RubyOnRails
[22:30:13] pragmatism: has joined #RubyOnRails
[22:30:17] cogsbox_: has joined #RubyOnRails
[22:30:57] leary: has joined #RubyOnRails
[22:32:58] simplyianm: has joined #RubyOnRails
[22:33:34] jaajaaj: has joined #RubyOnRails
[22:34:02] cogsbox_: I am having trouble with an integration test. I could really use some help. Here is my gist. https://gist.github.com/anonymous/97d4dda0969bbcc1f708 My error says ChoiceTest#test_should_be_valid [/home/ubuntu/workspace/prep_app/test/models/choice_test.rb:22]
[22:35:00] hnanon: smathy: No luck.
[22:35:03] highcup: has joined #RubyOnRails
[22:35:28] smathy: hnanon, excuse me if I'm skeptical.
[22:35:32] hnanon: Remember, the CSV doesn't have a sequence column. So, it just recreates the records.
[22:35:56] jaajaaj: i noticed that Rails 4.2.2 upgrades sprockets from 2.12.3 to 3.2.0
[22:36:06] jaajaaj: which is a breaking change for me
[22:36:16] smathy: cogsbox_, @question won't have an ID until it's saved.
[22:36:39] Zadrel: has joined #RubyOnRails
[22:37:17] bruno-: has joined #RubyOnRails
[22:37:30] siaw23: cogsbox_: you could use Questions.create instead.
[22:37:32] Artimus: has joined #RubyOnRails
[22:37:56] smathy: cogsbox_, or better, change your validation to be on the association not the foreign key.
[22:38:20] Artimus: Have their been any discussion on the 4.2.2 security patch yet? An upgrade from Sprockets 2 to 3 got snuck in there and is breaking a lot of code. Wondering if that's going to be replaced or if we can't apply the security update until we fix all of our code to use sprockets3.
[22:38:30] smathy: cogsbox_, which is better anyway because: `@choice.question_id = an_id_that_doesn't_exist` will be valid.
[22:38:51] mikecmpbll: has joined #RubyOnRails
[22:39:27] smathy: hnanon, where do you think the lack of sequence column will cause a record to be recreated (assuming you mean "duplicated" there)?
[22:39:32] jaajaaj: @Artimus i am having the same problem
[22:40:09] Zadrel: hello there! i couldn't login in #html channel and i desperately need help in a js script that i have, anyone can help me?
[22:40:17] pragmati_: has joined #RubyOnRails
[22:40:55] mostlybadfly: has joined #RubyOnRails
[22:42:27] hnanon: smathy: Not sure. But I promise you, they are being duplicated if I edit the amount attribute in the CSV an upload.
[22:43:37] crzrcn: has joined #RubyOnRails
[22:43:52] smathy: hnanon, so you think line 9 is creating a duplicate record?
[22:44:11] crzrcn: How can I force Rails to cryptographically sign session cookies in development?
[22:45:03] renews: has joined #RubyOnRails
[22:45:53] hnanon: smathy: new gist: https://gist.github.com/anonymous/09d8bdc51b9ea9e96a2f
[22:46:28] simplyianm: has joined #RubyOnRails
[22:47:00] arBmind1: has joined #RubyOnRails
[22:48:06] nobitanobi: has joined #RubyOnRails
[22:48:57] hnanon: First record (sequence 1) gets properly updated. The second and third records (created on lines 15 and 18) are recreated.
[22:49:22] l0oky: How can I write this model class method as a concern? https://gist.github.com/l0oky/9d7fc9147f37d54166c2
[22:49:23] smathy: crzrcn, just set secret_key_base
[22:50:28] smathy: hnanon, you think that a new record is being created with the same values as an existing record in your DB. So, just before line 14 in your code put this: `attrs = { phone_id: row["phone_id"], payment_type: "New Activation Bonus", phone_number: row["phone_number"], phone_model: row["phone_model"], sequence: 2, customer_id: current_user.customer.id }; logger.debug attrs; logger.debug DealerCommission.find_by(attrs).inspect;`
[22:50:48] enape_101: i have an idea that's in development, and I'd like to bring on some new experienced rails/angularjs devs. The current team is all remote, 3 people thus far, and we are currently executing on it. email me if you'd like to discuss this more seriously ;) - raising funds once product is ready, email me if srs - pblogsltd@gmail.com
[22:50:50] smathy: hnanon, then run your code, and then go to your logs and grab what's output, and add it to your gist.
[22:51:53] krisquigley: has joined #RubyOnRails
[22:52:07] baweaver: has joined #RubyOnRails
[22:52:43] smathy: l0oky, that's not a class method.
[22:53:05] recurrence: has joined #RubyOnRails
[22:53:24] l0oky: what is it?
[22:54:04] centrx: It's an instance method
[22:54:25] l0oky: How can I make ti class method?
[22:54:57] centrx: put self. in front of the name
[22:55:17] l0oky: I did I get undefined local variable or method `ensure_names_capitalized'
[22:55:17] centrx: but why do you want it to be a class method?
[22:55:20] smathy: ACTION gets off this train
[22:55:41] centrx: before_create references instances methods
[22:55:58] smathy: l0oky, seriously, the real answer to your question is: learn ruby before trying to write rails.
[22:56:40] l0oky: smathy, yeah I think you're right. But I like to be practical and learn while doing my own project..
[22:57:00] l0oky: That's called speed learning ..
[22:57:01] simplyianm: has joined #RubyOnRails
[22:57:19] smathy: l0oky, I'd recommend learning ruby outside the context of Rails first.
[22:57:29] hnanon: smathy: https://gist.github.com/anonymous/4f157ecc3fb0a5d8964a
[22:57:33] Etriaph: l0oky: I picked up Rails about 8 months ago, didn't learn anything about Ruby first and trust me, it's the hard way
[22:57:50] smathy: l0oky, lots of great resources here: https://www.ruby-lang.org/en/documentation/
[22:57:54] centrx: l0oky, It's a good idea, but you should find a good reference for Ruby itself, that you can refer to while learning Rails
[22:58:42] Etriaph: l0oky: http://devdocs.io/ is what I tend to use, almost all of the documentation I use in a day in one spot.
[22:58:55] smathy: hnanon, right, so see that little `nil` there? That means that there's no record in your DB with those attributes.
[22:59:04] l0oky: yeah I should learn basic ruby stuff out of rails context for sure
[22:59:13] smathy: hnanon, so no duplicate is being created, because none exists in the first place.
[22:59:13] l0oky: everything else meh
[22:59:20] l0oky: thanks guys
[22:59:25] l0oky: ACTION yawns
[22:59:34] smathy: l0oky, np.
[22:59:36] alex88: has joined #RubyOnRails
[23:01:06] smathy: hnanon, so, somehow, you think there are now TWO records with those attributes, so check for yourself, run this in your console: DealerCommission.where({:phone_id=>"1000001", :payment_type=>"New Activation Bonus", :phone_number=>"123-564-4544", :phone_model=>"Samsung Galaxy S6", :sequence=>2, :customer_id=>2}).count
[23:02:01] paulcsmith_: has joined #RubyOnRails
[23:02:21] hnanon: phone_number is stored without dashes in db. 1 sec...
[23:03:29] hahuang65: has joined #RubyOnRails
[23:03:42] hnanon: (because I keep uploading the same csv to test)
[23:04:58] MrPunkin: has joined #RubyOnRails
[23:05:16] jeanlinux: has joined #RubyOnRails
[23:05:55] x-light: has joined #RubyOnRails
[23:07:40] x1337807x: has joined #RubyOnRails
[23:07:48] Radar: Good morning.
[23:08:30] hnanon: smathy: Also, your inspect code showed nil because the csv has the numbers in various formats. I strip all non-numeric characters.
[23:08:48] hnanon: Good morning, Radar
[23:10:00] jhass: Radar: /topic time, 4.2.2 is out ;)
[23:10:09] Radar: jhass: thanks :)
[23:10:13] smathy: hnanon, where do you think you strip the non-numeric characters?
[23:10:24] hnanon: Elsewhere in the model.
[23:10:25] jhass: and everybody should at least bump their rack
[23:10:35] edwinrozario: has joined #RubyOnRails
[23:10:50] smathy: hnanon, did you not notice that the `DealerCommission.where` code I gave you uses PRECISELY THE SAME ARGUMENTS as the `DealerCommission.find_or_initialize_by` that you're having trouble with.
[23:11:04] smathy: hnanon, if the .where doesn't find a record in the DB, then the `find_or_initialize_by` won't either.
[23:11:31] hnanon: That's it.
[23:11:44] hnanon: It's a new number every time.
[23:11:58] hnanon: Because I'm stripping the number before it's saved to the db.
[23:12:31] darrencauthon: has joined #RubyOnRails
[23:12:42] Radar: ACTION hopes that one day he can be as smart as smathy
[23:13:07] hnanon: Radar: He really walked me through this one. It felt like a murder mystery to me.
[23:13:25] smathy: In this particular case it's more: s/smart/stubborn/
[23:13:59] hnanon: Now, I know the cause...just need a solution.
[23:14:32] smathy: hnanon, you really need to stop making so many assumption though, I hope you can see that everything I ask you to do is just checking the next assumption you're making.
[23:14:37] chipotle: has joined #RubyOnRails
[23:14:54] Ropeney: has joined #RubyOnRails
[23:15:11] hnanon: Yup, I'm noticing that.
[23:15:15] smathy: hnanon, write your own `find_or_initialize_by` method that does the same transformations with the values before calling the real find_or_initialize_by
[23:16:52] hnanon: Ok. I'll work on that.
[23:17:15] hnanon: Thanks so much. I really appreciate your time and effort.
[23:18:16] a1fa: ok. i am convinced that activerecord sucks bad and there is no way to write complex joins using it
[23:18:58] a1fa: should i suck it up, and go ahead and do raw sql?
[23:19:05] smathy: hnanon, you're welcome.
[23:19:28] smathy: hnanon, just to put the cherry on the top, here's how to do what I was suggesting: https://gist.github.com/anonymous/4f157ecc3fb0a5d8964a#comment-1474928
[23:19:57] smathy: hnanon, only trick here is that you'll have to move your `remove_non_digits` code, wherever it is now, into a class method by that name.
[23:20:11] smathy: a1fa, yes please.
[23:20:56] a1fa: i could still do find_by_sql i guess
[23:21:15] hnanon: smathy: Ok, I'll give it a shot. Thanks again.
[23:21:25] podman: has joined #RubyOnRails
[23:22:22] greengriminal: has joined #RubyOnRails
[23:25:00] a1fa: looks like find_by_sql will work for me
[23:25:28] a1fa: eventhough, i'd rather use the secret ruby handshakes
[23:25:31] jeanlinux: has joined #RubyOnRails
[23:25:35] centrx: a1fa, If you're already convinced, then yeah
[23:25:37] a1fa: do.this.than.that.then.this ;)
[23:25:48] centrx: a1fa, You haven't said what you are doing anyway, so raw SQL must be the only way
[23:26:17] baweaver: has joined #RubyOnRails
[23:26:31] a1fa: i have two tables, one is empty at the moment, the other one has ticket ids
[23:26:57] Silent__: has joined #RubyOnRails
[23:27:15] a1fa: i am using join to get a list of all ticket ids, as long as they dont have "closed" from the new table
[23:27:33] jcaho: has joined #RubyOnRails
[23:27:41] towski__: has joined #RubyOnRails
[23:28:23] SteenJobs: has joined #RubyOnRails
[23:28:48] a1fa: technically two select queries
[23:29:12] a1fa: select * from issues and select * from tickets; intersect those, and only show issues that dont have tickets closed
[23:29:19] startupality: has joined #RubyOnRails
[23:29:42] MrPunkin: has left #RubyOnRails: ()
[23:29:57] crdpink: has joined #RubyOnRails
[23:30:10] siemprefresco: has joined #RubyOnRails
[23:30:32] smathy: a1fa, you have two choices here that I can see: (1) actually take the time to learn Rails and then perhaps you can do this the Rails way, or (2) just use `find_by_sql` and get whatever you need done however you can do it.
[23:30:37] njero: has joined #RubyOnRails
[23:31:09] a1fa: smathy: i tried doing it the ruby way, at least trying to interact with the database through AR.. maybe thats not the right way to do it
[23:31:23] rickmasta: has joined #RubyOnRails
[23:31:33] a1fa: maybe i need to run two separate select statements, and compare this on the backend
[23:31:48] a1fa: and do the trimming on the backend, rather try to do it with sql statement
[23:31:58] a1fa: which would you opt for?
[23:32:30] smathy: a1fa, well, I know Rails, so I'd use Rails, but if I didn't want to learn Rails then I'd just use SQL.
[23:33:26] a1fa: smathy: methadology wise, should i do two selects (.where) and do trimming on the backend
[23:33:36] a1fa: or would you try to muscle ActiveRecord to spit out the SQL
[23:33:44] a1fa: honestly, joins are slow
[23:34:00] smathy: Methodology wise you should learn Rails.
[23:34:39] a1fa: i guess if you dont want to help, dont make my life harder
[23:35:43] Spami: has joined #RubyOnRails
[23:37:11] diegoviola: has joined #RubyOnRails
[23:37:37] helpa: has joined #RubyOnRails
[23:38:41] Radar: What was he calling you instead of your name?
[23:38:48] a1fa: http://gawker.com/lawsuit-man-loses-testicle-after-drunk-boss-yanks-it-d-1711444836
[23:38:52] a1fa: are you this guy?
[23:39:12] diegoviola: Radar: paraguayan
[23:39:14] renews: has joined #RubyOnRails
[23:39:22] diegoviola: Radar: immigrant
[23:39:35] Radar: yeah that's not on at all. :+1: for calling him out
[23:39:47] siaw23: can someone help here: http://stackoverflow.com/questions/30880030/rails-ajax-pagination
[23:39:51] Radar: If he keeps doing it, start calling him "whitey"
[23:40:00] bricker: Or calling him "I Quit"
[23:40:03] Radar: or be more direct: "racist"
[23:40:13] diegoviola: Radar: thanks
[23:41:41] annlewis: has joined #RubyOnRails
[23:42:01] earthquake: has joined #RubyOnRails
[23:43:33] smathy: Radar, he's Brazilian, so "whitey" might not be analogous.
[23:43:47] cirn0: has joined #RubyOnRails
[23:43:49] Radar: Ok, so "racist" will suit :)
[23:44:39] smathy: My tolerance is so much higher than most people it seems. It never strikes me that identifying my race/skin-color/immigration-status is being racist.
[23:44:57] shock_one: has joined #RubyOnRails
[23:45:19] SeanLazer: has joined #RubyOnRails
[23:46:03] eggoez: has joined #RubyOnRails
[23:46:47] Etriaph: I just think everyone should be nice to each other.
[23:46:54] Etriaph: As a default.
[23:47:15] diegoviola: smathy: I'm Paraguayan but I live in Brazil
[23:47:25] diegoviola: although it doesn't bother if people call me Brazilian
[23:47:31] diegoviola: I don't believe much in nationality myself
[23:47:53] a1fa: NoMethodError (undefined method `join' for #<Class:0x000000020a6bd8>):
[23:47:54] centrx: You wouldn't believe that if you were a Mooninite
[23:48:22] baweaver: a1fa: can't join a nonarray mate
[23:48:25] a1fa: of course its "joins"
[23:48:39] superlou: has joined #RubyOnRails
[23:48:49] smathy: siaw23, what's `$pagination(".pagination pagination a")` ?
[23:49:10] baweaver: ACTION needs to check channel headers
[23:49:13] workmad3: has joined #RubyOnRails
[23:49:22] siaw23: smathy: .pagination pagination a = is the class on the items
[23:49:24] smathy: diegoviola, I'm Australian, living in the US, and if someone called me immigrant or "Australian" I wouldn't care at all.
[23:49:41] Etriaph: Does anyone know if bootstrap-sass has an equivalent to @include make-xs-column(int) for table cells? I get different results from hand-coding each size individually than I do if I make a class using make-*-column for each
[23:49:41] baweaver: getting out the hammer there Radar?
[23:49:49] smathy: ...even though "immigrant" for me is actually incorrect.
[23:51:12] smathy: siaw23, well, let's focus on that selector for a second, what's `pagination` doing in there? You have a <pagination> tag in your HTML?
[23:51:21] Rager: question on the common practice, here
[23:51:31] diegoviola: smathy: I don't care they call me Paraguayan or immigrant, but it's different by how they say or the tone of voice
[23:51:38] GnuYawk: has joined #RubyOnRails
[23:51:38] GnuYawk: has joined #RubyOnRails
[23:51:42] baweaver: Rager: Answer on common practice here
[23:51:43] Rager: I want to return a list of Rx items belonging to a User based on a user_id param
[23:51:50] siaw23: smathy: yes. i do have a pagination tag.
[23:51:54] smathy: diegoviola, right, I agree with that. Just that that's not what you mentioned in here, nor what other reacted to.
[23:52:01] Rager: should it be /rx?user_id=1234
[23:52:06] Rager: or something like rx/user/1234
[23:52:10] Radar: Rager: /users/1234/rx
[23:52:12] Rager: which is the Rails Way
[23:52:16] smathy: siaw23, ok, and what's the $pagination function?
[23:52:23] Radar: because rx's are a sub-resource for /users
[23:52:27] baweaver: Radar on the trigger
[23:52:29] diegoviola: smathy: like the other day I didn't had money for lunch because I'm new at the company, the boss said to a coworker "Give a banana to this paraguayan"
[23:52:33] baweaver: dang you type fast
[23:52:34] Rager: so should I still answer it with the RxController?
[23:52:38] Radar: Rager: yes
[23:52:46] Radar: baweaver: surprising considering that I've got a massive headcold that needs to fuck off right now
[23:52:58] siaw23: smathy: i think something is wrong. i???m using slim and i just put in the file `<% javascript "pagination" %>` but it???s showing it like that in my VIEW
[23:52:58] Radar: Railscamp was AWESOME btw
[23:53:00] a1fa: alright, i was able to combine .join and .where clauses using ActiveRecord |
[23:53:06] smathy: Rager, is that user_id, 1234, the user id of the currently logged in user?
[23:53:12] baweaver: Radar, are you hungover too? :P
[23:53:14] Rager: user 1234
[23:53:20] Rager: but what if I wanted my own?
[23:53:24] Rager: I've been just going with user id "me"
[23:53:28] Radar: Rager: then it would be at /rx
[23:53:30] djbkd: has joined #RubyOnRails
[23:53:39] Rager: that sounds like a place for all rx
[23:53:39] Radar: Use the current_user's ID if no other id is specified
[23:53:40] baweaver: sevenseacat mentioned it
[23:53:41] Radar: baweaver: Nope! I wasn't hung over any of the days.
[23:53:45] RegulationD: has joined #RubyOnRails
[23:53:46] Rager: not rx of a given user
[23:53:49] Radar: hungover*
[23:53:52] a1fa: but it is slow
[23:53:56] a1fa: because of the stupid join
[23:53:58] siaw23: smathy: this is my slim file https://gist.github.com/siaw23/93b81d47b2805e3085a5
[23:54:03] greengriminal: has joined #RubyOnRails
[23:54:05] Rager: how about /user/rx for all rx of current user?
[23:54:15] smathy: Rager, does any normal user ever get to see the RX of all users?
[23:54:20] ndrei: has joined #RubyOnRails
[23:54:22] a1fa: is it better to run two different select statements, and filter on view vs run one big select with join?
[23:54:33] Rager: in this case, it's not your prescriptions - it's prescriptions you've written into a reference
[23:54:39] tds5016: has joined #RubyOnRails
[23:54:41] Rager: so the ones you've authored are yours
[23:54:41] siaw23: smathy: but the `<% javascript "pagination" %>` part is being shown in the view as it is. it???s not being run :(. don???t know how to fix that
[23:54:50] tds5016: hello all.
[23:55:06] tds5016: I want to use grunt with the asset pipeline... does anyone know how I'd add that to the precompile?
[23:55:13] tds5016: asset precompile*
[23:55:38] diegoviola: smathy: there's a guy in the office who has been getting some "jokes" in his direction as well, like people making jokes about his race because he's black, etc
[23:55:44] Rager: thanks, guys
[23:55:57] baweaver: tds5016: https://bugsnag.com/blog/replacing-the-rails-asset-pipeline-with-gulp
[23:56:23] tds5016: I don't actually want to replace the asset pipeline... I just wanna add my grunt task to it.
[23:56:33] Radar: Rager: I would just have /rx
[23:56:36] smathy: siaw23, well, that doesn't look like SLIM to me, it looks like ERB.
[23:56:57] Rager: Radar: but that wouldn't leave a route for rx index
[23:57:06] Radar: Rager: Why would you need a route for /rx index?
[23:57:09] jgpawletko: has joined #RubyOnRails
[23:57:10] siaw23: smathy: yes it???s erb i???m not sure how to make it to slim
[23:57:10] Radar: To show all prescriptions?
[23:57:14] Radar: (p.s. rx is a terrible name)
[23:57:23] smathy: siaw23, why are you using slim then?
[23:57:23] Radar: Rager: That sounds like a job for /admin/prescriptions
[23:57:28] Rager: blame some other guy nearly 3 years ago
[23:57:37] Rager: except that there isn't any PII with tese
[23:57:45] siaw23: smathy: i was forced to use it
[23:57:50] zorak8: has joined #RubyOnRails
[23:58:01] Rager: it's just a reference for doctors to write what Rx they would use for a given diagnosis
[23:58:13] smathy: siaw23, you should probably learn a bit more about it then: http://slim-lang.com/
[23:58:17] Rager: so having a list of *all* Rx is necessary thing for all users to have access to
[23:58:17] baweaver: Use longhand names, always
[23:58:35] Rager: I'll go do that for future bits
[23:58:53] baweaver: while a short name MAY save you time initially it'll be hell to pay down the road in terms of documentation and code clarity
[23:59:26] smathy: baweaver, what's the longhand name for Rx?
[23:59:26] sevenseacat: has joined #RubyOnRails
[23:59:28] siaw23: smathy: fixed it! :D
[23:59:40] smathy: siaw23, well done :)
[23:59:43] siaw23: smathy: but the AJAX part is not running btw
[23:59:44] baweaver: prescription unless I misread it
[23:59:49] siaw23: just made that erb to slim