« Back to channel list

#RubyOnRails - 01 December 2015

« Back 1 day Forward 1 day »
[00:01:12] siaW: has joined #RubyOnRails
[00:01:15] siaW: my .travis.yml file looks like this https://gist.github.com/siaw23/67b972e15b183c31670d and on travis i get this error ActiveRecord::StatementInvalid: PG::InsufficientPrivilege: ERROR: permission denied to create database
[00:01:16] siaW: any help?
[00:02:09] Radar: siaw: Travis creates the database for you.
[00:02:49] siaW: Radar: which means i need to remove - psql -c 'create database workshops_test;' -U postgres?
[00:02:55] Radar: siaw: probably
[00:03:07] siaW: Radar: but when i remove that it tells me db workshops_test doesn???t exist
[00:03:13] Radar: siaw: Ok, then I don't know.
[00:03:17] Radar: siaw: Did you consult the documentation?
[00:03:20] Radar: https://docs.travis-ci.com/user/using-postgresql/
[00:03:47] Radar: siaw: Try contacting Travis support if you're having troubles.
[00:03:58] siaW: Radar: thanks a lot i???ll try
[00:04:31] sonofdirt: has joined #RubyOnRails
[00:04:39] rhizome: certainly there must be a travis channel
[00:04:51] ethe: Radar yeah it still doesnt work
[00:05:02] Radar: ethe: I'm still waiting for the screenshot.
[00:05:21] echosystm: has anyone here ever combined facebook login with an internal login system?
[00:05:21] ethe: I fixed it though, I downloaded a jquery.min.js and put it in the vendor/javascript folde
[00:05:43] ethe: Radar I dont know what to screenshot, there isnt anything to screenshot except a "$ not found"
[00:05:51] roshanavand: has joined #RubyOnRails
[00:05:54] echosystm: ie. you can log in with facebook or email/password
[00:06:21] Radar: ethe: Your JSconsole.
[00:06:39] Radar: ethe: Show us your Gemfile, Gemfile.lock and application.js too please.
[00:07:40] grotewold: has joined #RubyOnRails
[00:08:20] markh_: echosystm - i think the idea is you would have one way of authorizing users regardless of how they register/login
[00:08:33] markh_: but that the register/login provides a token which they authorize against
[00:09:00] echosystm: they log in to facebook and you get facebook token and social ID back
[00:09:24] echosystm: so it seems liek the server needs to support login by email/password or social-id/token
[00:09:40] echosystm: im just wondering if there is some better way to log in with facebook without sending their facebook token to our server
[00:09:45] echosystm: it seems dodgy to do that
[00:09:52] havenwood: has left #RubyOnRails: ("Bye!")
[00:09:57] Radar: echosystm: look at omniauth-facebook.
[00:10:07] markh_: http://www.sitepoint.com/rails-authentication-oauth-2-0-omniauth/
[00:10:07] ethe: Radar http://vgy.me/EmomkN.png https://gist.github.com/anonymous/63a088f97d8e5f99ec18
[00:10:18] Radar: oh ethe's still here, good.
[00:10:33] K_r3aPeR: has joined #RubyOnRails
[00:10:41] Radar: ethe: Upload the app to GitHub please. I want to play around with it.
[00:10:46] Radar: ethe: tldr: works on my machine
[00:11:48] ethe: https://github.com/joshdekock/alpha
[00:12:14] fmcgeough: has joined #RubyOnRails
[00:12:16] Radar: ethe: thanks
[00:12:40] ethe: hey. you know what it might be... lemme try another browser
[00:12:51] argoneus: has joined #RubyOnRails
[00:13:22] argoneus: has joined #RubyOnRails
[00:13:26] ethe: nope. safari, chrome, and firefox. doesnt work in any of them
[00:13:37] Radar: running bundle install on it
[00:13:46] argoneus: I don't mean to start a shitstorm, I'm just wondering
[00:13:51] maloik: has joined #RubyOnRails
[00:14:13] rhizome: why did you stop in the middle of your sentence
[00:14:16] jhass: ACTION prepares for the shitstorm
[00:14:37] ethe: rhizome suspense...
[00:14:44] baweaver: argoneus: then don't
[00:14:56] argoneus: I've been making some fun little websites with symfony, django, flask before and I was wondering what Rails can give me over them, from my limited experience and from what I googled it seems like ruby lets me easily do common things and with neat short syntax, is that about right?
[00:15:19] argoneus: like I worry less about letting people register/login and making forms and spend more time making proper functionality
[00:15:29] argoneus: or is that not the point of rails?
[00:15:29] baweaver: ah, is that all? I thought you were going to go for Vim vs Emacs or something
[00:15:42] argoneus: nono I just know some people dislike other frameworks mentioned in their channel
[00:15:44] ethe: argoneus, rails has very good gems
[00:15:44] baweaver: Ruby is very concise
[00:16:06] ethe: well, ruby does, but they integrate well
[00:16:09] baweaver: though I'd just go and make a demo site to get a feel
[00:16:30] ethe: I feel like rails has the most structure
[00:16:45] Radar: ethe: It's because you have both application.coffee (which doesn't have the require) and application.js, which does. Delete application.coffee.
[00:16:46] argoneus: thing is, I've never really tried Ruby, apart from some hello world examples, which made me realize my python experience can go down the drain
[00:16:47] baweaver: Flask is comparable to Sinatra as a lightweight
[00:16:59] baweaver: argoneus: not really
[00:16:59] Radar: ethe: thanks for putting the app up on github
[00:17:01] argoneus: I'd be learning ruby just to use RoR, and I was wondering if there's a particular reason why it would be worth it
[00:17:12] argoneus: or if ror is just another framework for another language
[00:17:16] baweaver: Python and Ruby are close enough siblings
[00:17:29] ethe: Radar thanks for helping me :)
[00:17:30] argoneus: baweaver: there's some very weird Ruby syntax from what I've seen
[00:17:35] Pazician: has joined #RubyOnRails
[00:17:44] ethe: I dont really know what coffeescript is
[00:17:46] baweaver: Ruby is the hippy free loose rules language, and Python is the stickler with all the rules and regulations
[00:17:53] ethe: I thought I had better leave it there
[00:18:02] jhass: Ruby seems odd at first glance, but that feeling will vanish after a week or two
[00:18:23] Radar: ethe: It's a language that compiles down into JavaScript.
[00:18:54] argoneus: I remember being confused over blocks
[00:18:58] ethe: if you were wondering what my app does: it takes bing's image of the day, and displays a clock over it
[00:18:59] argoneus: haven't seen anything like that before
[00:19:06] ethe: similar to momentum
[00:19:20] jhass: argoneus: did you do some Javascript?
[00:19:39] argoneus: I did some, tried to avoid it for the most part though
[00:20:02] argoneus: javascript really likes its callbacks
[00:20:10] argoneus: and anonymous functions
[00:20:33] jhass: argoneus: think of blocks like the anonymous functions your pass all over the place in JS, just given to you as a distinct syntax construct by the language that every method can receive without any extra declarations
[00:22:54] kies: has joined #RubyOnRails
[00:23:19] argoneus: so basically
[00:23:39] baweaver: Ruby [1,2,3].map { |v| v * 2 } -> Javascript [1,2,3].map(function(x) { return x * 2; })
[00:23:41] argoneus: instead of directly calling functions, my functions are part of the syntax? kinda thing
[00:24:02] lacrymology: has joined #RubyOnRails
[00:24:47] stannard: has joined #RubyOnRails
[00:25:32] tw1sted: has joined #RubyOnRails
[00:25:37] argoneus: in python, that would be [x*2 for x in [1,2,3]], right?
[00:25:53] baweaver: Python: map(lambda x: x * 2, [1,2,3])
[00:26:00] baweaver: 1 to 1 it'd be that
[00:26:10] baweaver: but yeah, same in list comprehension form
[00:26:24] roshanavand: has joined #RubyOnRails
[00:26:24] baweaver: Python lambdas are ugly as sin though.
[00:26:26] argoneus: I never used a lambda with more than 1 argument
[00:26:32] argoneus: ruby seems to use them all the time
[00:26:35] argoneus: maybe that's why I got confused
[00:26:39] baweaver: lambda x, y: x * y
[00:26:51] baweaver: { |x, y| x * y }
[00:28:19] argoneus: I think I'll give Ruby and RoR a try, thanks :)
[00:28:20] IanV0rn2341: has joined #RubyOnRails
[00:28:28] argoneus: if nothing else the language seems nice (although hip as fuck)
[00:29:48] kitsuneyo: i tried to validate presence on some columns that are populated with a before_save method, but it gives me an error when i try to save a record now. is there some obvious reason why?
[00:30:13] lasker85: has joined #RubyOnRails
[00:30:29] tds5016: is there a nice/easy way to execute a method from each ruby file in a directory that matches a pattern?
[00:30:43] kitsuneyo: hip how argoneus?
[00:30:52] tds5016: I can see how you would require all files in a given directory; I'm just wondering how I'd run a method from each of those?
[00:31:31] ellisTAA: has joined #RubyOnRails
[00:31:36] kitsuneyo: tds5016, where, when and on what are you running all these methods?
[00:32:00] tds5016: okay, I have a bunch of sunspot adapters that I'm adding into a directory.
[00:32:12] kitsuneyo: you could just create a method that runs all the other methods
[00:32:13] tds5016: what I want to do is to run some code that uses classes in each of those files.
[00:32:41] tds5016: so I guess what I'm asking is... given the file path name, how would I get access to the classes in the file programmatically?
[00:33:02] argoneus: kitsuneyo: its just quite unique, like they tried to distance themselves from traditional languages and syntax
[00:33:05] argoneus: thats my first feel of it anyway
[00:33:34] argoneus: then again I could say the same about lisp, and thats like 50 years old
[00:33:55] tds5016: kitsuneyo: I feel like ruby has to have some weird easy way to do that :-)
[00:34:14] kitsuneyo: argoneus, yeah... i'm not an expert but i think the differences are for good reasons, not posing or anything ;)
[00:34:31] baweaver: Ruby stole a lot from Lisp, Smalltalk, and Perl
[00:34:46] argoneus: why would anyone steal anything from perl :O
[00:34:57] baweaver: Don't forget that Common Lisp and Clojure are still widely used Lisps
[00:34:59] kitsuneyo: tds5016, after reading well-grounded rubyist i don't remember seeing anything like that
[00:34:59] maloik: has joined #RubyOnRails
[00:35:06] baweaver: it has good ideas
[00:35:22] argoneus: it had before they made perl 6 :(
[00:35:26] tds5016: kitsuneyo: does the question I'm asking make sense though?
[00:35:36] creature: has joined #RubyOnRails
[00:35:36] creature: has joined #RubyOnRails
[00:35:57] baweaver: y'might want to ping #ruby if you want to drill language features
[00:36:00] tds5016: Sunspot::Adapters::InstanceAdapter.register(<the class to register>, <the model class>)
[00:36:25] tds5016: that's basically what I need to run fro each file in the list.
[00:36:30] drupald: has joined #RubyOnRails
[00:36:46] tds5016: lemme rephrase... is there a way to get a class by a string?
[00:36:55] kitsuneyo: tds5016: pretty sure you can get those class names yeah
[00:37:06] arthurnn: has joined #RubyOnRails
[00:37:09] tds5016: how would I get a reference to the class via a string?
[00:37:26] owenjones: has joined #RubyOnRails
[00:37:51] argoneus: one last thing before I start learning all this
[00:38:03] baweaver: constantize
[00:38:15] argoneus: anyone has experience with RubyMine / is it good / is there anything better? I normally use jetbrains stuff for most of my coding because they are good quality
[00:38:30] tds5016: would I do it with something like const_get or ?
[00:38:35] kitsuneyo: tds5016, just to do obj.class.to_s ?
[00:38:41] baweaver: 'Model'.constantize
[00:38:42] tds5016: argoneus: I like it :-)
[00:38:49] tds5016: kitsuneyo: I want it in the other direction...
[00:38:54] baweaver: I wouldn't focus too much on editors
[00:38:58] kmckelvin: has joined #RubyOnRails
[00:39:01] tds5016: I want to get a referent to the class by the name of the class.
[00:39:36] tds5016: reference to the class by a string of the class name*
[00:40:20] kitsuneyo: tds5016 can't remember, but i'm sure there's a way to do it
[00:40:39] tds5016: any idea what I could google to figure it out?
[00:40:42] tds5016: I'm not having any luck,.
[00:41:23] kitsuneyo: i think baweaver already answered you tds5016
[00:41:49] tds5016: baweaver sorry I missed that!
[00:41:50] lasker85: has joined #RubyOnRails
[00:42:35] tds5016: baweaver would constantine just return another string?
[00:42:57] kitsuneyo: you were also correct as constantize is apparently an activesupport convenience method that does object.const_get
[00:43:23] kitsuneyo: try this: http://stackoverflow.com/questions/14070369/how-to-instantiate-class-from-name-string-in-rails
[00:44:59] tds5016: so I'd want to do something like Object.const_get?
[00:46:54] roshanavand: has joined #RubyOnRails
[00:47:52] shanemcd: has joined #RubyOnRails
[00:48:23] flip_digits: has joined #RubyOnRails
[00:50:55] rickmasta: has joined #RubyOnRails
[00:51:03] pulgalipe: has joined #RubyOnRails
[00:51:50] ethe: oh god. I hate it when stuff works in dev mode, but breaks in production
[00:52:37] Radar: ethe: Did you not precompile your assets in production?
[00:53:25] cajone: has joined #RubyOnRails
[00:53:57] shanemcd_: has joined #RubyOnRails
[00:55:46] sevenseacat: has joined #RubyOnRails
[00:55:52] ethe: not sure how to, I assumed they would compile automatically
[00:56:03] Radar: ethe: where are you deploying your app to?
[00:56:10] medright: has joined #RubyOnRails
[00:56:45] maloik: has joined #RubyOnRails
[00:57:36] ethe: Radar dokku on my own server
[00:58:05] Radar: ethe: Ok, then you'll need to run `rake assets:precompile` either locally and then commit that output, or make dokku do that during deploy.
[00:59:38] Emily_: has left #RubyOnRails: ()
[00:59:47] Emily: has joined #RubyOnRails
[01:00:39] ethe: eyyy! Radar: https://alpha.ethe.co
[01:00:50] nyaa: has joined #RubyOnRails
[01:00:51] Radar: ethe: Well done :)
[01:01:11] RegulationD: has joined #RubyOnRails
[01:01:39] hardtail: Is it true if you have to run that rake job that I am doing something wrong in my CSS? That's what I was told in school anyway..
[01:01:57] Radar: hardtail: missing some words there
[01:02:23] reaVer_: has left #RubyOnRails: ()
[01:02:23] grotewold: has joined #RubyOnRails
[01:02:46] Sawbones: has joined #RubyOnRails
[01:02:48] ethe: Radar: Thanks for your help. Hopefully this is the road to structured applications rather than hacky sites whacked together with a bit of every language.
[01:04:06] hardtail: Radar: Ah :) so I was told that if I use rake assets:precompile to get my styling to work on production, I am breaking Rails convention somehow?
[01:04:11] ethe: I genuinely use 3 languages in my last project, a python web scraper which interfaced to a go backend (db-operator), and a lua webserver to serve the actual webapp
[01:04:20] Radar: hardtail: nope, that's the command that you need to run.
[01:04:48] hardtail: that's what I thought :S ok, thanks
[01:05:14] ethe: Now to see if my app actually works, I should automatically update the picture of the day at 7am. I might as well sleep for 6 hours while i wait :)
[01:06:34] lasker85: has joined #RubyOnRails
[01:06:57] rhizome: writing tests would tell you sooner :P
[01:07:21] htmldrum_: has joined #RubyOnRails
[01:07:28] roshanavand: has joined #RubyOnRails
[01:09:28] hardtail: good morning
[01:10:02] sevenseacat: has joined #RubyOnRails
[01:11:03] pulgalipe: has joined #RubyOnRails
[01:11:29] shanemcd: has joined #RubyOnRails
[01:12:38] kitsuneyo: has joined #RubyOnRails
[01:13:19] baweaver: has joined #RubyOnRails
[01:15:04] reoring: has joined #RubyOnRails
[01:17:26] argoneus: this is cool
[01:17:30] maloik: has joined #RubyOnRails
[01:17:52] argoneus: rails automatically sets up all the configs, databases, coffeescript, scss etc
[01:19:16] argoneus: i feel like i opened a whole new world
[01:19:17] Scriptonaut: has joined #RubyOnRails
[01:20:39] Scriptonaut: hey guys, I've used rbenv for the longest time, however I decided to experiment with rvm on a project I was working on writing ruby on a raspberry pi. Gemsets are so nice, I really hate having to always prepend my statements with bundle exec. Those of you that use rbenv, how do you deal with gem collisions that occur, do you just use bundle exec on everything like I do?
[01:21:56] sevenseacat: I don't use rbenv, but I always use bundle exec (aliased to be in my shell)
[01:22:10] Scriptonaut: ya, I ended up using aliases as well
[01:22:22] Scriptonaut: one issue with gemsets is you end up installing a lot of the same gems multiple times
[01:23:02] Radar: argoneus: !r4iafree
[01:23:02] helpa: argoneus: The first 3 chapters of Rails 4 in Action can be found for free at https://manning.com/books/rails-4-in-action. They're a great introduction to Ruby on Rails!
[01:23:13] Radar: argoneus: ^ A book I wrote about Rails that explains some of this stuff if you haven't read anything like it before.
[01:23:32] sevenseacat: ooh good tip.
[01:23:53] Scriptonaut: Radar: have you read "The Rails 4 Way"?
[01:24:06] Scriptonaut: how's it compare to your book, should I buy your book or is it kinda the same thing
[01:24:22] Radar: Scriptonaut: Rails 4 Way is great as a reference book, but it isn't a complete tutorial by any stretch of the imagination.
[01:24:37] Radar: Rails 4 in Action takes you from "this is Rails" to "we have now deployed the application in a production environment"
[01:24:50] Scriptonaut: ah, so you write a project along the way
[01:24:51] argoneus: that advertising tho
[01:24:53] wsewolod: has joined #RubyOnRails
[01:24:57] Scriptonaut: what kinda project
[01:25:07] annlewis: has joined #RubyOnRails
[01:25:21] sevenseacat: argoneus: if there were other better resources out there, we'd link to those instead
[01:25:23] nickenchuggets: has joined #RubyOnRails
[01:25:26] robbyoconnor: has joined #RubyOnRails
[01:25:27] hardtail: Scriptonaut Buy R4IA, you will be sorry you didn't!
[01:25:36] stannard: has joined #RubyOnRails
[01:26:21] Scriptonaut: Ok, my work buys all my books so no money out of my pocket ;)
[01:26:28] Scriptonaut: I'll ask them to order it
[01:26:31] banister: has joined #RubyOnRails
[01:26:40] Scriptonaut: anyone have a link to the best place to buy the most recent edition?
[01:26:42] one_zero: has joined #RubyOnRails
[01:27:25] Scriptonaut: oh, you guys already linked sorry
[01:28:05] roshanavand: has joined #RubyOnRails
[01:29:43] lessless: has joined #RubyOnRails
[01:29:53] baweaver: has joined #RubyOnRails
[01:31:00] hardtail: howdy pontiki. how are you?
[01:31:12] pontiki: fairly well
[01:31:29] pontiki: put in 9.5 hours today, mostly because i worked from home
[01:31:55] hardtail: busy day, everything go as expected?
[01:32:54] pontiki: had at least one huge stupid breakdown, and climbed out of it
[01:34:14] Radar: bbl lunching
[01:34:28] Radar: Scriptonaut: It builds a project management app
[01:34:42] Radar: Code from the book ishere: https://github.com/rubysherpas/r4ia_examples
[01:34:49] quazimodo: has joined #RubyOnRails
[01:35:34] Scriptonaut: sevenseacat: you wrote part of the book too? Or just wrote the code for it
[01:35:36] hardtail: good to hear pontiki, not fun when you can't climb out of the hole lol
[01:35:40] ktchup: has joined #RubyOnRails
[01:35:47] sevenseacat: Scriptonaut: I am a co-author of the book.
[01:35:54] Scriptonaut: you're yehuda katz?
[01:36:02] sevenseacat: no. I'm Rebecca Skinner.
[01:36:25] Radar: I'm Ryan Bigg.
[01:36:36] Scriptonaut: are you guys semi-famous in the rails world or what?
[01:36:42] Radar: Yes, I am.
[01:36:48] sevenseacat: he is. I'm not.
[01:36:53] Scriptonaut: Have you heard of Veezus Kreist?
[01:36:58] Scriptonaut: from hashrocket
[01:37:08] Radar: I go to conferences and people say two things: "YOU'RE RYAN BIGG?!" and then "I expected you were older!"
[01:37:13] Radar: Yes, I know him
[01:37:23] Scriptonaut: I've been working with Veez the last 6-7 months
[01:37:27] Scriptonaut: pairing with him like 8 hours a day
[01:37:31] Scriptonaut: I'll ask him if he knows ya
[01:37:45] Scriptonaut: he seems to know everyone, was friends with tpope and stuff
[01:38:01] Radar: Ok, lunching now for realsies.
[01:38:24] pontiki: at least they don't tell you "i expected you to be much smaller"
[01:38:43] Scriptonaut: I think the opposite would be more insulting
[01:38:48] maloik: has joined #RubyOnRails
[01:39:15] Radar: Scriptonaut: tell him I said hi
[01:39:16] Radar: ACTION disappears
[01:40:10] pfg: has joined #RubyOnRails
[01:40:48] baweaver: has joined #RubyOnRails
[01:40:56] sevenseacat: my internet is being soooooo slooooooow today
[01:41:12] Scriptonaut: Radar: Veez says hi
[01:44:17] sevenseacat: looks like I am not doing anything but the bare essentials today
[01:44:53] shibabu: has joined #RubyOnRails
[01:46:29] stannard: has joined #RubyOnRails
[01:46:31] ellisTAA: has joined #RubyOnRails
[01:47:29] quazimodo: has joined #RubyOnRails
[01:47:47] lasker85: has joined #RubyOnRails
[01:48:41] roshanavand: has joined #RubyOnRails
[01:49:44] kmckelvin: has joined #RubyOnRails
[01:50:43] K_r3aPeR: has joined #RubyOnRails
[01:51:28] xlegoman: has joined #RubyOnRails
[01:54:49] ishamo: has joined #RubyOnRails
[01:56:35] hardtail: haha that bad eh, has your connection taken you back to the 90s, sevenseacat?
[01:57:07] ellisTAA: if i set the session[:user_id] to equal user.id can???t someone just change the params on a form to a different user id and act as someone else?
[01:57:33] shanemcd_: has joined #RubyOnRails
[01:57:42] sevenseacat: ellistaa: if you're doing direct assignment to that session user ID from a user-submitted variable, then yes
[01:58:07] sevenseacat: you shouldnt be doing that.
[01:58:47] ellisTAA: sevenseacat: i usually do session[:user_id] = @user.id when they log in ???
[01:59:02] sevenseacat: thats not a user-submitted value though, is it?
[01:59:09] sevenseacat: you authenticate the user first
[01:59:23] ellisTAA: sevenseacat: true ???
[02:01:09] maloik: has joined #RubyOnRails
[02:01:12] reoring: has joined #RubyOnRails
[02:01:55] argoneus: if I modify my models many times during development, I'll end up with many migration files, right?
[02:02:21] argoneus: is there an easy way to consolidate them then? from what I've read all people say is "no don't do this there's no reason to"
[02:02:42] sevenseacat: you really don't need to
[02:02:52] argoneus: but I don't want 150 useless files in my repo ;_;
[02:03:46] sevenseacat: they come into more use when you have multiple people working on a project - they provide steps to get from one version of a database to any other version
[02:03:57] argoneus: but when you are done developing and you deploy to prod
[02:04:02] argoneus: there's no reason to have your old stuff, no?
[02:04:13] sevenseacat: then other people might have an older version of the db that needs to be migrated forward still
[02:04:19] argoneus: I can see the use of this when you already have something working and you want to have backup just in case
[02:04:32] argoneus: but during development you'll flood it with migrations, no?
[02:05:08] sevenseacat: I don't know about 'flood' - you wont be making that many schema changes
[02:05:34] argoneus: like 40 sounds reasonable for a small project
[02:05:35] Tempesta: has joined #RubyOnRails
[02:05:42] argoneus: that's 40 useless files on the prod server
[02:05:48] sevenseacat: space is cheap
[02:06:03] argoneus: im using ruby
[02:06:12] argoneus: if I care about maximum efficiency and saving every byte of memory I picked the wrong language
[02:06:26] argoneus: (didnt mean any offense by that)
[02:06:33] sevenseacat: haha exactly :P
[02:06:48] sevenseacat: optimized for developer happiness, not server happiness
[02:07:14] argoneus: im happy with it so far
[02:07:23] siaW: has left #RubyOnRails: ()
[02:07:24] argoneus: I wrote like 3 commands and edited 2 files
[02:07:29] argoneus: and I already have a working website with a controller
[02:07:31] thejamespinto: has joined #RubyOnRails
[02:07:33] argoneus: just need to implement it
[02:07:39] argoneus: but still, it's cool
[02:07:39] mostlybadfly: has joined #RubyOnRails
[02:07:46] phillips1012: has joined #RubyOnRails
[02:07:52] argoneus: it's like the rails devs were like "ok lads I fucking hate writing websites, how do we make it bearable"
[02:08:25] sparr: has joined #RubyOnRails
[02:08:38] sevenseacat: heh, you're looking at scaffolding arent you
[02:09:12] roshanavand: has joined #RubyOnRails
[02:09:14] argoneus: im not sure I understand this properly
[02:09:21] argoneus: are scaffolds basically "ok my website will have articles"
[02:09:41] argoneus: rails generate scaffold article
[02:09:43] argoneus: well that was easy
[02:09:46] sevenseacat: scaffolds are a quick and easy way to generate a lot of code that you'll likely end up rewriting or removing part of, especially if you dont know how they work
[02:09:58] sevenseacat: I would normally build it piece by piece
[02:10:39] ewnd9: has joined #RubyOnRails
[02:10:44] Sawbones: has joined #RubyOnRails
[02:10:56] roxtrongo: has joined #RubyOnRails
[02:12:04] argoneus: well but still
[02:12:23] argoneus: rails gives me the tools to generate a lot of boilerplate code
[02:12:30] argoneus: and focus on what I actually want to do
[02:12:34] benlakey: has joined #RubyOnRails
[02:13:26] argoneus: also the easy integration with coffeescript and scss is nice
[02:13:53] sevenseacat: I'm not a fan of coffeescript, but sass is great.
[02:13:56] argoneus: (I hate both javascript and css)
[02:14:15] sevenseacat: most people hate javascript.
[02:14:23] argoneus: coffeescript looks similar to ruby syntax
[02:14:26] argoneus: so I guess it's nice
[02:15:41] sevenseacat: it will cause a lot of problems if you dont know JavaScript well before using it, though
[02:16:28] argoneus: ill just learn all this stuff
[02:16:30] jhass: ugh, are we still at it?
[02:16:32] argoneus: learning is fun
[02:16:41] argoneus: jhass: what happened?
[02:16:56] jhass: by this time you could have worked through http://guides.rubyonrails.org/getting_started.html
[02:17:31] drbayer: has joined #RubyOnRails
[02:17:38] argoneus: but im working through that jhass
[02:17:46] sevenseacat: all good. i dont mind discussing stuff while they do that.
[02:17:47] argoneus: if you read what we were discussing I was mostly being happy about rails
[02:17:51] jhass: huh, looked still like meta discussion, sorry
[02:18:16] argoneus: sorry here too for being rude :<
[02:18:31] sevenseacat: learn all of the things! *insert meme
[02:20:26] ellisTAA: has joined #RubyOnRails
[02:25:46] annlewis: has joined #RubyOnRails
[02:28:47] i: has joined #RubyOnRails
[02:28:53] annlewis_: has joined #RubyOnRails
[02:29:48] roshanavand: has joined #RubyOnRails
[02:31:43] ellisTAA: has joined #RubyOnRails
[02:32:14] mary5030: has joined #RubyOnRails
[02:32:41] simplyianm: has joined #RubyOnRails
[02:33:36] rromanchuk: has joined #RubyOnRails
[02:33:38] rromanch_: has joined #RubyOnRails
[02:37:06] crdpink2: has joined #RubyOnRails
[02:37:19] threeminutemonta: has joined #RubyOnRails
[02:38:27] maloik: has joined #RubyOnRails
[02:38:42] codezomb: has joined #RubyOnRails
[02:39:33] owenjones: has joined #RubyOnRails
[02:47:11] ellisTAA: has joined #RubyOnRails
[02:50:18] roshanavand: has joined #RubyOnRails
[02:51:10] grotewold: has joined #RubyOnRails
[02:51:17] banister: has joined #RubyOnRails
[02:51:33] ellisTAA: has joined #RubyOnRails
[02:51:35] reaVer: has joined #RubyOnRails
[02:52:50] tubbo: argoneus: the best advice i can give is that coffeescript might look kinda like ruby or python, but since it compiles to JS it invariably must behave like JS.
[02:52:50] medright: has joined #RubyOnRails
[02:53:01] nyanz: has joined #RubyOnRails
[02:53:29] tubbo: so you get nice things like the last line of any function becomes its return value, but don't get too slick with class inheritance because that's really just syntax sugar for prototypes.
[02:54:37] medright_: has joined #RubyOnRails
[03:00:25] quazimodo: has joined #RubyOnRails
[03:01:22] lacuna: has joined #RubyOnRails
[03:01:23] lacuna: has joined #RubyOnRails
[03:02:06] xlegoman: has joined #RubyOnRails
[03:04:21] shanemcd: has joined #RubyOnRails
[03:05:40] sevenseacat: has joined #RubyOnRails
[03:06:18] maloik: has joined #RubyOnRails
[03:07:49] stannard: has joined #RubyOnRails
[03:08:53] r0bby_: has joined #RubyOnRails
[03:09:11] ellisTAA: has joined #RubyOnRails
[03:09:38] rickmasta: has joined #RubyOnRails
[03:10:50] roshanavand: has joined #RubyOnRails
[03:17:06] ellisTAA: has joined #RubyOnRails
[03:17:47] htmldrum: has joined #RubyOnRails
[03:18:08] MaDErroR123: has joined #RubyOnRails
[03:18:39] _3by8: has joined #RubyOnRails
[03:21:49] towski_: has joined #RubyOnRails
[03:22:25] mustmodify: has joined #RubyOnRails
[03:24:30] mustmodify: OK! I apparently need help thinking. I have a Rails app. I deployed to two environments... edge and staging. same ruby version... far as I know, same OS and versions of MySQL etc. In one, text is properly converted from markdown to a table. In the other, you see the markdown. It is not converted. Why?
[03:25:04] mustmodify: But text in the console is converted.
[03:25:09] mustmodify: in both environments.
[03:25:29] mustmodify: and the content comes from a yaml file that is part of the repo, so that should be the same.
[03:27:43] xlegoman: has joined #RubyOnRails
[03:28:10] jessemcgilallen: has joined #RubyOnRails
[03:29:01] ashishsingh173: has joined #RubyOnRails
[03:29:27] annlewis: has joined #RubyOnRails
[03:30:38] baweaver: has joined #RubyOnRails
[03:31:24] roshanavand: has joined #RubyOnRails
[03:31:51] bronson: has joined #RubyOnRails
[03:33:04] Radar: prove that they are running the same code version
[03:33:24] th0m__: has joined #RubyOnRails
[03:33:36] mustmodify: I assume you mean my code and not ruby version or whatever.
[03:34:35] mustmodify: well played. It actually isn't the same version.
[03:34:38] mustmodify: So that's interesting.
[03:35:32] mustmodify: that opens up a whole new can of worms. And my worms I mean confusing questions.
[03:35:36] mustmodify: But at least it's a lead.
[03:36:57] Radar: ACTION has played this game before :D
[03:40:23] mustmodify: Ah ha... now it can be reproduced.
[03:40:29] mustmodify: But that still sucks.
[03:47:36] shibabu: has joined #RubyOnRails
[03:50:54] grotewold: has joined #RubyOnRails
[03:51:01] kmckelvin: has joined #RubyOnRails
[03:51:59] roshanavand: has joined #RubyOnRails
[03:53:04] teamcoltra: has joined #RubyOnRails
[03:53:46] teamcoltra: Hey guys, I realize I am an idiot but was hoping I could get some basic help, I am trying to use the predictor gem and have got to this part https://github.com/Pathgather/predictor#retrieving-similarities-and-recommendations I don't understand where they want me to put this code, I assumed in the controller, but now how do I call it?
[03:54:15] tds5016: hey. If I run a save that also happens to create the object....
[03:54:22] tds5016: will the create callbacks also run?
[03:54:29] Radar: tds5016: !try
[03:54:29] helpa: tds5016: Why don't you try it and find out for yourself?
[03:54:50] honestemu: has joined #RubyOnRails
[03:54:54] tds5016: because I'm using cassandra as a backend and buffing up my data is a pain in the ass. lol.
[03:55:07] tds5016: which isn't a good reason....
[03:55:29] tds5016: but I'm also worried about it theoretically as well as practically. I want to know what it SHOULD be doing.
[03:55:44] Radar: Why do you think that the create callbacks won't be triggered when something is created?
[03:55:46] pwnd_nsfw: http://guides.rubyonrails.org/active_record_callbacks.html
[03:56:04] Radar: I wonder what leads you to thinking these things. You had the same question for updating records + updating callbacks a few hours ago.
[03:56:12] tds5016: Radar: I wasn't sure if it would "know" that a create is what the .save method was actually doing.
[03:56:22] Radar: Why on earth would a CREATE CALLBACK _not_ be triggered on a _CREATE_?
[03:56:37] pwnd_nsfw: 2 + 2 = ?????
[03:56:50] Radar: pwnd_nsfw: 5, but only for large values of 2.
[03:56:53] mustmodify: tds5016: an ORM that didn't know the difference between creating something and saving it, ie adding a new row vs updating an existing row, would be a pretty poor one.
[03:57:01] tds5016: Radar It SHOULD be. :-). I wasn't sure if active record handled the case is all.
[03:57:07] Radar: tds5016: yes, it does.
[03:57:17] Radar: tds5016: This is covered in the guides and Rails 4 in Action.
[03:57:24] tds5016: thanks guys. Sorry for the clearly dumb question :-/.
[03:57:25] mustmodify: at > 10 years old, most cases have been discovered. :)
[03:57:27] tubbo: sorry tds5016, it's just a pretty obvious question haha
[03:57:48] tds5016: tubbo: fair points.
[03:58:03] mustmodify: though I'm pretty sure save and create callbacks both ran in 2006.
[03:58:11] tubbo: a better question would be "hey, i'm doing $THING, why aren't my create callbacks being saved?"
[03:58:11] pwnd_nsfw: Radar blows up when trivial questions are asked ;p
[03:58:22] Radar: pwnd_nsfw: naw there's usually a reason behind most of them
[03:58:31] Radar: pwnd_nsfw: I banned mices again today for being ridiculously stupid.
[03:58:35] tubbo: Radar's style of snarkiness is just different than mine
[03:58:38] maloik: has joined #RubyOnRails
[03:58:42] Radar: pwnd_nsfw: They tried running JS code in the rails console.
[03:58:52] tubbo: definitely a dude, btw
[03:59:05] tubbo: when was the last female taxi driver you met? no offense.
[03:59:07] Radar: "Run the code in your browser's console, see what it says?"
[03:59:14] tubbo: just saying, i've never met one. uber/lyft drivers do not count.
[03:59:23] Radar: "It is just saying '#listing_bid_amount'"
[03:59:25] Radar: "Screenshot plz"
[03:59:26] tubbo: Radar: that was hilarious
[03:59:31] Radar: "<screenshot of rails console>"
[03:59:39] pwnd_nsfw: mices is crazy man...
[03:59:51] tubbo: what if he was just the best troll who ever lived
[03:59:54] tubbo: he played the long con
[03:59:59] pwnd_nsfw: He beats Jesus even.
[04:00:04] mustmodify: the long con.
[04:00:08] tubbo: pwnd_nsfw
[04:00:08] mustmodify: Let me think.
[04:00:19] mustmodify: If I just wanted to seriously troll a dev channel.
[04:00:26] tds5016: one other question.... stupid one I'm sure... which if it is tell me I'm dumb and I'll call it a night. lol. Is there a way to tell which action kicked off the after_save callbacks?
[04:00:37] mustmodify: which action?
[04:00:44] Radar: tds5016: !xy
[04:00:44] helpa: tds5016: It seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
[04:00:46] mustmodify: like, controller action?
[04:00:47] tds5016: like create/update, etc.
[04:01:06] tubbo: mustmodify: you'd...probably ask stupid questions, and keep pretending like you don't know what you're talking about. then you'd keep trying to get people's attention when they ignored you with MORE stupid questions/ideas. you'd reject most people's help, even ignore them when they talk to you.
[04:01:09] pwnd_nsfw: That is interesting, but seems redundant.
[04:01:11] mustmodify: No and that question worries me.
[04:01:13] tubbo: which is exactly what happened.
[04:01:33] pwnd_nsfw: tubbo can u hlp me plz
[04:01:50] mustmodify: tds5016: no and that question worries me. Why would you want to know?
[04:01:54] teamcoltra: I have tried putting <%= @recommender.similarities_for(@books.id) %> in my html.erb file but that didn't work it just leaves a blank space.
[04:01:54] K0nserv-: has joined #RubyOnRails
[04:01:55] tds5016: Radar: I was trying to write an after save_that would handle the case for both when I update, create, and save a model.
[04:02:11] tubbo: /msg chanserv kick #rubyonrails pwnd_nsfw ewpz
[04:02:12] rhizome: that's called after_save
[04:02:13] tds5016: after_save that**
[04:02:38] tubbo: i'm telling you man, i got my tinfoil hat on for this one
[04:02:43] tds5016: sorry... lemme rephrase.
[04:02:48] mustmodify: tds5016: out of <morbid> curiosity, what is it you're doing in this callback?
[04:02:56] pwnd_nsfw: has joined #RubyOnRails
[04:02:59] tds5016: I wanted to handle them slightly different ways.
[04:03:04] tubbo: you actually could if it was before_save
[04:03:08] rhizome: then use different methods
[04:03:10] tubbo: because you could check if new_record?
[04:03:18] Radar: tds5016: Stop. Go read the !xy tip.
[04:03:23] Radar: tds5016: Then come to us with some real code.
[04:03:43] mustmodify: tubbo: Well heck if you were going to do that, then just check the time since created_at. :)
[04:04:05] tds5016: Radar I will, but now I'm curious must modify: how would I check that at the before_save callback?
[04:04:18] mustmodify: tds5016: That was totally a joke.
[04:04:21] Radar: tds5016: Please follow all lighted signs and crew member instructions.
[04:04:23] tds5016: mustmodify: and it's because I have three cassandra tables I need to keep in sync.
[04:04:26] Radar: tds5016: !xy
[04:04:26] helpa: tds5016: It seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
[04:04:37] tds5016: but it makes sense that you can't.
[04:05:10] shinenelson: has joined #RubyOnRails
[04:05:27] tubbo: tds5016: it's also better if you can show us code, like "here is my method, <gist>, i'm doing it after_save, but i need to change its behavior based on whether we're creating or updating."
[04:05:47] tubbo: because we may offer a solution you never thought about
[04:06:06] pwnd_nsfw: has joined #RubyOnRails
[04:06:11] tds5016: unfortunately I can't share code on this project :-/. I need to create a generalized sample.
[04:06:15] tds5016: I'll do that tomorrow :-)
[04:06:28] tds5016: thanks for your help guys. again, sorry for the dumb question.
[04:06:35] tds5016: questions*
[04:06:47] pwnd_nsfw: I have issues with Linux more than not.
[04:07:16] mustmodify: tds5016: before you go, I have one suggestion. I suspect what you are doing is .... maybe not kosher ... but let me put together a quick example of what I do in lieu of callbacks.
[04:07:32] tubbo: pwnd_nsfw: yeah but look at your shiny new ipv6 hostmask
[04:07:42] tds5016: mustmodify: that would be awesome. I have a feeling you're absolutely right and what I'm doing isn't kosher. :-)
[04:08:03] Radar: tds5016: !rule3.3
[04:08:03] helpa: tds5016: NO FAKE CODE. If you're under an NDA, we cannot help you with your problem. Go hire a consultant.
[04:08:56] sevenseacat: has joined #RubyOnRails
[04:08:59] pwnd_nsfw: ooo so shiney!
[04:10:45] ewnd9: has joined #RubyOnRails
[04:11:30] braincrash: has joined #RubyOnRails
[04:12:32] roshanavand: has joined #RubyOnRails
[04:13:13] mustmodify: tds5016: https://gist.github.com/mustmodify/632951a5416c21d96464
[04:13:57] mustmodify: avoids callbacks and makes it easy to test "special case" behaviors without doing any kind of 'concern' stuff, which smells bad to me.
[04:15:03] tds5016: that looks really awesome! Thanks man! it also cleans it up so I can do things in the console when I need to.
[04:15:23] mustmodify: and as a bonus, when you're ready to switch to async stuff, like with resque, you already have the worker tasks separated out.
[04:15:43] Guest16359: has joined #RubyOnRails
[04:16:03] tds5016: the things you're inheriting... those are just sample things and not actual things that are important to the example right?
[04:16:16] tds5016: (Just wanna make sure I'm not missing something insanely obvious)
[04:16:28] mustmodify: tds5016: 'Valuable' is a gem.
[04:16:49] mustmodify: it provides #has_value and #has_collection, which are like attr_accessor on steoids.
[04:17:07] tds5016: oh, I see. thanks!
[04:17:12] mustmodify: but obviously you don't NEED valuable to do that.
[04:17:26] tds5016: also, where would you generally place that in the directory structure?
[04:17:29] mustmodify: But I find it saves me a lot of time.
[04:17:30] tds5016: I am assuming not in models?
[04:17:33] mustmodify: I create app/aides
[04:17:49] mustmodify: though I have been thinking about using app/events for my next project.
[04:17:56] mustmodify: As long as you're consistent it kind of doesn't matter
[04:18:44] mustmodify: and AR:B is actually wrong. I meant for that to be ApplicationController. I'll fix that now. Kind of a dumb mistake.
[04:19:08] tds5016: oh okay :-). I was literally just about to take that :-)
[04:19:10] Pazician: has joined #RubyOnRails
[04:19:14] tds5016: thanks again! that really helps me out a lot!
[04:19:40] dmarr: has joined #RubyOnRails
[04:19:48] baweaver: has joined #RubyOnRails
[04:20:06] mustmodify: tds5016: please note, though, that what I understand of your plan doesn't make it sound like a good plan. I mean, this will help, but ... there may be another solution out there that is exponentially better.
[04:20:20] maloik: has joined #RubyOnRails
[04:20:36] tds5016: mustmodify: actually this is exactly what I was looking for.
[04:21:27] mustmodify: that's kind of my point. It's what you were looking for. So enjoy... but sometimes what you're seeking and what you should be doing aren't the same thing.
[04:22:13] tds5016: my goals were to 1. do the work of managing multiple models in one place. 2. not break the console updating :-).
[04:23:43] tds5016: mustmodify: yeah, I think this is actually the perfect solution, because I will only really be updating one of the models directly; the other two I need to keep in sync are actually just different views of that same data.
[04:25:06] pawnbox: has joined #RubyOnRails
[04:26:12] bronson: has joined #RubyOnRails
[04:26:36] tds5016: thanks again everyone must modify I owe you a beer :-)
[04:27:28] Guest16359: has joined #RubyOnRails
[04:28:37] mustmodify: Radar: ah, found it. Apparently you can't put markdown in yaml using the heredoc thing because that adds extra spaces on the left, which markdown interprets as an indent, meaning it must be code.
[04:29:01] djbkd: has joined #RubyOnRails
[04:29:58] Radar: mustmodify: that'll do it
[04:30:10] mustmodify: which sucks.
[04:30:23] annlewis: has joined #RubyOnRails
[04:31:31] juddey: has joined #RubyOnRails
[04:33:10] roshanavand: has joined #RubyOnRails
[04:33:29] mustmodify: So I created my first microservice. It's pretty cool actually. http://artisan.physioagereporting.com/spectrum.svg?ranges=lbl:Decreased+coronary+blood+flow,cls:C,rng:50-130%7Clbl:Deconditioned,cls:B,rng:130-180%7Clbl:Healthy,cls:H,rng:180-220%7Clbl:Athletic,cls:O,rng:220-350&value=155&units=%25&style=narrow
[04:34:20] joshkovach: has joined #RubyOnRails
[04:34:40] ElectricAlan: has joined #RubyOnRails
[04:34:49] ElectricAlan: hey all, after soem help
[04:35:23] ElectricAlan: I installed bootstrap on my application using the appropriate gem, now I found a free bootstrap theme I want to utilize
[04:35:45] maloik: has joined #RubyOnRails
[04:36:10] ElectricAlan: the instructions say to replace the bootstrap css file, I'm jsut wondering what that is
[04:37:21] htmldrum_: has joined #RubyOnRails
[04:37:24] mustmodify: rhizome: a microservice with a macrourl.
[04:37:26] ellisTAA: has joined #RubyOnRails
[04:38:02] ElectricAlan: where* that is
[04:38:39] rhizome: i think that url is turing complete
[04:39:26] ElectricAlan: my application.css file has @import "bootstrap" in it, but idk where it's importing from
[04:40:13] rhizome: ElectricAlan: it's probably supplied by the bootstrap gem
[04:40:44] ElectricAlan: yeah I could beleive that
[04:40:55] ElectricAlan: so it's sitting in whatever file the gems are located in
[04:41:06] ElectricAlan: should go check my default gem install file
[04:41:17] ElectricAlan: s/file/directory/
[04:44:25] mloy: has joined #RubyOnRails
[04:45:22] rhizome: i imagine a theme file would be listed after the overall bootstrap gem
[04:45:36] jahbrewski: has joined #RubyOnRails
[04:45:37] Radar: If I want to upload files from my Rails app directly to S3 without using Paperclip/Carrierwave/whatever, what would be a good gem to do that?
[04:45:38] rhizome: file, whatever.
[04:46:04] mustmodify: I remember paperclip seemed to use aws-s3
[04:46:07] sevenseacat: the aws-s3 gem?
[04:46:36] ElectricAlan: bundle show <gemname> shows me the install location, promising
[04:46:41] Radar: https://rubygems.org/gems/aws-s3 Which doesn't seem to be maintained.
[04:46:45] rhizome: ElectricAlan: you're getting colder
[04:46:54] Radar: https://rubygems.org/gems/aws-sdk
[04:46:56] Radar: Maybe this is the one now.
[04:47:02] rhizome: i think so
[04:47:07] shanemcd: has joined #RubyOnRails
[04:47:37] rhizome: hm why is nginx installed on this machine
[04:47:40] mustmodify: Radar: Oh, yeah, that sounds like it.
[04:47:45] Radar: Thanks all :)
[04:48:42] ElectricAlan: rhizome, what do you mean then by a theme file is listed after the boostrap?
[04:48:47] rickmasta: has joined #RubyOnRails
[04:48:54] rhizome: in your asset manifest
[04:49:03] towski_: has joined #RubyOnRails
[04:49:06] rhizome: where you got that @import line before
[04:50:28] ElectricAlan: oh ok, so I jsut want to stick my theme file in app/assets/stylesheets and import from it applications.css
[04:50:32] ElectricAlan: that seems simple enough
[04:50:47] rhizome: i'm just guessing
[04:51:17] ElectricAlan: yeah fair enough
[04:51:24] ElectricAlan: thanks for the help, thoroughly appreciated
[04:52:51] owenjones: has joined #RubyOnRails
[04:52:51] ElectricAlan: awesome, rhizome that got me exactly what I want
[04:53:14] ElectricAlan: sweet, I'm v pleased by my progress here
[04:53:50] ElectricAlan: now I can move onto actual functional issues, for example, my users edit form is saving as a new user instead of upsating the existing one
[04:54:02] ElectricAlan: I suspect I might be sending it to the wrong action at some point
[04:55:41] rhizome: sounds like it
[04:58:30] tyoc213: has joined #RubyOnRails
[05:00:56] annlewis: has joined #RubyOnRails
[05:04:07] ImmovebleOne: has joined #RubyOnRails
[05:05:36] viiralvx: has joined #RubyOnRails
[05:06:19] MaDErroR123: has joined #RubyOnRails
[05:07:39] Klumben: has joined #RubyOnRails
[05:11:42] Karpah: has joined #RubyOnRails
[05:11:55] bergs: has joined #RubyOnRails
[05:12:57] maloik: has joined #RubyOnRails
[05:13:55] roshanavand: has joined #RubyOnRails
[05:31:38] paradisaeidae: has joined #RubyOnRails
[05:33:09] maloik: has joined #RubyOnRails
[05:33:41] pawnbox: has joined #RubyOnRails
[05:34:45] roshanavand: has joined #RubyOnRails
[05:41:09] bhaveshletter: has joined #RubyOnRails
[05:41:25] srinidhi: has joined #RubyOnRails
[05:43:05] pontiki: has joined #RubyOnRails
[05:50:21] shibabu: has joined #RubyOnRails
[05:50:25] pawnbox: has joined #RubyOnRails
[05:50:50] pawnbox: has joined #RubyOnRails
[05:51:00] stannard: has joined #RubyOnRails
[05:52:25] kmckelvin: has joined #RubyOnRails
[05:55:19] roshanavand: has joined #RubyOnRails
[05:56:11] pawnbox: has joined #RubyOnRails
[05:57:45] ewnd9_: has joined #RubyOnRails
[06:00:42] ddarko: has joined #RubyOnRails
[06:01:12] krz: has joined #RubyOnRails
[06:06:54] Cork: has joined #RubyOnRails
[06:08:28] annlewis: has joined #RubyOnRails
[06:08:55] ewnd9: has joined #RubyOnRails
[06:09:03] kmckelvin: has joined #RubyOnRails
[06:10:58] simplyianm: has joined #RubyOnRails
[06:11:26] ewnd9: has joined #RubyOnRails
[06:13:04] nickenchuggets: has joined #RubyOnRails
[06:15:30] n00bDev: has joined #RubyOnRails
[06:15:55] roshanavand: has joined #RubyOnRails
[06:17:39] n00bDev: I'm getting a UnintiliazedConstant name error for one of my worker files that uses sidekiq on heroku, any idea what this means?
[06:22:12] sevenseacat: it means you have an uninitialized constant
[06:22:16] baweaver: That there's an uninitialized constant?
[06:22:42] quazimodo: does request.env["foo"] = "bar" work correctly in modern rspec
[06:22:51] quazimodo: or didthey remove the ability to set request.env keys
[06:22:58] helpa: Why don't you try it and find out for yourself?
[06:25:27] n00bDev: actually i found out i didnt have a Procfile
[06:25:30] n00bDev: probably why
[06:25:37] quazimodo: baweaver: yes perhaps i tried it and found that it's not working and am asking for confirmation after googling for an hour
[06:25:38] darutoko: has joined #RubyOnRails
[06:25:44] n00bDev: btw does anyone know what the -c mean? cant find anything
[06:25:45] n00bDev: bundle exec sidekiq -c 3
[06:26:12] baweaver: quazimodo: then it would be a good idea to phrase it as such.
[06:26:16] Radar: n00bdev:https://github.com/mperham/sidekiq/wiki/Advanced-Options#concurrency
[06:26:20] quazimodo: i'll ask in #rspec, i forgot that that existed
[06:26:22] Radar: quazimodo: hi again
[06:26:24] baweaver: it sounded like you hadn't yet
[06:27:04] edwinvdgraaf: has joined #RubyOnRails
[06:27:09] n00bDev: thanks Radar
[06:27:17] sevenseacat: 'does this work?' != 'i tried this and it doesnt work'
[06:27:48] xlegoman: has joined #RubyOnRails
[06:28:19] baweaver: DANGIT JAVASCRIPT
[06:28:44] baweaver: code review twitch
[06:28:48] sevenseacat: = assign == equals === NO REALLY EQUALS
[06:29:06] baweaver: === ruby lol redefine special usecases!
[06:29:11] mary5030: has joined #RubyOnRails
[06:29:19] edwinvdg_: has joined #RubyOnRails
[06:29:33] sevenseacat: you forgot .eq and .eql in ruby
[06:29:44] Radar: override #hash on any object for good times
[06:29:56] Radar: class String; def hash; SecureRandom.uuid; end; end;
[06:30:02] Radar: Chuck that at line 666 of your largest model
[06:30:22] _3by8: has joined #RubyOnRails
[06:30:56] Radar: Or I might be misremembering what that method does because now I can't make it blow up hilariously.
[06:31:15] sevenseacat: needs more explosions
[06:31:17] netzfisch: has joined #RubyOnRails
[06:32:05] rvanlieshout: has joined #RubyOnRails
[06:33:00] baweaver: Radar: https://aphyr.com/posts/173-monkeypatching-is-for-wimps-use-set-trace-func
[06:33:31] roxtrongo: has joined #RubyOnRails
[06:34:22] netzfisch: has joined #RubyOnRails
[06:34:52] krz: has joined #RubyOnRails
[06:36:31] roshanavand: has joined #RubyOnRails
[06:37:25] sevenseacat: # Enforce immutable programming. Silently.
[06:37:26] mooru: has joined #RubyOnRails
[06:37:27] quazimodo: Radar: https://gist.github.com/siassaj/385957286133637204c6
[06:37:40] Radar: quazimodo: Controller or request spec?
[06:37:57] _3by8: Is it possible to order the results of a query that gets information on two seperate models such that each individual model is ordered how I like it? Currently the query is ordered by the order in which the relationship between the two models was created. Let's say I have two models: users and printers and a third model called ownership joins the two. I'd like to know how to query the
[06:37:57] _3by8: database to sort the models being joined instead of just the join.
[06:37:57] Radar: https://gist.github.com/siassaj/385957286133637204c6#file-spec-rb-L8
[06:38:00] Radar: Why is there a comma here
[06:38:14] Radar: quazimodo: Looks like it'd work.
[06:38:16] kmckelvin: has joined #RubyOnRails
[06:38:17] quazimodo: accidental, i tried to put a header in there, that didn't work either
[06:38:23] aganov: has joined #RubyOnRails
[06:38:37] rromanchuk: has joined #RubyOnRails
[06:38:38] sevenseacat: _3by8: !rule0
[06:38:38] helpa: _3by8: Show rather than tell. Explaining your problem with code, stacktraces or errors is always preferred to explaining it with just text. Show us what's happening, rather than telling us. Put the code on https://gist.github.com and then give us the HTTP link to the Gist.
[06:38:39] rromanch_: has joined #RubyOnRails
[06:38:42] lxsameer: has joined #RubyOnRails
[06:38:45] Radar: request.env['omniauth.auth'] remains nil?
[06:39:03] Radar: env should never be a blank hash.
[06:39:59] _3by8: sevenseacat, sorry, just a hypothetical question at this point. No code on that yet since I don't know where to begin ordering models attached to each other through a join by has_many/belongs_to.
[06:40:13] alaing: has joined #RubyOnRails
[06:40:38] alaing: has joined #RubyOnRails
[06:41:05] Radar: _3by8: I'm seeing it as like product has_many :images, through :product_images, where product_images has a position column
[06:41:20] Radar: _3by8: product.product_images.order(:position).each do |image| image.image
[06:43:44] quazimodo: https://gist.github.com/siassaj/385957286133637204c6
[06:44:43] tyoc213: has left #RubyOnRails: ("Leaving")
[06:44:47] quazimodo: the integration specs all have a meaningful env
[06:44:51] quazimodo: request specs etc
[06:44:56] quazimodo: but controller specs don't seem to
[06:45:31] yfeldblum: has joined #RubyOnRails
[06:45:52] quazimodo: so if they are meant to, then maybe i've messed something up somewhere
[06:47:47] sevenseacat: i dont have any controller specs in my current app so i cant test that out
[06:48:20] ashishsingh173: has joined #RubyOnRails
[06:49:25] ss_much: has joined #RubyOnRails
[06:49:29] trautwein: has joined #RubyOnRails
[06:49:30] tagrudev: has joined #RubyOnRails
[06:49:49] quazimodo: maybe i'm not meant to use env but request.env
[06:50:25] quazimodo: $99 says this has something to do with rspec bypassing something internal
[06:51:12] qejk: has joined #RubyOnRails
[06:51:39] sevenseacat: one of the many reasons why controller tests are a waste of time, imo.
[06:53:23] shibabu: has joined #RubyOnRails
[06:54:07] maloik: has joined #RubyOnRails
[06:55:00] SteenJobs: has joined #RubyOnRails
[06:55:33] yardenbar: has joined #RubyOnRails
[06:57:02] sevenseacat: I write them sometimes. very rarely.
[06:57:04] roshanavand: has joined #RubyOnRails
[06:58:09] quazimodo: sevenseacat: typically i agree
[06:58:19] quazimodo: on api i only really do api tests, this is for a small engine
[07:04:35] Pazician: has joined #RubyOnRails
[07:05:26] netzfisch: has joined #RubyOnRails
[07:09:07] annlewis: has joined #RubyOnRails
[07:09:20] nocontrol: has joined #RubyOnRails
[07:12:34] pawnbox: has joined #RubyOnRails
[07:12:38] stannard: has joined #RubyOnRails
[07:14:40] sandstrom: has joined #RubyOnRails
[07:17:15] maloik: has joined #RubyOnRails
[07:17:36] roshanavand: has joined #RubyOnRails
[07:19:47] gaussblurinc1: has joined #RubyOnRails
[07:20:22] jas02: has joined #RubyOnRails
[07:22:18] sevenseacat: has joined #RubyOnRails
[07:24:59] eoy: has joined #RubyOnRails
[07:25:33] bronson: has joined #RubyOnRails
[07:27:08] toomus: has joined #RubyOnRails
[07:28:15] toomus: Is it possible to cancel Sucker Punch job?
[07:28:40] kmckelvin: has joined #RubyOnRails
[07:29:40] xlegoman: has joined #RubyOnRails
[07:29:52] gambl0re: has joined #RubyOnRails
[07:31:15] tvw: has joined #RubyOnRails
[07:32:23] bronson: has joined #RubyOnRails
[07:32:49] maloik: has joined #RubyOnRails
[07:34:57] solars: has joined #RubyOnRails
[07:38:09] roshanavand: has joined #RubyOnRails
[07:40:12] build22_: has joined #RubyOnRails
[07:41:55] CJNE: has joined #RubyOnRails
[07:45:47] solars: has joined #RubyOnRails
[07:47:32] dideler: has joined #RubyOnRails
[07:47:52] CJNE: has joined #RubyOnRails
[07:50:03] SteenJobs: has joined #RubyOnRails
[07:50:25] Macaveli: has joined #RubyOnRails
[07:54:01] ur5us: has joined #RubyOnRails
[07:55:10] MaDErroR123: has joined #RubyOnRails
[07:56:52] arBmind: has joined #RubyOnRails
[07:59:31] MaDErroR123: has joined #RubyOnRails
[08:01:36] roshanavand: has joined #RubyOnRails
[08:04:20] maloik: has joined #RubyOnRails
[08:06:19] toomus: has joined #RubyOnRails
[08:07:24] paulodiniz: has joined #RubyOnRails
[08:07:29] toomus: Anyone know is it possible to kill sucker_punch job?
[08:09:50] rvanlieshout: what is 'sucker_punch job'?
[08:09:53] annlewis: has joined #RubyOnRails
[08:10:37] rvanlieshout: hmm. it's a gem
[08:10:47] rvanlieshout: kill a single job?
[08:11:20] Ergo: has joined #RubyOnRails
[08:12:54] toomus: rvanlieshout: sucker punch is gem for asynhronous background jobs in single process
[08:13:19] squiercaster: has joined #RubyOnRails
[08:13:23] rvanlieshout: so it uses threads (i guess)
[08:13:28] toomus: rvanlieshout: yes
[08:13:34] rvanlieshout: then it's going to be hard to kill a single job unless they have an interface for that
[08:13:56] desmondhume: has joined #RubyOnRails
[08:17:00] paulodiniz: has joined #RubyOnRails
[08:17:25] eoy_: has joined #RubyOnRails
[08:20:15] eoy_: has joined #RubyOnRails
[08:20:16] siaW: has joined #RubyOnRails
[08:21:06] siaW: this is my seeds.rb https://gist.github.com/siaw23/3b93528b327692df78f0 on heroku logs im getting NameError: uninitialized constant Faker. any ideas why please?
[08:22:47] rvanlieshout: why would faker be initialized?
[08:22:57] pontiki: siaw: first guess: you have the faker gem in a development / test group in your Gemfile, i.e., only production gems run on heroku
[08:23:27] siaW: pontiki: yes i have it in dev AND test group
[08:23:47] siaW: pontiki: meaning i have to add it to the production group as well?
[08:24:21] shanemcd: has joined #RubyOnRails
[08:25:46] pontiki: my question now is why are you using random data in production?
[08:26:58] siaW: pontiki: why not? it???s an app for learning purposes so i thought it wouldn???t matter
[08:27:37] comrad: has joined #RubyOnRails
[08:27:48] pontiki: fair enough
[08:28:43] siaW: pontiki: ???? thanks :)
[08:28:57] tibra: has joined #RubyOnRails
[08:29:59] pontiki: if you do that, make sure you do the same with factory girl
[08:30:35] kimegede: has joined #RubyOnRails
[08:32:19] quazimodo: has joined #RubyOnRails
[08:32:58] lubekpl: has joined #RubyOnRails
[08:34:14] stannard: has joined #RubyOnRails
[08:35:47] desmondhume: has joined #RubyOnRails
[08:36:10] brunto: has joined #RubyOnRails
[08:36:41] epistrephein: has joined #RubyOnRails
[08:36:48] hahuang65: has joined #RubyOnRails
[08:37:05] AzaToth: has joined #RubyOnRails
[08:41:25] Cervajz: has joined #RubyOnRails
[08:42:10] iateadonut: has joined #RubyOnRails
[08:42:44] Cervajz: has joined #RubyOnRails
[08:42:53] paulodiniz: has joined #RubyOnRails
[08:43:38] bronson: has joined #RubyOnRails
[08:44:40] skullcrasher_: has left #RubyOnRails: ()
[08:45:10] defsdoor: has joined #RubyOnRails
[08:45:17] artto: has joined #RubyOnRails
[08:48:43] mooru: has joined #RubyOnRails
[08:52:29] sandstrom: has joined #RubyOnRails
[08:53:18] Ergo: has joined #RubyOnRails
[08:55:11] shibabu: has joined #RubyOnRails
[08:56:33] ur5us: has joined #RubyOnRails
[08:59:27] arBmind: has joined #RubyOnRails
[08:59:40] edwinvdgraaf: has joined #RubyOnRails
[08:59:58] xlegoman: has joined #RubyOnRails
[09:01:15] Sawbones: has joined #RubyOnRails
[09:01:27] Pumukel: has joined #RubyOnRails
[09:04:43] desmondhume: has joined #RubyOnRails
[09:06:29] poorBastard: has joined #RubyOnRails
[09:08:51] jsrn_: has joined #RubyOnRails
[09:09:35] Puffball: has joined #RubyOnRails
[09:10:39] annlewis: has joined #RubyOnRails
[09:14:25] arBmind: has joined #RubyOnRails
[09:16:35] teclator: has joined #RubyOnRails
[09:18:10] marr: has joined #RubyOnRails
[09:19:29] alaing: has joined #RubyOnRails
[09:19:31] alaing: has joined #RubyOnRails
[09:24:27] Cervajz: has joined #RubyOnRails
[09:29:58] desmondhume: has joined #RubyOnRails
[09:30:08] njero: has joined #RubyOnRails
[09:31:04] annlewis: has joined #RubyOnRails
[09:33:53] zeyn: has joined #RubyOnRails
[09:35:14] blackhuey: has joined #RubyOnRails
[09:35:45] ewnd9: has joined #RubyOnRails
[09:36:46] bmalum: has joined #RubyOnRails
[09:37:26] zeyn: Hello everyone - when I create new Rails application, directorium of app doesn't have all permissions. When I set chmod 777 on that dir everything is ok, but whenever I create new route or controller I need to set it again - does it have something to do with Rails?
[09:37:40] rvanlieshout: zeyn: 777 is the worst permission you can set
[09:37:59] zeyn: rvanlieshout: This is development environment ;) Not production
[09:38:07] rvanlieshout: it's bad practice :)
[09:38:52] Macaveli: has joined #RubyOnRails
[09:39:45] zeyn: I don't do it on production servers (except for some scripts that REALLY need it). So, my question is: when I'm editing Rails app in Sublime and I create new route or controller, after trying to edit new router or controller I need to type my root password every single time, I never had that on Windows.
[09:40:02] zeyn: When I try to save actually*
[09:40:25] rvanlieshout: no script needs it
[09:40:30] rvanlieshout: if you need it your setup is wrong
[09:41:09] rvanlieshout: who owns that file?
[09:41:13] rvanlieshout: root? then change it to your user
[09:42:05] zeyn: Ruby isn't scripting language, I'm talking about scripts for PHP. Just like I said, I set it's permissions on 777 but whenever new route or controller is created it's folder has different permissions.
[09:42:37] rvanlieshout: as it should have
[09:42:41] rvanlieshout: cause 777 is wrong
[09:42:54] rvanlieshout: and if you need to enter your password each time you want to save, then the owner of that file is wrong
[09:42:59] zeyn: LOL, but it shouldn't have permission that disallows me to save normally every fu*king file
[09:43:10] rvanlieshout: then don't give it that permissions
[09:43:13] rvanlieshout: who is the owner of those files?
[09:43:25] rvanlieshout: chown -R <your_user> <rails app folder>
[09:43:48] zeyn: I'm creating every route and controller with sudo command so I should be owner of them, logically
[09:43:58] rvanlieshout: that's an assumption
[09:44:09] zeyn: There's no other user
[09:44:12] zeyn: I'm root
[09:44:20] sevenseacat: why the crap are you root and using sudo
[09:44:27] rvanlieshout: and as what user are you running sublime then?
[09:44:41] zeyn: That's the problem, I can't run Sublime Text as administrator
[09:44:50] zeyn: sevenseacat: Because of security
[09:44:53] rvanlieshout: that's because it's bad workflow
[09:45:08] sevenseacat: ..................uh
[09:45:13] sevenseacat: ACTION leaves now.
[09:45:21] sevenseacat: that is ass-backwards
[09:45:29] zeyn: sevenseacat: ?
[09:45:33] rvanlieshout: your setup is wrong
[09:45:43] zeyn: explain me
[09:45:45] rvanlieshout: and that's the only reason to blame why you have so much hassle in saving it
[09:45:52] rvanlieshout: use root only when you have to
[09:45:58] rvanlieshout: and you don't have to for developing rails applications
[09:46:01] norc: has joined #RubyOnRails
[09:46:04] rvanlieshout: those files should not belong to root
[09:46:10] sevenseacat: more like, don't use root, ever.
[09:46:19] sevenseacat: use sudo if you need it, but don't use root.
[09:46:26] zeyn: LOL, I don't have to develop Rails application as root? Hmm, I think you don't understand this enough
[09:46:30] sevenseacat: for rails apps, you don't need it.
[09:46:37] sevenseacat: LOL thats correct.
[09:46:39] jlpeters: has joined #RubyOnRails
[09:46:41] CornishPasty: I don't use root for any ruby
[09:46:54] zeyn: LOL, I couldn't create ANY controller or route without sudo
[09:46:58] rvanlieshout: i operate a hosting infastructure.. surely understand what using root means
[09:47:05] sevenseacat: thats because you're faffing around as root
[09:47:21] sevenseacat: and you've installed things with root and sudo and turned your system into an unholy mess
[09:47:33] sevenseacat: nothing ruby-related requires root
[09:47:36] CornishPasty: Only the project, hopefully sevenseacat
[09:47:48] CornishPasty: system gem needs root on OS X
[09:47:55] sevenseacat: and i wouldnt use that
[09:48:00] zeyn: You can't install all things without root access, Linux is actually secure becaue of that.
[09:48:04] sevenseacat: i'd install your own ruby as non-root
[09:48:18] zeyn: I used rbenv too
[09:48:23] zeyn: to install Ruby
[09:48:25] sevenseacat: zeyn: root != sudo
[09:48:29] Glenny: has joined #RubyOnRails
[09:48:34] sevenseacat: you can install everything without root access.
[09:48:51] zeyn: sevenseacat: I'm not logged all time as root in Terminal
[09:48:57] sevenseacat: you just said you were!
[09:49:05] rvanlieshout: zeyn: to start: change the owner of those files
[09:49:06] zeyn: sevenseacat: No. You don't understand me.
[09:49:11] rvanlieshout: they are wrong
[09:49:12] sevenseacat: you're not making sense is why
[09:49:40] zeyn: sevenseacat: No, I'm saying all the time SUDO, but someone needs to read better ;)
[09:49:52] siaW: has left #RubyOnRails: ()
[09:49:52] CornishPasty: 09:43:49 <zeyn> I'm creating every route and controller with sudo command so I should be owner of them, logically < No, root will be owner since sudo setuid's to 0
[09:49:53] sevenseacat: [17:44:09] zeyn: There's no other user
[09:49:53] sevenseacat: [17:44:12] zeyn: I'm root
[09:50:07] CornishPasty: zeyn: sudo doesn't do what you think it does
[09:50:21] norc: Hi. I have issues using USR2 + QUIT to restart Unicorn when deploying with Capistrano. For the most part it works, but it does not follow the new *current symlink for the Gemfile it seems:
[09:50:22] norc: https://gist.github.com/anonymous/1254d07de9a7ef124b01
[09:50:39] zeyn: Ok, sudo doesn't install everything with root access, no matter I type my ROOT password every time?
[09:50:43] zeyn: How the fu*k?
[09:50:49] Glenny: has joined #RubyOnRails
[09:50:51] rvanlieshout: zeyn: last time: CHANGE THE OWNER OF THOSE FILES
[09:51:07] sevenseacat: I dont think you have a root password
[09:51:13] zeyn: rvanlieshout: I need to change owner of those files every time?
[09:51:22] zeyn: sevenseacat: Actually I have, this is my desktop.
[09:51:26] sevenseacat: if you do, there's something wrong on your system
[09:51:27] CornishPasty: zeyn: no. Change the owner, and then stop using sudo
[09:51:29] xybre: norc: it might be tied to the inode of the file :(
[09:51:34] rvanlieshout: you should change the owner of the folder and files within
[09:51:41] rvanlieshout: to the user you're actually using
[09:51:42] rvanlieshout: the non root user
[09:51:44] zeyn: Ok, i'll try
[09:51:49] sevenseacat: no sane *nix gives you a root account by default
[09:51:55] rvanlieshout: chown -R <user> <rails_folder>
[09:52:01] norc: xybre: That would be... disgusting. :(
[09:52:07] zeyn: It doesn't give, but I'm root
[09:52:13] sevenseacat: no, you're not
[09:52:17] xybre: norc: Sorta, are you on linux?
[09:52:27] sevenseacat: if you were, you would not need sudo for anything
[09:52:29] norc: xybre: Yeah. It's an Ubuntu 14.04
[09:52:44] norc: Well, locally I'm on OSX, but that shouldn't matter, should it?
[09:52:49] CornishPasty: norc: Virtualbox or dedi/vps?
[09:52:51] zeyn: I'm not logged as root, but I'M ROOT, I installed OS, do you understand me now?
[09:53:03] sevenseacat: thats two totally different things
[09:53:14] sevenseacat: very totally, completely different things
[09:53:26] sevenseacat: you get no special privilege from having installed the OS, and that has nothing to do with root
[09:53:32] norc: CornishPasty: It's a remote virtual machine running on an ESXi host
[09:53:40] zeyn: Ok, maybe for you. For me, it's same, because I know root password and I can do whatever I want in every time. I know nothing is set by default because that would be big security hole.
[09:53:43] xybre: norc: norc only matters what OS is running Unicorn. OSX would probably act the same too.
[09:53:48] CornishPasty: Oh, I've seen a similar issue with shared folders on Virtualbox norc
[09:54:12] xybre: norc: Oh check this out, it might be an issue with Bundler: http://www.justinappears.com/blog/2-no-downtime-deploys-with-unicorn/
[09:55:04] sevenseacat: sorry, I don't see a point in continuing this conversation if you're just to answer everything with 'lol but you don't understand'
[09:55:08] norc: xybre: Brilliant. It contains an explanation and the solution. :)
[09:55:13] norc: Thank you very much dear sir.
[09:55:35] sevenseacat: especially when you're the one here asking for help
[09:55:40] CornishPasty: I think zeyn needs to read a linux manual or two
[09:55:53] stannard: has joined #RubyOnRails
[09:56:18] zeyn: This is what I get with chown: changing ownership of /<mainrailsdir>/<otherdirs>/ operation not permitted
[09:56:31] rvanlieshout: zeyn: run that command as root
[09:56:32] sevenseacat: because its now owned by root
[09:56:39] rodfersou: has joined #RubyOnRails
[09:56:40] sevenseacat: well, it was always owned by root because you used sudo
[09:56:45] sevenseacat: when you should not have
[09:56:54] zeyn: And you said me I shouldn't do anything with root...
[09:57:05] sevenseacat: do you want to fix your fuckups or not?
[09:57:15] CornishPasty: Hey sevenseacat calm down :(
[09:57:44] zeyn: That's it, I set it.
[09:57:49] rvanlieshout: i agree with sevenseacat on this one
[09:57:53] rvanlieshout: zeyn: now continue developing
[09:58:01] Cervajz: has joined #RubyOnRails
[09:58:26] zeyn: rvanlieshout: Okay, I'll find help in other place next time if you can't understand that someone is beginner.
[09:58:38] baweaver: has joined #RubyOnRails
[09:59:05] rvanlieshout: beginners don't tell others that they just don't understand how this works
[09:59:32] zeyn: rvanlieshout: I'm not saying you don't understand how this works, I said you don't understand what I'm saying. Bye.
[09:59:51] rvanlieshout: but i did. one of the first lines happend to be the solution to your problem
[09:59:54] rvanlieshout: isn't that strange then?
[10:00:00] zeyn: I'll try it now
[10:00:11] sevenseacat: zeyn: LOL, I don't have to develop Rails application as root? Hmm, I think you don't understand this enough
[10:00:23] arup_r: has joined #RubyOnRails
[10:01:04] zeyn: sevenseacat: But you explained downwards, so?
[10:01:09] rodfersou: has joined #RubyOnRails
[10:01:15] zeyn: sevenseacat: Why you continue to discuss, problem is solved?
[10:01:27] rvanlieshout: because you told me that i don't help beginners properly
[10:01:29] gaussblurinc1: has joined #RubyOnRails
[10:01:31] rvanlieshout: and blamed me of things you did yourself
[10:01:38] rvanlieshout: so thanks sevenseacat
[10:01:43] zeyn: rivanlieshout: I haven't blamed anyone.
[10:01:54] zeyn: rivanlieshout: You need to ask yourself few things.
[10:02:08] Cervajz: has joined #RubyOnRails
[10:02:56] TPBallbag: has joined #RubyOnRails
[10:03:40] AzaToth: has joined #RubyOnRails
[10:03:54] zeyn: rvanlieshout: Not to change context of other's sentences
[10:04:14] rvanlieshout: quit whining and read back
[10:04:33] moty66: has joined #RubyOnRails
[10:04:34] njero: has joined #RubyOnRails
[10:04:47] paulodiniz: has joined #RubyOnRails
[10:04:55] zeyn: I'm not blaming anyone of you, I need help because I never had something like this on web dev environment, I'm coming from PHP and Apache where you just have to edit apache.conf and everything will work properly.
[10:05:22] rvanlieshout: and we've explained you that files that belong to root imply a wrong setup
[10:05:30] rvanlieshout: but you didn't want to believe that
[10:05:44] zeyn: How do you know I don't believe you? XD
[10:05:51] sevenseacat: because you kept arguing
[10:05:55] sevenseacat: anyway, let's move on.
[10:06:00] zeyn: So, create new user?
[10:06:05] rvanlieshout: you already have a user
[10:06:07] sevenseacat: use your own user.
[10:06:14] rvanlieshout: the one that is running sublime
[10:06:15] zeyn: With sudo?
[10:06:31] zeyn: I couldn't, it doesn't give me permissions to save my files
[10:06:44] rvanlieshout: you change the file permissions with sudo yes
[10:06:47] rvanlieshout: file owner even
[10:06:53] zeyn: I changed that with chown
[10:06:59] rvanlieshout: and what is the current permission
[10:07:00] zeyn: sudo chown
[10:07:03] norc: xybre: Yup, that fixed it indeed. Thank you again.
[10:07:07] sevenseacat: in day-to-day dev, you don't need sudo to work on rails apps.
[10:07:08] rvanlieshout: and what user is running sublime?
[10:07:12] norc: rvanlieshout: I am.
[10:07:42] rvanlieshout: norc: i wasn't reading along with your issue. let me scroll back a looong time
[10:07:57] norc: rvanlieshout: Oh no need, it's solved. :-P
[10:07:59] zeyn: nikola@nikolapc:~$ ls -l blog
[10:07:59] zeyn: total 60
[10:07:59] zeyn: drwxrwxrwx 8 nikola root 4096 ?????? 30 21:09 app
[10:07:59] zeyn: drwxrwxrwx 2 nikola root 4096 ?????? 30 21:13 bin
[10:08:00] zeyn: drwxrwxrwx 5 nikola root 4096 ?????? 30 21:09 config
[10:08:00] zeyn: -rwxrwxrwx 1 nikola root 153 ?????? 30 21:09 config.ru
[10:08:02] zeyn: drwxrwxrwx 3 nikola root 4096 ?????? 30 23:16 db
[10:08:04] zeyn: -rwxrwxrwx 1 nikola root 1502 ?????? 30 21:09 Gemfile
[10:08:06] zeyn: -rwxrwxrwx 1 nikola root 3832 ?????? 30 21:13 Gemfile.lock
[10:08:07] sevenseacat: still root there
[10:08:08] zeyn: drwxrwxrwx 4 nikola root 4096 ?????? 30 21:09 lib
[10:08:10] zeyn: drwxrwxrwx 2 nikola root 4096 ?????? 30 22:56 log
[10:08:11] helpa: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[10:08:12] zeyn: drwxrwxrwx 2 nikola root 4096 ?????? 30 21:09 public
[10:08:15] sevenseacat: do not spam the channel with code.
[10:08:16] zeyn: -rwxrwxrwx 1 nikola root 249 ?????? 30 21:09 Rakefile
[10:08:18] helpa: https://gist.github.com/996779
[10:08:18] zeyn: -rwxrwxrwx 1 nikola root 478 ?????? 30 21:09 README.rdoc
[10:08:20] zeyn: drwxrwxrwx 8 nikola root 4096 ?????? 30 21:09 test
[10:08:21] ChanServ: +q *!*@212-200-204-237.dynamic.isp.telekom.rs
[10:08:40] rvanlieshout: how can we know? :)
[10:08:46] ChanServ: -q *!*@212-200-204-237.dynamic.isp.telekom.rs
[10:08:47] pulgalip1: has joined #RubyOnRails
[10:08:48] rvanlieshout: norc: it uses the old release path?
[10:09:24] rvanlieshout: zeyn: do you even have the same problem now?
[10:09:41] zeyn: Still root there but whenever I create new route or controller I couldn't save any file that is edited in Sublime. User on Sublime is default.
[10:09:50] sevenseacat: anyway i'm off. have fun and don't kill each other.
[10:09:58] CornishPasty: sevenseacat: But what if we want to kill zeyn?
[10:10:04] sevenseacat: CornishPasty: not allowed.
[10:10:07] CornishPasty: Mhm, figured.
[10:10:09] rvanlieshout: zeyn: the group is root, you want to change that eventually though
[10:10:18] rvanlieshout: and 'user on sublime is default' meaning?
[10:10:27] zeyn: Means no root
[10:10:44] rvanlieshout: is it nikola?
[10:10:46] rvanlieshout: or somebody else?
[10:10:52] zeyn: only one user beside root, nikola
[10:11:24] rvanlieshout: wnat group is that user in?
[10:11:51] xybre: norc: glad to hear!
[10:12:14] zeyn: nikola : nikola adm cdrom sudo dip plugdev lpadmin sambashare
[10:12:23] xybre: rvanlieshout: I think norc has it handled :)
[10:13:03] rvanlieshout: zeyn: ls -al ~/
[10:13:11] rvanlieshout: 1 line from that output
[10:13:20] zpe: has joined #RubyOnRails
[10:14:23] zeyn: drwxrwxrwx 12 nikola root 4096 nov 30 21:13 blog
[10:14:32] rvanlieshout: ah. also wrong
[10:14:36] teamcoltra: Hey guys, I realize I am an idiot but was hoping I could get some basic help, I am trying to use the predictor gem and have got to this part https://github.com/Pathgather/predictor#retrieving-similarities-and-recommendations I don't understand where they want me to put this code, I assumed in the controller, but now how do I call it in my template?
[10:14:40] rvanlieshout: and your users homedir?
[10:15:02] zeyn: Yo mean this: drwxr-xr-x 64 nikola nikola 4096 ?????? 1 10:32 . ?
[10:15:17] rvanlieshout: sudo chown -R nikola:nikola <rails app folder>
[10:15:25] rvanlieshout: sudo chmod -R 750 <rails app folder>
[10:16:17] zeyn: Ok, I would try know
[10:17:48] SalexW: has joined #RubyOnRails
[10:17:55] ql6wlld: has joined #RubyOnRails
[10:17:58] xybre: teamcoltra: That code is just usage examples, you can test it out in the rails console to see the output, but I think most people would put it in the controller.
[10:18:22] arup_r: CornishPasty: Why, btw, you wish to kill someone ?
[10:18:33] CornishPasty: arup_r: I don't really
[10:18:48] teamcoltra: xybre yeah, that's where I have it now... but how would I translate that from the controller into my template?
[10:18:50] arup_r: ok, you asked so I... never hope so..
[10:19:05] yfeldblum: has joined #RubyOnRails
[10:19:51] zeyn: Can someone suggest me good book on Rails with practical examples?
[10:19:51] kmckelvin: has joined #RubyOnRails
[10:20:01] helpa: zeyn: Rails 4 in Action - http://manning.com/bigg2 - An excellent book combining Rails and TDD/BDD development. Written by Rebecca Skinner, Steve Klabnik, Ryan Bigg, Yehuda Katz
[10:20:11] xybre: teamcoltra: ivars are shared between the controller and view, so you could do like `@recommendations = <code here>` in the controller, and then just `@recommendations` in the view, probably iterating over it and formatting it nicely.
[10:20:16] zeyn: rvanlieshout what?
[10:20:26] rvanlieshout: zeyn: see the line helpa (a bot) pasted
[10:20:31] zeyn: Ah, thanks
[10:20:37] mooru: has joined #RubyOnRails
[10:20:47] arup_r: zeyn: "Agile web developement with Rails 4"
[10:21:00] zeyn: arup_r: Thanks
[10:21:07] Diabolik: what's the easiest way of installing a local gem in a vagrant setup/
[10:21:11] yfeldblum: has joined #RubyOnRails
[10:21:23] rvanlieshout: Diabolik: gem install? :)
[10:21:34] nettoweb: has joined #RubyOnRails
[10:21:41] Diabolik: don't have write permissions
[10:21:50] MaDErroR123: has joined #RubyOnRails
[10:22:08] rvanlieshout: oh. using system ruby in your vagrant?
[10:22:10] rvanlieshout: sudo gem install
[10:22:14] Diabolik: https://gist.github.com/askl56/79d6950491536fa404a1
[10:22:17] Diabolik: tried using sudo
[10:22:18] rvanlieshout: v ssh runs as vagrant user
[10:22:26] Diabolik: il add the error from running sudo
[10:22:47] rvanlieshout: or, cause i didn't use rbenv before
[10:22:53] rvanlieshout: rbenv switch to your ruby
[10:22:56] rvanlieshout: gem install foobar
[10:23:23] chridal: I'm deploying with Docker and I am using docker-compose and routing all logging to STDIN to syslog.
[10:23:47] chridal: When I try to do `docker-compose run web rails console` I then am not able to see the console output, because I believe syslog is grabbing it.
[10:23:55] chridal: Anyone ran into anything similar and solved it?
[10:24:57] teamcoltra: thanks xybre I think I might get it, I think recommender.similarities_for("course-1") might go into the template... it's not really working but it is giving me empty brackets which might just mean that it works but the similarities are not working yet
[10:25:21] xybre: teamcoltra: yeah empty brackets means it's returning an empty collection
[10:25:47] chridal: xybre: Yea, STDOUT.
[10:25:47] AzaToth: has joined #RubyOnRails
[10:27:40] xybre: chridal: it sounds like you told it to route everything to syslog.. so it's working as intended? You'll just need to connect to the server's syslog to see the output.
[10:28:32] krz: has joined #RubyOnRails
[10:29:03] arup_r: So, I have an ENUM column `role` on my User model. enum role: [ :admin, :manager, :standard, :super_admin ] ,.. I am trying to update those `NULL` value to `standard`, but my rake task not recognizing `NULL` values ... and doing nothng.. https://gist.github.com/aruprakshit/b429192905e907d4370a
[10:29:13] xlegoman: has joined #RubyOnRails
[10:29:16] rvanlieshout: arup_r: why not do that in a migration?
[10:29:18] arup_r: What is wrong .. with my logic
[10:29:29] ddv: everything
[10:29:41] arup_r: I am not the only dev hehe.. someone did it long back. I am clearing it..
[10:29:54] rvanlieshout: User.where(role: nil).update_all(role: User.roles[:standard])
[10:30:51] arup_r: yes, but the query I wrote should work.. right?
[10:31:13] rvanlieshout: if User.roles.values returns something
[10:31:15] gaussblurinc1: has joined #RubyOnRails
[10:31:28] arup_r: yes it returns [0, 1,2 3]
[10:31:40] annlewis: has joined #RubyOnRails
[10:32:00] rvanlieshout: update users set role=NULL is wrong
[10:32:13] rvanlieshout: so use that User.where(role: nil).update_all(role: User.roles[:standard])
[10:32:19] rvanlieshout: if User.roles[:standard] returns the right number though :)
[10:32:59] arup_r: In prod I see my lot of records has `NULL` value for role column.. so I was trying to replicate it in dev to see why the rake task didn't work.. and found `NULL` issue
[10:33:35] snowy: has joined #RubyOnRails
[10:35:53] gaussblurinc1: has joined #RubyOnRails
[10:36:04] arup_r: ddv: ... ( please ) :D
[10:36:12] dhjondoh: has joined #RubyOnRails
[10:36:21] rvanlieshout: arup_r: did you try that statement?
[10:36:29] workmad3: has joined #RubyOnRails
[10:36:35] arup_r: which one.. ? with `nil`
[10:36:44] arup_r: User.where(role: nil).update_all(role: User.roles[:standard]) ?
[10:37:19] rvanlieshout: but i'm not sure if User.roles[:standard] returns the right integer
[10:38:55] arup_r: [1] pry(main)> User.roles #=> {"admin"=>0, "manager"=>1, "standard"=>2, "super_admin"=>3}
[10:38:59] arup_r: rvanlieshout: ^^
[10:39:13] rvanlieshout: and User.roles[:standard]
[10:39:17] rvanlieshout: then try that statement
[10:39:47] TPBallbag: has joined #RubyOnRails
[10:39:50] kmckelvin: has joined #RubyOnRails
[10:41:20] arup_r: your one worked. But I am wondering why min didn't work.. Nothing wrong the query I wrote logically. My query was to address any value to update to standard which are NOT IN (0, 1, 2, 3)
[10:41:32] snowy: has joined #RubyOnRails
[10:41:39] arup_r: wired though
[10:41:51] rvanlieshout: that that's not the query executed with your code
[10:42:03] rvanlieshout: somewhere it executed a where = NULL
[10:42:42] arup_r: But it is a NOT IN query, right? `User.where.not(role: User.roles.values)`
[10:42:59] rvanlieshout: i don't know if that query cased that statement
[10:44:06] bronson: has joined #RubyOnRails
[10:44:18] mxrguspxrt: has joined #RubyOnRails
[10:44:52] kimegede: has joined #RubyOnRails
[10:45:15] KnownSyntax: has joined #RubyOnRails
[10:45:16] KnownSyntax: has joined #RubyOnRails
[10:45:48] Zadrel: has joined #RubyOnRails
[10:45:56] desmondhume: has joined #RubyOnRails
[10:46:01] goldbug: has joined #RubyOnRails
[10:46:48] arup_r: rvanlieshout: see the buggy stuff https://gist.github.com/aruprakshit/b429192905e907d4370a#file-buggy-rb :) I am going to file it as a bug, if you guys show me a <thumbsup>
[10:47:05] edwinvdgraaf: has joined #RubyOnRails
[10:47:20] arup_r: check buggy.rb :)
[10:47:33] rvanlieshout: so why not use that statment i gave you before?
[10:48:20] arup_r: rvanlieshout: It is not about the get it working.. I did use it.. it is about why t is not working although it should work
[10:48:42] rvanlieshout: what code executes that query?
[10:48:45] arup_r: your code is working fine
[10:48:45] rvanlieshout: that failing query
[10:48:47] rvanlieshout: what single line
[10:49:01] arup_r: I am talking about my piece of code
[10:49:06] rvanlieshout: or what is failing?
[10:49:18] rvanlieshout: oh. it doesn't do anything you mean?
[10:49:22] rvanlieshout: what does user.standard! even do?
[10:49:23] Macaveli: has joined #RubyOnRails
[10:49:43] arup_r: this https://gist.github.com/aruprakshit/b429192905e907d4370a#file-buggy-rb-L6 should be `4`
[10:49:53] arup_r: rvanlieshout: It is Rails Enum feature
[10:50:08] rvanlieshout: not IN (1,2,3) won't return null
[10:50:08] arup_r: it should be `0` ?
[10:50:28] rvanlieshout: null is not that it's not either one of those values
[10:50:31] rvanlieshout: it's an unknown value
[10:50:51] rvanlieshout: e.g. where roles = 3 or roles <> 3 even won't return null
[10:51:23] nfk|laptop: has joined #RubyOnRails
[10:51:32] kitsuneyo: has joined #RubyOnRails
[10:51:54] arup_r: hmm.. strange .. I'll be back later.. need to do some research
[10:52:28] rvanlieshout: that's how databases work :)
[10:52:33] rvanlieshout: so null is something special
[10:52:44] arup_r: yes it is special.. I see ,,
[10:56:25] tvw: has joined #RubyOnRails
[10:56:30] quazimodo: has joined #RubyOnRails
[10:57:37] shibabu: has joined #RubyOnRails
[10:59:18] dhjondoh: has joined #RubyOnRails
[11:00:03] baweaver: has joined #RubyOnRails
[11:00:46] towski_: has joined #RubyOnRails
[11:03:35] pontiki: arup_r: sorry, i'm late to this, and haven't read scroll; i notice you're using an AR enum; your field in the DB should be specified at not null, and give it a default value, i'm guessing in your case, 2
[11:04:23] dhjondoh: has joined #RubyOnRails
[11:04:30] pontiki: something else to consider as well, as these roles seem to be used for authorization, you may want to order them, and give them specific numeric values
[11:04:46] arup_r: pontiki: yes you are right.. I have default value set and not null constraint also.. it was plain integer earlier so it had some garbage values too
[11:05:29] pontiki: lately, i've found more reasons to set null: false and default: <some value>
[11:05:42] pontiki: i'm doing *all* my booleans that way, for example
[11:06:10] pontiki: (except one i actually found a case for a tri-state, though it smells off)
[11:06:53] pontiki: it should *really* be an enum, but it was already defined and had data :/
[11:07:13] goldbug: How can I delete an element from an array and return the remaining values of the array? Have been trying a.delete('Element') but the returned value is 'Element'.
[11:08:52] pontiki: goldbug: look at Array#reject!
[11:09:02] arup_r: a.tap { |ary| ary. delete('Element') }
[11:09:16] arup_r: goldbug: ^^
[11:09:31] dionysus69: has joined #RubyOnRails
[11:10:57] simplyianm: has joined #RubyOnRails
[11:12:58] goldbug: Thanks both - I'm quiet because I'm trying both methods out (:
[11:13:19] pontiki: no worries
[11:15:35] gaussblurinc1: has joined #RubyOnRails
[11:16:15] kmckelvin: has joined #RubyOnRails
[11:16:50] ldnunes: has joined #RubyOnRails
[11:17:30] stannard: has joined #RubyOnRails
[11:20:23] MaDErroR123: has joined #RubyOnRails
[11:20:29] rickmasta: has joined #RubyOnRails
[11:21:23] njero: has joined #RubyOnRails
[11:24:58] kitsuneyo: has joined #RubyOnRails
[11:25:54] gaussblurinc1: has joined #RubyOnRails
[11:28:39] nickenchuggets: has joined #RubyOnRails
[11:29:08] Sawbones: has joined #RubyOnRails
[11:30:42] desiph3r: has joined #RubyOnRails
[11:30:51] Cervajz: has joined #RubyOnRails
[11:32:30] annlewis: has joined #RubyOnRails
[11:33:51] rclements: has joined #RubyOnRails
[11:36:25] KnownSyntax: has joined #RubyOnRails
[11:36:26] KnownSyntax: has joined #RubyOnRails
[11:36:58] yfeldblum: has joined #RubyOnRails
[11:37:14] lxsameer: has joined #RubyOnRails
[11:37:52] workmad3: has joined #RubyOnRails
[11:38:10] shanemcd: has joined #RubyOnRails
[11:38:50] njero: has joined #RubyOnRails
[11:39:39] krainboltgreene: has joined #RubyOnRails
[11:40:15] Puffball: has joined #RubyOnRails
[11:40:33] snowy: has joined #RubyOnRails
[11:41:44] BBHoss: has joined #RubyOnRails
[11:42:50] Sawbones: has joined #RubyOnRails
[11:42:55] desiph3r: has joined #RubyOnRails
[11:42:55] Kedare: has joined #RubyOnRails
[11:46:30] Denarii: has joined #RubyOnRails
[11:46:47] th0m__: has joined #RubyOnRails
[11:47:24] jayne: has joined #RubyOnRails
[11:48:27] defsdoor: has joined #RubyOnRails
[11:57:25] gaussblurinc1: has joined #RubyOnRails
[11:58:25] sandstrom: has joined #RubyOnRails
[11:58:48] xlegoman: has joined #RubyOnRails
[11:59:08] shibabu: has joined #RubyOnRails
[11:59:25] MaDErroR123: has joined #RubyOnRails
[12:01:18] Sawbones: has joined #RubyOnRails
[12:03:30] gaussblurinc1: has joined #RubyOnRails
[12:03:41] Cervajz: has joined #RubyOnRails
[12:04:23] Cervajz: has joined #RubyOnRails
[12:04:40] Sawbones: has joined #RubyOnRails
[12:05:50] zpe: has joined #RubyOnRails
[12:06:07] simplyianm: has joined #RubyOnRails
[12:06:26] paulodiniz: has joined #RubyOnRails
[12:06:26] zpe_: has joined #RubyOnRails
[12:06:29] RegulationD: has joined #RubyOnRails
[12:06:43] gaussblurinc1: has joined #RubyOnRails
[12:07:21] Cervajz: has joined #RubyOnRails
[12:10:38] Denarii: has joined #RubyOnRails
[12:11:57] th0m__: has joined #RubyOnRails
[12:12:20] brunto: has joined #RubyOnRails
[12:13:24] jord: has joined #RubyOnRails
[12:14:07] jayne: has joined #RubyOnRails
[12:14:15] lxsameer: has joined #RubyOnRails
[12:14:15] lxsameer: has joined #RubyOnRails
[12:15:00] nfk|laptop: has joined #RubyOnRails
[12:15:14] Macaveli: has joined #RubyOnRails
[12:15:52] rickmasta: has joined #RubyOnRails
[12:18:15] gaussblurinc1: has joined #RubyOnRails
[12:21:14] sankaber: has joined #RubyOnRails
[12:22:10] kitsuneyo: has joined #RubyOnRails
[12:22:18] ewnd9: has joined #RubyOnRails
[12:23:21] ibouvousaime: has joined #RubyOnRails
[12:24:15] gaussblurinc1: has joined #RubyOnRails
[12:26:20] allcentury: has joined #RubyOnRails
[12:28:22] gaussblurinc1: has joined #RubyOnRails
[12:29:52] gaussblurinc1: has joined #RubyOnRails
[12:30:08] dhjondoh: has joined #RubyOnRails
[12:31:36] tk_: has joined #RubyOnRails
[12:33:15] annlewis: has joined #RubyOnRails
[12:33:17] arup_r: has joined #RubyOnRails
[12:35:18] hello9: has joined #RubyOnRails
[12:36:14] johnflux: has joined #RubyOnRails
[12:36:15] hello9: is it a security risk if I directly use an html div value via javascript in a rails query? e.g Post.find(params[:id]) where id is from the html div
[12:36:52] zpe: has joined #RubyOnRails
[12:37:26] alaing: has joined #RubyOnRails
[12:37:34] yardenbar: has joined #RubyOnRails
[12:37:39] alaing: nickjj: hi are you around?
[12:37:57] nickjj: alaing, sort of
[12:38:10] alaing: I've got docker image running
[12:38:26] alaing: but how do i get localhost to talk to port 4242
[12:38:27] zpe: has joined #RubyOnRails
[12:38:39] arup_r: has joined #RubyOnRails
[12:39:10] stannard: has joined #RubyOnRails
[12:39:16] nickjj: alaing, if you didn't touch any of the env variables you should set
[12:39:38] alaing: I only created the push token
[12:40:01] nickjj: FAYE_URL=http://localhost:4242/stream
[12:40:16] norc: has joined #RubyOnRails
[12:40:26] nickjj: that /stream path can be changed on the faye end too
[12:40:38] kmckelvin: has joined #RubyOnRails
[12:40:41] nickjj: as well as the port
[12:41:18] Moeh: has joined #RubyOnRails
[12:41:28] nickjj: keep in mind FAYE_URL in this case is nothing enforced by faye, that's just an env variable in your rails app that stores the server url
[12:41:35] kmckelvin: has joined #RubyOnRails
[12:41:43] nickjj: you could name that whatever you want
[12:41:51] nertzy: has joined #RubyOnRails
[12:42:17] Moeh: Is there gem that could help me to determine the "type" of a string. Say if the string is "2015-12-01" it would return "datetime". If the string is "$12.20" it would return "currency". If it is "12 mph" it would return "speed" and so on.
[12:42:35] norc: Hi. Is there some common convention what to call an attribute "type" of a model?
[12:43:08] build22: has joined #RubyOnRails
[12:43:29] alaing: nickjj: ok so so i'm now passing faye_url to docker run. should i then be able to open that url in the browser and see soemthing?
[12:43:31] norc: (I cannot use the column name type)
[12:43:56] nickjj: alaing, the only env var you need to pass to docker run would be the auth token
[12:44:33] shanemcd: has joined #RubyOnRails
[12:44:38] nickjj: faye_url could be named foobar if you wanted, it's just a place to variablalize the location of the faye server
[12:45:58] robertmay: has joined #RubyOnRails
[12:46:00] alaing: Oh i see so rails can pick it up from a single point of definition
[12:46:13] bronson: has joined #RubyOnRails
[12:46:29] alaing: ok so I only passed in the faye push token when i ran docker run
[12:46:45] squiercaster: has joined #RubyOnRails
[12:46:49] alaing: should i then be able to open a browser and connect to localhost:4242/stream and see something?
[12:47:04] Ropeney: has joined #RubyOnRails
[12:48:09] kitsuneyo: has joined #RubyOnRails
[12:48:40] nickjj: it might return something, but that's typically not a url you'd access directly
[12:48:41] alaing: ok time to fiddle with rails and see if I can get faye on nodejs working
[12:48:57] alaing: nickjj: makes sense after all thats why there is a token ;-)
[12:49:39] nickjj: i wrote a simple broadcast class to talk to it, hold on
[12:49:43] nickjj: let me gist a few things
[12:50:08] alaing: ok thanks :-)
[12:53:45] nickjj: alaing, are you using turbolinks?
[12:54:19] alaing: nickjj: no
[12:54:45] Sawbones: has joined #RubyOnRails
[12:54:51] alaing: nickjj: would it matter? other than to be aware of js document.ready issues
[12:55:28] nickjj: it doesn't matter, but i had issues with double connecting to the faye server when i used it, which required some workarounds
[12:56:22] User458764: has joined #RubyOnRails
[12:56:29] alaing: ah i see, makes sense
[12:57:06] kmckelvin: has joined #RubyOnRails
[12:58:45] jkamenik: has joined #RubyOnRails
[12:59:55] nickjj: alaing, https://gist.github.com/nickjj/725601bc75f45ada16db
[13:01:41] nickjj: i'm making an assumption that your rails app is also running in a docker container and .env is just a file i feed into docker-compose.yml basically is the same as running docker with with them passed in with -e
[13:01:43] baweaver: has joined #RubyOnRails
[13:01:46] ner0x: has joined #RubyOnRails
[13:02:05] norc: Sigh. I really want edge rails for prefixable enums. :(
[13:02:15] nickjj: if your rails app isn't in a docker container, then the FAYE_INTERNAL_URL would end up being localhost not "faye"
[13:02:35] pontiki: norc: what are prefixable enums? sounds intriguing
[13:02:43] d0nn1e: has joined #RubyOnRails
[13:03:16] alaing: nickjj: my rails isn't running in docker locally but it will be when it goes into production
[13:03:37] norc: pontiki: You can specify a _prefix or _suffix fragment, which adds it to the generated methods to prevent clashing with other enums or your methods.
[13:03:51] nickjj: alaing, you could hardcode those values for now if your rails app isn't configured to use env vars
[13:04:18] norc: pontiki: So enum foo: [:new, :old], _suffix: true # generates foo_new / foo_old
[13:04:20] alaing: my rails app is configured to pick up env vars
[13:04:26] pontiki: norc: that would be awesome
[13:05:05] kmckelvin: has joined #RubyOnRails
[13:05:08] pontiki: much better than having to do it by hand :(
[13:05:33] ner0x: Is it possible to have a template something along the lines of: create.coffee.erb?
[13:05:50] ner0x: Or, better yet, is there a way to use render() in coffeescript?
[13:06:02] hello9: i have some jQuery click events that call a name_spaced rails controller, i.e NewPosts::PostsController, and its been working, but now its doubling up the "parent" so when I send the ajax to the url posts/new_posts , its looking for posts/posts/new_posts
[13:06:06] hello9: anyone ever see that before?
[13:06:08] elaptics: ner0x: yes, you can do that but it probably isn't going to do what you think it might
[13:06:15] nickjj: alaing, i forgot one thing too, updated the gist
[13:06:18] ner0x: elaptics: Can you elaborate?
[13:06:34] alaing: nickjj: thanks, are you in NY?
[13:06:40] elaptics: ner0x: well better that you elaborate to say why you want to do that?
[13:06:45] norc: pontiki: Indeed.
[13:07:20] alaing: nickjj: if you ever in london hit me up....I owe you beer
[13:07:21] nickjj: alaing, you would need to include the client.js before using it in your javascript , so if you wanted to test it in your browser, goto http://localhost:4242/stream/client.js
[13:07:36] ner0x: elaptics: Sure. I'd like to return a rendered simple_form @object inside a .js response so I can replace the old form with the new form (so that it may include any errors, etc)
[13:07:37] nickjj: (that's after you make the change in the gist)
[13:07:39] sevenseacat: has joined #RubyOnRails
[13:07:55] nickjj: that should return a bunch of minified js which is being served from the faye server
[13:08:33] elaptics: ner0x: you'd be better off just using js not coffeescript because otherwise you've got to have some way to dynamically compile the coffeescript during the request
[13:09:14] ner0x: elaptics: I can do that. So create.js.erb is the way to go?
[13:09:27] elaptics: it is _a_ way to go :)
[13:09:30] Sawbones: has joined #RubyOnRails
[13:09:54] ner0x: elaptics: Seems simple enough. I'm having issues returning the proper action .js/.html
[13:10:03] ner0x: elaptics: I'm going to work up a gist before I start asking for help though.
[13:10:21] elaptics: ner0x: yep, we'll be able to help better if we see your code
[13:11:40] alaing: nickjj: I'll carry on playing around and let you know if i run into any problems, thanks again
[13:11:43] nickjj: alaing, and for a legit test, goto your page, open the console , then open a terminal and run this command https://github.com/nickjj/docker-faye#trying-to-troubleshoot-your-server (replace the token with your correct token)
[13:11:52] nickjj: and you should see the msg in your console
[13:12:01] alaing: nickjj: sweet
[13:12:06] alaing: nickjj: will do
[13:12:28] alaing: nickjj: once i get it working i'll look to stripping out docker for local dev
[13:13:11] nickjj: cool, if you're interesting i have an online course out that goes into a lot of detail for working with docker in dev/production
[13:13:14] alaing: just because other devs in my team arent to familar with docker etc and i might use foreman to run the two processes side by side in local dev
[13:13:53] User458764: has joined #RubyOnRails
[13:14:03] nickjj: it goes through everything required to set up an automated git based deployment strategy
[13:14:05] alaing: nickjj: do you have links to the details and i'll see if i can persuade the powers that be
[13:14:49] nickjj: yeah, here's 30% off https://www.udemy.com/the-docker-for-devops-course-from-development-to-production/?couponCode=IRCPROMO
[13:16:10] ibouvousaime: has joined #RubyOnRails
[13:17:12] renegadeandy: has joined #RubyOnRails
[13:18:42] jas02: has joined #RubyOnRails
[13:20:59] Geffy: has joined #RubyOnRails
[13:21:34] dhjondoh: has joined #RubyOnRails
[13:22:15] thispixel: has joined #RubyOnRails
[13:22:47] ewnd9: has joined #RubyOnRails
[13:28:53] gaussblurinc1: has joined #RubyOnRails
[13:31:26] stamina: has joined #RubyOnRails
[13:31:45] dhjondoh: has joined #RubyOnRails
[13:34:02] annlewis: has joined #RubyOnRails
[13:36:00] bmalum: has joined #RubyOnRails
[13:37:57] kitsuneyo: has joined #RubyOnRails
[13:38:46] yoongkang: has joined #RubyOnRails
[13:39:42] Cervajz: has joined #RubyOnRails
[13:40:34] mooru: has joined #RubyOnRails
[13:41:29] alaing: nickjj: with docker running, I trying using curl to post a message but it says connection if refused
[13:41:31] kmckelvin: has joined #RubyOnRails
[13:41:46] alaing: I did change the token to match the one being used
[13:42:17] nickjj: are you running docker natively or through docker-machine?
[13:42:29] Quintasan: has joined #RubyOnRails
[13:42:30] Quintasan: has joined #RubyOnRails
[13:43:05] alaing: I'm using Kitematic gui
[13:44:26] nickjj: in that case you can't access localhost
[13:44:51] nickjj: because docker is running on a different ip address, try connecting to the IP given by kitematic
[13:44:58] nickjj: i don't use it, but it should tell you the IP somewhere
[13:45:58] Osw: has joined #RubyOnRails
[13:48:12] alaing: nickjj: I've managed to get into the images terminal using virtualbox
[13:48:28] CornishPasty: alaing: use the "docker cli" button on kitematic to find out the host's IP
[13:48:50] alaing: CornishPasty: is that dockers IP?
[13:48:54] sonofdirt: has joined #RubyOnRails
[13:48:58] alaing: I know what my localhost ip is
[13:49:02] CornishPasty: alaing: you should then be able to do docker-machine ls
[13:49:51] alaing: let me try that ip
[13:49:56] shanemcd: has joined #RubyOnRails
[13:49:57] CornishPasty: It's probably 192.168.99.100
[13:49:58] quazimodo: has joined #RubyOnRails
[13:50:11] bmalum: has joined #RubyOnRails
[13:50:47] mag42c: has joined #RubyOnRails
[13:50:57] alaing: CornishPasty: that it is
[13:51:33] alaing: url -X POST http://192.168.99.100:4242/stream still has the connection refused
[13:54:07] alaing: nickjj: is this the follow of push server setup: browser>rails > faye> browser
[13:54:13] alaing: follow=flow
[13:55:00] alaing: or is it browser>faye>rails>faye>browser
[13:55:47] nickjj: when you use curl, rails isn't even in the equation
[13:56:02] nickjj: neither is the browser
[13:56:12] moeabdol: has joined #RubyOnRails
[13:57:25] nickjj: alaing, do you have redis running too?
[13:57:37] nickjj: because i'm wondering if the faye server is running
[13:57:48] alaing: oh bugger I need to get redis up and runnig
[13:57:48] gaussblurinc1: has joined #RubyOnRails
[13:57:54] alaing: forgot about redis
[13:58:15] alaing: Again redis will be running from my localhost not in docker
[13:58:25] nickjj: yeah, mainly because i figured in any real implementation it would be backed by redis
[13:59:04] nickjj: you could remove this dependency of redis in faye itself, but that would require building your own custom docker image of it with a modified server.js which tells faye not to use redis
[13:59:05] alaing: nickjj: Yes I was going to head down the redis route too. no point using up memory
[13:59:41] nickjj: if you already have faye running in docker, you might as well dockerize redis too, all you need to do is pull down the official redis image and run it
[13:59:44] nickjj: no configuration required
[13:59:56] drbayer: has joined #RubyOnRails
[14:00:32] xlegoman: has joined #RubyOnRails
[14:01:31] alaing: nickjj: redis docker image downloaded and now running on docker port 6379
[14:01:59] nickjj: and if you dockerize redis, then you just need to run the faye docker image with --link redis
[14:02:17] kitsuneyo: has joined #RubyOnRails
[14:02:20] gaussblurinc1: has joined #RubyOnRails
[14:02:49] d0nn1e: has joined #RubyOnRails
[14:03:07] nickjj: so kill the faye docker container and re-run it exactly how you did before but add --link redis
[14:03:20] kitsuneyo: rails s stopped working after i updated my gems. i'm getting this error: "bin/rails:6: warning: already initialized constant APP_PATH". after googling i guess it's a problem with a gem, how do i find out which one?
[14:03:36] goodcodeguy: has joined #RubyOnRails
[14:03:56] drbayer: has joined #RubyOnRails
[14:04:01] shanemcd: has joined #RubyOnRails
[14:04:18] kitsuneyo: lol nevermind, fixed it
[14:04:23] sonofdirt: has joined #RubyOnRails
[14:06:06] kitsuneyo: it was countries
[14:07:26] alaing: nickjj: docker run -e "FAYE_PUSH_TOKEN=secret-hex-value-here" nickjj/faye --link redis
[14:07:38] alaing: rror response from daemon: Cannot start container 2e77bc1769c2c5a1bc7421604301fef1e3a237521d45638976e7027506433ebc: [8] System error: exec: "--link": executable file not found in $PATH
[14:07:48] gaussblurinc1: has joined #RubyOnRails
[14:09:10] joshkovach: has joined #RubyOnRails
[14:09:26] viiralvx: has joined #RubyOnRails
[14:10:24] crystal77: has joined #RubyOnRails
[14:11:44] nickjj: alaing, add it before the name of the image i think
[14:12:10] wsewolod: has joined #RubyOnRails
[14:12:15] nickjj: you may also want to consider using docker-compose because it makes running multiple docker containers a lot easier
[14:13:19] Cervajz: has joined #RubyOnRails
[14:13:29] skullcrasher: has joined #RubyOnRails
[14:14:13] skullcrasher: what do I have to do in order to add subfolders + models to the app/models folder?
[14:14:20] skullcrasher: for better organization
[14:14:21] alaing: nickjj: its running now
[14:14:36] alaing: but still getting refused connection
[14:14:44] skullcrasher: I get an 'uninstantiated constant' error
[14:15:05] Sawbones: has joined #RubyOnRails
[14:15:06] defsdoor: skullcrasher, afaiaa its recursive
[14:15:18] ramortegui: has joined #RubyOnRails
[14:16:05] nickjj: alaing, docker ps , shows both containers running?
[14:16:54] alaing: yes I see redis and faye
[14:16:57] skullcrasher: defsdoor, hmm ok. I added a folder like app/models/test/test_model.rb
[14:17:00] gaussblurinc1: has joined #RubyOnRails
[14:17:05] sevenseacat: skullcrasher: namespace them, or add the subfolders to the load path
[14:17:20] defsdoor: skullcrasher, theres an interesting feature here
[14:17:28] skullcrasher: sevenseacat, any links on how to namespace models?
[14:17:29] sevenseacat: i'd recommend the first option, or just not putting them in subfolders
[14:17:41] sevenseacat: same way you'd namespace a controller or any other class
[14:17:53] yardenbar: has joined #RubyOnRails
[14:17:56] skullcrasher: sevenseacat, well there are already many models, and logical some of them belong to different sections than the others
[14:17:56] sevenseacat: class Something::MyModel < ActiveRecord::Base
[14:18:00] alaing: I like the name docker has given it......"hopeful_jones"
[14:18:31] gaussblurinc1: has joined #RubyOnRails
[14:19:41] nickjj: alaing, yeah but you see both containers running?
[14:19:57] nickjj: ok (i see, scrolled up)
[14:20:23] alaing: both have been up for 5mins
[14:20:25] nickjj: i would need to more about your environment to debug this more
[14:20:30] nickjj: but i really don't have the time atm :/
[14:20:58] alaing: I'm wondering whether i should just ditch docker for the time being
[14:21:13] flashpoint9: has joined #RubyOnRails
[14:21:18] alaing: recreate faye using the nodejs version
[14:21:28] nickjj: you could, if you swiped the server.js from https://github.com/nickjj/docker-faye/blob/master/server.js
[14:21:28] alaing: so i can reuse server.js
[14:21:36] nickjj: all you would have to do is run that
[14:21:52] alaing: that sounds like a plan for the time being
[14:21:54] nickjj: and replace the default value on line 8 from 'redis' to 'localhost'
[14:22:06] nickjj: since redis would be running on localhost at that point
[14:22:36] alaing: look thank you for your help and time. i dont want to take up any more of it today so I'll crack on with it by myself and see how i get on
[14:22:51] nickjj: np, i'm sure you'll get it running if you go down this route
[14:23:21] alaing: nickjj: tbh I'm more of js person than a ruby specialist
[14:23:27] alaing: so it might be easier for me
[14:23:37] alaing: its just the rest of my team are ruby devs
[14:23:48] mary5030: has joined #RubyOnRails
[14:24:29] alaing: I have also sent the docker course link to some other people so hopefully we might be able to take you up on your course
[14:24:48] The_Phoenix: has joined #RubyOnRails
[14:25:36] nickjj: alaing, thanks. if you have any questions about it let me know
[14:25:37] kitsuneyo: is there like a standard regex string validation i can use without having to learn all about regex right now?
[14:25:52] nickjj: or if you need multiple licenses, we can work something out too
[14:25:54] alaing: nickjj: will do :-)
[14:26:03] gaussblurinc1: has joined #RubyOnRails
[14:27:02] krz: has joined #RubyOnRails
[14:27:16] Cervajz: has joined #RubyOnRails
[14:28:41] Sawbones: has joined #RubyOnRails
[14:28:57] hello9: has joined #RubyOnRails
[14:29:20] tagrudev: has joined #RubyOnRails
[14:30:03] Cervajz: has joined #RubyOnRails
[14:32:11] lxsameer: is there any translation option to avoid wrapping missing translation string in <span> ?
[14:33:12] darkxploit: has joined #RubyOnRails
[14:34:36] mustmodify: lxsameer: tell me more about that.
[14:34:47] annlewis: has joined #RubyOnRails
[14:35:24] lxsameer: mustmodify: I18n.t wrap the keys with missing translations in a <span> tag, Is there any option to disable this ?
[14:35:57] thedaniel: has joined #RubyOnRails
[14:36:08] mustmodify: irb(main):001:0> I18n.translate('Name') => "Name"
[14:36:13] mustmodify: it doesn't do that for me.
[14:36:29] lxsameer: mustmodify: you;re running it in text context
[14:37:49] thedaniel: Hello, rails peeps! I've been doing rails for a long time but I am about to do a side project with a friend that is not really a programmer and i would like to help her avoid the dependency / ruby version / db setup process. Did any of those old rails.app-type "all in one rails dev setup" tools ever turn into anything useful?
[14:38:10] annlewis_: has joined #RubyOnRails
[14:38:16] thedaniel: something like the MAMP app that wraps up apache and mysql and php, but for a rails app preferably with postgres
[14:41:51] Cervajz: has joined #RubyOnRails
[14:42:14] mustmodify: has left #RubyOnRails: ()
[14:42:32] sevenseacat: its not a hard process, if you're guided by someone who knows what theyre doing (as it sounds like you do)
[14:43:20] gaussblurinc1: has joined #RubyOnRails
[14:45:57] allcentury: has joined #RubyOnRails
[14:47:05] Sawbones: has joined #RubyOnRails
[14:47:24] norc: has joined #RubyOnRails
[14:47:29] diegoviola: has joined #RubyOnRails
[14:48:10] dmonster: has left #RubyOnRails: ()
[14:52:47] svoop: has joined #RubyOnRails
[14:54:25] tagrudev: is there a way to access the join table of habtm ?
[14:55:08] mary5030: has joined #RubyOnRails
[14:55:19] sevenseacat: nup, and why would you need to?
[14:55:21] tagrudev: https://gist.github.com/tagrudev/68ac6b3688697d4a1cd6
[14:55:24] tagrudev: sevenseacat, ^
[14:55:39] kitsuneyo: what's wrong with this test: "assert @place.longitude == -1.47008500000004" - is it the negative float, and what do i do about this?
[14:56:01] sevenseacat: well if UserConversation is a model, its not HABTM is it
[14:56:13] tagrudev: it's not a model
[14:56:18] sevenseacat: kitsuneyo: floats suck.
[14:56:26] sevenseacat: don't use them when precision is important.
[14:56:33] Frem: has joined #RubyOnRails
[14:56:36] tagrudev: sevenseacat, well if I need something like this should I move to has_many :through ?
[14:56:47] adre: has joined #RubyOnRails
[14:56:52] tagrudev: although I don't need anything else in this table rather than the ids
[14:57:02] kitsuneyo: sevenseacat, i was just following the geocoder setup guide
[14:57:06] sevenseacat: tagrudev: if the join model is important, then yes. i dont know if it is there because i dont know what that query is doing
[14:57:21] kitsuneyo: you suggest a string instead?
[14:57:32] tagrudev: thanks gonna investigate
[14:57:38] sevenseacat: kitsuneyo: a string or a decimal.
[14:57:45] drbayer_: has joined #RubyOnRails
[14:57:48] kitsuneyo: a decimal huh
[14:57:57] sevenseacat: i have no idea what 'geocoder setup' has to do with that line of code
[14:58:08] sevenseacat: nor have you mentioned what the problem actually is with that test
[14:58:10] stannard: has joined #RubyOnRails
[14:58:11] Sawbones: has joined #RubyOnRails
[14:58:13] kitsuneyo: it's the reason i used float
[14:58:15] maloik: has joined #RubyOnRails
[14:58:20] sevenseacat: I presume its failing somehow, but you didnt say why
[14:58:24] kitsuneyo: c'mon, that was pretty obvious
[14:58:35] kitsuneyo: well i got Failed assertion, no message given.
[14:58:42] kitsuneyo: so i don't know why
[14:58:46] sevenseacat: kitsuneyo: well is it failing because @place.longitude raised a no method error?
[14:59:05] argoneus: anyone here has experience with openid/oauth?
[14:59:16] sevenseacat: if not, then its only obvious to you.
[14:59:16] argoneus: im wondering if I should look for a gem or try to figure it out mself
[14:59:28] drbayer_: has joined #RubyOnRails
[15:01:05] crystal77: has joined #RubyOnRails
[15:01:18] xlegoman: has joined #RubyOnRails
[15:02:38] crystal77: has joined #RubyOnRails
[15:02:56] MaDErroR123: has joined #RubyOnRails
[15:03:35] maloik: has joined #RubyOnRails
[15:04:42] simplyianm: has joined #RubyOnRails
[15:05:48] sankaber: has joined #RubyOnRails
[15:07:22] drbayer: has joined #RubyOnRails
[15:08:24] bratsche: has joined #RubyOnRails
[15:08:46] RegulationD: has joined #RubyOnRails
[15:09:23] paulodiniz: has joined #RubyOnRails
[15:11:51] roxtrongo: has joined #RubyOnRails
[15:15:01] jhass: argoneus: by all means, use gems
[15:15:15] jhass: argoneus: tell us more about what you want to use them for and we can make suggestions
[15:16:14] pwnd_nsfw: has joined #RubyOnRails
[15:17:14] moeabdol1: has joined #RubyOnRails
[15:17:18] momomomomo: has joined #RubyOnRails
[15:17:41] gaussblurinc1: has joined #RubyOnRails
[15:17:48] nyaa: has joined #RubyOnRails
[15:18:52] Guest16359: has joined #RubyOnRails
[15:19:01] kitsuneyo: the floats are being rounded to 6 decimal places so i adjusted the test to assert @place.longitude == (-1.47008500000004).round(6)
[15:19:36] kitsuneyo: sevenseacat, is float accurate enough just for some google maps stuff? i guess i won't be doing any calculations on it or anything
[15:21:25] jhass: kitsuneyo: you should test floats using a tolerance, eg assert that |expected-actual| < epsilon
[15:21:35] jhass: minitest probably has a helper for that, let's see
[15:22:01] Sawbones: has joined #RubyOnRails
[15:22:23] kitsuneyo: jhass, i'm just pulling them from google maps api with geocoder, i don't know what i would be testing?
[15:22:59] jhass: kitsuneyo: http://www.rubydoc.info/gems/minitest/Minitest/Assertions#assert_in_epsilon-instance_method
[15:23:18] kitsuneyo: ah i see, thanks for that
[15:24:16] drbayer: has joined #RubyOnRails
[15:25:10] jhass: given these are probably WGS84 coordinates, we're talking millimeter range here that we would cut off, floats are good enough usually for this
[15:25:22] kitsuneyo: awesome thanks jhass
[15:25:44] kitsuneyo: so if my epsilon = 0.000001, that would be the same as rounding to 6 right?
[15:26:05] jhass: pretty much
[15:26:56] jhass: just without the danger of just trading one "weird" value for another because the target value couldn't be accurately represented in a float either
[15:27:37] robotbrain: has left #RubyOnRails: ("http://quassel-irc.org - Chat comfortably. Anywhere.")
[15:27:45] worknick: has joined #RubyOnRails
[15:28:17] argoneus: jhass: I'm just not sure how it's supposed to work on paper
[15:28:23] worknick: i am trying to add tabs as shown here https://jqueryui.com/tabs/ i manually added script src to jq ui. then added those tabs. now they dont have that css style. how can i get it? its not listen in their own style.css too
[15:28:34] argoneus: like if I want to grab the user's profile from this 3rd party thing, im not sure how often I need to update it or if I should update it every time the person logs in or what
[15:28:35] jhass: argoneus: sorry? I don't follow
[15:28:51] jhass: depends entirely on what you're doing
[15:29:13] argoneus: basically there's this openid service that lets them login with their account for a videogame and I can then use their information to grab info from the game's API and fill their profile or such
[15:29:25] argoneus: but I'm not sure how to check for changes on their game profile so I know I need to update mine and such
[15:30:01] kitsuneyo: jhass, i wrote a much better test with this help, thanks so much
[15:30:09] argoneus: if I poll the api all the time they will shank me
[15:30:17] jhass: argoneus: well, if the API has no webhooks or similar for that or an endpoint you can ask, it's up to you to poll it in a regular task
[15:30:34] jhass: if you truly care about the info being up-to-date at all that is
[15:30:54] argoneus: thing is, if I have like 500 users, they might shank me anyway if I update in a burst, and it could happen that a person's token meanwhile expired and I can't use it until they log in again and such
[15:31:03] drbayer: has joined #RubyOnRails
[15:31:10] argoneus: im just not sure how people generally work with the login to facebook thing and such
[15:31:13] jhass: good API docs inform you of any rate limits
[15:31:23] argoneus: they say 10 requests per 2 minutes is reasonable
[15:31:32] jhass: I don't think there's a golden rule
[15:32:37] argoneus: basically in my head it works like this
[15:32:47] jhass: so have a background task that throttles that sleeps 24 seconds after each request or something so you consume 5 per 2 minutes for that and have 5 left for other stuff
[15:33:06] argoneus: when a user logs in through the game on my website, I store their information and token on my website, and then I have a background task that just updates things over and over and extends tokens
[15:33:29] jhass: pretty much
[15:33:43] jhass: don't implement an openid client btw, there should be gems for that
[15:34:05] argoneus: thing is im not exactly sure if this api is proper openid, it's weird
[15:34:13] argoneus: could i perhaps link it to you and you tell me what you think about it?
[15:34:19] arup_r: has joined #RubyOnRails
[15:34:29] argoneus: it's just a short description of what urls and parameters they want you to use
[15:34:33] jhass: https://rubygems.org/gems/omniauth-openid there, omniauth is a popular framework, you can easily find plugins for everything else you can imagine
[15:34:35] argoneus: im not sure if it's even openid
[15:34:47] i: has joined #RubyOnRails
[15:35:16] dopie: has joined #RubyOnRails
[15:36:19] blackmesa: has joined #RubyOnRails
[15:37:13] lindii_: has joined #RubyOnRails
[15:38:41] desmondhume: has joined #RubyOnRails
[15:38:57] annlewis: has joined #RubyOnRails
[15:39:38] gaussblurinc1: has joined #RubyOnRails
[15:39:44] manjaro: has joined #RubyOnRails
[15:42:05] humd1ng3r: has joined #RubyOnRails
[15:42:38] teclator: has joined #RubyOnRails
[15:43:19] yoongkang: has joined #RubyOnRails
[15:45:00] manjaro: has joined #RubyOnRails
[15:45:31] _HombreTepic: has joined #RubyOnRails
[15:47:24] mdel: has joined #RubyOnRails
[15:48:50] nettoweb: has joined #RubyOnRails
[15:49:23] User458764: has joined #RubyOnRails
[15:50:03] Cervajz: has joined #RubyOnRails
[15:50:25] User458764: has joined #RubyOnRails
[15:50:51] Rodya_: has joined #RubyOnRails
[15:51:25] artto: has joined #RubyOnRails
[15:53:17] centrx: has joined #RubyOnRails
[15:56:41] B1n4r10: has joined #RubyOnRails
[15:58:52] kitsuneyo: has joined #RubyOnRails
[16:02:06] xlegoman: has joined #RubyOnRails
[16:02:15] drbayer: has joined #RubyOnRails
[16:03:33] gaussblurinc1: has joined #RubyOnRails
[16:05:47] adre: has joined #RubyOnRails
[16:07:23] gaussblurinc1: has joined #RubyOnRails
[16:07:44] Tempesta: has joined #RubyOnRails
[16:10:16] neanderslob: has joined #RubyOnRails
[16:11:34] qejk: has joined #RubyOnRails
[16:14:36] desmondhume: has joined #RubyOnRails
[16:15:29] hardtail: has joined #RubyOnRails
[16:16:06] tubbo: hey folks in south america...what's the best payment processor?
[16:16:25] tubbo: i've just about had it with PayU Latam and their lack of support for literally anything
[16:16:43] gaussblurinc1: has joined #RubyOnRails
[16:18:03] neanderslob: has joined #RubyOnRails
[16:20:30] gaussblurinc1: has joined #RubyOnRails
[16:21:46] Gm4n: has joined #RubyOnRails
[16:21:58] ebertx: has joined #RubyOnRails
[16:22:01] gaussblurinc1: has joined #RubyOnRails
[16:22:13] AlHafoudh: has joined #RubyOnRails
[16:22:30] jds: has joined #RubyOnRails
[16:22:54] Sawbones: has joined #RubyOnRails
[16:23:18] jds: Anyone aware of anything that creates a table called 'encoding_test' ? It keeps randomly cropping up in my schema.rb - I delete it, then something occurs that recreates it a few days later
[16:23:49] gambl0re: any guides out there that show how to create a very basic rails api?
[16:24:24] allcentury: has joined #RubyOnRails
[16:24:42] drbayer: has joined #RubyOnRails
[16:24:50] tubbo: jds: nothing in rails, that's for sure.
[16:25:02] jalcine: has joined #RubyOnRails
[16:25:09] tubbo: unless you have a self.table_name = 'encoding_test' somewhere haha
[16:25:48] dici: has joined #RubyOnRails
[16:26:55] chouhoul_: has joined #RubyOnRails
[16:27:30] gaussblurinc1: has joined #RubyOnRails
[16:27:55] momomomomo: has joined #RubyOnRails
[16:28:42] adre: has joined #RubyOnRails
[16:29:57] jhass: jds: how do you "delete" it?
[16:31:24] badoo: has joined #RubyOnRails
[16:33:02] Megamos: has joined #RubyOnRails
[16:33:57] adre: has joined #RubyOnRails
[16:34:29] ethe: has joined #RubyOnRails
[16:34:33] multiscan: has joined #RubyOnRails
[16:34:33] bronson: has joined #RubyOnRails
[16:35:11] momomomomo: has joined #RubyOnRails
[16:38:33] jds: @jhass using DROP TABLE in mysql, and removing it from schema.rb
[16:38:59] jhass: well, grep your project for it?
[16:39:13] jhass: spec,test,lib,config too
[16:39:42] annlewis: has joined #RubyOnRails
[16:39:44] tubbo: `git grep`
[16:40:31] jhass: mh, I should find out whether I can configure that to use ag
[16:41:10] jhass: but another reason I use bundle install --path vendor/bundle everywhere, can just grep all the dependencies of an app
[16:42:40] tubbo: jhass: it's pointless, because `ag` has its own ignore file and is faster than `git grep`, or just as fast in some cases.
[16:42:51] jds: jhass: Yeah, it doesn't exist. Not in my gems either
[16:42:56] tubbo: source -> playing with using `git grep` and `ag` for project-wide find and replace
[16:42:57] jds: so there's clearly something crazy occuring
[16:43:43] jds: I've changed my database privileges so that CREATE TABLE will be denied, hopefully it'll make it more obvious when it tries to recreate it
[16:43:45] jhass: jds: tbh you probably just failed to find it
[16:43:51] jds: thanks.
[16:44:03] jhass: maybe a another project using the same database name?
[16:44:50] kitsuneyo: i'm trying to write a regexp that matches strings with a-Z, 0-9, _ and -. this is what i have: \A[a-zA-Z0-9](\w|\-)*[a-zA-Z0-9]\z ... but the string "ChIJXSModoWLGGARILWiCfeu2M0" is failiing a rails test with that regexp.
[16:45:28] kitsuneyo: i guess that regexp is maybe requiring a - character in rails, even though it shouldn't
[16:45:35] jhass: kitsuneyo: so - is forbidden at the start and end?
[16:45:43] jhass: and _ too?
[16:45:54] kitsuneyo: jhass, i was wondering about that too... tbh, they aren't
[16:46:12] jhass: so just /\A[\w-]+\z/
[16:46:13] kitsuneyo: i guess i could simplify this somehow
[16:46:22] tubbo: kitsuneyo: i also recommend using rubular.com to work out your regex
[16:46:26] jhass: or * if the empty string shall be valid too
[16:46:37] kitsuneyo: i'm on the site now jhass
[16:47:15] kitsuneyo: it's still saying ChIJXSModoWLGGARILWiCfeu2M0 is invalid
[16:47:39] jhass: maybe for another reason than the regex?
[16:47:44] Cervajz: has joined #RubyOnRails
[16:48:07] jhass: ohttp://rubular.com/r/G28nwAO1kW
[16:48:12] jhass: http://rubular.com/r/G28nwAO1kW sorry
[16:49:05] kitsuneyo: this is my model and test https://gist.github.com/kitsuneyo/f67c5e123ad1c312f227
[16:49:11] kitsuneyo: yeah maybe jhass
[16:49:26] jds: IIRC '-' needs to be first in the character class
[16:49:59] jhass: jds: no, first or last or escaped
[16:50:10] jds: huh, ok
[16:50:20] jhass: kitsuneyo: look at the validation errors?
[16:50:28] kies: has joined #RubyOnRails
[16:50:51] robbyoconnor: has joined #RubyOnRails
[16:50:53] jshepherd: has joined #RubyOnRails
[16:51:01] kitsuneyo: you mean in my test results, or somewhere else?
[16:51:22] jhass: in the test results, yeah
[16:51:34] jhass: I mean it's probably easily reproduced on the console too
[16:51:41] jhass: just call .valid? and print .errors iirc
[16:52:53] drbayer_: has joined #RubyOnRails
[16:54:18] kitsuneyo: jhass, i put the test output here in a comment: https://gist.github.com/kitsuneyo/f67c5e123ad1c312f227
[16:54:57] jds: kitsuneyo: ChIJ2_UmUkxNekgRqmv-BDgUvtk has an underscore
[16:55:05] jhass: kitsuneyo: it's hard to read, make a habit of using code fences (```) everywhere ;)
[16:55:16] jhass: well, \ includes _, no?
[16:55:43] jhass: jds: yep, not the issue http://rubular.com/r/WrlvgOWCRU
[16:56:08] gaussblurinc1: has joined #RubyOnRails
[16:56:11] jds: Oh, sorry. I think I need more coffee.
[16:56:41] roxtrongo: has joined #RubyOnRails
[16:56:44] jhass: kitsuneyo: really, print the validation errors, that's just showing the failed assertion
[16:57:13] maloik: has joined #RubyOnRails
[16:57:22] diegoviola: I created an app in rails and now my client is saying I should convert it to microservices
[16:57:41] diegoviola: I really don't want to go the nodejs route for that
[16:57:52] diegoviola: as I have more ruby experience than JS
[16:58:04] diegoviola: suggestions?
[16:58:08] jhass: who says microservices have to be written in node?
[16:58:33] diegoviola: what can I use in ruby for that?
[16:58:33] jhass: do you even spend a minute researching what it means?
[16:58:34] kitsuneyo: jhass, i'm a dummy and not sure exactly how to do that
[16:58:45] diegoviola: jhass: I know what it means
[16:58:51] jhass: kitsuneyo: as said, call .valid? and then print .errors iirc
[16:59:07] jhass: diegoviola: then you don't need to ask the question you just asked
[16:59:26] gaussblurinc1: has joined #RubyOnRails
[16:59:32] diegoviola: my question is, what libs and frameworks can I use in ruby for that?
[16:59:35] diegoviola: sequel, sinatra?
[17:00:36] lindii_: any suggestions on adding some real time functionality?
[17:02:06] sloggerkhan: diegoviola: what about your current app makes it not a microservice?
[17:02:15] towski_: has joined #RubyOnRails
[17:02:25] momomomomo: has joined #RubyOnRails
[17:02:56] xlegoman: has joined #RubyOnRails
[17:03:03] jhass: diegoviola: yes
[17:03:50] kitsuneyo: jhass, i found the issue. that place_id already existed in the dev database. i didn't think that would matter in the test environment
[17:04:09] kitsuneyo: thanks again for your help
[17:04:39] drbayer: has joined #RubyOnRails
[17:04:46] drbayer: has joined #RubyOnRails
[17:05:02] hnanon: has joined #RubyOnRails
[17:05:30] drbayer: has joined #RubyOnRails
[17:06:04] diegoviola: SloggerKhan: I can just remove the views from my rails app and have another app access my rails API
[17:06:45] gaussblurinc1: has joined #RubyOnRails
[17:07:13] based_pdev_: has joined #RubyOnRails
[17:07:17] tildes: has joined #RubyOnRails
[17:07:20] diegoviola: SloggerKhan: but then I don't see the point of using rails anymore, I can just as well use sinatra for that
[17:07:28] hnanon: Assuming you're an above-junior dev, what's the best bang for your buck in terms of employability: learning to write tests, working with and creating APIs, or really learning SQL?
[17:07:37] Osw: has joined #RubyOnRails
[17:07:44] diegoviola: SloggerKhan: if I'm not going to use MVC as intended, I mean
[17:09:33] squiercaster: has joined #RubyOnRails
[17:11:34] nobitanobi: has joined #RubyOnRails
[17:11:55] kmckelvin: has joined #RubyOnRails
[17:12:06] jhass: diegoviola: the idea of microservices is not to split the architectual components (eg it's not to make one app for the views and one for the controllers) but into components that solve a single task, like one that tracks your shopping cart, one that does the interfacing to the payment providers and one that sends out notification mails
[17:12:47] gaussblurinc1: has joined #RubyOnRails
[17:14:47] User458764: has joined #RubyOnRails
[17:15:11] tubbo: diegoviola: your client doesn't have the right to tell you how to do your job.
[17:15:15] tubbo: fire them.
[17:16:00] tubbo: hey diegoviola, where do you live anyway?
[17:16:12] tubbo: i might have a question for YOU, actually.
[17:16:57] edwinvdgraaf: has joined #RubyOnRails
[17:17:38] maloik: has joined #RubyOnRails
[17:19:03] kmckelvin: has joined #RubyOnRails
[17:19:27] diegoviola: tubbo: it doesn't matter where I live
[17:19:31] diegoviola: tubbo: what question?
[17:19:38] gaussblurinc1: has joined #RubyOnRails
[17:20:25] markh: has joined #RubyOnRails
[17:20:26] tubbo: diegoviola: well, it actually had to do with whether you lived in south america or not. i'm building a site for someone down there, actually it's already built, but we're having a lot of problems with their payment provider.
[17:20:30] gaussblurinc1: has joined #RubyOnRails
[17:20:35] diegoviola: tubbo: they're talking that they expect the architecture of the app to be different, they want a client server model
[17:20:53] tubbo: i was kinda wondering if there were any other choices for payment processing...
[17:20:54] diegoviola: tubbo: they want an api that runs in the server and they want a client that just renders HTML
[17:21:08] diegoviola: tubbo: in another server
[17:21:14] tubbo: diegoviola: seems weird, but hey whatever they want, right? they're paying you.
[17:21:25] mclee: has joined #RubyOnRails
[17:21:25] ellisTAA: has joined #RubyOnRails
[17:21:33] diegoviola: tubbo: it is what it is, they have the money and I have to just do the work to earn it
[17:21:58] B1n4r10: has joined #RubyOnRails
[17:22:02] gaussblurinc1: has joined #RubyOnRails
[17:22:20] diegoviola: tubbo: I don't understand why they want this architecture, yes, it sounds silly
[17:23:21] diegoviola: tubbo: I'm from south america, yes
[17:23:49] tubbo: diegoviola: at least your client isn't asking you to write shitty code to deal with a bunch of idiots who can't even make a solid testing environment for their payment processor. :) i'd much rather my client paid me to refactor my already working code.
[17:24:13] gaussblurinc1: has joined #RubyOnRails
[17:25:40] diegoviola: tubbo: yeah I'm not really complaining
[17:26:01] paulodiniz: has joined #RubyOnRails
[17:26:08] diegoviola: tubbo: I'm actually very happy they are giving me work
[17:26:34] [Butch]: has joined #RubyOnRails
[17:26:42] diegoviola: tubbo: just seems odd, they said I can use whatever framework I want, I choose rails, and now they want this different architecture, oh well
[17:28:47] grotewold: has joined #RubyOnRails
[17:28:49] atrius: has joined #RubyOnRails
[17:29:16] [Butch]_: has joined #RubyOnRails
[17:30:49] tubbo: diegoviola: i'm surprised they care at all about what you're using. most people either don't know or don't care, they trust me as a programmer to get the job done with whatever tools i deem necessary
[17:31:16] tubbo: diegoviola: to put it in perspective, this is like the owner of a house instructing contractors on exactly what brand of drywall to buy.
[17:32:25] diegoviola: tubbo: I actually have 90% of the work already done on rails
[17:32:34] diegoviola: and now I have to rewrite it or reuse my code in another framework
[17:32:46] tubbo: diegoviola: and they're essentially paying for that?
[17:32:58] tubbo: because that sounds like a lot of great money coming in
[17:33:13] chrishein: has joined #RubyOnRails
[17:33:34] User458764: has joined #RubyOnRails
[17:34:05] tubbo: diegoviola: fwiw, a JSON API + client-side application is *not* "micro-services"
[17:34:28] sloggerkhan: It sounds like they want a Angular/Backbone/Ember type app that lets them scale static resources separately from the application layer more than a microservice.
[17:34:42] tubbo: totally ridiculous
[17:35:13] diegoviola: tubbo: what is that called then?
[17:35:39] tubbo: diegoviola: just a single-page app with an API.
[17:37:06] tubbo: diegoviola: in my experience, clients don't know more than you about the code. if they did, they wouldn't be paying for your service. so, i see no reason why you can't convince them that your current approach to their app will solve their problem just as well as a SPA + API.
[17:37:11] diegoviola: I'm not really used to angular/ember/backbone
[17:37:36] tubbo: diegoviola: honestly, i think you need to stand up to your client and make sure they know who's the boss of the code around here.
[17:38:01] tubbo: because it sounds like they're trying to push you around and you're not experienced enough to know when to say "no" to them.
[17:38:03] maloik: has joined #RubyOnRails
[17:39:09] bronson: has joined #RubyOnRails
[17:39:09] diegoviola: I've been using rails for 7 years, that's the reason why I got their app written in a week, I just don't have experience writing SPAs
[17:39:41] diegoviola: I'm comfortable with rails, not with SPAs
[17:39:56] momomomomo: has joined #RubyOnRails
[17:40:29] annlewis: has joined #RubyOnRails
[17:40:31] ethe: don't SPAs just use AJAX to work with an API?
[17:40:34] bronson: has joined #RubyOnRails
[17:40:37] diegoviola: they just said I have a day to convert it to the new architecture, this is ridiculous
[17:40:45] Pumukel: has joined #RubyOnRails
[17:41:12] tbuehlmann: diegoviola, you're here for 7 years already? wow, time flies
[17:41:19] tubbo: diegoviola: lol, and then what, they don't pay?
[17:41:35] tubbo: because you're not going to be able to convert it in the next 24 hrs
[17:41:35] diegoviola: tbuehlmann: I started working with rails in 2007/2008
[17:42:00] Pazician: has joined #RubyOnRails
[17:42:28] diegoviola: tubbo: he said "If you can't do it in 24 hours, then don't"
[17:42:30] slash_part: diegoviola: you ever see a recreational vehicle pulling a car?... think of it this way, until now you've been driving around in an RV, pulling a hunk of junk (html, various js, lots of trips back to the rv for spare parts). Now you're driving around in an RV that's pulling a ferrari (less junky, more organized, more powerful, and less trips back to the RV for things you need)
[17:42:54] rhizome: diegoviola: i would start by telling them it's out of scope, is a new requirement, and it'll cost them both money and time. that may put them off the microservices idea and let you get on with whatever else you have to do.
[17:43:03] tubbo: diegoviola: haha then don't :)
[17:43:24] rhizome: yeah, "sounds good to me!"
[17:43:47] sloggerkhan: diegoviola: well random ultimatums sound ridiculous. That said, rich front end client style apps aren't that hard. Just use something like pundit + active model serializers and the back end can come together pretty quick. Which will leave the front end. Which probably won't take a day since you haven't built something like it before.
[17:44:22] tubbo: yeah that's kind-of what i was implying, if he wants you to completely rewrite the thing from scratch, he better be paying for a whole new site. so now the site costs 2x as much
[17:44:29] tubbo: time is money.
[17:44:34] diegoviola: I tried Ember, it felt a bit too much, overengineered perhaps
[17:44:43] rhizome: well, "24 hours" implies a lot of ignorance and/or malice
[17:44:46] yoongkang: has joined #RubyOnRails
[17:44:56] diegoviola: not sure I like where this SPA stuff is going
[17:45:07] rhizome: never, *ever*, succumb to a hustle
[17:45:10] tubbo: diegoviola: sounds like you're getting bamboozled. i highly doubt your client will pay you :)
[17:45:56] sloggerkhan: Angular and Ember definitely have steep learning curves.
[17:46:15] jbrhbr: has joined #RubyOnRails
[17:46:41] tbuehlmann: gogo turbolinks
[17:47:50] sloggerkhan: Backbone + something like Backbone Stickit could be quickish to learn if you drop backbone routes and just use views/collections/models. Or at least much less to learn than angular/react/ember.
[17:47:55] hahuang65: has joined #RubyOnRails
[17:47:56] simplyianm: has joined #RubyOnRails
[17:49:30] diegoviola: tubbo: he really isn't paying me that much, I'm working for a salary
[17:50:45] rhizome: diegoviola: that's an improvement from past stories ;)
[17:51:21] diegoviola: rhizome: oh those old clients that screwed me you mean?
[17:51:24] roKin14: has joined #RubyOnRails
[17:52:13] drbayer: has joined #RubyOnRails
[17:52:29] nocontrol: has joined #RubyOnRails
[17:52:38] cycorld: has joined #RubyOnRails
[17:53:33] arup_r: I mentioned in my Gemfile gem 'sidekiq', '~>4.0.2' . And then what this error means ? https://gist.github.com/aruprakshit/4ac2903ffe86bf550f7d
[17:53:43] cornerma1: has joined #RubyOnRails
[17:53:50] arup_r: I am upgrading the gem version that's it
[17:54:15] diegoviola: rhizome: heh, I have a lawyer that I'm working with these days and he's still helping me to collect payment from one of those clients that never paid
[17:54:39] diegoviola: rhizome: so I don't have to worry about that part these days anymore
[17:54:42] alaing: has joined #RubyOnRails
[17:54:44] diegoviola: rhizome: I just let my lawyer deal with that
[17:55:37] bergs: has joined #RubyOnRails
[17:55:48] gaussblurinc1: has joined #RubyOnRails
[17:56:07] Rodya_: has joined #RubyOnRails
[17:56:54] bap1313: has joined #RubyOnRails
[17:57:03] Macaveli: has joined #RubyOnRails
[17:57:33] rhizome: good to hear
[17:57:49] jhass: arup_r: run bundle update sidekiq. Can't believe you haven't done this before ...
[17:58:09] arup_r: jhass: what do you mean >
[17:58:28] maloik: has joined #RubyOnRails
[17:58:35] diegoviola: rhizome: the lawyer takes a cut from the pay I should have received, but it's better than to not get paid at all, and it saves my time too, I don't have to deal with any of that bs anymore
[17:58:39] jhass: arup_r: what was hard to understand in my suggestion? I find it as straight forward as it gets
[17:58:43] diegoviola: I recommend everyone to talk to a lawyer, it's worth it
[17:59:05] arup_r: I ran bundle update .
[17:59:19] shinenelson: has joined #RubyOnRails
[17:59:23] jhass: arup_r: bundler says you didn't
[17:59:28] neanderslob: has joined #RubyOnRails
[17:59:37] arup_r: check my gist carefully then .. :)
[17:59:38] jhass: btw open bundle update's are bad, always specify the gem you want to update
[17:59:44] alaing: has joined #RubyOnRails
[18:00:20] jhass: arup_r: well
[18:00:22] jhass: https://rubygems.org/gems/sidekiq
[18:00:26] jhass: where's 4.0.2?
[18:00:39] joshkovach: has joined #RubyOnRails
[18:01:07] arup_r: in https://github.com/mperham/sidekiq/blob/master/Changes.md#sidekiq-changes
[18:01:17] arup_r: I need to grab 4.0.1
[18:02:34] rakm: has joined #RubyOnRails
[18:03:06] Ergo: has joined #RubyOnRails
[18:03:20] lacuna: has joined #RubyOnRails
[18:03:30] matthewcroxon: has joined #RubyOnRails
[18:03:35] lacuna: has joined #RubyOnRails
[18:04:34] paulodiniz: has joined #RubyOnRails
[18:04:57] moeabdol: has joined #RubyOnRails
[18:06:06] gaussblurinc1: has joined #RubyOnRails
[18:08:12] neanderslob_: has joined #RubyOnRails
[18:08:13] `based_pdev`: has joined #RubyOnRails
[18:11:28] tubbo: diegoviola: salary for a client?!
[18:12:24] cac: has joined #RubyOnRails
[18:12:35] diegoviola: tubbo: it's employment
[18:13:32] bratsche: has joined #RubyOnRails
[18:14:13] lubekpl: has joined #RubyOnRails
[18:15:40] diegoviola: I think I'll just use sinatra/sequel for the backend/API but I still don't know what I can use for the client
[18:15:44] diegoviola: or for consuming the API
[18:16:00] tubbo: diegoviola: you could just use rails for the backend/API
[18:16:11] tubbo: you don't need to use action_view
[18:16:20] tubbo: just render json responses from the controller
[18:16:42] diegoviola: but on the client?
[18:16:58] tubbo: diegoviola: if you want me to help design this project, i want a cut of your salary.
[18:17:04] ethe: have a controller/view which is the SPA
[18:17:07] tubbo: diegoviola: the other side is up to you
[18:17:17] ethe: which serves*
[18:17:22] matthewcroxon: has left #RubyOnRails: ()
[18:17:37] ethe: then just convert the rest of the application to a consumable API
[18:17:43] diegoviola: ethe: you mean something like ember on the client?
[18:17:45] tubbo: it already is, bceause it's rails
[18:18:03] jahbrewski: has joined #RubyOnRails
[18:18:26] ethe: diegoviola something like that, your goal was to have an SPA, right?
[18:18:42] tubbo: lol why do you need a "controller/view to act as the SPA?"
[18:18:54] maloik: has joined #RubyOnRails
[18:19:02] ethe: tubbo well, you need something to server the SPA
[18:19:15] jhass: how about your webserver?
[18:19:37] ethe: actually. dont mind me.
[18:19:43] diegoviola: there is no way I'll learn emberjs in 24 hours though
[18:19:47] tubbo: ethe: you can actually just define app/views/application/index.html.whatever and not have to worry about creating a new controller
[18:19:50] diegoviola: and do this at the same time
[18:19:54] diegoviola: in that timeframe
[18:20:02] jhass: diegoviola: true, took me a week or so
[18:20:09] ethe: tubbo yeah, I'm awful at phrasing things today :(
[18:20:18] baweaver: has joined #RubyOnRails
[18:20:40] diegoviola: jhass: learn ember?
[18:21:14] jhass: ember-cli gives you a decent enough environment though, a good base structure
[18:21:23] ethe: just do some cut & paste coding for today?
[18:21:40] ethe: so dont actually learn it fully, but just hack something together
[18:21:46] ethe: (just a thought)
[18:21:56] tubbo: and then deploy that to production? great suggestion, ethe.
[18:22:04] tubbo: :rolleyes:
[18:22:05] roxtrongo: has joined #RubyOnRails
[18:22:27] markh: ember is cool.
[18:22:36] markh: it's come a long way
[18:23:39] jhass: the community fails to do proper plugin maintenance though
[18:23:45] jhass: everything is behind all the time
[18:23:48] ethe: tubbo, what does the client expect diegoviola to do in 24 hours?
[18:24:12] tubbo: ethe: learn ember and refactor his 90%-complete "traditional" rails app into a SPA with a JSON API.
[18:24:18] agit0: has joined #RubyOnRails
[18:24:55] tubbo: jhass: i'm still a little sad ember-cli continues to depend on bower. :
[18:25:14] tubbo: when the rest of the JS community has moved past it, the bower devs won't even maintain it anymore, and there are way better alternatives such as System.js
[18:25:46] paulodiniz: has joined #RubyOnRails
[18:25:58] diegoviola: fortunately the app is not big at this point, I think I can totally write a ember app that consumes json
[18:26:18] creature: Is there a JS framework that lets you write templates once and does both plain HTML & fancy JS app bits? That is, use the templates for both server-side and client-side rendering?
[18:26:25] creature: (In Rails, and without utter contortionism)
[18:26:28] diegoviola: any good tutorials on ember?
[18:27:12] colleenmcguckin: has joined #RubyOnRails
[18:28:05] lacuna: has joined #RubyOnRails
[18:28:06] lacuna: has joined #RubyOnRails
[18:28:16] markh: diegoviola:
[18:28:17] markh: http://fromrailstoember.com/
[18:28:20] markh: http://thejackalofjavascript.com/emberjs-a-hands-on-tutorial/
[18:28:25] jhass: tubbo: that's actually my next gripe with the JS community. They can't decide on anything. Hundreds of tools that slightly but not fully do the same job and are basically incompatible with each other. Keep up what the best practice will be tomorrow takes your entire time today
[18:28:43] tubbo: creature: mustache is implemented in both JS and ruby.
[18:28:43] markh: http://thetechcofounder.com/getting-started-with-ember-js-using-ember-cli/
[18:29:37] colleenmcguckin: has joined #RubyOnRails
[18:29:48] tubbo: jhass: yeah, i feel you on that. bet the bloggers are loving it, all they have to do is :%s/Angular/React/gc and boom, instant hits.
[18:29:54] tubbo: in their articles*
[18:30:44] diegoviola: I'll just said to my employer that I will change it to use ember, and he is now contradicting me, this will not fly
[18:30:50] lacuna: has joined #RubyOnRails
[18:30:51] lacuna: has joined #RubyOnRails
[18:31:03] jhass: "I don't like how this tool handles this particular edge case! Let's start all over!"
[18:31:11] diegoviola: "It has to be the other way around" he said
[18:31:22] cac: has joined #RubyOnRails
[18:32:29] RegulationD: has joined #RubyOnRails
[18:32:48] ldnunes: has joined #RubyOnRails
[18:32:49] UnixBeginner: has joined #RubyOnRails
[18:32:50] diegoviola: he wants 2 servers and the server to send push messages to the client so the client knows when the update
[18:33:04] diegoviola: when to update*
[18:33:36] diegoviola: Ember will not work for this right?
[18:34:41] njero: has joined #RubyOnRails
[18:34:52] UnixBeginner: Hy. I have a script which I want to be executed inside a .rb file. It has been given execute permission and it is placed inside folder which is added to $PATH. calling `script` inside the code does nothing. if I run `script` inside irb console, it executes it.
[18:34:59] UnixBeginner: What am I missing here?
[18:35:29] diegoviola: this sounds overengineered and not something I can do in 24 hours
[18:35:36] RegulationD: has joined #RubyOnRails
[18:36:22] UnixBeginner: I have also tried adding an absolute path, still no success.
[18:37:25] FLeiXiuS: has joined #RubyOnRails
[18:37:26] FLeiXiuS: has joined #RubyOnRails
[18:37:49] jhass: UnixBeginner: how do you assert "does nothing"?
[18:37:56] baweaver: has joined #RubyOnRails
[18:37:58] LambdaSource: has joined #RubyOnRails
[18:38:07] uri: has joined #RubyOnRails
[18:38:14] UnixBeginner: script is supposed to create a file file.txt -> touch 'file.txt'
[18:38:27] diegoviola: do you guys know what my client is talking about when he says he wants 2 servers and the server sending push notifications to the client to update?
[18:38:49] jhass: UnixBeginner: using absolute or relative paths? How sure the code calling it is actually hit?
[18:38:55] jhass: *how sure are you
[18:39:13] cac: has joined #RubyOnRails
[18:39:25] maloik: has joined #RubyOnRails
[18:39:56] jhass: diegoviola: I can come up with two very different ways to interpret that. I suspect too much information is lost in translation here
[18:40:27] meoblast001: has joined #RubyOnRails
[18:40:31] UnixBeginner: jhass: 100% sure it reaches that point. tried `script` and `current_user/bin/script`
[18:41:00] safety_cut: has joined #RubyOnRails
[18:41:13] annlewis: has joined #RubyOnRails
[18:41:16] jhass: UnixBeginner: ah I meant whether the script uses an absolute or relative path to the file it creates
[18:41:44] gaussblurinc1: has joined #RubyOnRails
[18:42:06] UnixBeginner: jhass: relative path
[18:42:40] jhass: so, how sure are you you're looking in the right place? maybe the current working directory of your app is just different from what you think it is?
[18:42:48] diegoviola: jhass: I'm building some application that basically collects information from different sources and adds the info to a database, the app also is displaying some charts and information right now, I have that working on rails right now... but the client said he wants me to split the app that collects the info and he wants a separate app for displaying the data
[18:43:07] jhass: UnixBeginner: but tbh this is getting rather pointless, I can only provide very general pointers because the information you provide is very very vague
[18:43:08] diegoviola: jhass: so he gave me this idea that I should have 2 servers where the server sends messagest to the client to update
[18:43:15] diegoviola: jhass: but I have no idea how to build such a thing
[18:43:23] diegoviola: or what library to use for that
[18:43:34] tubbo: diegoviola: just tell him that's what it is
[18:43:36] tubbo: just lie to him
[18:44:19] jhass: diegoviola: they're probably taking about some websocket or long polling approach for the UI app
[18:44:37] jhass: and now the micro service statement starts to make sense
[18:44:56] jhass: you should build one app that inserts data into the DB and one that reads and visualizes it
[18:45:23] jhass: the app that inserts data into the DB is not supposed to provide the API for the client app
[18:45:29] markh: i think the moral of the story here is don't freelance
[18:46:03] markh: also, diegoviola, i don't think this is a 24-hour project
[18:46:12] diegoviola: markh: it isn't
[18:46:20] renegadeandy: has joined #RubyOnRails
[18:46:38] diegoviola: I'll have to use node
[18:46:43] diegoviola: if it requires websockets
[18:47:25] FLeiXiuS: has joined #RubyOnRails
[18:47:25] FLeiXiuS: has joined #RubyOnRails
[18:47:27] zeknox: has joined #RubyOnRails
[18:47:31] Sawbones: has joined #RubyOnRails
[18:47:46] [Butch]: has joined #RubyOnRails
[18:47:52] humd1ng3r: has joined #RubyOnRails
[18:48:19] diegoviola: markh: freelancing is not bad, what's bad is clients that are unreasonable like this
[18:48:48] diegoviola: markh: I think that's also my fault for not saying no more often
[18:48:50] simplyianm: has joined #RubyOnRails
[18:49:06] elektronaut: has joined #RubyOnRails
[18:49:29] adamholt: has joined #RubyOnRails
[18:49:45] zeknox: when creating a many to many relationship record like so: 'author.articles << article' , is it possible to access the article ID after this line is invoked?
[18:50:27] User458764: has joined #RubyOnRails
[18:50:40] FLeiXiuS: has joined #RubyOnRails
[18:50:40] FLeiXiuS: has joined #RubyOnRails
[18:51:32] diegoviola: is it reasonable if I tell the client that this is not a project I can do in 24 hours as it requires rethinking *everything* and it's better if we continue with the current codebase (rails) if the deadline is too tight at this point?
[18:51:56] diegoviola: and we can rethink the architecture in the long run
[18:52:03] markh: diegoviola, what were the specs you both agreed to in the first place?
[18:52:06] jhass: zeknox: the line doesn't affect whether article.id returns a number or not, whether article is saved or not does
[18:52:34] zeknox: jhass: assuming article is saved properly, how might i access article.id ?
[18:52:47] jhass: zeknox: with article.id
[18:53:23] zeknox: jhass: unless im doing something wrong it comes back with 'undefined method `id' for nil:NilClass'
[18:53:26] diegoviola: markh: as I said, he wants some application that collects data from different web sites and sources and adds them to his database, and a different application to render the views and show information such as charts
[18:53:35] jhass: zeknox: that means article is assigned nil
[18:53:50] diegoviola: markh: we agreed I'd do this, and I wrote 90% of it in rails already, but he's claiming this is not the architecture we agreed to
[18:54:08] diegoviola: markh: meaning, he wants different apps to collect and show the data
[18:54:18] zeknox: jhass: my bad, you are correct
[18:54:27] zeknox: jhass: i was accessing an object that didn't save
[18:54:34] diegoviola: markh: I choose rails because it's what I'm most comfortable working with, and he said I could use whatever framework I wanted to
[18:54:43] diegoviola: markh: but now he is complaining
[18:55:36] jhass: diegoviola: well, if he mentioned that he wants separate apps in the beginning, you fucked that up
[18:55:51] diegoviola: he seems to want me to write it with nodejs, websockets, angular/ember, etc, I'm not comfortable with that
[18:56:00] gaussblurinc1: has joined #RubyOnRails
[18:56:05] based_pdev_: has joined #RubyOnRails
[18:56:20] jhass: diegoviola: it's your job to determine what you can do before you accept the work
[18:56:54] jhass: if you change/not fulfill the requirements they posed without telling them before accepting the work, this is your fault, sorry
[18:57:10] diegoviola: yeah I agree
[18:57:36] diegoviola: I wonder what I can do the remedy the situation
[18:57:52] Rodya_: has joined #RubyOnRails
[18:58:09] Hates_: so the client asked for a node app from the start?
[18:58:25] diegoviola: I had a 1 week deadline to come with this solution, and I told him I wasn't a JS person
[18:58:55] CJNE: has joined #RubyOnRails
[18:59:09] jhass: I see roughly three possibilities: if you're lucky you can convince them that what you have chosen is the better architecture (hard), bite the bullet and fulfill the requirement unpaid, whatever it takes you or reject finishing the project and offer paying back some money
[18:59:18] diegoviola: Hates_: he is more of a node/mongo person
[18:59:22] diegoviola: than a rails person
[18:59:41] maloik: has joined #RubyOnRails
[18:59:42] diegoviola: I'm more of a rails person at this point
[18:59:43] Hates_: diegoviola: ahhhh
[18:59:51] momomomomo: has joined #RubyOnRails
[19:00:11] tubbo: ah so now we've come full circle
[19:00:21] tubbo: because, diegoviola, if you recall, i told you to do this like 30 mins ago
[19:00:35] tubbo: which is tell the client you're not able to do this in the alotted time frame.
[19:00:53] jhass: diegoviola: all that doesn't matter really, you failed to communicate properly. It's your job to communicate properly. Stop whining about their demands
[19:00:55] tubbo: it's not only not feasible, it's not possible, to rewrite what you've done in 24 hours in a completely different framework and language.
[19:01:07] tubbo: diegoviola: and yeah seriously, if you keep talking about this i'll probably +q you.
[19:01:13] tubbo: because i'm annoyed
[19:01:41] centrx: You have to stop the train and use the railroad signals or you will end up in a trainwreck
[19:02:35] markh: ACTION shrugs
[19:02:41] markh: diegoviola, just be honest
[19:03:05] tubbo: ^ works for me
[19:04:13] flashpoint9: has joined #RubyOnRails
[19:04:21] jbrhbr: has joined #RubyOnRails
[19:04:30] FLeiXiuS: has joined #RubyOnRails
[19:04:41] xlegoman: has joined #RubyOnRails
[19:05:11] markh: say you thought you had agreed to using rails, but there was a miscommunication at some point. with the time alotted and the deadline approaching, there are really only a few options. 1. mutually part ways and say sorry it didn't work out, 2. extend the deadline (if you think you can do this in node as originally asked for), or 3. push through with rails and get the best deliverable you can in the time available
[19:05:24] grotewold: has joined #RubyOnRails
[19:07:56] centrx: diegoviola chooses Option 4: Freak out and do nothing
[19:08:45] defsdoor: change email address and phone numbers and disappear
[19:08:53] diegoviola: centrx: I don't freak out, and can you stop being an ass?
[19:08:55] ibouvousaime: has joined #RubyOnRails
[19:09:11] B1n4r10: has joined #RubyOnRails
[19:10:19] brunto: has joined #RubyOnRails
[19:10:36] hobodave: has joined #RubyOnRails
[19:11:35] markh: yeah, diegoviola, it's not a huge deal. i know it feels shitty right now but be honest with them asap and things will work out fine
[19:12:11] diegoviola: I just told him
[19:12:33] hardtail: has joined #RubyOnRails
[19:12:40] safety_cut: has joined #RubyOnRails
[19:14:16] simplyianm: has joined #RubyOnRails
[19:14:49] gaussblurinc1: has joined #RubyOnRails
[19:15:38] argoneus: im trying to grasp the difference between devise and omniauth
[19:16:00] argoneus: I want to be able to auth people with 3rd party services only
[19:16:04] argoneus: and keep their session
[19:16:15] argoneus: I thought I need both devise and omniauth for this, but devise creates pretty much the entire register/login workflow etc
[19:16:20] Pazician: has joined #RubyOnRails
[19:16:21] apotry: has joined #RubyOnRails
[19:16:40] juddey: has joined #RubyOnRails
[19:16:55] tubbo: argoneus: if you don't need passwords, you don't need devise, IIRC.
[19:17:15] goldbug: has joined #RubyOnRails
[19:17:42] argoneus: tubbo: so I just install omniauth and implement the basic stuff for sessions and users?
[19:17:47] tubbo: your auth "workflow" is basically giving users a button so they can go offsite and connect with their provider, then the callback action that you use to populate your own DB with the information sent over by the prpvider
[19:17:50] tubbo: provider*
[19:17:53] tubbo: yeah argoneus
[19:18:05] gaussblurinc1: has joined #RubyOnRails
[19:18:17] argoneus: time to figure out how to un-generate devise code
[19:18:25] tubbo: argoneus: rails d devise User
[19:18:32] tubbo: rails d rocks
[19:18:39] argoneus: does destroy work with everything that uses generate?
[19:18:45] argoneus: that's cool
[19:18:50] drewdfw: has joined #RubyOnRails
[19:19:04] tubbo: i've been doing this rails shit way too long to have not known about that until last year haha
[19:20:02] colleenmcguckin: has joined #RubyOnRails
[19:20:05] maloik: has joined #RubyOnRails
[19:20:27] argoneus: on a related note
[19:20:31] argoneus: is there a way to unmigrate?
[19:20:36] argoneus: that is delete all migrations up to a certain one
[19:20:41] marr: has joined #RubyOnRails
[19:20:56] `based_pdev`: has joined #RubyOnRails
[19:21:42] tubbo: argoneus: i just rm the files. once their information is in your db/schema.rb, you don't need them anymore.
[19:22:01] tubbo: because you can regenerate the schema by running rake db:schema:load, which you should probably be doing anyway imho
[19:22:11] njero: has joined #RubyOnRails
[19:22:14] hahuang65: has joined #RubyOnRails
[19:23:10] MaDErroR123: has joined #RubyOnRails
[19:23:51] momomomomo: has joined #RubyOnRails
[19:24:58] baweaver: has joined #RubyOnRails
[19:27:52] hobodave: has joined #RubyOnRails
[19:29:26] ebertx: has joined #RubyOnRails
[19:30:53] colleenmcguckin: has joined #RubyOnRails
[19:33:55] drbayer: has joined #RubyOnRails
[19:36:01] desmondhume: has joined #RubyOnRails
[19:37:22] maloik: has joined #RubyOnRails
[19:38:07] arup_r: has joined #RubyOnRails
[19:38:22] manfrin: has joined #RubyOnRails
[19:42:08] annlewis: has joined #RubyOnRails
[19:44:44] asteros: has joined #RubyOnRails
[19:46:16] yoongkang: has joined #RubyOnRails
[19:47:19] Synthead: has joined #RubyOnRails
[19:49:21] ldnunes: has joined #RubyOnRails
[19:50:46] nettoweb: has joined #RubyOnRails
[19:51:39] crystal77: has joined #RubyOnRails
[19:52:33] mentero: has joined #RubyOnRails
[19:54:21] ur5us: has joined #RubyOnRails
[19:54:25] Pazician: has joined #RubyOnRails
[19:56:07] maxx88: has joined #RubyOnRails
[19:58:45] yfeldblum: has joined #RubyOnRails
[19:59:17] Rodya_: has joined #RubyOnRails
[20:00:46] CJNE: has joined #RubyOnRails
[20:02:40] safety_cut: has joined #RubyOnRails
[20:03:14] rakm: has joined #RubyOnRails
[20:04:36] dopie: has joined #RubyOnRails
[20:07:11] hackeron: has joined #RubyOnRails
[20:08:15] srinidhi: has joined #RubyOnRails
[20:09:30] yoongkang: has joined #RubyOnRails
[20:11:31] yardenbar: has joined #RubyOnRails
[20:12:02] based_pdev_: has joined #RubyOnRails
[20:12:35] diegoviola: does rails have websockets support?
[20:12:50] bbrowning: has joined #RubyOnRails
[20:15:26] CJNE: has joined #RubyOnRails
[20:16:48] shathoma: has joined #RubyOnRails
[20:16:58] sandstrom: has joined #RubyOnRails
[20:17:34] cac: has joined #RubyOnRails
[20:17:45] arup_r: I am going to use https://github.com/carrierwaveuploader/carrierwave gem for image thing for 3 models.. Should I use same uploader for all models, or each model should one uploader ? What is best practice to follow ?
[20:18:06] paulodiniz: has joined #RubyOnRails
[20:18:13] dionysus69: has joined #RubyOnRails
[20:19:24] shathoma: Trying to figure out using select boxes on the controller side of an app, I saw the model portion in the documentation but my example seemed more complex and wasn't sure how to handle the nesting of my models. I have the full gist (with more explination of issue) here:
[20:19:25] shathoma: https://gist.github.com/codejoy/24f71c9ba18511e8c14e
[20:19:43] twilling: has joined #RubyOnRails
[20:20:22] centrx: has joined #RubyOnRails
[20:20:55] havenwood: has joined #RubyOnRails
[20:20:56] ur5us: has joined #RubyOnRails
[20:22:59] ur5us_: has joined #RubyOnRails
[20:23:58] momomomomo: has joined #RubyOnRails
[20:25:01] simplyianm: has joined #RubyOnRails
[20:25:52] arup_r: ok, got some answers http://stackoverflow.com/questions/4796709/carrierwave-multiple-uploaders-or-just-one and http://stackoverflow.com/questions/10458324/carrierwave-single-uploader-for-multiple-models and http://stackoverflow.com/questions/16147347/use-one-uploader-of-image-carrierwave-for-several-models-in-rails to get the ideas.. for now I will use the same uploader and in future if something differs.. I'll choose inheritance if that
[20:25:52] arup_r: solves it.
[20:28:11] slash_nick: ice, ice, baby
[20:29:50] arup_r: baby... baby.. milky babay
[20:29:58] multiscan: has joined #RubyOnRails
[20:30:50] FailBit: vanilla??? milk
[20:30:54] meoblast001: has joined #RubyOnRails
[20:31:01] chubijs: has joined #RubyOnRails
[20:32:28] flashpoint9: has joined #RubyOnRails
[20:33:34] hahuang65: has joined #RubyOnRails
[20:33:42] shibabu: has joined #RubyOnRails
[20:34:19] juddey: has joined #RubyOnRails
[20:37:08] baweaver: has joined #RubyOnRails
[20:38:18] cac: has joined #RubyOnRails
[20:39:47] arup_r: so each time I am signin though a google I would like to see if the user has changed the profile image or not. If changed, then I will update it in my model otherwise not. https://github.com/zquestz/omniauth-google-oauth2#auth-hash Is it possible image comparisons, or just to update the image file for every login will be a good idea ?
[20:40:30] pyemkey: has joined #RubyOnRails
[20:41:26] roxtrongo: has joined #RubyOnRails
[20:42:09] slash_nick: arup_r: could you just compare the image url? nevermind the file?
[20:42:32] slash_nick: abc.com/profile1.png changes to abc.com/profile2.png (must be different)?
[20:42:46] annlewis: has joined #RubyOnRails
[20:42:47] rhizome: are you even allowed to save profile images? just get it when they log in
[20:43:24] arup_r: no idea if that is the correct approach, and I am not storing the image url, and I will give the url to carrierwave and this gem will process and save it.
[20:43:58] rhizome: so what are you comparing to see if it changed?
[20:44:30] arup_r: No idea how to compare, that is why asked if any parameters are there or not..
[20:44:54] arup_r: if it is so hard to compare, I will update the table column for each login
[20:45:21] tubbo: lol wat arup_r
[20:45:23] tubbo: you never asked that
[20:45:45] pyemkey: Hello. I started to write feature tests by using rspec with capybara. I decided to use outside-inside pattern. I started in good way, because my test was red :) Problem is that I don't have idea why user is redirecting to sign in page instead of "page with welcome message". Here is sample code https://gist.github.com/pyemkey/b1605c8029e47e8e47c9 Probably I forgot to add something in configuration
[20:45:52] alaing: HI , any ideas why I might get a 400 bad request from Net::HTTP call?
[20:45:55] alaing: https://gist.github.com/aliuk2012/62e8a35bc2761f336e74
[20:45:59] arup_r: I did bro.
[20:46:10] rhizome: arup_r: you have to have two things in order to do a comparison. what are you comparing what would be their current image with to see if it changed?
[20:46:55] LambdaSource: has joined #RubyOnRails
[20:47:10] alaing: it works when i use curl but throws the bad request when it comes from rails
[20:47:19] dionysus69: has joined #RubyOnRails
[20:47:33] arup_r: yes, google profile pic will be the current one.. so if they change there, I will change here also
[20:47:43] baweaver: has joined #RubyOnRails
[20:47:48] arup_r: there(Google) and here(mmy app)
[20:48:41] desmondhume: has joined #RubyOnRails
[20:48:46] shibabu: has joined #RubyOnRails
[20:49:45] melonstorm: has joined #RubyOnRails
[20:49:53] Jasaka: has joined #RubyOnRails
[20:50:17] MaDErroR123: has joined #RubyOnRails
[20:51:33] maloik: has joined #RubyOnRails
[20:52:05] jetpackjoe: has joined #RubyOnRails
[20:52:42] Hates_: arup_r: don't you have to fetch it to compare it? if you're fetching it why not just replace it
[20:53:00] slash_nick: alaing: i'm confused... when they login, i imagine you get a response from google with some json profile object... one of the properties of said object is the image?... nothing has to change, just always use it dynamically
[20:53:17] slash_nick: arup_r: whoops, for you ^
[20:53:19] jetpackjoe: has joined #RubyOnRails
[20:53:24] arup_r: Hates_: that is what I concluded here...so writing it like that
[20:53:33] mustmodify: has joined #RubyOnRails
[20:53:54] arup_r: slash_nick: no.. there is a problem
[20:54:01] diegoviola: my client just told me I can continue the work I'm doing with rails
[20:54:07] slash_nick: ACTION sticks fingers in ears and hums loudly... no problems!
[20:54:08] mustmodify: something interesting. I added `gem 'pry-byebug'` to a Gemfile and used it in development, which worked. Just found that I accidentally put it in the 'test' group. Why did it work?
[20:55:02] arup_r: those people can login to app locally also using email and local password, so in this google image url will not work due to authentication .. that is why I am saving locally..
[20:55:19] arup_r: anyway.. I will update on every login,, that is easy
[20:55:27] mustmodify: ACTION seems to be jumping in during the middle of an interesting conversation
[20:55:28] arup_r: thanks all
[20:55:41] LambdaSource: has joined #RubyOnRails
[20:55:49] thekkid: has joined #RubyOnRails
[20:56:00] alaing: arup use https://en.gravatar.com/
[20:56:33] slash_nick: nooo, alaing arup_r wants their profile image to be the same as their google profile image... gravatar is a-whole-nother account
[20:56:34] thekkid: Has anyone used faraday to consume a paginated resource as a transparent enumerator?
[20:56:40] Sawbones: has joined #RubyOnRails
[20:56:52] alaing: slash_nick: ah ok
[20:57:10] alaing: arup_r: ignore me
[20:57:24] lxsameer: has joined #RubyOnRails
[20:57:24] arup_r: I don't ignore anybody..
[20:57:31] arup_r: ACTION hugs alaing
[20:57:44] slash_nick: ACTION joins group hug
[20:58:28] alaing: ACTION notices some others giving weird looks
[20:58:53] alaing: ACTION hugs everyone
[20:59:37] shathoma: I am having fits with my select_tag I think i need one model based, I saw it in the documentation but I have a deep/complex association in my model and wasn't sure how to make it work. More information in the gist here: https://gist.github.com/codejoy/24f71c9ba18511e8c14e
[20:59:38] alaing: ACTION wonders who squeezed his bum
[21:01:15] multiscan: has joined #RubyOnRails
[21:02:11] asteros: has joined #RubyOnRails
[21:02:59] agit0: has joined #RubyOnRails
[21:03:56] LambdaSource: has joined #RubyOnRails
[21:05:40] bronson: has joined #RubyOnRails
[21:06:32] xlegoman: has joined #RubyOnRails
[21:07:14] Coldblackice: has joined #RubyOnRails
[21:07:45] lacuna: has joined #RubyOnRails
[21:08:41] alaing: slash_nick: any chance you could help me with the bad request i get when i use net::http
[21:09:02] bronson: has joined #RubyOnRails
[21:09:46] momomomomo: has joined #RubyOnRails
[21:09:57] rubyonrails711: has joined #RubyOnRails
[21:11:03] twilling: has joined #RubyOnRails
[21:12:03] mustmodify: ACTION waiting
[21:12:11] argoneus: I don't define mode attributes in my code?
[21:12:18] argoneus: I need to change the db directly?
[21:13:22] argoneus: i have a feeling im using ruby wrong
[21:13:32] rhizome: sounds like it
[21:13:33] centrx: argoneus, To change the database: http://edgeguides.rubyonrails.org/active_record_migrations.html
[21:13:57] maloik: has joined #RubyOnRails
[21:13:58] centrx: argoneus, Rails automatically determines the attributes of a model from the database
[21:14:16] argoneus: I thought I make a model called "user" and give it an attribute "email"
[21:14:25] argoneus: so instead I create a model called user, create a migration, and edit it?
[21:15:59] argoneus: I do generate model user bla:bla bla:bla
[21:16:04] argoneus: and change that if needed
[21:16:06] nurey: has joined #RubyOnRails
[21:16:24] momomomomo: has joined #RubyOnRails
[21:16:39] svoop: has joined #RubyOnRails
[21:18:25] lacuna: has joined #RubyOnRails
[21:18:36] lacuna: has joined #RubyOnRails
[21:18:36] jetpackjoe: has joined #RubyOnRails
[21:18:48] argoneus: ora m I not supposed to edit migratios ns by hand?
[21:19:17] mustmodify: argoneus: the rule of thumb is that you should not edit a migration once you have committed it.
[21:19:34] argoneus: so if I generate a new model
[21:19:44] argoneus: and realize I forgot some columns, and I didn't commit yet
[21:19:47] argoneus: then I just edit the migration
[21:19:52] argoneus: if I already commited, I need a new migration
[21:20:08] mustmodify: rake db:rollback, edit rake db:migrate
[21:20:29] mustmodify: because Rails keeps track of what migrations it has run, in a list.
[21:20:35] mojobiri__: has joined #RubyOnRails
[21:20:49] mustmodify: and it won't run the same one again.
[21:20:55] argoneus: im a bit confused right now
[21:20:57] mustmodify: so rolling back "reverses" that
[21:21:04] mustmodify: argoneus: oh, sorry.
[21:21:06] argoneus: could you give me a tl;dr on the workflow if I decide I need an "Article" model?
[21:21:17] argoneus: with like title, text, author
[21:22:10] quazimodo: has joined #RubyOnRails
[21:23:05] renegadeandy: has joined #RubyOnRails
[21:23:16] paulodiniz: has joined #RubyOnRails
[21:23:30] drbayer: has joined #RubyOnRails
[21:23:57] benlieb: has joined #RubyOnRails
[21:24:01] maloik: has joined #RubyOnRails
[21:24:22] mustmodify: 1. generate migration.
[21:24:25] lacuna: has joined #RubyOnRails
[21:24:25] lacuna: has joined #RubyOnRails
[21:24:43] mustmodify: 2. edit the migration file so that it will generate the exact table that you want.
[21:25:10] mustmodify: 3. run the migration
[21:25:31] mustmodify: 4. create model, views and controller.
[21:25:36] mustmodify: 5. create tests.
[21:25:48] mustmodify: 6. add logic to model, while writing tests.
[21:26:10] mustmodify: 1, 4 and 5 may be substituted by changing 1 to "generate a scaffold"
[21:26:19] mustmodify: I don't do that but I'm sure many people do.
[21:26:51] argoneus: when I generate a model, does it run the migration it makes?
[21:27:29] mustmodify: you run the migration
[21:27:33] joshkovach: has joined #RubyOnRails
[21:27:34] argoneus: why not do 4 before 1, then?
[21:27:36] mustmodify: bundle exec rake db:migrate
[21:28:02] brunto: has joined #RubyOnRails
[21:28:09] argoneus: something like
[21:28:11] argoneus: generate model
[21:28:14] argoneus: edit migration
[21:28:16] argoneus: rake db:migrate
[21:28:21] argoneus: write tests, controllers, whatever
[21:28:24] argoneus: is that bad?
[21:28:27] mustmodify: well, a model is useless and, if loaded, will throw an error if there is no table.
[21:28:30] mustmodify: But the reverse is not true.
[21:28:38] mustmodify: If there is a table with no associated model, nothing bad will happen.
[21:29:36] mustmodify: however, rhizome's comment was useful, because scaffolding will create the model, the controller, the views, the migrations and the tests in one fell swoop.
[21:29:39] asteros: has joined #RubyOnRails
[21:29:58] argoneus: I may not need the controller and the views
[21:29:59] argoneus: or the tests
[21:30:06] argoneus: and then it's more work, no?
[21:30:22] rhizome: why wouldn't you need tests?
[21:30:37] rhizome: well, if it's just a model
[21:30:54] annlewis: has joined #RubyOnRails
[21:31:00] mustmodify: rhizome: it happens, but if you don't know how to create a migration, you probably aren't there just yet.
[21:32:33] asteros: has joined #RubyOnRails
[21:32:45] duncannz: has joined #RubyOnRails
[21:33:36] argoneus: and then when the migrations are done
[21:33:40] argoneus: my models will be pretty much empty?
[21:33:46] argoneus: like, rails models don't hold attributes, just methods?
[21:34:18] mustmodify: argoneus: This is one thing that, while I like it, does confuse a lot of people.
[21:34:43] markh: has joined #RubyOnRails
[21:35:17] mustmodify: If you have an Article model and an articles table, the first thing Rails is going to do is `describe articles` ... it will ask the database for a list of columns and their types.
[21:35:24] mustmodify: Then it will create methods with those names.
[21:35:48] mustmodify: So even though it isn't written in article.rb, there will be a setter and a getter for Article#title Article#content, etc.
[21:39:41] AlHafoudh: has joined #RubyOnRails
[21:41:41] paulodiniz: has joined #RubyOnRails
[21:44:30] argoneus: i still need to learn ruby syntax
[21:44:43] argoneus: this whole #=> and # and ! and ? and stuff is weird
[21:46:48] joshkovach: has joined #RubyOnRails
[21:48:01] mustmodify: argoneus: yeah, it's a different world in many respects.
[21:49:06] twilling: has joined #RubyOnRails
[21:50:11] cac: has joined #RubyOnRails
[21:53:23] ModusPwnens: has joined #RubyOnRails
[21:54:23] ModusPwnens: I just upgraded from rails 4.0 to rails 4.2 We have an engine that we are using for this application as well (which is using rails 4 still). After the upgrade, it complains about not being able to find the engine version constant, which is defined in version.rb in the lib folder and should be autoloaded. After the upgrade, it's not autoloaded anymore. Has anyone run into this?
[21:55:10] Pazician: has joined #RubyOnRails
[21:55:48] User458764: has joined #RubyOnRails
[21:56:48] zeknox: when are we going to see rails 5 in action, really hungry for some ActionCable
[21:57:53] `based_pdev`: has joined #RubyOnRails
[21:58:55] yardenbar: has joined #RubyOnRails
[21:59:08] Radar: zeknox: never
[21:59:15] Radar: zeknox: Manning owns the rights to the Rails x in Action stuff
[21:59:27] Radar: And the contract forbids me from writing another intro book for 3 years after the publication of R4IA
[21:59:57] zeknox: Radar: are you being serial or trolling?
[22:00:01] Radar: zeknox: serious
[22:00:14] wkoszek: Radar: that totally sucks
[22:00:17] Radar: zeknox: If anything, a new book I would write would be an intro to Elixir / Phoenix for Ruby / Rails developers.
[22:00:18] kadoppe: has joined #RubyOnRails
[22:00:25] wkoszek: ACTION sees Radar selling his soul to devil
[22:00:25] Radar: wkoszek: Absofuckinglutely.
[22:00:26] simplyianm: has joined #RubyOnRails
[22:00:48] SalexW: has joined #RubyOnRails
[22:01:12] markh: if i had any talent at all, i would sell out nigh-immediately.
[22:01:16] roshanavand: has joined #RubyOnRails
[22:01:32] zeknox: Radar: wait, so why have all the blogs been saying rails 5 is coming this winter with ActionCable and such
[22:01:43] claytonzaugg: has joined #RubyOnRails
[22:01:47] Radar: zeknox: lol
[22:01:54] Radar: zeknox: Rails 5 is coming, Rails 5 in Action isn't coming.
[22:02:10] Radar: zeknox: "Rails 5 in Action" the book. Or did you mean "Rails 5" in action?
[22:02:14] zeknox: zeknox: doh, why you gotta be like that :P
[22:02:23] markh: zeknox, Radar wrote the book, "Rails 4 in Action"
[22:02:32] zeknox: Radar: haha, i did not mean the book lol
[22:02:49] zeknox: Radar: I was just meaning in general when might we see some rails 5 with actioncable lol
[22:02:49] Rodya_: has joined #RubyOnRails
[22:02:57] mustmodify: zeknox: parsing issues. lol.
[22:03:09] zeknox: wew! I can breathe again
[22:03:56] wkoszek: ACTION wonders if he prefers raspberry pi over rails 4 in action from santa
[22:04:06] edwinvdgraaf: has joined #RubyOnRails
[22:04:38] tvon: has joined #RubyOnRails
[22:04:49] flashpoint9: has joined #RubyOnRails
[22:04:51] lacuna: has joined #RubyOnRails
[22:04:59] markh: i wont buy r4ia out of principle
[22:05:29] Radar: markh: I'd recommend buying just the ebook one. The authors get 50% of that.
[22:05:55] Radar: wkoszek: por que no los dos?
[22:06:31] ql6wlld: has joined #RubyOnRails
[22:06:39] markh: Radar: nice, that's cool
[22:06:42] roxtrongo: has joined #RubyOnRails
[22:07:10] Radar: More info about publishing books if anyone wants to know http://ryanbigg.com/2015/08/my-self-publishing-success-story/
[22:07:11] wkoszek: Radar: Frugal miser here, but yes, both are good investments.
[22:07:12] momomomomo: has joined #RubyOnRails
[22:07:15] zeknox: back to the original question, when might we see some rails 5 released into action -not the book
[22:07:22] Radar: zeknox: !when
[22:07:22] xlegoman: has joined #RubyOnRails
[22:07:26] Radar: zeknox: !where
[22:07:45] flashpoint9: has joined #RubyOnRails
[22:08:25] zeknox: ok, i guess i missed the boat somewhere...
[22:08:47] wsewolod: has joined #RubyOnRails
[22:08:57] Radar: Hm, northern Russia. Might be a bit cold.
[22:09:06] yoongkang: has joined #RubyOnRails
[22:09:07] Radar: zeknox: It'll be done when it's done.
[22:09:15] Radar: Feel free to use it now. I think Basecamp does.
[22:09:40] Radar: If you want to play with proper websockets instead of a hacked variation of them, then I recommend learning Elixir and Phoenix.
[22:10:03] baweaver: has joined #RubyOnRails
[22:10:05] drbayer_: has joined #RubyOnRails
[22:10:10] zeknox: perfect, where might i find the most upto date rails5 branch, don't see it on github or overlooked it perhaps?
[22:10:23] Radar: It's the master branch.
[22:10:53] zeknox: Radar: so it sounds like you feel elixir and phoenix are superior to actioncable then?
[22:10:58] Radar: zeknox: yes
[22:11:59] baweaver: has joined #RubyOnRails
[22:14:02] zeknox: Radar: so this is an entirely different lang / framework, not an addition to rails itself?
[22:14:22] Radar: zeknox: yes, that's right
[22:15:00] zeknox: ah i c, was just looking for a little something to update my UI without polling in rails
[22:15:18] Radar: Look at Faye then
[22:15:41] zeknox: will do, thanks!
[22:16:31] Dreeg: has joined #RubyOnRails
[22:16:56] B1n4r10: has joined #RubyOnRails
[22:17:14] mustmodify: Radar: If you know much about websockets, I have a question. My impression is that you're leaving open a connection between the client and the server. At what scale does that become infeasible, and what problem does it cause?
[22:18:56] Radar: mustmodify: Spoilers: I don't know much about websockets at all :)
[22:19:06] mustmodify: ok well never mind then.
[22:20:15] Radar: mustmodify: As far as I know, it depends on how much data is being transmitted over the sockets.
[22:20:47] Radar: mustmodify: Phoenix Core released a benchmark recently of 2 million websocket connections to the same machine, with only a 40% CPU load (briefly) when a message was sent to a chatroom.
[22:21:02] markh: #websockets-rails exists
[22:21:09] adavia: what would you guys suggest for adding some real time functionality?
[22:21:10] Radar: http://www.phoenixframework.org/blog/the-road-to-2-million-websocket-connections
[22:21:20] rakm: has joined #RubyOnRails
[22:21:26] havenwood: mustmodify: http://www.nateberkopec.com/2015/09/30/action-cable.html
[22:21:43] Radar: What kind of real-time functionality are you all adding to your apps?
[22:22:16] adavia: like private notifications
[22:25:17] colleenmcguckin: has joined #RubyOnRails
[22:25:27] Rubie: has joined #RubyOnRails
[22:31:40] annlewis: has joined #RubyOnRails
[22:32:06] tubbo: i really don't see much of a difference in terms of how they interact with the web
[22:32:24] tubbo: the main diffs i see between phoenix and rails is the language.
[22:32:44] tubbo: what makes actioncable any worse than phoenix's channels?
[22:35:07] tubbo: lol literally 200 doubleclick requests on linio.com.co
[22:35:45] jbrhbr: has joined #RubyOnRails
[22:36:25] rubyonrailed: has joined #RubyOnRails
[22:37:18] shibabu: has joined #RubyOnRails
[22:39:08] Radar: tubbo: You'll learn one day :)
[22:39:23] asteros: has joined #RubyOnRails
[22:39:32] Radar: I don't think that actioncable could handle anywhere near the requests that phoenix could.
[22:39:50] Radar: And Ruby doesn't necessarily make it easy for multi-threaded processes, which is what websockets requires.
[22:43:37] safety_cut: has joined #RubyOnRails
[22:44:01] benlieb: has joined #RubyOnRails
[22:44:09] yfeldblum: has joined #RubyOnRails
[22:44:25] tubbo: Radar: i hope so
[22:44:36] tubbo: ahhh that makes sense, yeah
[22:46:14] twilling: has joined #RubyOnRails
[22:46:40] Radar: So imo actioncable is going to be a terrible, disgusting hack which'll work for Basecamp's purposes but then anyone else who tries to use it in a Real Production Environment(tm) will run into issues and there will be actual tears.
[22:46:53] Radar: ACTION prints that out, dates it and sticks it to the wall
[22:47:19] jscheel: has joined #RubyOnRails
[22:48:22] tubbo: Radar: s/actioncable/turbolinks
[22:48:33] tubbo: Radar: have you actually read the actioncable source?
[22:49:05] Radar: tubbo: I have no desire to do that because I do not want to have a Twitter fight with DHH again.
[22:49:29] Radar: "blah blah blah undocumented, blah blah blah unsupported, blah blah blah crap code"
[22:49:32] desmondhume: has joined #RubyOnRails
[22:49:36] Radar: See also: turbolinks, asset pipeline, rbenv
[22:51:03] B1n4r10: has joined #RubyOnRails
[22:51:10] tubbo: Radar: asset pipeline and turbolinks are awesome. you're just not good enough.
[22:51:33] tubbo: Radar: just kidding, but seriously...i thought the same thing, then i took the time to understand these tools, and i know what they're supposed to be used for.
[22:53:10] havenwood: tubbo: It seems the target for ActionCable is a sub-second broadcast with a couple hundred connections and for Phoenix Channels it's a couple hundred thousand.
[22:53:28] ethe: has joined #RubyOnRails
[22:53:29] tubbo: interestng
[22:53:32] tubbo: interesting*
[22:53:56] tubbo: so action cable is probably "good enough"
[22:54:08] wkoszek: Is there a good resource on Rails internals? Basically I'd like to understand some more about how Rails handled connections for example.
[22:54:27] Radar: wkoszek: https://leanpub.com/ddr
[22:54:31] Radar: wkoszek: I'm writing a book about this.
[22:54:40] sloggerkhan: I don't know what I think about how it's written, but in terms of how it functions I think actioncable is fairly clean.
[22:55:16] hahuang65: has joined #RubyOnRails
[22:55:18] wkoszek: While this thing is fairly well understood for Apache/nginx + .php stuff, Rails with all the Rack stuff and actual servers, is so-so understood I feel.
[22:55:28] baweaver: has joined #RubyOnRails
[22:55:43] Radar: And by "writing" I mean "Finishing MTWRv2, taking some months off and then resuming writing"
[22:57:20] renegadeandy: Does anybody know if it would be easy to add a method to this https://github.com/ryanb/private_pub which would allow me to interrogate all current subcriptions? I don???t see that being part of the PrivatePub object as it currently stands?
[22:57:30] havenwood: tubbo: Each websocket connection with phoenix runs in its own erlang process. The BEAM has no GIL/GVL and can quickly spin up millions of erlang processes, each with its own gc.
[22:58:01] Tariq: has joined #RubyOnRails
[22:58:06] wkoszek: Radar: That would be great.
[22:58:30] Radar: wkoszek: Shoot me@ryanbigg.com an email with what you'd expect to see in a book like that and I'll add it to my list.
[22:58:51] havenwood: tubbo: So that works well!
[22:58:58] wkoszek: I know that having scalability problems nowadays is a good problem to have (e.g.: most of your projects are probably not going to be popular enough to hit issues), but I'd like to understand what I'm getting into wrt. Rails.
[22:59:23] sloggerkhan: I particularly like that I can just run my main rails app like normal and use the regular redis pub command to push stuff so the ActionCable parts are more or less isolated from the regular App parts. Though I'm sure it can't compete with Erlang, it's been great for my narrow use case.
[22:59:57] wkoszek: Radar: You bet I will. :-)
[23:01:00] renegadeandy: Anybody willing to help me give the addition a go?
[23:01:23] jhn: has joined #RubyOnRails
[23:01:47] gaussblurinc1: has joined #RubyOnRails
[23:02:21] lacuna: has joined #RubyOnRails
[23:02:21] lacuna: has joined #RubyOnRails
[23:03:11] yfeldblum: has joined #RubyOnRails
[23:04:34] tariqc: Is it a good idea to allow users to put in an entry for a form
[23:04:46] paulodiniz: has joined #RubyOnRails
[23:05:14] tariqc: and for the server to decide to create that entry if it doesn't exist already in the database
[23:05:41] iateadonut: has joined #RubyOnRails
[23:06:28] Cy-24: has joined #RubyOnRails
[23:06:42] tariqc: I'm just worried that I'm overcomplicating stuff
[23:06:57] renegadeandy: Tariq_: what are you trying to achieve
[23:07:16] renegadeandy: Does anybody know if it would be easy to add a method to this https://github.com/ryanb/private_pub which would allow me to interrogate all current subcriptions? I don???t see that being part of the PrivatePub object as it currently stands? - Radar? rhizome ?
[23:07:21] tariqc: User should be able to make an Offer for a Book, and that people should be able to follow Books to know if there is an offer for a Book
[23:07:28] quazimodo: has joined #RubyOnRails
[23:07:33] tariqc: Right now, my scheme has Books and Offers be seperate
[23:07:41] renegadeandy: Sure that sounds logical
[23:07:42] tariqc: and users have to create a Book first before making an Offer
[23:07:52] renegadeandy: that does not sound ideal???
[23:08:03] tariqc: So, yeah, my boss wants me to redesign this
[23:08:19] renegadeandy: why not instead make it so that a Book has many offers
[23:08:36] renegadeandy: and the user creates a new offer, using a form, which is added to the book :)
[23:08:55] tariqc: The thing is, I think my boss believes that the user should fill out one form
[23:08:58] tariqc: where he types in the book
[23:09:09] tariqc: The reason I mention creating a Book first
[23:09:21] renegadeandy: That doesnt sound ideal???.wouldnt you browse to a book - then click offer?
[23:09:22] tariqc: is that we don't know what Books Users are planning to sell
[23:09:31] baweaver: has joined #RubyOnRails
[23:09:44] renegadeandy: Tariq_: oh I see - by ???offer??? do you mean, ???sell this book'
[23:09:44] rhizome: separate the book creating and the offer making
[23:09:55] brennovich: has joined #RubyOnRails
[23:10:10] renegadeandy: So there isnt 2 models
[23:10:13] renegadeandy: there is book
[23:10:23] renegadeandy: a user makes a new book - which adds it to a list of books being sold
[23:10:26] diegoviola: my client wants me to draw some charts like this one: http://i.imgur.com/9bxC0SH.png with the Login 5s and other labels, I'm currently using chartkick but I don't know if chartkick would let me add that to the image, any ideas?
[23:10:37] diegoviola: should I use another lib?
[23:10:59] rhizome: just a title for the chart?
[23:11:16] lacuna: has joined #RubyOnRails
[23:11:17] lacuna: has joined #RubyOnRails
[23:11:37] diegoviola: I'll just add it with text I suppose :P
[23:11:37] rhizome: but the charts are exported images?
[23:11:50] diegoviola: chartkick gives back svg
[23:11:57] tariqc: Wait, er, renegadeandy, there are tow offers
[23:11:59] rhizome: is there a reason why the text should be in svg too?
[23:12:06] tariqc: The Book Model and the Offer model
[23:12:11] havenwood: has left #RubyOnRails: ("Bye!")
[23:12:23] maxz: has joined #RubyOnRails
[23:12:28] renegadeandy: So an offer on a book - is somebody wanting to buy the book.
[23:12:30] diegoviola: rhizome: not really
[23:12:45] BBird: has joined #RubyOnRails
[23:12:49] tariqc: It's someone wanting to sell a book.
[23:13:18] tariqc: Okay, so...hm...
[23:13:27] tariqc: It seems that I really, really should have thought about my schema design beforehand
[23:13:41] diegoviola: rhizome: btw, I was able to convince my client to just stick with rails as I have 90% of the app already written
[23:14:10] renegadeandy: Tariq_: well that just doesnt make sense.
[23:14:58] renegadeandy: Tariq_: Why not make it that if a user wants to sell a book then the schema is - User has many Books. And a Book has many ???BuyOffer??? . A book has one User.
[23:15:15] brennovich: has joined #RubyOnRails
[23:15:29] renegadeandy: Tariq_: That way - if a user wants to sell a book???..make a new Book object. If a user wants to BUY the book - make a new BuyOffer object.
[23:15:46] djbkd: has joined #RubyOnRails
[23:15:59] renegadeandy: Tariq_: If you want to show the Seller all their offers???then just loop over the has many BuyOffers on the book.
[23:16:07] renegadeandy: Does anybody know if it would be easy to add a method to this https://github.com/ryanb/private_pub which would allow me to interrogate all current subcriptions? I don???t see that being part of the PrivatePub object as it currently stands?
[23:17:39] tariqc: Let me think about that, renegadeandy
[23:17:46] brennovich: has joined #RubyOnRails
[23:17:54] tubbo: renegadeandy: when you say "interrogate"...you talking Law & Order? NCIS? CSI?
[23:17:54] tariqc: Yeah, that will work.
[23:17:56] tubbo: waterboarding?
[23:18:03] tariqc: If you got two users trying to sell the same book
[23:18:09] tariqc: then I can find the original Book object, right?
[23:18:34] tariqc: and just display both users' offers
[23:18:35] renegadeandy: tubbo: LOL hehehe i mean???can I make a method which returns me each of the id???s of the connected subscribers
[23:18:48] Grag_Harker: has joined #RubyOnRails
[23:19:06] drbayer: has joined #RubyOnRails
[23:19:53] renegadeandy: Tariq_: You could design it to reuse the same Book Object???.but I think it would be more normal for there to exist 2 individual Book objects associated with different Users???.so you would have 2 independant Book objects which are selling the same ???book name??? but are actually differnet books, i.e there are literally 2 books being sold in the real world, so they should be modelled as 2 different Book objects
[23:20:12] Scriptonaut: Hey guys, I remember there was a way with associations to validate that associations actually exist. I have a field, source_category_id on my person model, if the source_category_id doesn't refer to an actual record, how can I make it check that when it validates?
[23:20:36] renegadeandy: Scriptonaut: I would use a custom validator
[23:21:06] renegadeandy: tubbo: can you help?
[23:21:09] Scriptonaut: ah dang, I was pretty damn sure there was an option you could pass to belongs_to
[23:22:10] renegadeandy: Scriptonaut: there might be???i do what you are saying using my own custom validator???which then checks through the association???there might be something but i don???t know of it???rhizome will probably know
[23:22:36] Scriptonaut: I think it's like: validates :person, presence: true
[23:22:38] Scriptonaut: I will look it up
[23:23:08] renegadeandy: Tariq_: Then in your search you for a particular book, you could logically show it as 1 page???.for the 1 page but on that page show all Book???s being sold, which would be 2
[23:23:37] tariqc: I think I get it
[23:23:47] tariqc: The only thing I'm worrying about is that users can't actually "follow" a specific book
[23:24:02] tariqc: They can't say, "I want to know if Title X is up for sale"
[23:24:03] tariqc: Then again
[23:24:57] simplyianm: has joined #RubyOnRails
[23:25:38] tariqc: Maybe I am overthinking it again
[23:25:57] tariqc: Users should receive an alert when someone posts a Book that they want
[23:26:02] tariqc: that should be the case
[23:26:12] rickmasta: has joined #RubyOnRails
[23:26:17] workmad3: has joined #RubyOnRails
[23:28:05] Scriptonaut: do you guys know how I can have an AR association with presence: true and allow nil?
[23:28:16] rhizome: Tariq_: so, ebay
[23:28:24] Scriptonaut: I basically want to allow the model to not have a field set, however if it *is* set, I would like to make sure that the record actually exists
[23:28:42] _djbkd: has joined #RubyOnRails
[23:28:42] ellisTAA: has joined #RubyOnRails
[23:28:59] renegadeandy: Tariq_: I think you can do that???.you would just whenever somebody ???follows??? a book name, loop through all books, and any whicih have the same name you alert them.rhizome yeah ebay
[23:29:19] tariqc: Yeah, that'll make sense
[23:29:31] ellisTAA: a cookie is used by the backend to identify the session correct?
[23:29:32] tariqc: I just hope that this loop won't be too complex
[23:30:10] brennovich: has joined #RubyOnRails
[23:30:23] renegadeandy: Tariq_: Its not. Anything else would be more complex I feel. As always there are hundreds of ways to implement the same thing, do waht you feel makes the most sense :D
[23:30:34] diegoviola: some of my app functionality depends on 2 or 3 background workers, I'm currently using rake and just running them inside a bash loop, I don't want to tell to my user to run them manually like that though, is there something better I can use?
[23:30:39] tariqc: Right, I think my boss got angry at me for making stuff complex
[23:30:51] paulodiniz: has joined #RubyOnRails
[23:31:03] SecretAgent: has joined #RubyOnRails
[23:31:06] Radar: diegoviola: Sidekiq.
[23:31:07] wkoszek: so what's the biggest rails deployment you've guys dealt with? (and how many req/s) ?
[23:31:13] wkoszek: or better: how many users/s
[23:31:16] Radar: wkoszek: https://bikeexchange.com.au
[23:31:27] Radar: ACTION pulls up the datas
[23:31:30] tariqc: Maybe, as soon as someone adds a offer, run the loop
[23:31:54] diegoviola: Radar: can I start the sidekiq workers when the app boots up and have an easy way to control them from the GUI?
[23:32:03] Radar: diegoviola: "control them from the GUI" what
[23:32:19] diegoviola: Radar: like reboot the workers, see if they failed, etc
[23:32:27] annlewis: has joined #RubyOnRails
[23:32:28] Radar: diegoviola: Yes, there is a web interface for sidekiq.
[23:32:32] rhizome: activeadmin!
[23:32:55] Radar: wkoszek: 117 pages per minute according to NewRelic.
[23:33:11] Radar: Although that's during the AM. Late PM is much busier, probably about 200-300.
[23:33:21] tariqc: Thanks, renegadeandy, I'm just going to work on this then
[23:33:21] wkoszek: How many machines are serving this?
[23:33:23] Radar: It's not a small Rails app, but it's not Twitter-sized either.
[23:33:28] Radar: wkoszek: Just the one.
[23:33:38] wkoszek: Radar: Ok. Sounds good.
[23:33:50] CustosLimen: has joined #RubyOnRails
[23:34:41] wkoszek: Ok, I guess I should get over my performance anxiety then.
[23:34:57] wkoszek: Radar: This is plain normal Ruby or JRuby or Rubinius?
[23:35:09] Radar: wkoszek: Ruby 2.2.3, Rails 4.2.5
[23:35:21] wkoszek: Radar: I see. That's not bad.
[23:35:23] Radar: nginx in the front, with some caching done through Redis + memcached.
[23:36:31] wkoszek: I think there's no objections from Rails when I only want it to be the backend for REST stuff?
[23:36:48] wkoszek: e.g.: I susepct the biggest sense to write an app nowadsy is to do the frontend in something like Angular.
[23:37:07] ellisTAA: i have a decoupled app and when my clientside tries to create a resource i can???t assign them as the owner because session[:user_id] is nil ??? i???m assuming to solve this i just need to send over a cookie in the request?
[23:37:11] wkoszek: so HAMLs and ERBs of this world IMO may not be a way to go.
[23:37:14] diegoviola: don't you still need rails views when using angular?
[23:37:38] Radar: wkoszek: You can also build apps without using fancy JS tools ;)
[23:37:55] wkoszek: You need views, but they'd be rendering JSON instead of HTML.
[23:38:00] Radar: I feel like a lot of people reach for the new shiny too easily without realising that they don't really need it + they're going to make their lives harder by using it
[23:38:01] K_r3aPeR: has joined #RubyOnRails
[23:38:06] Radar: Angular is crap and needs to diaf.
[23:38:21] Radar: https://twitter.com/ryanbigg/status/671160985407787010
[23:38:42] diegoviola: Radar: I have a client that just asked me to build some app, I started it with rails, built 90% of the app, then he said "Do you remember I told you to create 2 apps?", he wanted me to rewrite it with node using websockets and make it 2 servers
[23:38:43] wkoszek: I think it's hard to write slick UI without Angular.
[23:38:45] Scriptonaut: Radar: do you like ember?
[23:38:59] Scriptonaut: I wanted to move our app to ember but some people on the team wanted angular
[23:39:01] Radar: Scriptonaut: I think it has a learning curve that is off the charts.
[23:39:02] wkoszek: or rather:
[23:39:03] diegoviola: Radar: I asked what the benefit would be, he said he just wanted 2 servers
[23:39:07] Radar: diegoviola: lol
[23:39:10] diegoviola: Radar: then I convinced him to stay with rails
[23:39:12] Radar: diegoviola: Fire your client? :P
[23:39:12] Scriptonaut: hrm, maybe not worth learning then
[23:39:14] wkoszek: Angular/whatever_your_ui_framework_is
[23:39:18] Radar: Learn React, imo
[23:39:22] diegoviola: Radar: I need the money bro
[23:39:23] Radar: Use it to build lightweight components.
[23:39:32] Scriptonaut: too many damn libraries
[23:39:36] Scriptonaut: I never know what to learn these days
[23:39:43] diegoviola: Radar: it was annoying to deal with that though
[23:40:13] Radar: diegoviola: welcome to freelancing
[23:40:46] Radar: Scriptonaut: yup
[23:41:01] ellisTAA: how do u maintain state in a decoupled app?
[23:41:07] ellisTAA: send cookies back & forth?
[23:41:14] Radar: With much cursing and swearing.
[23:42:38] diegoviola: Radar: he's still hoping that for v2 of the app we'll decouple everything and make the app decoupled (a bunch of servers)
[23:42:51] Radar: diegoviola: But why?
[23:42:58] diegoviola: Radar: I have no idea
[23:43:09] Radar: diegoviola: that sounds like overengineering for the sake of overengineering
[23:43:12] diegoviola: the dude is a node/mongo guy, so maybe that's why
[23:43:14] Radar: I would argue vehemently against that
[23:43:39] diegoviola: he seems to have something against the way rails works
[23:44:13] diegoviola: I asked him today what's the point of decoupling everything and make it a bunch of servers
[23:44:17] diegoviola: he said "I want it to be real time"
[23:44:31] user083: has joined #RubyOnRails
[23:44:44] diegoviola: then I said "we're way over the deadline for the project, we don't have time"
[23:44:59] diegoviola: then he said "I don't want it to be realtime, just make it 2 servers"
[23:45:16] diegoviola: me: "what's the point?"
[23:45:20] diegoviola: "I just wnat it to be 2 servers"
[23:45:40] sloggerkhan: I like not having the layout/appearance/html stuff coupled to the business parts of my apps. Main reason I tend to shy away from traditional style rails is I feel like you get more room to change and redesign the front end when it's mostly static since front and back end aren't as tightly coupled with the API style.
[23:45:48] diegoviola: me: "Would adding emberjs work so that we consume the rails api from ember?"
[23:45:55] diegoviola: he said: "no, it has to be the other way around"
[23:46:47] tfitts: has joined #RubyOnRails
[23:47:03] maloik: has joined #RubyOnRails
[23:48:22] tfitts: does anyone have experience saving a file postd through an HTML image capture (android phone/camera in this case). Inside my form tags I have <input name="package" type="file" accept="image/*;capture=camera" id="capture"> params[:package] contains the filename but I can't see the actual data anywhere in the request.
[23:49:33] tfitts: n/m, seems that spec is old and outdated.
[23:50:57] mustmodify: has left #RubyOnRails: ()
[23:52:47] queequeg1: has joined #RubyOnRails
[23:56:00] Pazician: has joined #RubyOnRails
[23:56:06] B1n4r10: has joined #RubyOnRails
[23:58:21] maloik: has joined #RubyOnRails
[23:58:23] diegoviola: some people seem to think monolithic is bad and micro is good
[23:58:32] diegoviola: anyone remember linux vs minix debate?
[23:58:47] tariqc: Nope, but Minix should have won
[23:58:51] tariqc: Its name just sounds cooler.
[23:59:04] Scriptonaut: I haven't used Minix, is it any good?
[23:59:33] diegoviola: https://groups.google.com/forum/#!topic/comp.os.minix/wlhw16QWltI