« Back to channel list

#RubyOnRails - 15 September 2015

« Back 1 day Forward 1 day »
[00:00:03] djbkd: has joined #RubyOnRails
[00:00:55] FailBit: I'm not so sure what issues you refer to ??? it can be somewhat awkward at times but I haven't had any issues with it
[00:01:26] baweaver: I'll have to ask around, coworker was working on it.
[00:03:51] K3VA: has joined #RubyOnRails
[00:04:15] baweaver: more of curious over all if anyone knows of situations where premade auth frameworks start getting messy
[00:04:49] baweaver: another coworker made the mistake of trying to make devise play nicely with LDAP
[00:04:59] paulcsmith: has joined #RubyOnRails
[00:05:34] baweaver: (speaking of which, ldap support in ruby is touchy)
[00:07:01] charliesome: has joined #RubyOnRails
[00:07:48] pwnd_nsfw: This version of Rails 4 in Action I found is a mixture of Rails 4 and 3 heh
[00:08:02] pwnd_nsfw: Which is good in a sense..
[00:10:18] codeurge: has joined #RubyOnRails
[00:10:47] dopamean_: has joined #RubyOnRails
[00:13:53] hefox: has joined #RubyOnRails
[00:16:01] Ropeney: baweaver: Did ya's get it working smooth though? Its on my todo list
[00:16:01] hefox: Hiya! I???m trying to use serializers from active_model_serializers, so I defined my serialize in serializers/api/v1/user_serializer.rb then in y controller I go render json: @user, each_serializer: UserSerializer ;; It works ONCE, but when I refresh, it gives the error uninitialized constant Api::V1::UsersController::UserSerializer ;; if I resave the file, it finds the class again, then looses it next class. So looks like it???
[00:16:02] hefox: not autoloading the file correctly, what could be wrong? this was working fine when I first worked on the project yesterday
[00:17:09] petricore: has joined #RubyOnRails
[00:17:24] cnk: has left #RubyOnRails: ()
[00:18:59] bmurt: has joined #RubyOnRails
[00:23:14] hefox: I added Api::V1: to @user, each_serializer: UserSerializer, to make: tender json: @user, each_serializer: Api::V1::UserSerializer and that fixed it, but whole question is why it broke and why it ???fixed??? itself after page load, etc.
[00:25:30] chills42: has joined #RubyOnRails
[00:29:57] gambl0re: has joined #RubyOnRails
[00:31:40] FailBit: can you gist some code
[00:31:56] FailBit: there's just this giant wall of text on my terminal
[00:32:38] JoshL: has joined #RubyOnRails
[00:33:57] luckyruby: has joined #RubyOnRails
[00:34:30] Guest5: has joined #RubyOnRails
[00:37:31] hfp_work: has joined #RubyOnRails
[00:37:40] sankaber: has joined #RubyOnRails
[00:40:59] hefox: has joined #RubyOnRails
[00:45:13] FailBit: why is there so much variance in response times for the same endpoint?
[00:45:32] FailBit: I assume this is rails being weird
[00:45:38] FailBit: 30ms one time, 120 the next
[00:45:53] camilasan: has joined #RubyOnRails
[00:47:28] havenwood: has joined #RubyOnRails
[00:47:35] allcentury: has joined #RubyOnRails
[00:47:57] sevenseacat: has joined #RubyOnRails
[00:49:30] choke: has joined #RubyOnRails
[00:49:53] mrchris: has joined #RubyOnRails
[00:50:36] rromanch_: has joined #RubyOnRails
[00:52:24] annlewis: has joined #RubyOnRails
[01:06:21] Moonlight-Angel: has joined #RubyOnRails
[01:07:23] bonhoeffer: has joined #RubyOnRails
[01:08:24] bonhoeffer: if i want to delete an association, but not the original objects: @user.journal_entries.map{|j| j.friends = []; j.save!} is this a good way?
[01:09:09] lwu: has joined #RubyOnRails
[01:09:15] FailBit: @user.journal_entires.update_all(friends: [])
[01:10:50] bonhoeffer: hmm . . much better
[01:12:17] x-light: has joined #RubyOnRails
[01:12:41] bonhoeffer: ah, i wasn???t clear user has_many journal_entries, journal_entries habtm friends
[01:13:00] bonhoeffer: think i might need a map statement after all
[01:13:26] rromanch_: has joined #RubyOnRails
[01:13:31] FailBit: JournalEntry.where(user_id: @user.id).update_all(friends: [])
[01:13:48] cnk: has joined #RubyOnRails
[01:13:50] rhizome: sounds about right
[01:13:53] FailBit: I don't understand AR's default HABTM
[01:14:05] FailBit: so I won't attempt to further fuck around with that
[01:15:07] bonhoeffer: yeah ??? i tried the second approach on my own, but that didn???t work either . . .
[01:15:21] FailBit: you'll need to make a query on the join table
[01:17:53] FailBit: I'm probably going to be accused of smoking my database but I don't approve of how ActiveRecord does has_and_belongs_to_many relations
[01:18:31] FailBit: for all its shortcomings, the way mongoid does it makes much more sense
[01:20:19] bullcitydev: has joined #RubyOnRails
[01:31:11] wethu: has joined #RubyOnRails
[01:32:42] Rubie: has joined #RubyOnRails
[01:35:13] luckyruby: has joined #RubyOnRails
[01:36:34] stardiviner: has joined #RubyOnRails
[01:36:50] Rubie: hi all: i only want to render a template in the layouts/application.html.erb if the user is not on a specific view, is that possible?
[01:37:04] chipotle: has joined #RubyOnRails
[01:38:05] nettoweb: has joined #RubyOnRails
[01:38:55] Rubie: *sorry i meant partial, not template
[01:39:19] idd2d: has joined #RubyOnRails
[01:46:00] bendangelo: has joined #RubyOnRails
[01:46:35] FreeBleeder: has joined #RubyOnRails
[01:47:09] FreeBleeder: has left #RubyOnRails: ()
[01:49:44] goodcodeguy: has joined #RubyOnRails
[01:49:52] aldodelgado: has joined #RubyOnRails
[01:50:35] meatherly: has joined #RubyOnRails
[01:50:42] frzn: has joined #RubyOnRails
[01:50:42] frzn: has joined #RubyOnRails
[01:52:03] choke: has joined #RubyOnRails
[01:53:08] annlewis: has joined #RubyOnRails
[01:55:15] chouhoulis: has joined #RubyOnRails
[01:56:56] dopamean_: has joined #RubyOnRails
[01:58:54] yaymukund: has joined #RubyOnRails
[01:59:11] darrencauthon: has joined #RubyOnRails
[02:00:22] rhizome: rubie: remove it from the view template
[02:00:35] rhizome: other than that you can use controller_name, etc.
[02:00:43] poli: has joined #RubyOnRails
[02:01:07] herbst: has joined #RubyOnRails
[02:01:29] havenwood: has joined #RubyOnRails
[02:02:01] sam_weerasinghe: has joined #RubyOnRails
[02:02:46] jezeniel: Will rails release the lock within with_lock block if i raised an exception?
[02:02:54] Aeyrix: sevenseacat:
[02:03:06] Aeyrix: Can you just
[02:03:08] Aeyrix: make a captains call
[02:03:09] Aeyrix: and +r #ruby
[02:03:12] Aeyrix: before I go fucking insane
[02:03:17] Aeyrix: God dammit
[02:03:23] Aeyrix: Why is apeiros bad?
[02:03:31] lwu: has joined #RubyOnRails
[02:03:45] Guest5: has joined #RubyOnRails
[02:04:06] Aeyrix: left both, that's moronic
[02:05:30] FailBit: wut am I missing
[02:06:06] rhizome: session[:invoice_id] = @cart.id # stack level too deep grr
[02:06:09] Aeyrix: People making bad decisions mostly.
[02:06:28] lwu: has joined #RubyOnRails
[02:06:43] FailBit: who is apeiros?
[02:06:49] Aeyrix: Owner of #ruby.
[02:07:12] Aeyrix: It is - unfortunately - not owned by Radar or someone else who understands IRC in detail.
[02:07:17] navo_: has joined #RubyOnRails
[02:07:37] _lexjm: has joined #RubyOnRails
[02:08:24] tvon: has joined #RubyOnRails
[02:09:01] Aeyrix: Or maybe he does understand but just can't see past the "muh ezpz help" mantra of #ruby, which invites a large display of idiocy from unregistered, disposable accounts.
[02:09:16] Aeyrix: Having to get Freenode ops in once a fortnight does not make a good channel, and it really irritates the Freenode ops.
[02:09:27] sevenseacat: why do you think i left?
[02:09:35] Aeyrix: Spam? idk.
[02:09:43] Aeyrix: I didn't see you in there at all this morning. I tried to ping you in that channel.
[02:11:28] havenwood: Aeyrix: I'm in a restaurant. Silenced unregistered and banned the IP and will ban ranges if it continues.
[02:11:43] Aeyrix: havenwood: The fact is that this has happened multiple times in a week.
[02:12:02] Aeyrix: The fact that +r didn't drop in after time #2 makes me question some logic.
[02:12:03] VeryBewitching: It happened in here, same act, in the last couple of days.
[02:12:04] havenwood: Trolling happens in all large IRC channels.
[02:12:32] Aeyrix: Yeah and it's heavily mitigated by one simple flag.
[02:12:37] VeryBewitching: And havenwood is right, historically it's tradition on IRC
[02:12:38] Aeyrix: But no, muh ezpz help
[02:12:44] Aeyrix: Don't give me that garbage.
[02:13:00] Aeyrix: VeryBewitching: We +r here now.
[02:13:07] Aeyrix: 12:13 PM Channel mode is +Ccgnt
[02:13:16] havenwood: Aeyrix: And I recall trolls recently. Please be nice.
[02:13:16] Aeyrix: Oh wait Radar removed it again, wtf
[02:13:22] Aeyrix: havenwood: No, tbh.
[02:13:31] rocLv: has joined #RubyOnRails
[02:13:46] Aeyrix: I'm not going to 'be nice' about it. It's like me pointing to a bucket of water when you're on fire
[02:13:47] havenwood: Aeyrix: Really, it's rude.
[02:13:52] Aeyrix: "Nah we can't use that."
[02:13:58] Xiti: has joined #RubyOnRails
[02:15:00] darrencauthon: has joined #RubyOnRails
[02:15:36] havenwood: Aeyrix: I responded in seconds while eating dinner. Sorry if that's not good enough for you but it'd be nice if you didn't blather about it offtopic in other populated channels.
[02:15:46] Aeyrix: Response time isn't an issue.
[02:15:48] Aeyrix: Response type is.
[02:16:24] havenwood: A mute followed by a global silence and IP bans. Please feel free to discuss in #ruby-community if you'd like to do anything other than gripe.
[02:16:36] havenwood: I'm done here. Not Rails.
[02:16:38] Aeyrix: Discussions with you never really go far
[02:16:39] Aeyrix: so I can't be bothered.
[02:16:40] Rubie: has joined #RubyOnRails
[02:17:05] safety_cut: has joined #RubyOnRails
[02:18:58] bootstrappm: has left #RubyOnRails: ()
[02:22:53] choke: has joined #RubyOnRails
[02:23:14] corioliss: has joined #RubyOnRails
[02:23:46] Kallis: has joined #RubyOnRails
[02:25:05] Lightsword: has joined #RubyOnRails
[02:26:34] michaeldeol: has joined #RubyOnRails
[02:26:43] nya: has joined #RubyOnRails
[02:27:19] bmurt: has joined #RubyOnRails
[02:28:53] wldcordeiro: has joined #RubyOnRails
[02:33:50] safety_cut: has joined #RubyOnRails
[02:35:43] webguynow: has joined #RubyOnRails
[02:36:38] luckyruby: has joined #RubyOnRails
[02:36:40] Wolland: has joined #RubyOnRails
[02:39:14] rushed: has joined #RubyOnRails
[02:39:21] astrodog: has joined #RubyOnRails
[02:42:46] rocLv: has joined #RubyOnRails
[02:46:18] luckyruby: has joined #RubyOnRails
[02:46:47] catcher: has joined #RubyOnRails
[02:48:24] webguynow: has joined #RubyOnRails
[02:50:42] baweaver: has joined #RubyOnRails
[02:52:45] bendangelo: has joined #RubyOnRails
[02:52:52] rocLv: has joined #RubyOnRails
[02:54:21] annlewis: has joined #RubyOnRails
[02:55:15] sadaf2605: has joined #RubyOnRails
[02:58:10] xcesariox: has joined #RubyOnRails
[02:59:10] darrencauthon: has joined #RubyOnRails
[03:00:00] mrtomme: has joined #RubyOnRails
[03:00:09] webguynow: has joined #RubyOnRails
[03:00:38] safety_cut: has joined #RubyOnRails
[03:05:12] webguynow: has joined #RubyOnRails
[03:06:02] lessless: has joined #RubyOnRails
[03:06:38] lessless: hi folks! how to express an scoped has_one through association: has_one :author, -> { where author: true }, through: :permissions, source: :user ?
[03:07:03] havenwood: has joined #RubyOnRails
[03:07:42] sevenseacat: lessless: what's wrong with that?
[03:07:58] lessless: sevenseacat, Cannot have a has_one :through association 'List#author' where the :through association 'List#permissions' is a collection. Specify a has_one or belongs_to association in the :through option instead.
[03:08:15] hightower4: In development mode, how can I temporarily disable seeing database queries in the rails console?
[03:08:25] lessless: List has_many :permissions
[03:08:29] sevenseacat: right, thats a problem we can now work with :)
[03:09:15] sevenseacat: personally I wouldn't use a scope for it, I'd just make it a class method
[03:09:21] sevenseacat: *an instance method
[03:09:47] davidheward: has joined #RubyOnRails
[03:10:11] lessless: sevenseacat, do you think store 'author' as a boolean in permissions table is better than directly associate it with the list table?
[03:10:20] lessless: because of list can have author and collaborators
[03:10:46] braincras: has joined #RubyOnRails
[03:10:51] sevenseacat: its not how i would model it, but it would work
[03:11:19] lessless: how you would model it?
[03:12:19] rocLv: has joined #RubyOnRails
[03:12:22] sevenseacat: a list would belong to an author, and a list would have many collaborators
[03:12:23] deol: has joined #RubyOnRails
[03:13:23] lessless: sevenseacat what about permissions? collaborators have certain permissions like 'read, delete' for the list itself, and 'create, delete' for the list items
[03:13:31] sevenseacat: well that you didnt mention
[03:13:38] chouhoulis: has joined #RubyOnRails
[03:13:38] lessless: sevenseacat yeah, sorry :)
[03:13:59] lessless: sevenseacat and author of course have absolute permissions
[03:14:06] sevenseacat: we covered setting up these kinds of permissions in rails 4 in action chapter 8 - basically assigning a role to a person on a project
[03:14:23] webguynow: has joined #RubyOnRails
[03:14:36] catcher: has joined #RubyOnRails
[03:16:57] lessless: sevenseacat, 8 chapter is about validations?..
[03:17:09] sevenseacat: nope, it's about authorization
[03:17:59] charliesome: has joined #RubyOnRails
[03:19:28] michaeldeol: has joined #RubyOnRails
[03:22:49] SteenJobs: has joined #RubyOnRails
[03:23:00] sergiopantoja: has joined #RubyOnRails
[03:25:57] webguynow: has joined #RubyOnRails
[03:26:13] baweaver: has joined #RubyOnRails
[03:26:55] frzn: has joined #RubyOnRails
[03:27:51] dopamean_: has joined #RubyOnRails
[03:27:52] wldcordeiro_: has joined #RubyOnRails
[03:27:53] Rubie: has joined #RubyOnRails
[03:29:59] larissa: has joined #RubyOnRails
[03:30:00] Shidash: has joined #RubyOnRails
[03:30:01] robotbrain: has joined #RubyOnRails
[03:30:06] jtdowney: has joined #RubyOnRails
[03:30:06] jtdowney: has joined #RubyOnRails
[03:30:06] Avon: has joined #RubyOnRails
[03:30:17] DarkBushido: has joined #RubyOnRails
[03:30:18] epochwolf: has joined #RubyOnRails
[03:30:18] asi_: has joined #RubyOnRails
[03:30:29] cball: has joined #RubyOnRails
[03:30:31] cschneid: has joined #RubyOnRails
[03:31:26] universa1: has joined #RubyOnRails
[03:31:43] Klumben: has joined #RubyOnRails
[03:31:49] Wolland: has joined #RubyOnRails
[03:31:51] Voxxit: has joined #RubyOnRails
[03:31:53] sergiopantoja: What's the best way to execute code after a specific enum status has been set? I heard that overriding attribute getters and setters is not recommended with Rails (instead we should opt for using callbacks). But this is what I currently have: https://gist.github.com/sergiopantoja/5e535f5f8681c6dcd5c3
[03:32:07] davidheward: has joined #RubyOnRails
[03:32:21] lacrosse: has joined #RubyOnRails
[03:32:28] Lightsword: has joined #RubyOnRails
[03:32:33] craysiii: has joined #RubyOnRails
[03:33:42] markelite: has joined #RubyOnRails
[03:36:03] aguynamedben: has joined #RubyOnRails
[03:36:13] terrellt: has joined #RubyOnRails
[03:36:25] michaeldeol: has joined #RubyOnRails
[03:41:52] f00dMonsta: has joined #RubyOnRails
[03:42:12] robotbrain: has joined #RubyOnRails
[03:42:22] davidheward: has joined #RubyOnRails
[03:42:26] rushed: has joined #RubyOnRails
[03:42:28] asi_: has joined #RubyOnRails
[03:46:50] mloy_: has joined #RubyOnRails
[03:47:08] baweaver: has joined #RubyOnRails
[03:47:36] rickmasta: has joined #RubyOnRails
[03:49:13] webguynow: has joined #RubyOnRails
[03:50:44] poli_: has joined #RubyOnRails
[03:51:53] chipotle: has joined #RubyOnRails
[03:52:59] The_Phoenix: has joined #RubyOnRails
[03:54:11] dima_: has joined #RubyOnRails
[03:55:17] annlewis: has joined #RubyOnRails
[03:56:39] cball: has joined #RubyOnRails
[03:57:22] craysiii: has joined #RubyOnRails
[03:58:10] rushed: has joined #RubyOnRails
[04:03:51] epochwolf: has joined #RubyOnRails
[04:03:57] larissa: has joined #RubyOnRails
[04:04:01] Shidash: has joined #RubyOnRails
[04:04:05] cschneid: has joined #RubyOnRails
[04:04:21] DarkBushido: has joined #RubyOnRails
[04:04:39] Avon: has joined #RubyOnRails
[04:04:57] Voxxit: has joined #RubyOnRails
[04:05:00] SuMo_D: has joined #RubyOnRails
[04:05:10] sfr^: has joined #RubyOnRails
[04:05:31] universa1: has joined #RubyOnRails
[04:05:31] aguynamedben: has joined #RubyOnRails
[04:07:11] Lightsword: has joined #RubyOnRails
[04:07:57] robbyoconnor: has joined #RubyOnRails
[04:10:21] terrellt: has joined #RubyOnRails
[04:11:33] Klumben: has joined #RubyOnRails
[04:12:02] skarn: has joined #RubyOnRails
[04:17:23] Rubie: has joined #RubyOnRails
[04:19:25] lessless: sevenseacat, ok. but how would you implement admin user, would you add it directly in the thing table or create a permission with special action?
[04:19:45] chipotle: has joined #RubyOnRails
[04:19:57] sevenseacat: lessless: an admin user for what? the entire application? a boolean field on a user record would be sufficient for that basic case
[04:20:16] lessless: sevenseacat, no tha admin permission on the thing
[04:20:33] sevenseacat: I don't know what you want that admin permission for/to do
[04:20:54] sevenseacat: one of the roles you might assign on a 'thing' is an admin role
[04:21:04] markelite: has joined #RubyOnRails
[04:21:56] lessless: The thing (List in my case) has an author, which is ultimately an admin - he has all the permissions, other users are collaborators, they have a fine grained permissions, like "view", "delete", etc
[04:22:54] lessless: there is nothing about "roles" in 8th chapter >.<
[04:23:50] sevenseacat: lessless: I don't know what you're looking at, but it isnt the released version of rails 4 in action.
[04:25:52] sevenseacat: so the List might have an auto-created role for the admin of the list
[04:36:31] petricore: has joined #RubyOnRails
[04:37:57] jenrzzz: has joined #RubyOnRails
[04:40:25] johnflux: has joined #RubyOnRails
[04:48:52] rushed: has joined #RubyOnRails
[04:52:29] arup_r: has joined #RubyOnRails
[04:53:38] dionysus69: has joined #RubyOnRails
[04:53:44] rocLv: has joined #RubyOnRails
[04:54:45] sevenseacat: has joined #RubyOnRails
[04:54:47] lampshades: has joined #RubyOnRails
[04:55:51] annlewis: has joined #RubyOnRails
[05:00:04] webguynow: has joined #RubyOnRails
[05:03:29] afrianska: has joined #RubyOnRails
[05:08:35] Rubie: has joined #RubyOnRails
[05:17:39] geoffw8_: has joined #RubyOnRails
[05:18:26] riotjones: has joined #RubyOnRails
[05:19:57] dhjondoh: has joined #RubyOnRails
[05:30:10] aganov: has joined #RubyOnRails
[05:31:01] atomic: has joined #RubyOnRails
[05:33:37] lwu: has joined #RubyOnRails
[05:39:40] yfeldblum: has joined #RubyOnRails
[05:40:51] codenapper: has joined #RubyOnRails
[05:41:39] webguynow: has joined #RubyOnRails
[05:43:27] SuMo_D: has joined #RubyOnRails
[05:45:02] tagrudev: has joined #RubyOnRails
[05:45:59] yfeldblum: has joined #RubyOnRails
[05:48:18] mike___1234: has joined #RubyOnRails
[05:48:34] Rubie: has joined #RubyOnRails
[05:49:37] sandstrom: has joined #RubyOnRails
[05:51:59] riotjones: has joined #RubyOnRails
[05:54:04] rails663: has joined #RubyOnRails
[05:55:25] havenwood: has joined #RubyOnRails
[05:56:46] annlewis: has joined #RubyOnRails
[05:57:46] balzaK: has joined #RubyOnRails
[05:59:23] balzaK: has left #RubyOnRails: ()
[06:02:42] herbst: has joined #RubyOnRails
[06:03:23] kimegede: has joined #RubyOnRails
[06:04:24] agent_white: has joined #RubyOnRails
[06:04:39] DoubleMalt: has joined #RubyOnRails
[06:04:54] mary5030: has joined #RubyOnRails
[06:05:24] alexUaN: has joined #RubyOnRails
[06:07:21] pawnbox: has joined #RubyOnRails
[06:08:09] rocLv: has joined #RubyOnRails
[06:10:15] eGGsha: has joined #RubyOnRails
[06:12:12] solars: has joined #RubyOnRails
[06:13:53] SuMo_D: has joined #RubyOnRails
[06:14:49] herbst: has joined #RubyOnRails
[06:15:35] arup_r: has joined #RubyOnRails
[06:16:52] DEA7TH: has joined #RubyOnRails
[06:26:12] riotjones: has joined #RubyOnRails
[06:26:14] tfittsy: has joined #RubyOnRails
[06:27:23] rakm: has joined #RubyOnRails
[06:29:05] erichu: has joined #RubyOnRails
[06:29:53] webguynow: has joined #RubyOnRails
[06:32:58] agent_white: has left #RubyOnRails: ()
[06:37:34] webguynow: has joined #RubyOnRails
[06:43:50] moneylotion: has joined #RubyOnRails
[06:44:27] jalcine: has joined #RubyOnRails
[06:47:51] webguynow: has joined #RubyOnRails
[06:48:59] skullcrasher: has joined #RubyOnRails
[06:49:35] finnnnnnnnnnn: has joined #RubyOnRails
[06:51:25] yottanami: has joined #RubyOnRails
[06:52:15] x-light: has joined #RubyOnRails
[06:54:37] DEA7TH: has joined #RubyOnRails
[06:55:31] pawnbox_: has joined #RubyOnRails
[06:56:13] Linuus: has joined #RubyOnRails
[06:56:14] pawnbox_: has joined #RubyOnRails
[06:57:13] jas02: has joined #RubyOnRails
[06:57:26] annlewis: has joined #RubyOnRails
[06:57:41] greenarrow: has joined #RubyOnRails
[06:58:53] yottanami: I need to update my db in some places in controller based on some conditions so I created a method like this http://dpaste.com/0VGRY4K Should I put it in my Model?
[07:00:49] Ropeney: yottanami: In the little context i can see, yes
[07:01:57] arup_r: yottanami: only use Gist! :D
[07:02:17] rhizome: put it in Payment and call in on an instance, which you probably already have since you're passing its id as res_id
[07:02:36] yottanami: arup_r, sure
[07:03:54] dhjondoh: has joined #RubyOnRails
[07:04:57] finnnnnnnnnnn: has joined #RubyOnRails
[07:05:27] MuffinPimp: has joined #RubyOnRails
[07:05:31] webguynow: has joined #RubyOnRails
[07:05:34] herenow: has joined #RubyOnRails
[07:05:36] yottanami: rhinon, instance that I have? I recorded db records in another method, so I have not any instance in current method of controller
[07:05:49] rhizome: where is res_id coming from?
[07:06:39] finnnnnnnnnnn: has joined #RubyOnRails
[07:07:02] yottanami: rhizome, it is a parameter that passed for verification
[07:07:22] yottanami: rhinon, as a method argument
[07:07:38] rhizome: from somewhere else?
[07:07:38] yottanami: rhinon, sorry for wrong mention
[07:07:52] Rubie: has joined #RubyOnRails
[07:08:14] xcesariox: has joined #RubyOnRails
[07:09:04] yottanami: rhizome, yes, as a POST parameter
[07:09:39] yottanami: for verification
[07:10:44] rocLv: has joined #RubyOnRails
[07:10:46] rhizome: i see. just a class method is fine, but maybe consider doing the find in the controller and doing the rest as an instance method. it's more readable that way
[07:11:10] MartinElvar: has joined #RubyOnRails
[07:11:31] alex88: has joined #RubyOnRails
[07:13:09] webguynow: has joined #RubyOnRails
[07:13:14] yottanami: rhizome, class method in Model or Controller?
[07:13:58] artto: has joined #RubyOnRails
[07:15:27] robbyoconnor: has joined #RubyOnRails
[07:16:15] havenwood: has joined #RubyOnRails
[07:17:41] rocLv: has joined #RubyOnRails
[07:18:02] yottanami: rhinon, For calling it in my controller just call name of method withoud Model name?
[07:19:06] yaymukund: has joined #RubyOnRails
[07:22:47] rhizome: think @payment.update_payment(ref_id, amt)
[07:24:45] comrad: has joined #RubyOnRails
[07:26:05] sandstrom: has joined #RubyOnRails
[07:27:45] finnnnnnnnnnn: has joined #RubyOnRails
[07:27:48] skullcrasher: has joined #RubyOnRails
[07:29:19] ror15: has joined #RubyOnRails
[07:31:38] habitullence: has joined #RubyOnRails
[07:33:12] Juanchito: has joined #RubyOnRails
[07:37:19] Ergo: has joined #RubyOnRails
[07:37:31] Linuus: has joined #RubyOnRails
[07:38:24] ror15: has anyone used the Unread gem?
[07:38:35] ror15: https://github.com/ledermann/unread
[07:38:54] ror15: I can't figure out how to implement from the docs
[07:39:09] chipotle: has joined #RubyOnRails
[07:39:21] sevenseacat: what have you tried and what isnt working?
[07:40:36] ror15: I just don't know where to go after placing acts_as_reader and acts_as_readable in my current_user and messages controllers
[07:41:06] sevenseacat: ror15: all the usage examples right below it?
[07:41:10] sevenseacat: what exactly do you want to do?
[07:41:39] ror15: I'm not sure how to write those and where to write them - fairly junior level
[07:41:49] naftilos76: has joined #RubyOnRails
[07:42:39] rhizome: the examples not in activerecord class blocks are more or less stuff for your controllers
[07:43:17] sevenseacat: pretty much - without knowing exactly what you're trying to do, its kinda hard to offer advice
[07:44:20] zpe: has joined #RubyOnRails
[07:45:25] ror15: Trying to add notifications to a messaging system
[07:45:43] rhizome: you've got some work ahead of you
[07:46:36] ror15: so it seems
[07:46:51] jgt1: has joined #RubyOnRails
[07:47:28] sevenseacat: thats a good start, but let's break it down into much smaller chunks of work
[07:47:44] charliesome: has joined #RubyOnRails
[07:47:59] blackhuey: has joined #RubyOnRails
[07:48:19] lessless: has joined #RubyOnRails
[07:50:15] Pathfinder: has joined #RubyOnRails
[07:51:05] kh0d: has joined #RubyOnRails
[07:51:24] ror15: alright - so I have acts_as_reader and acts_as_readable in my models
[07:51:48] wethu: has joined #RubyOnRails
[07:52:03] kimegede: has joined #RubyOnRails
[07:52:20] ror15: in the doc where it says "message1 = Message.create!"
[07:52:40] ror15: could you explain what that is trying to tell me?
[07:53:52] habitullence: has joined #RubyOnRails
[07:53:56] mices: since i've spent 2 days trying to get rails and passenger working with apache on fbsd should i give up and try another server?
[07:54:02] ror15: not the code itself - but what do I do with that line
[07:54:30] rushed: mices: you might consider Heroku or another PaaS solution if you're not interested in dealing with sysadmin
[07:55:00] mices: i meant webserver, i dunno what sysadmin is
[07:55:12] sevenseacat: ror15: the code is examples of how you would use the gem - that line just creates a Message instance
[07:55:14] rushed: mices: exactly~
[07:55:39] sevenseacat: ror15: it's hard to demonstrate how you can mark messages as read or unread without having messages to begin with
[07:56:32] ror15: sevenseacat: I do have messages already setup
[07:56:39] mikecmpbll: has joined #RubyOnRails
[07:56:51] ror15: sevenseacat: but ah i see what you mean
[07:57:09] jenrzzz: has joined #RubyOnRails
[07:57:33] habitullence: has joined #RubyOnRails
[07:57:53] yardenbar: has joined #RubyOnRails
[07:58:11] annlewis: has joined #RubyOnRails
[07:58:19] ror15: sevenseacat: where would i stick "Message.unread_by(current_user)" confused there
[07:58:33] sevenseacat: in whatever controller you want to render messages that are unread by the current user
[07:58:43] sevenseacat: all that does is get you a list of them
[07:58:54] Linuus: has joined #RubyOnRails
[07:59:35] rushed: ror15: if you look at the comments they're showing you what you can do by example, not giving you a bunch of code that you have to slot in to your app somewhere
[08:00:00] Pupeno: has joined #RubyOnRails
[08:01:33] maz-dev: has joined #RubyOnRails
[08:02:50] xcesariox: has joined #RubyOnRails
[08:04:06] wethu: has joined #RubyOnRails
[08:04:12] webguynow: has joined #RubyOnRails
[08:04:12] habitullence: has joined #RubyOnRails
[08:04:51] mices: is nginx configuration as murky as apache's httpd.conf ?
[08:05:27] rushed: mices: there are plenty of examples of either floating around
[08:06:12] mices: i just wanna know if nginx is easier config wise
[08:06:24] Bongo: has joined #RubyOnRails
[08:06:27] rushed: mices: the thing you already know how to configure is easier
[08:06:46] mices: true but i can't get it to work
[08:07:15] sevenseacat: did you fix all the issues we pointed out over the last few days?
[08:07:19] mices: i thought when i discovered that mod_rewrite wasn't installed that would solve but failing that i'm taking another look at apache
[08:07:38] mices: yea i've tried everything
[08:07:57] mices: just woke up from falling asleep while installing rails from ports
[08:08:00] sevenseacat: well no you haven't, otherwise it would work - i dont know how you've had so many troubles, it's a couple of lines of code
[08:08:01] mices: didn't help
[08:08:05] mices: same sh*t
[08:08:10] rushed: mices: if you don't know what you're doing the best two options would be: a) find a guide for exactly what you want to do for exactly the platform/stack you want to do it on or b) PaaS
[08:08:22] mices: i'm on freebsd
[08:08:39] mices: i don't know what clouds are so i don't think tonight's the night for paas
[08:08:46] sevenseacat: we know you're on freebsd, you've said so about a thousand times
[08:09:01] mices: is anyone else in here on freebsd
[08:09:08] mices: i'm questioning whether it works
[08:09:12] sevenseacat: of course it does
[08:09:17] mices: for my fbsd ver 10.1
[08:09:25] sevenseacat: apache and passenger is a tried and tested simple solution.
[08:09:33] mices: on freebsd/
[08:09:44] sevenseacat: if it doesnt work there, then the problem is with freebsd.
[08:10:11] mices: yea, the fbsd port for passenger is still 5.0.16
[08:10:13] sevenseacat: but I dare say it does, and you're just doing it wrong.
[08:10:18] mices: an indication of lameness
[08:10:51] mices: so i'm gonna uninstall that passenger install and reinstall from gem
[08:11:29] chipotle: has joined #RubyOnRails
[08:11:30] sevenseacat: I wonder how many days this will go on - the record I've seen for a single installation is eight
[08:11:55] sevenseacat: so far we're at what, two? three?
[08:12:35] toomus: has joined #RubyOnRails
[08:13:40] webguynow: has joined #RubyOnRails
[08:13:49] Kedare: has joined #RubyOnRails
[08:14:27] DoubleMalt: has joined #RubyOnRails
[08:15:55] SuMo_D: has joined #RubyOnRails
[08:24:32] arup_r: tomaw: Hello
[08:24:41] webguynow: has joined #RubyOnRails
[08:25:31] arup_r: ah.. sorry
[08:25:37] arup_r: toomus: Hi
[08:27:27] srinidhi: has joined #RubyOnRails
[08:29:16] jgt1: has joined #RubyOnRails
[08:29:33] habitullence: has joined #RubyOnRails
[08:30:14] pawnbox: has joined #RubyOnRails
[08:31:54] toomus: I have problem with string interpolation http://pastie.org/10420955
[08:32:32] toomus: Why first query works, but second doesn't?
[08:33:32] arup_r: toomus: ':online_limit') should be :online_limit)
[08:33:52] arup_r: oh 1 minutes
[08:34:02] Balzrael: has joined #RubyOnRails
[08:34:26] toomus: arup_r: nope :/
[08:34:58] weckl: has joined #RubyOnRails
[08:36:01] quazimodo: Given a restful api consumption gem (in this case Her), does it make sense that Record.where(attribute: value) does a GET to http://wherever.com/api/record?attribute=value
[08:36:35] helpa: Please do not use fake values, as they can be confusing or misleading. Sometimes both.
[08:36:39] quazimodo: I'd have thought it'd be more likeGET to http://wherever.com/api/record?filter[attribute]=value
[08:36:40] arup_r: order("(users.last_seen_at > ':online_limit') DESC, name ASC", { online_limit: (1.minute.ago).localtime }) <~~ I don't get this If you are trying the substitution like where .. it wouldn't worj with ORDER BY
[08:36:51] sevenseacat: quazimodo: neither
[08:37:05] quazimodo: sevenseacat: give it a rest, there are no real values. i'm asking a protocol question
[08:37:16] quazimodo: sevenseacat: what would you use?
[08:37:18] sevenseacat: ok. both URLs are wrong.
[08:37:34] quazimodo: s/record/records/
[08:38:03] sevenseacat: don't tell me to give it a rest, then ask for my help.
[08:38:08] krz: has joined #RubyOnRails
[08:38:15] toomus: arup_r: conditional ORDER BY is very usefull feature :)
[08:38:17] tbuehlmann: quazimodo, yeah, /records?filter[attr]=value seems okay to me
[08:38:30] arup_r: we don't have now :(
[08:39:14] toomus: arup_r: and it works great without interpolation
[08:39:19] sevenseacat: you also didn't mention anything about being json api compliant, so the format is quite irrelevant.
[08:39:31] tbuehlmann: (whether or not /api is in front)
[08:39:46] arup_r: toomus: You meant the first example
[08:39:47] toomus: arup_r: but CodeClimate says "Possible SQL injection"
[08:39:56] arup_r: toomus: They are right
[08:40:27] sevenseacat: how can you SQL inject 1.minute.ago ?
[08:40:28] quazimodo: tbuehlmann: yeah i thought so too. I think the Her gem should do that or atleast let you do that. It's an ok gem
[08:40:32] tbuehlmann: quazimodo, having the filter namespace is good. not having it could interfere with other keys, like "sort"
[08:40:47] tbuehlmann: quazimodo, dunno, no idea about that gem
[08:40:48] quazimodo: but i wanna know why the Her devs didn't do that
[08:41:26] quazimodo: tbuehlmann: definitely makes sense to me to have filter namespace
[08:42:32] x-light: has joined #RubyOnRails
[08:42:58] toomus: arup_r: any idea how to fix this?
[08:43:40] ror15: has joined #RubyOnRails
[08:43:51] arup_r: toomus: show me the working one..
[08:44:07] quazimodo: sevenseacat: i will
[08:44:31] toomus: arup_r: http://pastie.org/10420955 <- first query
[08:46:11] mices: https://gist.github.com/anonymous/af0b04d80eb6febfa5b6
[08:46:21] arup_r: toomus: https://gist.github.com/aruprakshit/4ac2c84b4ff9420d49a7
[08:46:58] sevenseacat: arup_r: that doesnt even make sense
[08:47:08] arup_r: sevenseacat: Why ?
[08:47:16] sevenseacat: you're interpolating a hash into a string
[08:47:30] arup_r: let me edit
[08:47:33] arup_r: overlooked
[08:48:05] arup_r: toomus: https://gist.github.com/aruprakshit/4ac2c84b4ff9420d49a7
[08:48:38] arup_r: But yes, ORDER BY don't work like WHERE syntax.
[08:49:44] srinidhi: has joined #RubyOnRails
[08:53:08] darutoko: has joined #RubyOnRails
[08:53:26] sg19: has joined #RubyOnRails
[08:53:29] habitullence: has joined #RubyOnRails
[08:54:48] sg19: hey! I need to built a multi-lingual website. I dont know from where to start. I dont want google translate. Any tips?
[08:56:33] infoget: has joined #RubyOnRails
[08:57:02] sevenseacat: sg19: get familiar with http://guides.rubyonrails.org/i18n.html
[08:57:14] drale2k_: has joined #RubyOnRails
[08:57:25] sg19: sevenseacat: I am doing that. so will that be the only thing to look into right now?
[08:57:45] sevenseacat: right now, yes.
[08:57:56] sg19: okay thanks
[08:58:42] chipotle: has joined #RubyOnRails
[08:58:55] annlewis: has joined #RubyOnRails
[09:00:10] AzaToth: has joined #RubyOnRails
[09:04:36] jsrn_: has joined #RubyOnRails
[09:04:54] Macaveli: has joined #RubyOnRails
[09:05:15] naftilos76: Hi, i am expiencing a delay on my remote vps (passenger & apache) but also a delay on my local app (webrick) . The two apps (websites) are the same and i am running tests under exactly the same conditions. The delay occurs when sending a query on a table with almost a million rows. It is weird because i am measuring the time the actual query needs to complete and it is almost nothing. Please see the def in my private section of the controller a
[09:05:16] naftilos76: nd the log when i am doing a search in the table with the 1m rows. Please see here:
[09:05:17] naftilos76: https://gist.github.com/anonymous/6bfbb5eb623b6a6f7d87
[09:05:42] naftilos76: experiencing
[09:09:08] infoget: has left #RubyOnRails: ()
[09:09:31] mices: the problem i had yesterday was my router wasn't forwarding ports even though port forwarding was set up, it was a verizon westell modem/router combo with verizon software installed on it and was not allowing port forwarding so i switched it for another router and httpd requests get through after that
[09:10:00] mices: so i'm really not that bad
[09:10:11] mices: i lost a whole day fooling around with that
[09:10:49] marr: has joined #RubyOnRails
[09:12:36] lxsameer: has joined #RubyOnRails
[09:13:54] ror15: has joined #RubyOnRails
[09:15:04] arBmind: has joined #RubyOnRails
[09:15:54] x-light: has joined #RubyOnRails
[09:16:57] relix: has joined #RubyOnRails
[09:18:18] quazimodo: i read you lost your whole foot
[09:18:23] quazimodo: was surprise
[09:19:46] sameerynho: has joined #RubyOnRails
[09:20:37] DLSteve: has joined #RubyOnRails
[09:23:45] Linuus: has joined #RubyOnRails
[09:24:15] gremax: has joined #RubyOnRails
[09:24:25] sevenseacat: has joined #RubyOnRails
[09:24:50] frg133: has joined #RubyOnRails
[09:25:44] voker57: has joined #RubyOnRails
[09:25:57] drale2k: has joined #RubyOnRails
[09:31:43] arup_r: has joined #RubyOnRails
[09:33:36] arup_r1: has joined #RubyOnRails
[09:35:10] pawnbox: has joined #RubyOnRails
[09:38:00] mices: even i though i ran gem install execjs, apache complains there's no javascipt runtime
[09:39:55] sevenseacat: execjs is a dependency of rails
[09:40:02] sevenseacat: read the error message
[09:41:11] toomus: arup_r: CodeClimate still says "Possible SQL injection"
[09:43:33] beauby_: has joined #RubyOnRails
[09:44:16] tvw: has joined #RubyOnRails
[09:45:14] lessless: has joined #RubyOnRails
[09:45:41] srinidhi: has joined #RubyOnRails
[09:48:24] infoget: has joined #RubyOnRails
[09:49:15] maz-dev: has joined #RubyOnRails
[09:51:16] infoget: Hi guys I would like to extend method from model's concerns by self.test, but it doesn't work, because the method seems that is private: "private method `test' called for", how come?
[09:52:38] mices: sevenseacat: rubygem-statsd-0.5.4 Ruby port of the statsd python and node.js tools
[09:54:16] Pupeno_: has joined #RubyOnRails
[09:54:40] mices: that's what i find when i search the freebsd ports collection for node.js
[09:55:57] sevenseacat: freebsd doesnt have a nodejs package...?
[09:57:03] mices: seemingly not
[09:57:21] sevenseacat: I find that hard to believe
[09:57:33] sevenseacat: regardless, pick a different runtime then
[09:57:52] BongoS: has joined #RubyOnRails
[09:59:24] workmad3: mices: https://github.com/nodejs/node-v0.x-archive/wiki/Installing-Node.js-via-package-manager?utm_source=%5Bdeliciuos%5D&utm_medium=twitter#freebsd-and-openbsd
[09:59:43] annlewis: has joined #RubyOnRails
[10:01:20] mices: i found it "pkg install node-devel"
[10:01:22] mices: lemme try
[10:02:01] eGGsha: has joined #RubyOnRails
[10:04:23] sg19: has joined #RubyOnRails
[10:04:44] lessless: where do you put value objects?
[10:05:00] lessless: should I create an app/values ?
[10:05:32] mary5030: has joined #RubyOnRails
[10:07:22] jgt1: has joined #RubyOnRails
[10:08:41] elaptics: lessless: I'd just keep them in models
[10:09:00] elaptics: or maybe lib if they're particularly generic
[10:10:03] pawnbox: has joined #RubyOnRails
[10:10:24] lessless: I have an PermittedActions array which consists from constants like LIST_READ, LIST_DELETE, etc. It looks like awkward reference it from the policy
[10:12:32] Macaveli: has joined #RubyOnRails
[10:14:02] pawnbox: has joined #RubyOnRails
[10:14:50] rabbi1: has joined #RubyOnRails
[10:15:25] rabbi1: Hi, Using ImageMagick and Paperclip on ubuntu 12.04??? but captcha image doesn't display at all.. How can i solve this ?
[10:20:21] rickmasta: has joined #RubyOnRails
[10:22:35] universa1: rabbi1: you need to provide a lot more information so that someone is able to help you.
[10:26:15] rabbi1: universa1: what else i can provide ? i don't get any error/ warning???. its just that captcha images are not showing ???.
[10:26:16] lipoqil: rabbi1: check logs
[10:26:36] universa1: rabbi1: your code? the logs...
[10:27:05] universa1: imagemagick and paperclip are just image and file storage tools, not much to do with captchas...
[10:27:15] universa1: so you're using smoething else...
[10:27:26] lipoqil: rabbi1: Also try the IM call in rails c
[10:29:19] lipoqil: rabbi1: If it does not fail, try to debug the whole functionality step by step
[10:30:23] DoubleMalt: has joined #RubyOnRails
[10:31:40] gurnoorinder: has joined #RubyOnRails
[10:31:52] rabbi1: universa1: yeap, but using those with simple_captcha
[10:32:15] crdpink2: has joined #RubyOnRails
[10:32:16] ciree: has joined #RubyOnRails
[10:32:22] stevednd: has joined #RubyOnRails
[10:32:23] urkle: has joined #RubyOnRails
[10:32:37] rabbi1: ok, only viewing the image in browser gives -> Image cannot be loaded coz of some image error??? :(
[10:33:10] rodfersou: has joined #RubyOnRails
[10:34:06] gurnoorinder: hello everyone. Can any tell me how to install ruby and rails without touching the system ruby and rails on Mac OS X
[10:34:55] elaptics: gurnoorinder: use rvm, rbenv or chruby - they will all install separate rubies and the gems will be specific to the versions of ruby you install
[10:35:16] gurnoorinder: so which is easy to manintain and use? chruby or rbenv?
[10:37:11] elaptics: I've never used rbenv, only rvm and chruby
[10:37:30] elaptics: I tend to use chruby now as it's simpler and lightweight
[10:38:02] elaptics: if you use chruby you'll also want to use ruby-install to actually install ruby itself. chruby simple switches between rubies that are installed
[10:38:18] elaptics: rvm is a one-stop-shop
[10:38:26] elaptics: it does everything and more
[10:38:38] gurnoorinder: okay and how do i generate RI documentation while installing ruby?
[10:39:05] gurnoorinder: i had RVM earlier but somehow installed rbenv and removed everything last night.
[10:39:41] elaptics: you'll get ri documentation by default when you install gems
[10:39:54] givanse: has joined #RubyOnRails
[10:40:05] rabbi1: universa1: this is what i get when i try to view the image http://postimg.org/image/m36qg1m41/
[10:40:06] elaptics: I think most people probably disable it now
[10:40:08] gurnoorinder: alright thanks.
[10:40:14] defsdoor: has joined #RubyOnRails
[10:40:21] gurnoorinder: i was trying to follow pragmatic studios.
[10:40:47] gurnoorinder: there is a tool called Yard for docs. is it any good?
[10:41:12] sandstrom: has joined #RubyOnRails
[10:48:44] malusalexandru: has joined #RubyOnRails
[10:50:14] Janno: gurnoorinder: Here is really good guide on how to setup rbenv, rvm or from source. I really recommend this, it helped me a lot! https://gorails.com/setup/ubuntu/15.04
[10:51:07] gurnoorinder: one more thing. @janno and @elaptics: how can i make a fresh install of mysql as well. i seem to have forgotten the password and user names.
[10:51:21] gurnoorinder: also is there any IDE u can use on Mac for mysql.
[10:51:29] cac: has joined #RubyOnRails
[10:51:42] platosha: has joined #RubyOnRails
[10:52:21] Janno: I don't have any experience on mac, sadly.
[10:52:57] gurnoorinder: alright. can you tell me how u wud do on Ubuntu?
[10:53:09] gurnoorinder: should not be much differnt.
[10:53:26] Detch: has joined #RubyOnRails
[10:53:35] Janno: so you want to reinstall mysql to reset password right?
[10:53:53] elaptics: how did you install mysql in the first place?
[10:54:09] liquid-silence: has joined #RubyOnRails
[10:54:16] chouhoulis: has joined #RubyOnRails
[10:54:30] liquid-silence: busy setting up elasticbeanstalk deployment, has anyone done this before?
[10:54:32] kanzure: has joined #RubyOnRails
[10:54:45] nettoweb: has joined #RubyOnRails
[10:55:01] Janno: gurnoorinder: here is some guide to reset password as long as you have sudo access: http://www.rackspace.com/knowledge_center/article/mysql-resetting-a-lost-mysql-root-password
[10:55:33] liquid-silence: I don't want to go into writing a massive piece of text, if no one has touched it before
[10:55:49] gurnoorinder: thanks a lot @janno
[10:56:58] chills42: has joined #RubyOnRails
[10:57:40] chouhoulis: has joined #RubyOnRails
[10:58:07] Kallis: has joined #RubyOnRails
[10:59:22] chipotle: has joined #RubyOnRails
[11:00:29] annlewis: has joined #RubyOnRails
[11:02:27] adre: has joined #RubyOnRails
[11:02:48] frzn: has joined #RubyOnRails
[11:02:48] frzn: has joined #RubyOnRails
[11:03:18] mugurel: has joined #RubyOnRails
[11:05:10] dhjondoh: has joined #RubyOnRails
[11:09:35] moeabdol: has joined #RubyOnRails
[11:10:00] Rubie: has joined #RubyOnRails
[11:10:03] charliesome: has joined #RubyOnRails
[11:11:16] lulzmachine: has joined #RubyOnRails
[11:11:34] srinidhi: has joined #RubyOnRails
[11:12:03] Cervajz: has joined #RubyOnRails
[11:12:22] habitullence: Is it just me or is directory structure all messed up when it comes to gems? Devise::Controllers::Helpers resolves to devise/lib/devise/controllers/helpers.rb but Devise::Generators::InstallGenerator resolves to devise/lib/generators/devise/install_generator.rb :S
[11:12:56] Linuus: has joined #RubyOnRails
[11:13:04] habitullence: Asked another way, why are generators in devise/lib/devise?
[11:14:28] Cervajz_: has joined #RubyOnRails
[11:14:52] ror15: has joined #RubyOnRails
[11:16:18] stamina: has joined #RubyOnRails
[11:16:30] Cervajz__: has joined #RubyOnRails
[11:17:04] lampshades: has joined #RubyOnRails
[11:17:48] bePolite: has joined #RubyOnRails
[11:18:49] Linuus: has joined #RubyOnRails
[11:19:58] drptbl: has joined #RubyOnRails
[11:20:40] Scriptonaut: has joined #RubyOnRails
[11:20:54] pawnbox: has joined #RubyOnRails
[11:21:22] mugurel_: has joined #RubyOnRails
[11:22:06] unholycrab: has joined #RubyOnRails
[11:23:28] mugurel_: has left #RubyOnRails: ()
[11:24:13] mugurel: has joined #RubyOnRails
[11:24:35] liquid-silence: I have a hate relationship with AWS EB
[11:25:02] noparachute_: has joined #RubyOnRails
[11:25:36] platosha: has joined #RubyOnRails
[11:26:00] noparachute__: has joined #RubyOnRails
[11:26:41] brendan-: has joined #RubyOnRails
[11:26:59] mugurel: i hace a problem that is driving me crazy, maybe someone can help
[11:26:59] mugurel: /msg NickServ SETPASS mugurel ibbxxwbwvren <password>
[11:27:31] mugurel: http://stackoverflow.com/questions/32584347/failure-error-get-index-nomethoderror-undefined-method-for-nilnilclass
[11:28:08] darrencauthon: has joined #RubyOnRails
[11:30:05] wethu: has joined #RubyOnRails
[11:30:10] tbuehlmann: mugurel, is publish_date of your created blog record nil?
[11:31:45] mugurel: tbuehlmann: no, if i run that query on rails console or the site it works
[11:31:57] mugurel: this is why i find it difficult
[11:32:16] tbuehlmann: mugurel, you have different databases dependent on your environment (development/test)
[11:32:21] mugurel: also i deleted all blog posts and tested it, it still works it just does not show
[11:32:37] tbuehlmann: when you call create(:blog), what publish_date does this record have?
[11:32:40] syath: has joined #RubyOnRails
[11:33:03] mugurel: publish_date "2015-03-01"
[11:33:14] tbuehlmann: how did you check?
[11:33:21] mugurel: it a factory
[11:33:36] mugurel: it should work with no posts, i just tested that
[11:34:05] mugurel: i have to go to lunch, sorry, i will talk when i will be back, maybe i can find a soulution with a clear mind
[11:34:24] tbuehlmann: what happens if you put `Blog.destroy_all` before `get :index`?
[11:35:10] zpe: has joined #RubyOnRails
[11:35:50] mary5030: has joined #RubyOnRails
[11:36:24] ldnunes: has joined #RubyOnRails
[11:37:52] maz-dev: has joined #RubyOnRails
[11:39:36] krz: has joined #RubyOnRails
[11:40:51] ldnunes_: has joined #RubyOnRails
[11:41:04] ror15: has joined #RubyOnRails
[11:41:53] pawnbox: has joined #RubyOnRails
[11:44:35] alextheger: has joined #RubyOnRails
[11:48:53] greenarrow: has joined #RubyOnRails
[11:50:15] jenrzzz: has joined #RubyOnRails
[11:51:28] drptbl_: has joined #RubyOnRails
[11:51:43] solars: hi, if I want to find all Articles where author.name = 'fubar' how is this done? Article belongs to Author
[11:51:47] prestorium: has joined #RubyOnRails
[11:52:00] solars: how is this done in the fastest way was what I wanted to ask
[11:52:03] solars: performance wise
[11:52:32] universa1: solars: what have you done so far?
[11:52:37] workmad3: solars: with a join
[11:53:12] mices: client denied by server configuration
[11:53:43] pwnd_nsfw: has joined #RubyOnRails
[11:54:15] solars: something like Article.joins(:author).where(author: {name: 'fubar'}) is this right?
[11:54:21] mrchris: has joined #RubyOnRails
[11:54:24] solars: not sure if I understood the docs right
[11:54:39] workmad3: solars: !try
[11:54:39] helpa: solars: Why don't you try it and find out for yourself?
[11:54:49] solars: it was a pseudo example
[11:55:07] solars: I need to know it for planning
[11:55:19] Ropeney: has joined #RubyOnRails
[11:55:28] arup_r1: solars: your query is right!
[11:55:36] solars: arup_r_, thank you!
[11:55:52] solars: I thought I used something simpler once.. but not sure
[11:55:59] arup_r1: s/right/correct :)
[11:56:06] codenapp_: has joined #RubyOnRails
[11:56:42] arup_r1: solars: this is the simplest way :) You HAVE to join
[11:56:48] solars: wasn't there something that let's you specify this directly in the where part, syntactically, like where(author.name => 'fubar')
[11:56:53] solars: could have been a plugin though ..
[11:57:16] solars: arup_r_, sure yeah.. I just thought that I saw a nicer syntax for it
[11:57:40] pwnd_nsfw: solars, include(:author).where(name: "butts")
[11:58:01] arup_r1: pwnd_nsfw: that does OUTER JOIN
[11:58:06] defsdoor: pwnd_nsfw, can result in ambiguous references to columns
[11:58:08] solars: hm but is it the same
[11:58:08] arup_r1: joins does INNER JOIN
[11:58:24] pwnd_nsfw: ACTION shrugs
[11:58:41] universa1: pwnd_nsfw: include doesn't even have to do a join.
[11:58:45] defsdoor: .include(:author) doesnt to outer join - rails will do seperate query
[11:59:05] defsdoor: .include and .references will pull it into a join
[12:00:20] devdazed: has joined #RubyOnRails
[12:00:21] arup_r1: defsdoor: http://blog.arkency.com/2013/12/rails4-preloading/ straight below
[12:00:23] universa1: but all this is a superficial discussion anyways, because in the end solars has the author and just does an author.articles... ;)
[12:00:46] pwnd_nsfw: Just woke up heh
[12:01:14] solars: universa1, basically you are right
[12:01:15] annlewis: has joined #RubyOnRails
[12:02:00] infoget: has left #RubyOnRails: ()
[12:02:25] solars: Article.joins(:author).where(author: {name: 'fubar'}) vs Author.where(name: 'fubar').articles
[12:02:35] solars: Article.joins(:author).where(author: {name: 'fubar'}) vs Author.where(name: 'fubar').first.articles
[12:02:38] pwnd_nsfw: There ya go
[12:02:51] pwnd_nsfw: Author.find_by(name: 'fubar').articles
[12:03:43] solars: performance wise I assume there is not much of a difference, right
[12:03:51] solars: between joins vs the other
[12:04:33] universa1: performance needs to be evaluated with actual code and actual data... ...hypothetical discussions msot likely hit the wrong part of the stack.
[12:05:08] pwnd_nsfw: Would articles have multiple authors?
[12:05:19] arup_r1: defsdoor: When you give where clause while including is same as using references while doing include .. Right ? Asking...
[12:05:25] pwnd_nsfw: Otherwise, you could just build a standard has_many/belongs_to association.
[12:05:41] universa1: arup_r_: scroll to the end of the article you just linked.
[12:05:57] arup_r1: universa1: they used only .references not the hash syntax
[12:06:05] arup_r1: that is why asking
[12:06:14] universa1: arup_r_: the article explains it completely.
[12:06:29] arup_r1: Let me re -read again
[12:07:08] solars: pwnd_nsfw, nope, only one author standard bleongs to
[12:07:50] pwnd_nsfw: So, you don't have to make it all complicated :P
[12:08:14] Jasaka: has joined #RubyOnRails
[12:08:31] solars: pwnd_nsfw, well but it doesn't change anything, right? :)
[12:08:43] gurnoorinder: hello everyone. do homebrew and chruby work well together?????
[12:08:53] ldnunes: has joined #RubyOnRails
[12:09:04] universa1: gurnoorinder: why should they not?
[12:09:48] gurnoorinder: i dont know. i was just asking. @universa1
[12:09:51] pwnd_nsfw: solars, just how you use rails to query the DB :P
[12:11:18] gurnoorinder: universa1: just asking
[12:11:24] mostlybadfly: has joined #RubyOnRails
[12:11:35] Linuus: has joined #RubyOnRails
[12:11:38] arup_r1: universa1: Basically I was right! https://gist.github.com/aruprakshit/e464c4081b92ae073b52 :D
[12:11:49] universa1: gurnoorinder: i haven't heard of any problems, but then i am not using chruby.
[12:12:06] arup_r1: Post.includes(:answers).where("answers.text = ?","I have one").references(:answers) and Post.includes(:answers).where(answers: { text: "I have one" }) both does LEFT OUTER JOIN
[12:12:10] gurnoorinder: universa1: what do u prefer?
[12:12:23] universa1: gurnoorinder: depends on the situtaion.
[12:12:29] FailBit: JUST DO IT
[12:12:56] gurnoorinder: universa1: alright. so if i am to begin with rails, what shud i use?
[12:12:57] arup_r1: FailBit: You had morning coffee ?
[12:13:04] arup_r1: FailBit: Good Morning
[12:13:11] FailBit: I don't drink coffee
[12:13:21] universa1: gurnoorinder: if you're following some tutorial, probably whatever they are using and explaining how to use.
[12:13:30] victortyau: has joined #RubyOnRails
[12:13:33] FailBit: although I might occasionally put some coffee in my sugar
[12:13:57] universa1: gurnoorinder: chruby, rvm, rbenv are all good solutions and it mostly comes down to personal preferences what you want to use
[12:14:03] gurnoorinder: universa1: sounds cool. thanks
[12:14:50] gurnoorinder: universa1: i was using rvm earlier. switched to rbenv which messed up couple of things. now was about to make a fresh install so thought should ask what to use
[12:15:02] lessless: has joined #RubyOnRails
[12:15:08] jgt1: has joined #RubyOnRails
[12:15:09] universa1: gurnoorinder: pick one and basically stick with it ;)
[12:15:30] gurnoorinder: universa1: gotcha. thanks a lot
[12:18:50] webguynow: has joined #RubyOnRails
[12:18:56] pawnbox: has joined #RubyOnRails
[12:19:41] codenapper: has joined #RubyOnRails
[12:21:26] lampshades: has joined #RubyOnRails
[12:23:05] lessless: how to stub current_user in test spec? I'm trying to do allow(subject).to receive(:current_user).and_return(author), but it doesn't working
[12:23:40] mary5030: has joined #RubyOnRails
[12:27:04] fschuindt: has joined #RubyOnRails
[12:28:43] pwnd_nfsw: has joined #RubyOnRails
[12:30:02] pwnd_nfsw: I think Chrome randomly crashes my Ubuntu. I can move mouse, but can't do anything else.
[12:30:49] apg: has joined #RubyOnRails
[12:32:46] alex_ulsk_ii: has joined #RubyOnRails
[12:32:46] apg: do I need to learn ruby first before jump to rails?
[12:32:47] diegoviola: has joined #RubyOnRails
[12:33:28] apg: I have no experience with web programming.
[12:33:31] pwnd_nfsw: apg, it's a good idea to understand the syntax at least
[12:33:48] iateadonut: has joined #RubyOnRails
[12:35:19] DEac-: has joined #RubyOnRails
[12:35:44] pawnbox: has joined #RubyOnRails
[12:36:23] DoubleMalt: has joined #RubyOnRails
[12:36:48] jkamenik: has joined #RubyOnRails
[12:36:57] apg: pwnd_nsfw, I need your suggestion, what knowledge specifically on web technology that will help to learn rails beside the ryby syntax itself?
[12:37:11] daynaskully: has left #RubyOnRails: ("Leaving")
[12:38:27] mugurel: tbuehlmann: if i put Blog.destroy_all the test passes
[12:39:03] tbuehlmann: mugurel, then you likely have an existing blog record in your database that doesn't have a publish_date set
[12:39:21] tbuehlmann: mugurel, do you clean the database before each example?
[12:39:25] mices: has joined #RubyOnRails
[12:39:58] mugurel: do i need to do that?
[12:40:05] tbuehlmann: I highly recommend it
[12:40:22] camilasan: has joined #RubyOnRails
[12:40:26] tbuehlmann: my favorite: https://github.com/amatsuda/database_rewinder
[12:42:15] pwnd_nfsw: apg, HTTP protocol, difference between get/post, etc. Would probably be good to have an understanding of HTML as well.
[12:42:16] mugurel: if i do after(:each) Blog.destroy_all? will that be ok?
[12:42:47] apg: thanks pwnd_nfw, I aprreciate your time
[12:42:48] tbuehlmann: mugurel, how about other models that might interfer?
[12:43:19] apg: thanks pwnd_nfsw, I aprreciate your time
[12:43:25] tbuehlmann: also, that library is optimized for exactly what you are dealing with
[12:44:11] pwnd_nfsw: apg, also understanding SQL
[12:44:36] apg: pwnd_nfsw, okay
[12:45:33] mugurel: tbuehlmann: i will give that gem a try, thanks for pointing that out for me
[12:45:58] mugurel: if you have a stack overflow account maybe you can answer there to accept the answer?
[12:47:41] chipotle: has joined #RubyOnRails
[12:47:51] tbuehlmann: sure, posted something
[12:49:24] mugurel: unfortunately i can't use that gem because i work with a 3.2 rails app
[12:51:25] tbuehlmann: mugurel, then there is https://github.com/DatabaseCleaner/database_cleaner
[12:51:33] jenrzzz: has joined #RubyOnRails
[12:51:49] gremax: has joined #RubyOnRails
[12:51:56] tbuehlmann: doing the same thing, works a bit differently
[12:52:45] mugurel: great, thanks
[12:54:49] kr1shnak: has joined #RubyOnRails
[12:55:18] liquid-silence: ACTION goes back to wanting to kill elasticbeanstalk
[12:56:47] JoshL: has joined #RubyOnRails
[12:57:07] webguynow: has joined #RubyOnRails
[12:59:45] erichu: has joined #RubyOnRails
[13:00:40] arup_r1: liquid-silence: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_Ruby_rails.html did you saw.. Just asking
[13:00:50] jkamenik1: has joined #RubyOnRails
[13:00:54] artto: has joined #RubyOnRails
[13:01:06] Swappticon: has joined #RubyOnRails
[13:01:16] goodcodeguy: has joined #RubyOnRails
[13:02:00] annlewis: has joined #RubyOnRails
[13:03:55] sevenseacat: has joined #RubyOnRails
[13:04:15] patryk__: has joined #RubyOnRails
[13:04:42] liquid-silence: has joined #RubyOnRails
[13:04:51] denDro: has joined #RubyOnRails
[13:07:02] Sutffness: has joined #RubyOnRails
[13:07:28] ramortegui: has joined #RubyOnRails
[13:08:07] Scriptonaut: has left #RubyOnRails: ()
[13:10:12] djbkd: has joined #RubyOnRails
[13:12:01] umgrosscol: has joined #RubyOnRails
[13:12:54] krz: has joined #RubyOnRails
[13:14:30] liquid-silence: has joined #RubyOnRails
[13:16:16] chills42: has joined #RubyOnRails
[13:17:51] greengriminal: has joined #RubyOnRails
[13:18:54] liquid-silence: has joined #RubyOnRails
[13:21:49] webguynow: has joined #RubyOnRails
[13:27:30] fmcgeough: has joined #RubyOnRails
[13:27:32] habitullence: If I have a model that belongs to many but the model it belongs to is the same, i.e., with a different association name and foreign key, how do I order by one of those associations?
[13:28:54] habitullence: This shows a similar schenario http://www.spacevatican.org/2008/5/6/creating-multiple-associations-with-the-same-table/
[13:29:04] charliesome: has joined #RubyOnRails
[13:30:07] jkamenik: has joined #RubyOnRails
[13:33:04] arup_r1: habitullence: show your model and tell which association you want to order by
[13:34:59] habitullence: arup_r_: https://gist.github.com/habitullence/9f87c01fc72fc2b9d185
[13:35:38] habitullence: So say I want the model joined to all the belongs_to but then order by location_type.title
[13:36:54] Lightsword: has joined #RubyOnRails
[13:36:55] universa1: habitullence: do you really want them joined? do you just want them preloaded?
[13:37:23] brunoalano: has joined #RubyOnRails
[13:37:33] habitullence: universa1: what's the difference?
[13:38:07] arashb: has joined #RubyOnRails
[13:38:15] brunoalano: It's possible to do nested constraints?
[13:38:31] universa1: habitullence: what is your use case?
[13:38:49] brunoalano: I need subdomain in a subdomain constraint (a.k.a subsubdomain)
[13:39:11] universa1: brunoalano: have you tried just nesting them?
[13:39:14] brunoalano: habitullence: Example: Company has a subdomain. But Company Users have subdomain inside Company
[13:39:32] sankaber: has joined #RubyOnRails
[13:39:38] brunoalano: (Oops, wrong reference)
[13:39:58] brunoalano: universa1: Doesn't works, I will send a Gist
[13:40:32] habitullence: universa1: I'm trying to use the above model with datatables and ordering.. The belongs to association is essentially an enum
[13:40:54] brunoalano: universa1: https://gist.github.com/brunoalano/913e2e974428079d456e
[13:41:57] chipotle: has joined #RubyOnRails
[13:42:12] habitullence: universa1: I'm guessing this means it needs be a join
[13:42:46] habitullence: I read this http://blog.bigbinary.com/2013/07/01/preload-vs-eager-load-vs-joins-vs-includes.html ;)
[13:42:55] universa1: habitullence: you need a join for the association(s) you want to order on, for the other ones an include is fine.
[13:43:44] Linuus: has joined #RubyOnRails
[13:43:46] habitullence: universal1: but how do I reference location_type.title vs study_design.title?
[13:44:53] dima_: has joined #RubyOnRails
[13:45:12] universa1: habitullence: ?
[13:46:53] hayricicek: has joined #RubyOnRails
[13:47:56] habitullence: universa1: so there's only one table, list_items, but Survey belongs_to location_type, study_design on those tables using a different foreign key. I need to be able to sort by those
[13:48:04] webguynow: has joined #RubyOnRails
[13:48:06] habitullence: Don't know if I explained that very well :P
[13:48:08] Jardayn: has joined #RubyOnRails
[13:48:16] universa1: so you need to join all you want to sort by.
[13:48:20] shinnya: has joined #RubyOnRails
[13:49:56] habitullence: universa1: Survey.where(publication_id: 1).joins(:location_type, :study_design).order('location_type.title').limit(10) gives unknown column location_type
[13:50:01] sandstrom: has joined #RubyOnRails
[13:50:23] habitullence: universa1: I guess what I want rails to do is join as...
[13:51:02] arup_r1: habitullence: in order you need the actual table name
[13:51:09] arup_r1: not the association name
[13:51:18] Guest5: has joined #RubyOnRails
[13:51:52] darrencauthon: has joined #RubyOnRails
[13:51:57] hayricicek: has joined #RubyOnRails
[13:52:36] habitullence: arup_r_: yeah, I guess what I want to do is join them as different entities so they can be ordered by
[13:52:53] arup_r1: I understood
[13:53:39] brunoalano: has joined #RubyOnRails
[13:53:57] webguynow: has joined #RubyOnRails
[13:55:43] iateadonut: has joined #RubyOnRails
[13:57:35] mrchris: has joined #RubyOnRails
[14:01:59] SteenJobs: has joined #RubyOnRails
[14:02:03] brunoalano: I've solved the problem in nested constraints
[14:02:24] drptbl: has joined #RubyOnRails
[14:02:45] annlewis: has joined #RubyOnRails
[14:03:41] ekem: if anything, thats just a really awesome site janno
[14:03:53] ekem: ive seen that guide before, its nice
[14:04:12] NBarnes: has joined #RubyOnRails
[14:04:13] ekem: oh... nm i was scrolled up like 2 days back : )
[14:05:55] kitsuneyo: has joined #RubyOnRails
[14:06:11] HalcyonicStorm: has joined #RubyOnRails
[14:06:17] eGGsha: has joined #RubyOnRails
[14:06:53] suchness: has joined #RubyOnRails
[14:07:56] tvon: has joined #RubyOnRails
[14:08:15] n1lo: has joined #RubyOnRails
[14:08:44] crankharder: I've got this button, but it doesn't seem to be toggling the 'active' class on #sidebar -- somethings not quite right?
[14:08:51] crankharder: <button class="navbar-toggle collapsed" data-target="#sidenav" data-toggle="active" type="button">blah</button>
[14:09:17] crankharder: ...it was working with the default example, but i'm trying to have it toggle something else now. Manually adding active has the effect I want -- so it's definitely this button
[14:10:01] d08z: has joined #RubyOnRails
[14:11:01] d08z: hi, does anyone know how to get rid of the spring warning message to run 'gem pristine --all'? (yes, i did run it and yes, i did go on stackoverflow before asking! :)
[14:12:07] suchness: crankharder: You need to make a pastie or gist of the js, html, and whatever else if you want help.
[14:12:12] blackmesa: has joined #RubyOnRails
[14:12:49] suchness: d08z: http://stackoverflow.com/questions/19726167/how-do-i-get-rid-of-spring-warning-running-gem-pristine-all
[14:13:17] sininen: has joined #RubyOnRails
[14:13:18] d08z: yeah i read it
[14:13:34] kitsuneyo: how easy is it to include nested attributes in seed data?
[14:13:46] d08z: suchness: didnt work
[14:14:08] suchness: d08z: Read it again.
[14:14:48] d08z: suchness: ran the small script and typed 'gem pristine --all' and i still have the warning
[14:15:00] suchness: d08z: Read it again.
[14:15:23] d08z: i ... dont understand what you mean
[14:15:37] sevenseacat: suchness: thats not helpful.
[14:15:40] suchness: d08z: The link I sent you, and the link you said you have read. Read it again.
[14:15:43] Macaveli: has joined #RubyOnRails
[14:16:02] suchness: sevenseacat: Yes, it is.
[14:16:08] sevenseacat: suchness: you may have to be more specific.
[14:16:27] dopamean_: has joined #RubyOnRails
[14:16:35] suchness: sevenseacat: I am not teaching rails I am teaching reading comprehension.
[14:16:44] kies^: has joined #RubyOnRails
[14:16:53] sevenseacat: suchness: I'm teaching empathy and not being arrogant.
[14:17:07] sevenseacat: please be more specific.
[14:17:25] CheckYourSix: has joined #RubyOnRails
[14:17:36] fschuindt: has joined #RubyOnRails
[14:17:58] d08z: nah i dont mind being "schooled", the only problem is i really dont understand what you mean
[14:18:04] suchness: sevenseacat: You're in the wrong IRC.
[14:18:17] suchness: d08z: "But it is easier to run gem pristine --all and as @Beerlington mentioned, gem uninstall any gems giving it a problem."
[14:18:29] suchness: d08z: What is the second part of that, the part you haven't done?
[14:18:36] d08z: i know but no gem is giving me problems
[14:19:35] d08z: thanks anyway for your time
[14:19:44] suchness: d08z: Then it might be worth commenting gems out until you find the culprits, then uninstalling them, and letting bundler and rake grab the right versions for you. That should stop any further errors. You could also just uninstall all the gems and reinstall them too.
[14:20:14] chouhoulis: has joined #RubyOnRails
[14:20:47] suchness: Gem::Specification.stubs.reject(&:stubbed?).reject(&:default_gem?).each do |gemspec|
[14:20:47] suchness: puts "gem pristine #{Shellwords.escape gemspec.name} --version #{Shellwords.escape gemspec.version.to_s}"
[14:20:49] suchness: d08z: Either way, pristine missed something, but the script in that comment should specifically show you which ones are not working:
[14:20:56] helpa: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[14:21:49] kitsuneyo: so yeah i have my Games model which has has_many relationships with various other tables. If I want to seed data for those other tables, do I have to make a hash the same as is submitted by the app's form?
[14:21:56] kitsuneyo: or is it simpler than that?
[14:22:37] suchness: kitsuneyo: You can create them however you want. YAML, JSON, csv, anything.
[14:23:33] kitsuneyo: thanks suchness... i guess my full answer is more reading as usual
[14:23:43] wldcordeiro_: has joined #RubyOnRails
[14:24:03] suchness: kitsuneyo: What kind of things do you need to seed? Are they for production, test, dev?
[14:25:12] kitsuneyo: dev, but the data is good for production as well. there isn't a ton of data.
[14:25:30] suchness: kitsuneyo: Then I recommend using some yaml to do it.
[14:25:42] sevenseacat: I'd just chuck it in a seeds file.
[14:25:48] sevenseacat: Model.create(whatever)
[14:25:53] kitsuneyo: yeah i'm using yaml at the moment, but im just not sure of the right format for nested_attributes
[14:26:04] suchness: kitsuneyo: Then you just need a rake task that loads up the yaml (which will probably end up looking like what your form does) and create your default instances from it.
[14:26:40] sevenseacat: you dont need to use nested attributes if you're just creating models
[14:26:41] suchness: kitsuneyo: You can certainly use it for nested attributes, but there is also nothing stopping you from creating the record individually, and not at one time.
[14:27:07] kitsuneyo: well i usually just to bundle exec rake db:seed
[14:27:09] centrx: has joined #RubyOnRails
[14:27:29] suchness: kitsuneyo: You can have the seed task load up the yaml as well.
[14:28:13] suchness: kitsuneyo: Or even evoke another rake task that handles the yaml part.
[14:28:30] aldodelgado: has joined #RubyOnRails
[14:29:01] suchness: kitsuneyo: Anyhow, if you list a couple models and some sample data that would make it easier to access the best way to accomplish what you are trying to do.
[14:29:02] kitsuneyo: actually i'm talking crap, i'm not using yaml, i'm using .rb files in my seeds folder
[14:29:36] suchness: kitsuneyo: That's implied, I am saying that in the .rb file you can load up the yaml and create objects then.
[14:29:37] kitsuneyo: let me try to do that suchness
[14:29:38] mugurel: does anyone know how to test format.rss and format.json with rspec rails?
[14:30:15] suchness: mugurel: response.content_type.should eq("application/rss+xml")
[14:30:25] helpa: http://i.imgur.com/m9m3wr9.gif
[14:30:59] sevenseacat: I wonder how many people you'll confuse under the guise of 'helping'
[14:31:17] mugurel: suchness: i use rspec rails 3.3
[14:32:01] quazimodo: has joined #RubyOnRails
[14:32:02] suchness: mugurel: Ah right
[14:32:14] bratsche: has joined #RubyOnRails
[14:32:18] mugurel: suchness: i will modify the code, it does not seems that hard, thank you very much
[14:32:19] suchness: mugurel: You should still be able to assess the content_type though?
[14:32:29] goodcodeguy: has joined #RubyOnRails
[14:32:30] mugurel: yes i see i can
[14:32:35] suchness: mugurel: I know the syntax changes to assert or whatever.
[14:32:47] mugurel: expect(response.content_type).to eq("application/rss")
[14:32:58] suchness: mugurel: That's it.
[14:33:24] mugurel: can i test somehow how the response is after the redirect? i do a redirect to .rss and that redirect is content/html
[14:33:35] mugurel: how can i dest the state after the redirect?
[14:33:47] suchness: mugurel: That I couldn't speak to, I haven't used rspec in a while.
[14:34:01] mugurel: what do you use for tests?
[14:34:15] suchness: mugurel: People I hired to do it for me.
[14:34:25] suchness: mugurel: Who do use rspec.
[14:34:25] mugurel: tha't the best gem ever
[14:34:30] kitsuneyo: suchness: https://gist.github.com/kitsuneyo/3cac21858cb0d6737861 - here is a gist with three of my models (game, genre and game_genre). if you could help me create some seed game_genre records, i think i can figure out how to do the rest from that
[14:34:35] camilasan: has joined #RubyOnRails
[14:35:11] tenderlove: has joined #RubyOnRails
[14:35:52] anjen: has joined #RubyOnRails
[14:36:19] nettoweb: has joined #RubyOnRails
[14:36:31] podman: has joined #RubyOnRails
[14:37:48] Rubie: has joined #RubyOnRails
[14:38:00] suchness: kitsuneyo: Why does genres have a user id?
[14:38:00] beauby: has joined #RubyOnRails
[14:38:15] suchness: kitsuneyo: also, why does games have a user id?
[14:38:25] kitsuneyo: suchness, just to track who creates each genre and game
[14:38:52] kitsuneyo: it's more important for games than genres
[14:39:15] law__: has joined #RubyOnRails
[14:39:25] suchness: kitsuneyo: I am just thinking about it from the perspective of seeding, do you need user_id tied to either of those while your'e seeding? I should think not.
[14:40:18] havenwood: has joined #RubyOnRails
[14:40:20] suchness: sevenseacat: You sure are salty.
[14:40:30] chills42: has joined #RubyOnRails
[14:40:31] adavia: has joined #RubyOnRails
[14:40:34] Kedare: has joined #RubyOnRails
[14:40:51] sevenseacat: suchness: sorry?
[14:40:56] catcher: has joined #RubyOnRails
[14:41:04] law__: Annyone know if the jquery-turbolinks gem is still the gem to use to get jquery to work with turbolinks?
[14:41:31] kitsuneyo: well, i hope my seed data is going to stick around for a while so i don't mind the user id being there. but i guess it's not super important.
[14:41:33] suchness: sevenseacat: Just enjoy your popcorn.
[14:42:35] mugurel: how can i do a get to url/feed.rss if the name of my action is feed, with rspec?
[14:42:45] mugurel: a get requuuest
[14:43:26] ror15: has joined #RubyOnRails
[14:43:36] wildlander: has joined #RubyOnRails
[14:44:03] kitsuneyo: suchness: my problem anyway is how best to create the seed data for game_genres, to add many genres to one game. at the moment i have a method called add_genre, but it seems inefficient
[14:44:31] hashrocket: has joined #RubyOnRails
[14:44:46] sevenseacat: use normal active record association helpers - eg. @game.genres << @genre
[14:45:04] kitsuneyo: sevenseacat, i started reading the well-grounded rubyist partly on your recommendation, pretty good so far
[14:45:10] sevenseacat: good stuff :)
[14:45:17] drptbl: has joined #RubyOnRails
[14:45:53] suchness: kitsuneyo: One momoment. It's a bit difficult to give you a good seed without knowing your full data, but assuming you have users:
[14:45:53] kitsuneyo: sevenseacat, is that like making an instance variable in the seed data? what would that look like exactly?
[14:46:13] sevenseacat: it was an example to show that you have an instance of a game and an instance of a genre
[14:46:22] sevenseacat: sounds like you need to read through the associations guide
[14:46:55] sevenseacat: eg. game = Game.create(stuff); genre = Genre.create(other_stuff); game.genres << genre
[14:47:52] suchness: kitsuneyo: http://pastie.org/private/sqtzmt4ol5vrmm5nxregw
[14:48:11] Swappticon: has joined #RubyOnRails
[14:48:16] suchness: kitsuneyo: You would need to expand on that, but it's just to get you thinking.
[14:48:20] rodfersou: has joined #RubyOnRails
[14:48:35] Pupeno_: has left #RubyOnRails: ()
[14:48:35] kitsuneyo: sevenseacat, ah ok, that's kind of similar to what i have. but if i have to assign a genre variable for each game_genre record, thats a lot of lines as each game has around 5 genres
[14:48:53] TheNet: has joined #RubyOnRails
[14:48:58] suchness: mugurel: get :feed, :format => "rss" ?
[14:49:03] sevenseacat: then use different association methods, eg. game.genres = [genre1, genre2, genre3]
[14:49:12] erichu: has joined #RubyOnRails
[14:49:16] liquid-silence: has joined #RubyOnRails
[14:49:31] mugurel: suchness: thanks, that works
[14:49:38] webguynow: has joined #RubyOnRails
[14:49:57] mugurel: i look for the answers first on google, but sometimes i don't even know what to "ask" google
[14:50:08] kitsuneyo: thanks suchness
[14:50:36] kitsuneyo: ok sevenseacat, that sounds good
[14:51:05] kitsuneyo: sevenseacat: is this the page you recommend: http://guides.rubyonrails.org/association_basics.html
[14:51:50] jsvgoncalves: has joined #RubyOnRails
[14:51:53] aldodelgado: has joined #RubyOnRails
[14:52:07] walidvb: has joined #RubyOnRails
[14:52:29] walidvb: Hi everyone! I'm having hte following issue on safari, but i don't understand what this means... http://stackoverflow.com/questions/18620118/rails-redirects-to-data
[14:52:43] walidvb: my user gets redirected to data:, after posting a form
[14:52:55] aldodelgado: Question: Hi I have a rake task that need to be fired off when the application or server is restarted. Any suggestions on how to handle this?
[14:53:38] sevenseacat: kitsuneyo: yep
[14:53:43] aldodelgado: I currentlly do it manually when I restart the server
[14:54:13] nya: has joined #RubyOnRails
[14:56:18] suchness: walidvb: Not sure how you have things set up, but wouldn't you want t page.html.erb that you render, and inside of it do @page.html?
[14:56:32] suchness: walidvb: wouldn't you want a*
[14:57:04] walidvb: suchness: so, it seems that redirecting to a page that contains an iframe you just submitted is the culprit
[14:57:31] suchness: walidvb: I am pretty sure rails thinks you are trying to send data in the form of text...
[14:57:45] webguynow: has joined #RubyOnRails
[14:58:14] suchness: walidvb: Ah, you have a lot more going on than it looks like at first glance then.
[14:59:58] drptbl: has joined #RubyOnRails
[15:00:26] walidvb: suchness: well, it saves alright, and displays alright. and it works fine in chrome. I really feel like it is this security thing
[15:00:39] smathy: walidvb, the code you've shown, in a regular page, works fine.
[15:00:41] sinkensabe: has joined #RubyOnRails
[15:00:45] Fire-Dragon-DoL: has joined #RubyOnRails
[15:01:13] kitsuneyo: suchness, sevenseacat: will something like this work: [1, 2, 28, 64, 9].each do { |genre| GameGenre.create(game_id: 1, genre_id: genre ) }
[15:01:23] kitsuneyo: because i know all the genre and game id numbers
[15:01:42] sevenseacat: how, if you're creating them in the seed file?
[15:01:47] sami: How do i actually migrate this model using Postgres? https://gist.github.com/samimb/3db16a8413b767e9eed3
[15:01:58] gremax: has joined #RubyOnRails
[15:02:02] kitsuneyo: because i already created the genres in a separate file
[15:02:19] tubbo: sami: "migrate'?
[15:02:24] petricore: has joined #RubyOnRails
[15:02:26] sevenseacat: sami: rake db:migrate ?
[15:02:32] kitsuneyo: i'm only concerned with the game_genre records, which are the relationships between games and genres
[15:02:35] suchness: kitsuneyo: I would steer clear of explicitly stating your ids.
[15:02:40] tubbo: sami: uhh, you do that?
[15:02:49] kitsuneyo: and this lets me do lots in one line
[15:02:50] sami: tubbo: ..yes?
[15:02:56] slayerjain: has joined #RubyOnRails
[15:02:56] sevenseacat: kitsuneyo: i'd just build the association using rails like I said already.
[15:03:00] suchness: kitsuneyo: I would just put the name of the genre and use that to find the correct one.
[15:03:01] tubbo: sami: i don't understand your question...
[15:03:12] artto: has joined #RubyOnRails
[15:03:17] sevenseacat: no-one reading your seeds file is going to know whats going on if its just full of random ID assignments.
[15:03:32] sevenseacat: and IDs can easily change between dbs.
[15:03:42] walidvb: suchness: smathy: indeed, i didn't know where the error came from. but after more testing, i could reproduce only when submitting a form containing a field with an iframe, and redirecting to a page displaying that same iframe
[15:03:48] annlewis: has joined #RubyOnRails
[15:03:48] kitsuneyo: that's true, it's a pretty short term answer
[15:03:51] sami: Well, creating and migrating the db with tables that refer to tables that has not been created yet.
[15:03:59] zpe_: has joined #RubyOnRails
[15:04:12] walidvb: suchness: which pointed me to this: https://github.com/activeadmin/activeadmin/issues/2963
[15:04:27] walidvb: and indeed, removing the XSS security header does solve it
[15:04:28] tubbo: sami: that's what migrations do, they create tables and/or change the existing schema of tables.
[15:04:56] sevenseacat: sami: it seems like you don't understand how migrations work in rails
[15:05:13] smathy: walidvb, perfect, well done.
[15:05:19] liquid-silence: has joined #RubyOnRails
[15:05:20] tubbo: sami: !migrations
[15:05:20] helpa: sami: http://guides.rubyonrails.org/migrations.html - Migrations Guide by Frederick Cheung
[15:05:40] Macaveli: has joined #RubyOnRails
[15:05:57] walidvb: smathy: lol... well, i deactivated XSS. which makes my client happy right now, but obviously leaves a security breach.....
[15:06:29] FailBit: >deactivate xss
[15:06:34] FailBit: ur gonna be haxxored
[15:07:26] suchness: walidvb: Did you follow up here? http://stackoverflow.com/questions/19106111/rails-4-redirects-to-data-in-chrome/21341180#21341180
[15:09:17] fschuindt: has joined #RubyOnRails
[15:09:31] cschneid_: has joined #RubyOnRails
[15:09:45] sami: No, obviously I don't know how they work since when I do it on SQLite it seems to work. When I do it in PG it's complaining that it can't create a foreign_key to a table that does not exist. So I'm wondering how you create two tables that referes to eachother
[15:10:00] bendangelo: has joined #RubyOnRails
[15:10:11] sevenseacat: now thats a totally different question
[15:10:56] smathy: walidvb, right, but redirecting within in iframe (or redirecting to content with an embedded iframe, or whatever the issue is) is a security risk which your client wants to assume.
[15:11:00] sevenseacat: having two tables that point to each other like that is quite uncommon
[15:11:06] sevenseacat: normally you would only have the one foreign key
[15:11:25] sami: sevenseacat: That's why i pasted the model generator.
[15:11:38] sevenseacat: so why do you have a circular dependency like that?
[15:11:47] djbkd: has joined #RubyOnRails
[15:11:49] sami: crossway lookups.
[15:11:50] Macaveli: What is the latest stable rails en ruby version that I should combine?
[15:12:00] sevenseacat: Macaveli: the latest of each.
[15:12:25] webguynow: has joined #RubyOnRails
[15:12:49] Macaveli: sevenseacat rails 4.2.4 and ruby 2.2.3 FYI
[15:12:55] sevenseacat: Macaveli: yes, i know.
[15:12:57] corioliss: has joined #RubyOnRails
[15:13:05] smathy: sami, you create the tables first, and add the constraint after both tables exist.
[15:13:09] sami: 1 info har many actions, 1 action has many infos
[15:13:14] [Butch]: has joined #RubyOnRails
[15:13:20] sevenseacat: sami: thats not what your models say
[15:13:22] sami: smathy: That's the only way? :(
[15:13:34] smathy: sami, of course, yes.
[15:13:37] diegoviola: has joined #RubyOnRails
[15:13:40] polishdub: has joined #RubyOnRails
[15:13:42] sevenseacat: your models say that an info belongs to an action and an action belongs to an indo
[15:13:55] sami: sevenseacat: Sorry, my bad.
[15:14:01] sami: that's what I meant :)
[15:14:14] sevenseacat: so again, why the circular dependency, because it doesnt make sense
[15:14:20] smathy: sami, but no need for the :( - it's very simple to do, just copy the code out of one of your migration files into the other, put both `create_table`s before the `add_index`s
[15:14:39] smathy: sami, notwithstanding what sevenseacat is saying, which I'm not following but is probably true.
[15:15:14] sevenseacat: at best its extra duplicated information, at worst it will get out of sync and lead to a whole host of problems
[15:15:24] strcmp1: has joined #RubyOnRails
[15:15:26] walidvb: smathy: well, it seems to me like smth quite normal to do, no? i mean, have a WYSIWYG, that can embed an iframe, and redirect the user to that post once it's created, no?
[15:16:12] sevenseacat: if (for example) action.info.action != action
[15:16:13] smathy: walidvb, whether it's common or not doesn't impact whether it poses a security risk or not.
[15:16:16] sami: smathy: Ohh that's true.
[15:16:23] smathy: walidvb, it's really common to want easy to remember and type passwords.
[15:16:29] sami: smathy: Didn't think about that.
[15:16:36] smathy: walidvb, using them is still a security risk, for which there's no workaround.
[15:17:03] kitsuneyo: sevenseacat, does << work for has_many through too?
[15:17:10] sevenseacat: kitsuneyo: try it.
[15:17:17] walidvb: smathy: hehe obviously. but still, how does wordpress do, or tumblr? do they not allow that?
[15:17:17] smathy: ...or read the docs.
[15:17:17] sevenseacat: or check the docs you linked.
[15:17:30] kitsuneyo: i'm just reading it now
[15:17:31] smathy: walidvb, either not allow, or they don't do a redirect.
[15:17:32] sevenseacat: walidvb: they don't use iframes?
[15:17:38] law__: Does anyone know why the gem 'jquery-turbolinks' doesn't work on heroku rails 4 when it functions normally locally? (extremely basic jquery functions just to test that it's working)
[15:17:46] smathy: ...or what sevenseacat said :)
[15:17:56] smathy: ACTION has actually never ever used an IFRAME in 25 years
[15:18:10] walidvb: hm interesting.. i might need to find another way, then...
[15:18:13] sevenseacat: i have. very very rarely though.
[15:18:17] tubbo: law__: what do you mean by "doesn't work"?
[15:18:50] walidvb: smathy: i don't, usually, but my clients usually like to be able to embed youtube videos
[15:18:51] law__: it doesn't seem to function at all, it's as if the gem isn't installed on heroku thought i've even run heroku run bundle install
[15:19:01] law__: and it's not in a development only group
[15:19:10] walidvb: law__: do you have them in application.js?
[15:19:11] sami: Quick question. What "stage" populates the schema.rb?
[15:19:12] arup_r: has joined #RubyOnRails
[15:19:16] smathy: It's as relevant to me as the <applet> tag
[15:19:23] sevenseacat: thats old school
[15:19:40] Lightsword: has joined #RubyOnRails
[15:19:47] smathy: sami, db:migrate runs a subtask of db:schema:dump when it runs.
[15:19:57] tubbo: law__: can you verify whether jQuery.turbolinks is included in your application.js? heroku *should* have precompiled everything into application.{js|css} files
[15:19:58] sami: smathy: ok
[15:20:00] walidvb: sevenseacat: applets are oldschool, or iframes'
[15:20:08] law__: as in //= require jquery.turbolinks ?
[15:20:11] liquid-silence: has joined #RubyOnRails
[15:20:12] law__: yes i have that
[15:20:19] smathy: ACTION doesn't even know whether they're valid HTML anymore
[15:20:20] maz-dev: has joined #RubyOnRails
[15:20:25] law__: currently the test jquery selects that have a .show/hide attached are also in application.js
[15:20:26] tubbo: law__: here's the source https://github.com/kossnocorp/jquery.turbolinks/blob/master/vendor/assets/javascripts/jquery.turbolinks.js
[15:20:26] smathy: (either IFRAME or APPLET :)
[15:20:31] chipotle: has joined #RubyOnRails
[15:20:39] sevenseacat: they probably came back in html5. html5 threw all kinds of obsolete shit back in.
[15:20:46] tubbo: law__: you should see that source (minified and compressed) in your application.js
[15:20:54] tubbo: law__: that is, on heroku
[15:20:55] walidvb: law__: do you have a link?
[15:21:05] tubbo: you're gonna have to whip out the chrome dev tools for this one
[15:21:27] smathy: It's not even that I've consciously tried not to use an IFRAME, I really have just never come to a problem which they solved.
[15:21:39] smathy: I've always assumed they were for people who didn't know how to code.
[15:22:08] centrx: They're good for showing SSRS reports on website
[15:22:13] smathy: (or people who, I dunno, liked to steal functionality from other sites)
[15:22:30] tubbo: smathy: clearly you have never created an html email template preview ;)
[15:22:47] tubbo: smathy: or made a facebook/twitter-ish button of some sort that actually called back to a remote service
[15:22:56] smathy: tubbo, I have, I've created an entirely template based website creation tool - twice actually.
[15:23:34] tubbo: smathy: point is, iframes actually are useful (probably not in the future though), when you need to isolate the DOM of a portion of your page from the rest of the page
[15:23:41] tubbo: of course this includes a lot of fun little implications
[15:24:08] tubbo: it's so i can put a button or a form of some kind on your site, and you can't mess with my styling.
[15:24:17] beauby: has joined #RubyOnRails
[15:24:23] law__: i mean it works locally perfectly fine
[15:24:28] Ropeney: has joined #RubyOnRails
[15:24:45] tubbo: law__: right but the problem you have is that you don't know what the problem is.
[15:25:04] tubbo: law__: first thing's first, you need to diagnose what is happening to your JS. it might not even be in the eventual compiled JS on Heroku.
[15:25:28] Moonlight-Angel: has joined #RubyOnRails
[15:27:17] DapperFox: has joined #RubyOnRails
[15:28:46] smathy: tubbo, sure, I understand why a third party would want me to use their iframe - but I've still never done it.
[15:28:48] Rubie: has joined #RubyOnRails
[15:29:01] banister: has joined #RubyOnRails
[15:29:14] tubbo: consider yourself lucky that you haven't needed one then. they just make me feel dirty.
[15:29:25] smathy: ...and I can see the limited use case of an intact DOM - but the truth is that you get much better control over the end result by embedding one DOM within the containing DOM so you can clip properly etc.
[15:29:44] kitsuneyo: sevenseacat, what do you think of this? http://pastie.org/10421711
[15:30:17] mary5030: has joined #RubyOnRails
[15:30:27] sevenseacat: seems okay, but doesn't handle the case when Genre.find_by returns nil.
[15:30:52] pawnbox_: has joined #RubyOnRails
[15:31:15] safetypin: has joined #RubyOnRails
[15:31:17] mary5030: has joined #RubyOnRails
[15:32:33] kitsuneyo: any hints? :)
[15:32:50] mary5030: has joined #RubyOnRails
[15:32:51] law__: @tubbo do you know what could block it's addition?
[15:32:52] t3rm: has joined #RubyOnRails
[15:33:17] sevenseacat: kitsuneyo: do you want to add a nil genre? do you think Rails would even allow it?
[15:33:20] TheNet: has joined #RubyOnRails
[15:33:26] tubbo: law__: no, but you can know that very easily by looking at the source of application.js as it's served to you by heroku...
[15:33:47] chipotle: has joined #RubyOnRails
[15:33:57] kitsuneyo: i guess i just need to check that 'gen' isn't nil and cancel any action if it is??
[15:34:00] law__: well i must be dumb then.
[15:34:03] nettoweb: has joined #RubyOnRails
[15:34:11] kitsuneyo: so some kind of conditional/
[15:34:41] siddart_: has joined #RubyOnRails
[15:34:50] ngscheurich: has joined #RubyOnRails
[15:36:06] Cache_Money: has joined #RubyOnRails
[15:36:14] slayerjain: has joined #RubyOnRails
[15:36:30] sevenseacat: see, i didnt even need to give hintd.
[15:37:19] tubbo: law__: no, i said earlier to open up chrome dev tools. do you know what to look for? check out the "Network" tab and refresh the page to first of all see if application.js is coming in at all. next, you can right click that and "Open in New Tab" to view its source. ctrl+f for "$.turbo" and if you don't find it, it's not in there. you *might* have a error somewhere in the JS too.
[15:37:34] mdel: has joined #RubyOnRails
[15:37:42] kitsuneyo: sevenseacat: but if find_by returns nil, i'll get an exception so it'll be too late for an if statement then, right?
[15:37:53] sevenseacat: when will you get an exception?
[15:38:01] smathy: law__, I assume your heroku site has a public URL, give it to us and we can check it for you.
[15:38:08] kitsuneyo: when find_by fails
[15:38:17] sevenseacat: no, it returns nil if it finds no results.
[15:38:20] kitsuneyo: during my seed task
[15:38:21] jaequery: has joined #RubyOnRails
[15:38:32] wilsonArteaga: has joined #RubyOnRails
[15:38:58] sevenseacat: returning nil isnt the same as throwing an exception.
[15:38:59] law__: i already checked the file just doesn't get included as if the gem was never installed in production though i can see in heroku logs that it does
[15:39:10] kitsuneyo: sevenseacat, so this works? game.genres << gen unless gen == nil
[15:39:21] sevenseacat: kitsuneyo: its easier for you to try it than ask
[15:39:28] kitsuneyo: haha ok sorry
[15:39:37] law__: the turbolink file just never makes it to the end view
[15:39:39] Ropeney: kitsuneyo: Class.Find(id) exceptions, not find_by
[15:39:44] smathy: kitsuneyo, game.genres << Genre.where( name: ["Action", "Adventure", "Fantasy", "Action RPG", "Role Playing Game"] )
[15:40:07] tubbo: law__: probably something you're not telling us (no offense), so you mind giving me the URL so I can check it out? you can PM it if you really don't want everyone in the channel seeing it.
[15:40:11] kitsuneyo: ah smathy, that looks really good :D
[15:40:15] law__: and by turbolink i mean jquery-turbolink gem
[15:40:43] Cervajz: has joined #RubyOnRails
[15:40:43] smathy: law__, if you're sure (like you've accounted for minimization, etc) then contact heroku customer support.
[15:40:53] law__: https://mysterious-inlet-5617.herokuapp.com/
[15:40:56] sevenseacat: also, seeds would typically be expected to pass (given seeds are data required for an app to function), so having unexpected nils is a big code smell
[15:41:19] tubbo: law__: your application.js is not minified. that's the first thing that jumps out at me.
[15:41:26] chipotle: has joined #RubyOnRails
[15:42:04] kitsuneyo: i guess i won't need to worry about nils with this where method, eh
[15:42:43] tubbo: law__: what's your RAILS_ENV set to on heroku config?
[15:43:00] michaeldeol: has joined #RubyOnRails
[15:43:02] Cervajz_: has joined #RubyOnRails
[15:43:07] law__: production
[15:43:50] NBarnes: has joined #RubyOnRails
[15:44:26] smathy: law__, and the fingerprint of that .js file matches your heroku logs?
[15:45:20] law__: that file wouldn't even have the contents that woudl get included from the jquery-turbolinks gem
[15:45:38] law__: it is another js file that doesn't get precompiled/or included when on heroku
[15:46:03] kitsuneyo: sevenseacat, smathy and suchness, thanks for your help
[15:46:09] kitsuneyo: i understand how to do this now
[15:46:17] kitsuneyo: you guys are awesome
[15:46:30] SuMo_D: has joined #RubyOnRails
[15:47:11] tubbo: law__: https://devcenter.heroku.com/articles/rails-4-asset-pipeline#missing-asset-in-precompile-list
[15:47:27] smathy: law__, I thought you said above that you had //= require jquery.turbolinks in your app/assets/application.js ?
[15:47:28] kitsuneyo: i have one other question. i have all my migrations in a folder, can i delete them and use db:reset instead? and still create new migrations after?
[15:47:30] tubbo: law__: perhaps you need sprockets_better_errors? not sure if you're using 4.1...
[15:47:53] sevenseacat: kitsuneyo: !guys
[15:47:53] helpa: kitsuneyo: We're not all guys here - while you probably don't meant to be exclusive, not everybody feels that way. Maybe consider using "folks", "y'all" or "everyone" instead?
[15:48:18] sevenseacat: and i have no idea why you would want to delete your migrations, thats just asking for trouble
[15:48:28] tubbo: kitsuneyo: yes, migrations are pretty much useless after you have created a db/schema.rb imho, because rake db:setup, rake db:reset, et. al. will actually run db:schema:load instead of db:migrate since it's faster.
[15:48:33] law__: /= require jquery
[15:48:33] law__: /= require jquery.turbolinks
[15:48:33] law__: /= require bootstrap-sprockets
[15:48:33] law__: /= require jquery_ujs
[15:48:33] law__: /= require turbolinks
[15:48:34] arup_r: kitsuneyo: Is your app resides only in your local or you pushed to another server where others are usig it ?
[15:48:43] tubbo: law__: please don't paste into IRC
[15:48:44] smathy: law__, don't paste into the channel again please, use gist.
[15:48:49] kitsuneyo: sevenseacat, you know i meant it in a non-gender-specific way since i know you're a girl, but apologies anyway
[15:48:54] Mia: has joined #RubyOnRails
[15:49:06] sevenseacat: kitsuneyo: guys is not a non-gender-specific word so please don't.
[15:49:13] smathy: law__, so still, you haven't told us which file those lines are in.
[15:49:25] kitsuneyo: arup_r, for the time being it's just me working on it but i hope that will change at some point
[15:49:35] sevenseacat: and if you've ever shared your app with anyone else who has a working copy of it, blowing away migrarions is going to mess things up
[15:49:36] law__: application.js
[15:49:48] sevenseacat: it achieves nothing, and cause a lot of problems, so i would just not do it
[15:49:59] smathy: law__, so why did you just say "that file wouldn't even have the contents that woudl get included from the jquery-turbolinks gem" ?
[15:50:00] arup_r: kitsuneyo: Then drop db and delete the migration and again set it up
[15:50:00] Dzejmskrokan: has joined #RubyOnRails
[15:50:04] kitsuneyo: but i thought too many migrations can cause some errors?
[15:50:11] sevenseacat: kitsuneyo: what errors?
[15:50:13] smathy: law__, and: "it is another js file that doesn't get precompiled/or included when on heroku" ?
[15:50:19] law__: because locally it comes out as a separate file
[15:50:23] tubbo: yeah that's my main point sevenseacat / kitsuneyo...after a certain point having the migrations around are meaningless, but at the same time they don't really affect you negatively right?
[15:50:29] arup_r: kitsuneyo: LISTEN me :D
[15:50:40] Scriptonaut: has joined #RubyOnRails
[15:50:45] kitsuneyo: i read that the more migrations you have, the more chance of errors when building the db
[15:50:46] smathy: law__, right, that's for debugging purposes, you should read this: http://guides.rubyonrails.org/asset_pipeline.html
[15:51:04] smathy: law__, so on the basis of this I need to check something else you said earlier.
[15:51:04] tubbo: kitsuneyo: if you build your db with rake db:migrate but nobody does that. they use rake db:schema:load.
[15:51:18] tubbo: if they don't, they don't realize the benefits of rake db:schema:load
[15:51:35] tubbo: all this aside, i never delete my migrations. never have and never will.
[15:51:41] tubbo: i just don't see the problem with doing so
[15:51:44] nettoweb: has joined #RubyOnRails
[15:51:47] sevenseacat: if they do, then kitsuneyo's app isnt going to work because it sounds like they loaded data in a migration
[15:51:49] smathy: law__, you said: "i already checked the file just doesn't get included as if the gem was never installed in production though i can see in heroku logs that it does" - was that last part, about the logs, just about the gem?
[15:52:12] kitsuneyo: i never loaded data through a migration, just the db structure
[15:52:15] law__: when i run bundle install it's there in the list of installed gems
[15:52:23] sevenseacat: kitsuneyo: then where did the genres come from
[15:52:23] webguynow: has joined #RubyOnRails
[15:52:28] kitsuneyo: my seed data
[15:52:42] TheNet: has joined #RubyOnRails
[15:52:45] sevenseacat: then why are you looking them up again in your seed data
[15:52:45] smathy: law__, ok. So what you should really be looking for in the heroku logs is when the assets:precompile rake task is run.
[15:52:50] sevenseacat: if they're already there
[15:52:58] law__: i even ran that manually
[15:53:04] kitsuneyo: so i can add them to my seed game records
[15:53:05] sevenseacat: you said you had already loaded the genres from some file
[15:53:20] law__: heroku run rake assets:precompile
[15:54:17] smathy: law__, ok, so what you're looking for is the filename of the application-<fingerprint>.js file.
[15:54:26] smathy: law__, you want to be sure that matches what your server is sending you.
[15:54:53] yardenbar: has joined #RubyOnRails
[15:54:53] smathy: law__, so your server is sending: application-bc14db4b12225e2899a5b7f85c4fcfb7e2a4778659016b8c89619b95826bc8be.js
[15:54:53] sevenseacat: so you've already got something in your file like action = Genre.create(name: "Action") and then later on you're doing game.genres << Genre.find(name: "Action"), instead of just reusing the same action genre?
[15:55:04] smathy: law__, is that what the output of `rake assets:precompile` shows as the filename?
[15:55:09] DoubleMalt: has joined #RubyOnRails
[15:55:29] kitsuneyo: yes sevenseacat, because i want to handle each seed game record individually
[15:55:41] sevenseacat: ..........wat, why
[15:56:03] kitsuneyo: because it's just easier to manage that way
[15:56:35] kitsuneyo: there are a lot of genres
[15:56:38] sevenseacat: either i'm tireder than i thought, or that makes no sense
[15:57:09] kitsuneyo: you're making me doubt myself, but it does make sense to me.
[15:57:21] sevenseacat: how does adding a buttload of extra db queries and writing things like game.genres << Genre.find(name: "Action") make more sense than just doing game.genres << action
[15:57:24] slayerjain: has joined #RubyOnRails
[15:57:35] bmurt: has joined #RubyOnRails
[15:58:28] kitsuneyo: it probably doesn't, but right now my genre creation lines (which i wrote before our conversation) look like this: user.genres.create!(name: "Action")
[15:58:46] kitsuneyo: so if i rewrote those, then your idea does sound a lot better, yes!
[15:58:48] n008f4g_: has joined #RubyOnRails
[15:59:07] sevenseacat: so when i said 'you have code X' and then you said 'yes' but you actually didn't have code X and screw this, I'm going to bed.
[15:59:31] law__: smathy, no it's not giving me the same hash value
[15:59:50] alfie_max15: has joined #RubyOnRails
[16:00:12] kitsuneyo: sorry, i can't always keep up as a beginner, thanks anyway
[16:00:34] jgt1: has joined #RubyOnRails
[16:01:14] tubbo: kitsuneyo: that's not how this actually works, you should be aware of what is happening in the DB when you do that. either way this does the same thing, the DB relates the genre with the name "Action" to your game
[16:01:35] tubbo: kitsuneyo: but it doesn't use, like, a copy of the object...it uses an ID. that ID is used by rails to look up the object's data when you need it
[16:02:04] tubbo: kitsuneyo: this is kind-of like doing "SELECT id FROM genres WHERE id = 1"
[16:02:16] tubbo: in a sense, you know the data and you're asking the DB for it anyway
[16:02:25] tubbo: which is not logical
[16:02:34] sininen: has joined #RubyOnRails
[16:03:04] smathy: law__, sounds like the problem here is that you haven't restarted your app.
[16:03:11] mary5030_: has joined #RubyOnRails
[16:03:20] habitullence: has joined #RubyOnRails
[16:03:20] choke: has joined #RubyOnRails
[16:04:18] annlewis: has joined #RubyOnRails
[16:04:21] liquid-silence: has joined #RubyOnRails
[16:04:27] tubbo: ACTION thought heroku did that for you *shrug*
[16:05:18] law__: i mean i'll try restarting it again (is there a way I can restart it more than heroku restart?)
[16:05:28] law__: i've also tried heroku run rake assets:clean
[16:05:42] suchness: kitsuneyo: Don't be bothered by that, I find her quite abrasive.
[16:05:42] mugurel: anyone ever did rspec tests with sorcery?
[16:06:07] smathy: law__, if `heroku restart` doesn't deliver the new asset file to you in a browser, then contact heroku support.
[16:06:18] tubbo: mugurel: !used
[16:06:18] helpa: mugurel: Don't ask "does anyone use <thing>?". It's better to just state your problem and if anyone has used <thing> they will most likely answer.
[16:06:42] smathy: tubbo, they should but you can disable that, and it has been known to happen that heroku doesn't function as it's supposed to, y'know, every so often ;)
[16:06:48] kitsuneyo: tubbo: i think i do get it, i just overlooked what a good idea it is to say action = Genre.create(name: "Action") and put it in a variable i could re-use
[16:06:54] habitullence: has joined #RubyOnRails
[16:07:05] webguynow: has joined #RubyOnRails
[16:07:13] kitsuneyo: suchness, yeah, she helps me out a lot though so it's cool
[16:07:25] tubbo: sometimes you need a little tough love
[16:07:38] chipotle_: has joined #RubyOnRails
[16:07:46] mugurel: i get an error when i include " config.include Sorcery::TestHelpers::Rails::Controller, type: :controller" into my spec_helper.rb file so i can test login with sorcery.
[16:07:51] alfie_max15: has left #RubyOnRails: ()
[16:08:18] mugurel: i get this error uninitialized constant Sorcery::TestHelpers::Rails::Controller (NameError)
[16:08:25] TheNet: has joined #RubyOnRails
[16:08:32] law__: ya niether of the asset hashes or w.e you would refer to those as matched, restart nor an asset:clean and then recompile changed anything either
[16:08:47] zpe: has joined #RubyOnRails
[16:13:11] fschuindt: has joined #RubyOnRails
[16:17:46] quazimod1: has joined #RubyOnRails
[16:18:37] pawnbox: has joined #RubyOnRails
[16:18:54] kitsuneyo: if my seed data is split across multiple .rb files, how do i get a variable defined in the first file to still be available in the second?
[16:19:27] bricker: has joined #RubyOnRails
[16:20:35] kitsuneyo: i have this in seeds.rb: Dir[File.join(Rails.root, 'db', 'seeds', '*.rb')].sort.each { |seed| load seed }
[16:20:56] webguynow: has joined #RubyOnRails
[16:21:01] kitsuneyo: then all my numbered .rb files are in a folder db/seeds
[16:21:59] towski_: has joined #RubyOnRails
[16:22:37] diego4: has joined #RubyOnRails
[16:22:39] mary5030: has joined #RubyOnRails
[16:23:30] suchness: kitsuneyo: I would explicitly load each of them, just a heads up. File order shouldn't be relevant, not should file name.
[16:23:57] sam_weerasinghe: has joined #RubyOnRails
[16:24:08] diego4: has joined #RubyOnRails
[16:24:58] kitsuneyo: suchness, there is some relationship data in there, so i can't try to load a game-genre relationship before i create the game and genres it links, so order seems like it is important?
[16:25:34] suchness: kitsuneyo: It is important! But the order should be defined in your requires in the right order, instead of require *.rb, require them each explicitly
[16:26:06] kitsuneyo: ok, will that fix the problem of variables not being available between files?
[16:26:57] pixelhandler: has joined #RubyOnRails
[16:27:59] gumchum: has joined #RubyOnRails
[16:28:19] nya: has joined #RubyOnRails
[16:29:42] smathy: FWIW, I think the numeric ordering is an ok idea.
[16:30:00] rakm: has joined #RubyOnRails
[16:30:09] kh0d: has joined #RubyOnRails
[16:30:16] webguynow: has joined #RubyOnRails
[16:31:00] moeabdol: has joined #RubyOnRails
[16:31:45] smathy: My issue is with using `load` - that's so nasty. Make a proper namespace, and `require` the other files, make those files classes within that namespace with a single public method that runs the seeds code - that'll allow you to have whatever variables (or constants more likely) you want in the namespace, accessible from all the classes.
[16:32:09] kitsuneyo: the numbering is mainly so i can keep track of things
[16:32:15] mordocai: has joined #RubyOnRails
[16:32:29] gumchum: has left #RubyOnRails: ()
[16:32:38] smathy: kitsuneyo, and, based on that `.sort` you're also using it to control load order.
[16:33:00] bc2: has joined #RubyOnRails
[16:33:04] jaequery: has joined #RubyOnRails
[16:33:09] kitsuneyo: smathy, that sounds good but a lot of it is over my head
[16:33:16] srinidhi: has joined #RubyOnRails
[16:33:32] mrchris: has joined #RubyOnRails
[16:34:41] maz-dev: has joined #RubyOnRails
[16:34:48] bc2: Has anyone encountered an issue preloading an association, particularly when the association is on two citext columns? It seems rails doesn't realize it should be a case insensitive join?
[16:34:57] maz-dev_: has joined #RubyOnRails
[16:35:46] webguynow: has joined #RubyOnRails
[16:35:51] nettoweb: has joined #RubyOnRails
[16:36:04] smathy: kitsuneyo, sounds like you don't want to learn.
[16:36:25] kitsuneyo: smathy, on the contrary, i'm reading about namespaces right now
[16:36:28] rakm: has joined #RubyOnRails
[16:36:36] smathy: kitsuneyo, ok cool.
[16:36:47] kitsuneyo: http://blog.makandra.com/2014/12/organizing-large-rails-projects-with-namespaces/
[16:40:04] greengriminal: has joined #RubyOnRails
[16:43:06] yfeldblum: has joined #RubyOnRails
[16:43:20] acti0nman: has joined #RubyOnRails
[16:43:25] chipotle: has joined #RubyOnRails
[16:43:35] i: has joined #RubyOnRails
[16:43:36] sonOfRa: has joined #RubyOnRails
[16:44:04] dopie: has joined #RubyOnRails
[16:44:15] paulcsmith: has joined #RubyOnRails
[16:44:21] kitsuneyo: smathy, where do i define the namespace and why a namespace for seeds? i thought namespaces were mainly about setting URLs?
[16:46:21] wldcordeiro: has joined #RubyOnRails
[16:46:37] suchness: kitsuneyo: Namespaces are important in many places.
[16:46:39] fschuindt: has joined #RubyOnRails
[16:46:49] kitsuneyo: does the namespace just set the path for require?
[16:46:58] suchness: kitsuneyo: And when I say important, I mean for making things logically separated.
[16:47:47] smathy: kitsuneyo, if you put all your seeds into the same namespace then (a) it'll make organizing things very simple because you won't have to worry about clobbering your model names and (b) you can share data between all classes in the same namespace.
[16:48:53] wilsonArteaga: has joined #RubyOnRails
[16:49:10] kitsuneyo: after reading this article - http://www.agileweboperations.com/seed-data-in-ruby-on-rails - i think my seeds.rb should look something like... namespace :db do; namespace :seeds do; require 'file.rb; end; end
[16:49:33] kitsuneyo: the require 'file.rb' bit representing my list of files
[16:49:49] kitsuneyo: is it as simple as that?
[16:50:22] smathy: kitsuneyo, eg: https://gist.github.com/smathy/82261d8250974d695281
[16:50:53] smathy: kitsuneyo, different namespace - that's a namespace in a rake task.
[16:51:14] kitsuneyo: thanks smathy
[16:51:33] smathy: kitsuneyo, happy to explain any of that if you need it, there's a couple of tricky bits.
[16:51:42] diego4: has joined #RubyOnRails
[16:52:47] kitsuneyo: why Class Seeds; Class Foo instead of Class Foo::Seeds ? am i mixing ideas up here?
[16:53:20] chipotle: has joined #RubyOnRails
[16:53:26] jenrzzz: has joined #RubyOnRails
[16:53:46] smathy: kitsuneyo, did you mean to ask "instead of class Seeds::Foo" ?
[16:54:34] kitsuneyo: not sure... i thought Foo would belong to Seeds, so Foo::Seeds ?
[16:54:44] pwnd_nfsw: That means it's the other way around
[16:54:44] laszlo_1: has joined #RubyOnRails
[16:54:50] pwnd_nfsw: Parent::Child
[16:54:51] smathy: "Foo belong to Seeds" will be Seeds::Foo
[16:55:13] smathy: Seeds is at a higher level.
[16:55:16] smathy: Foo is within it.
[16:55:17] frozenyogurt: has joined #RubyOnRails
[16:55:24] pragmatism: has joined #RubyOnRails
[16:55:30] smathy: ...one of the many different seeds within the Seeds namespace.
[16:55:37] smathy: Seeds::Foo Seeds::Bar Seeds::Genre
[16:55:43] habitullence: Can anyone tell me what this line does https://github.com/plataformatec/devise/blob/1a0192201b317d3f1bac88f5c5b4926d527b1b39/lib/generators/active_record/devise_generator.rb#L7?
[16:55:51] smathy: ...all of which will have access to the Seeds::NAMES constant.
[16:56:22] smathy: (well anything will have access to that, but things within the namespace will have access to it without having to qualify it, ie. as just NAMES)
[16:56:36] smathy: kitsuneyo, I just updated my gist with a more realistic Foo
[16:57:14] frozenyogurt: so i am having a really weird issue with scope, this is my scope scope :has_sizes, -> { joins(:available_sizes).where('available_sizes.quantity > ?', 0) } , the issue i am having is that it is duplicating each item for each available size it has
[16:57:26] chipotle: has joined #RubyOnRails
[16:57:31] kitsuneyo: ok, i think i understand that on some level. so i need to put all my different filenames minus the .rb extension into NAMES, right?
[16:57:34] diego4: has joined #RubyOnRails
[16:57:40] diego4: has joined #RubyOnRails
[16:58:40] hahuang65: has joined #RubyOnRails
[16:59:46] frozenyogurt: but an includes breaks the query
[17:00:12] arup_r: frozenyogurt: what is the association ?
[17:00:19] smathy: kitsuneyo, no.
[17:00:42] greengriminal: has joined #RubyOnRails
[17:00:44] smathy: kitsuneyo, NAMES isn't used for that. Look at where it's used.
[17:00:53] smathy: (it's just a coincidence that I put foo bar etc into NAMES)
[17:01:12] frozenyogurt: has_many :available_sizes
[17:01:17] smathy: kitsuneyo, I used your same code to iterate over the files in db/seeds
[17:01:39] Pavster: has joined #RubyOnRails
[17:01:48] frozenyogurt: arup_r: has_many :available_sizes scope :has_sizes, -> { joins(:available_sizes).where('available_sizes.quantity > ?', 0) }
[17:02:26] smathy: frozenyogurt, because the association already JOINS, and you're joining again in the scope.
[17:02:37] eosinx: has joined #RubyOnRails
[17:02:52] smathy: ...well, I'm assuming how you're using it.
[17:02:57] kitsuneyo: smathy, so NAMES is the list of variables to persist across all the seed files?
[17:03:03] smathy: kitsuneyo, correct.
[17:03:13] smathy: I was just giving an example.
[17:03:15] kitsuneyo: but the problem is, there are hundreds of variables
[17:03:16] kidoz: has joined #RubyOnRails
[17:03:35] smathy: kitsuneyo, not sure what problem you see that being.
[17:03:58] moeabdol: has joined #RubyOnRails
[17:04:11] frozenyogurt: so scope :has_sizes, -> { where('available_sizes.quantity > ?', 0) }
[17:04:15] nettoweb: has joined #RubyOnRails
[17:04:17] kitsuneyo: every time i update the seed data i'll have to add the variable name to this list
[17:04:29] frozenyogurt: scope :has_sizes, -> { available_sizes.where('available_sizes.quantity > ?', 0) }
[17:04:34] kitsuneyo: i think it might be hard to maintain that
[17:04:53] yaymukund: has joined #RubyOnRails
[17:05:00] arup_r: scope :has_sizes, -> { available_sizes.where('available_sizes.quantity > ?', 0) }
[17:05:04] annlewis: has joined #RubyOnRails
[17:05:09] arup_r: frozenyogurt: ^^
[17:05:38] frozenyogurt: undefined local variable or method `available_sizes' for #<Class:0x007f9c95a5c010>
[17:05:43] scpike_: has joined #RubyOnRails
[17:06:05] smathy: frozenyogurt, how are you using the scope?
[17:06:20] frozenyogurt: @products=Product.has_sizes
[17:06:36] kitsuneyo: gotta go, thanks for all the help!
[17:06:47] arup_r: frozenyogurt: sorry.. here is one way :
[17:07:01] arup_r: has_many :available_sizes, -> { joins(:available_sizes).where('available_sizes.quantity > ?', 0) }
[17:07:07] arup_r: sorry.. fuck!
[17:07:17] arup_r: has_many :available_sizes, -> { where('available_sizes.quantity > ?', 0) }
[17:07:29] smathy: frozenyogurt, ok, so there must be at least two available sizes per product.
[17:07:45] pwnd_nfsw: arup_r, I feel like joining data is your favorite thing to do :p
[17:07:57] arup_r: pwnd_nfsw: :( may be
[17:08:16] arup_r: frozenyogurt: you can use scope with association..
[17:08:31] smathy: frozenyogurt, add a .uniq if you want just a single Product even when there are multiple available sizes with quantity > 0
[17:08:33] frozenyogurt: kk will try right now
[17:08:51] annlewis_: has joined #RubyOnRails
[17:09:14] frozenyogurt: .uniq totally workd
[17:09:18] arup_r: and if you want the association without a filter, add another assocation with different name with `class` option
[17:09:23] scpike: has joined #RubyOnRails
[17:09:40] frozenyogurt: thank you guys!!
[17:09:46] smathy: arup_r, the filter won't stop there being multiple sizes per product.
[17:09:48] frozenyogurt: but quick question why does joins duplicate ?
[17:10:00] scpike: Can I change case when interpolating into i18n locales? The default 'create: "Create %{model}"' gives
[17:10:07] scpike: 'Create User' but I want 'Create user' (sorry hit enter)
[17:10:13] smathy: frozenyogurt, because it runs an SQL join, which produces a single row for every product <-> available_size combination.
[17:10:20] arup_r: smathy: You are right. I was fixing the association..:( got stuck there
[17:10:31] arup_r: couldn't move further
[17:10:39] frozenyogurt: thanks smathy
[17:10:43] smathy: frozenyogurt, so if there are multiple available_size records (matching your query) then it'll display multiple product rows.
[17:10:48] frozenyogurt: and thank you arup_r
[17:10:53] smathy: frozenyogurt, you're welcome.
[17:11:17] arup_r: scpike: yes you can
[17:11:39] yardenbar: has joined #RubyOnRails
[17:11:40] arup_r: "Create %{model.downcase}"'
[17:12:12] milchschaum: has joined #RubyOnRails
[17:12:55] smathy: That doesn't work does it?
[17:13:02] Swappticon: has joined #RubyOnRails
[17:13:02] scpike: arup_r: that doesn't work, it's not regular ruby string interpolation. It just outputs 'Create %{model.downcase}'. There's an old discussion here http://stackoverflow.com/questions/9642901/how-to-change-case-of-interpolated-variables-in-rails-locale-file
[17:13:12] scpike: hoping there's some less hacky answer
[17:13:14] smathy: scpike, you just need to downcase it when you pass it in.
[17:13:16] arup_r: scpike: O i see
[17:13:36] arup_r: scpike: learning from mistakes...
[17:14:13] scpike: smathy: I want my app to "do the right thing" when I do a naked `<%= f.submit %>`
[17:14:30] MartinEl_: has joined #RubyOnRails
[17:16:07] moneylotion: has joined #RubyOnRails
[17:18:58] siemprefresco: has joined #RubyOnRails
[17:19:58] idd2d: has joined #RubyOnRails
[17:21:12] vipaca: has joined #RubyOnRails
[17:22:55] kh0d: has joined #RubyOnRails
[17:24:09] gerep: has joined #RubyOnRails
[17:24:11] mices: has joined #RubyOnRails
[17:24:17] tubbo: scpike: iirc you can customize the locale string on a per-object basis
[17:24:43] gerep: Hello good people! Can someone please help me with a nested resource issue where on nested resource my test works, with two it doesn't work: https://gist.github.com/gerep/652a2cfdc017dd21b664
[17:25:24] scpike: tubbo: that gets rid of a bit of the duplication at least, and does work
[17:25:32] chills42: has joined #RubyOnRails
[17:26:01] tubbo: scpike: right, you can do f.submit "Create User", *or* you could change a special key in the i18n which is being looked for (but not found) before resolving to the "default" global create helper text
[17:26:25] gerep: I have updated the gist with rake routes
[17:26:47] wilsonArteaga: has joined #RubyOnRails
[17:26:50] tubbo: scpike: but i think on the i18n key 'helpers.user.create', rather than just 'helpers.create' (for example) will allow you to customize the submit button text for *just* the user.
[17:27:36] tubbo: gerep: can you confirm the response is successful when you have that other nested route defined?
[17:27:48] gerep: tubbo, sure, doing that now
[17:28:02] dstarh: has joined #RubyOnRails
[17:28:07] scpike: tubbo: yea, that'd work to at least keep it all in one spot
[17:28:55] gerep: tubbo, it is 200 :( So it is working but I don't know where it is failing
[17:29:12] gerep: The variables @company and @app are set correctly
[17:29:34] gerep: I tested that functionality in the browser and it works
[17:29:35] choke: has joined #RubyOnRails
[17:30:22] gerep: tubbo, I updated the gist with another test failing but now with a routes problem: https://gist.github.com/gerep/652a2cfdc017dd21b664
[17:30:27] gerep: tubbo, can you take a look please?
[17:30:49] gerep: tubbo, ah! The :id is nil :(
[17:31:06] TheNet: has joined #RubyOnRails
[17:31:12] webguynow: has joined #RubyOnRails
[17:31:34] mary5030: has joined #RubyOnRails
[17:31:46] gerep: This transaction_cost = assigns(:transaction_cost) should assign transaction_costs, right?
[17:31:48] pwnd_nfsw: You never set id
[17:32:01] gerep: pwnd_nfsw, yes, that's another test, I'll add it to another gist
[17:32:11] strcmp1: has joined #RubyOnRails
[17:33:01] gerep: pwnd_nfsw, here: https://gist.github.com/gerep/f1c54c91862084fa9d10
[17:33:31] gerep: pwnd_nfsw, that test pass when I have just resources :transction_cost nested in resources :companies
[17:33:46] gerep: pwnd_nfsw, when I add resources :billings, it stop working
[17:33:52] mary5030: has joined #RubyOnRails
[17:34:36] gerep: updated the gist with my controller
[17:34:47] smathy: scpike, you can set that human name of a model in activerecord:models:lowercase-model-name eg. en: activerecord: models: foo: foo
[17:34:57] crystal77: has joined #RubyOnRails
[17:35:31] scpike: smathy: I don't think I want to do that. The style guide for my site is "Sentence case links/buttons", I don't want to use lowercase *everywhere* for model names
[17:36:13] smathy: scpike, right, this would impact labels, etc. too
[17:36:19] codenapper: has joined #RubyOnRails
[17:36:35] smathy: ...but other things like labels are easier (ie. possible) to transform in CSS
[17:37:55] TheNet: has joined #RubyOnRails
[17:38:20] gerep: pwnd_nfsw, it is a problem with my test, no doubt, I'll keep searching for it
[17:39:32] Scient: this is super weird... on one branch of my code controller "session" is backed by Rack SessionHash
[17:39:42] Scient: on another branch its ActionDispatch::Session
[17:39:53] Scient: difference is that the latter does not have a #store method
[17:41:05] kh0d: has joined #RubyOnRails
[17:41:09] mices: has joined #RubyOnRails
[17:41:22] mices: has joined #RubyOnRails
[17:43:22] d5sx43: has joined #RubyOnRails
[17:45:59] vickleton: has joined #RubyOnRails
[17:46:15] havenwood: has joined #RubyOnRails
[17:46:40] DmitryM: is it possible to log all response codes server by rails somehow?
[17:47:29] lwu_: has joined #RubyOnRails
[17:47:32] DmitryM: that might be too far "down" (or up). I want really basic performance logging to see how many 200s vs 300s vs 500s i get
[17:47:48] DmitryM: i wonder if i can look at newrelic gem or something like that to see how they do it
[17:49:02] TheNet: has joined #RubyOnRails
[17:50:44] dopamean_: has joined #RubyOnRails
[17:50:46] erichu: has joined #RubyOnRails
[17:51:05] EasyRider0: has joined #RubyOnRails
[17:51:06] siemprefresco: has joined #RubyOnRails
[17:51:24] arup_r: Hi. Why my Ajax call rendering the Jquery, instead of the my rendered HTML https://gist.github.com/aruprakshit/c09219b8b2df4aad0e59
[17:51:33] EasyRider0: Hi guys, Anyone knows how i can set a default value upon initializing an object based on associations? The problem is accessing the associations. I want the defaults to be set without persisting them: https://gist.github.com/milankubin/0ebef87e668a407e44d7
[17:51:37] tubbo: DmitryM: rails already logs all of its response codes. in its log
[17:52:13] DmitryM: tubbo: i know, but i'd like to send it off to a statsd server (https://github.com/Shopify/statsd-instrument)
[17:52:16] tubbo: DmitryM: "Completed 200 OK in <EXTREMELY EMBARRASINGLY SLOW RESPONSE>ms"
[17:53:22] arup_r: got it :)
[17:53:35] tubbo: DmitryM: i think you have access to the response object in an after_filter, maybe you can just send response.code off to statsd?
[17:53:40] arup_r: I need to change `dataType: "html"` to `dataType: "script"`
[17:53:41] mwlang: has joined #RubyOnRails
[17:53:46] DmitryM: thanks for the tip
[17:54:33] jenrzzz: has joined #RubyOnRails
[17:55:04] agent_white: has joined #RubyOnRails
[17:55:09] Scriptonaut: Hey guys, on my entire site, whenever I have a page with inputs, if I go to another page and then hit back, all of the inputs render twice (and then three, four, etc) times. Could this be related to turbolinks? Pretty stumped
[17:57:35] greengriminal: has joined #RubyOnRails
[17:57:57] chipotle: has joined #RubyOnRails
[17:58:13] mary5030_: has joined #RubyOnRails
[17:59:36] agent_white: has joined #RubyOnRails
[17:59:41] DmitryM: Scriptonaut: is your javascript rendering stuff without clearing the container for that stuff?
[18:00:51] marr: has joined #RubyOnRails
[18:01:16] n008f4g_: has joined #RubyOnRails
[18:01:41] hayricicek: has joined #RubyOnRails
[18:01:55] Scriptonaut: DmitryM: I figured it out, it was turbolinks afterall
[18:02:10] Scriptonaut: I had to change a selectpicker() call to only execute on page:load, rather than page:change
[18:05:21] d5sx43: has joined #RubyOnRails
[18:05:31] yaymukund: has joined #RubyOnRails
[18:05:32] maz-dev: has joined #RubyOnRails
[18:05:33] MrPunkin: has joined #RubyOnRails
[18:06:12] agent_white: has left #RubyOnRails: ()
[18:06:37] Scient: any of you ran into the issue of getting Forbidden responses when trying to delete/retry sidekiq jobs?
[18:06:40] agent_white: has joined #RubyOnRails
[18:08:24] polishdub: has joined #RubyOnRails
[18:08:42] webguynow: has joined #RubyOnRails
[18:09:08] dionysus69: has joined #RubyOnRails
[18:10:44] TheNet: has joined #RubyOnRails
[18:11:34] EasyRider0: nvm was doing it wrong
[18:12:59] MartinEl_: has joined #RubyOnRails
[18:13:26] laszlo: has joined #RubyOnRails
[18:14:40] TheNet: has joined #RubyOnRails
[18:15:16] pawnbox: has joined #RubyOnRails
[18:15:52] baweaver: has joined #RubyOnRails
[18:16:21] gerep: has joined #RubyOnRails
[18:20:12] chouhoul_: has joined #RubyOnRails
[18:20:25] kies^: has joined #RubyOnRails
[18:21:39] wildlander: has joined #RubyOnRails
[18:28:45] kidoz: has joined #RubyOnRails
[18:29:28] chipotle: has joined #RubyOnRails
[18:31:05] User458764: has joined #RubyOnRails
[18:31:26] Cervajz: has joined #RubyOnRails
[18:32:32] TheNet: has joined #RubyOnRails
[18:34:27] Cervajz_: has joined #RubyOnRails
[18:35:30] nickenchuggets: so uh, I think I need a front-end javascript... framework
[18:35:36] nickenchuggets: any preference among rails users?
[18:35:49] FailBit: jquery. :p
[18:36:32] nickenchuggets: I am using jquery
[18:36:37] Lightsword: has joined #RubyOnRails
[18:36:38] nickenchuggets: but, the frontend part is growing a bit
[18:36:43] nickenchuggets: quite a bit actually
[18:36:51] nickenchuggets: so my javascript file is getting massive
[18:37:04] nickenchuggets: I figure it might be a good time to look at angular, or backbone, or something similar
[18:37:29] bePolite: has joined #RubyOnRails
[18:37:38] Lightsword: has joined #RubyOnRails
[18:37:44] rakm: has joined #RubyOnRails
[18:38:15] hayricicek: has joined #RubyOnRails
[18:38:56] mices: is nginx better for rails than apache?
[18:39:35] baweaver: mices: !try
[18:39:35] helpa: mices: Why don't you try it and find out for yourself?
[18:39:56] baweaver: besides, better is subjective. It depends on a lot.
[18:40:05] noah256: has joined #RubyOnRails
[18:40:33] rromanch_: has joined #RubyOnRails
[18:40:59] jsvgoncalves: has joined #RubyOnRails
[18:41:08] TheNet: has joined #RubyOnRails
[18:41:29] mices: just looking for something more modular, less cryptic
[18:41:33] JoshL_: has joined #RubyOnRails
[18:41:34] mices: easier to config
[18:41:35] nickenchuggets: I think I might look at Angular
[18:41:41] mices: easier to troubleshoot
[18:41:56] mices: apache doesn't give you enough information sometimes
[18:41:58] nickenchuggets: well, Apache I think is more "complete"
[18:42:17] DLSteve: has joined #RubyOnRails
[18:42:25] baweaver: short answer: I use NginX
[18:42:25] mices: something's wrong here either i'm on the wrong os or the wrong www server
[18:42:32] sandstrom: has joined #RubyOnRails
[18:42:40] mices: what do we like in here ubuntu?
[18:42:46] nickenchuggets: I use Heroku, so, I don't really screw around with HTTP servers :)
[18:43:05] mices: i don't know what a cloud is
[18:44:04] baweaver: they didn't mention the cloud, so apparently something mismatched there.
[18:44:06] smathy: mices, they're both as easy to configure as each other.
[18:44:20] mices: heroku uses the cloud
[18:44:45] baweaver: in a vague disambiguation of the term, maybe, but that's shortsighted at best
[18:44:56] JoshL__: has joined #RubyOnRails
[18:45:05] Lytol: has joined #RubyOnRails
[18:45:10] arup_r: How to refactor this code ? https://gist.github.com/aruprakshit/d170b52726ca674adcec
[18:45:23] smathy: mices, you, more than anyone, should use heroku.
[18:45:33] tubbo: mices: have you ever tried heroku? it's pretty nice and painless. learn one thing at a time, you'll have plenty of time to learn how to set up servers.
[18:45:40] tubbo: (ops knowledge, fwiw, is a lot more valuable than rails knowledge)
[18:45:55] baweaver: arup_r: did you read it yourself?
[18:45:56] speakingcode: has left #RubyOnRails: ()
[18:46:07] tubbo: i can translate what i know about chef, devops and just regular sysadmin work to other jobs that aren't even using ruby anywhere else
[18:46:08] arup_r: baweaver: I just wrote the code..
[18:46:16] arup_r: But not able to figure out
[18:46:19] greengriminal: has joined #RubyOnRails
[18:46:31] mices: how long will it take me to learn enough to get a prod server up and running
[18:46:32] arup_r: but it is duplicating
[18:46:41] tubbo: arup_r: lol really dude?
[18:46:43] baweaver: arup_r: I don't believe you in this case.
[18:46:52] tubbo: arup_r: very funny, nice troll
[18:46:53] smathy: arup_r, both if and else are the same.
[18:47:27] arup_r: ahh sorry typo
[18:47:46] mices: so heroku stores some of it's system files on the web?
[18:47:52] mices: or it's executables?
[18:47:59] arup_r: sorry here is the correct one https://gist.github.com/aruprakshit/d170b52726ca674adcec
[18:48:00] smathy: mices, you're not making any sense.
[18:48:09] baweaver: mices: it's magic, don't worry about it.
[18:48:14] MartinEl_: has joined #RubyOnRails
[18:48:18] sandstrom: has joined #RubyOnRails
[18:48:22] arup_r: tubbo: Jquery ate my brain..
[18:48:24] baweaver: unless you're willing to spend some time learning ops knowledge
[18:48:44] baweaver: where's search_assets defined?
[18:48:46] sinkensabe: has joined #RubyOnRails
[18:48:51] baweaver: put a conditional in that, done
[18:49:02] smathy: mices, just use heroku, based on the time it's taking and your lack of knowledge, it's just not a good idea for you to set up a production server.
[18:49:06] arup_r: baweaver: search_asset and permitted_assets are both scope
[18:49:17] tubbo: arup_r: it's cool i've been therebefore
[18:49:31] arup_r: search_asset is from Gem https://github.com/Casecommons/pg_search
[18:49:32] unholycrab: has joined #RubyOnRails
[18:49:34] baweaver: then make them class methods (does the same thing) and put a conditional in there
[18:49:37] arup_r: baweaver: ^^
[18:49:52] arup_r: I can't change search_asset
[18:49:55] baweaver: make a method that wraps it that does the conditional
[18:50:23] arup_r: baweaver: Inside my model ?
[18:50:29] baweaver: class method
[18:50:41] mices: if i'm not expecting any significant traffic can i use webrick until i get another server worked out
[18:50:52] havenn: has joined #RubyOnRails
[18:51:08] mices: or will that make me totally vulnerable
[18:51:20] Guest34844: has joined #RubyOnRails
[18:51:56] tubbo: mices: not really. your site will be extremely slow, not being able to handle more than 1 http request at a time.
[18:52:00] smathy: mices, the fact that you're having anything to do with setting up a production server will make you totally vulnerable.
[18:52:01] baweaver: good luck, have fun.
[18:52:09] FailBit: smathy: kkek
[18:52:44] tubbo: mices: fwiw if you're using webrick *on* heroku, then no worries
[18:53:38] tubbo: mices: but no, you shouldn't run webrick bare on :80 or anythng
[18:53:46] FailBit: you can't in prod anyways
[18:53:51] baweaver: mices: https://devcenter.heroku.com/articles/rails4 - just use that
[18:54:17] mices: you can start it at the command line: rails server -e production
[18:54:41] smathy: mices, use heroku.
[18:54:43] mices: maybe it's semi secure in production env
[18:54:49] jenrzzz: has joined #RubyOnRails
[18:54:53] tubbo: mices: well, there's no maybe here. it's code.
[18:55:08] User458764: has joined #RubyOnRails
[18:55:09] tubbo: mices: it's no more secure in production than it is in development. security is also not your problem here.
[18:55:22] smathy: mices, there is WAYYYY too much that you don't know for you to be doing this yourself, use heroku.
[18:55:23] n00bDev: has joined #RubyOnRails
[18:55:25] nettoweb: has joined #RubyOnRails
[18:56:09] mices: oh ok i see, it works with rails i thought it was a rails competitor
[18:56:23] smathy: mices, nope, it's a hosting platform.
[18:56:41] idd2d: has joined #RubyOnRails
[18:57:00] mices: to replace (in my case) freebsd?
[18:57:17] smathy: mices, to replace every part of your production hosting requirements.
[18:57:23] FailBit: Heroku is a PaaS
[18:57:33] FailBit: it offers you a way to run a rails app without renting a server
[18:57:49] manfrin: has joined #RubyOnRails
[18:58:07] FailBit: well, without having to worry about setting up a production server
[18:58:18] FailBit: (I mean technically the cloud is just someone else's computer)
[18:58:24] mices: handles mail too?
[18:58:49] tubbo: mices: doesn't handle mail, but connects with services that allow you to handle mail (like sendgrid)
[18:59:10] mices: i have to run mail server
[18:59:25] smathy: mices, you just sign up to heroku, install the heroku tools, push your code to github, and run a command and your app is live.
[18:59:29] tubbo: mices: well you don't *have* to, you *could* use a service to send and receive mail.
[19:00:05] tubbo: mices: in fact i would argue avoiding running a mail server (smtp or imap?) as much as possible, due to the bullshit spam detection
[19:00:18] tubbo: mices: if you can't figure out apache you'll never be able to figure out DKIM auth.
[19:00:32] smathy: ...or iptables
[19:01:16] mices: i think i might have figured out that apache24 freebsd10.1 and rails don't work together
[19:01:16] FailBit: heh, heroku's pricing doesn't quite compete with renting a VPS
[19:01:39] smathy: mices, wrong, they work perfectly well together.
[19:01:46] FailBit: mices: I would use nginx, and yes they work fine
[19:02:11] universa1: has joined #RubyOnRails
[19:02:12] larissa: has joined #RubyOnRails
[19:02:15] sfr^: has joined #RubyOnRails
[19:02:25] mices: smathy: so then wut's wrong with my config
[19:02:26] momomomomo: has joined #RubyOnRails
[19:02:29] sleungcy: has joined #RubyOnRails
[19:02:49] laszlo: has joined #RubyOnRails
[19:03:02] brendan-: has joined #RubyOnRails
[19:03:02] FailBit: your problem is that you're getting way ahead of yourself
[19:03:07] mices: apache didn't even tell me i neede fastcgi i found that out googling
[19:03:14] sleungcy: Is it okay to set I18n.locale to another language from a controller? Is this a system wide change? I only want a different language for that specific request.
[19:03:17] mices: but installing the module didn't help
[19:03:29] smathy: mices, I can't help you because you don't listen, get distracted too easily, and go off and focus on irrelevant things. I'm also sick of talking about server setup in this channel because this channel is really about Rails the framework, not how to set up a server.
[19:03:31] tubbo: mices: you don't need fastcgi if you use passenger, iirc
[19:03:47] elaptics: tubbo: you remember correctly
[19:03:57] smathy: tubbo, you don't.
[19:04:08] meoblast001: has joined #RubyOnRails
[19:04:12] tubbo: mices: also, i have successfully deployed a rails app on freebsd 10.1 with apache 2 and rails.
[19:04:13] smathy: ...not to mention what the hell does "apache didn't even tell me..." mean?
[19:04:31] yfeldblum: has joined #RubyOnRails
[19:05:35] tubbo: mices: there could be a million things wrong, my suggestion would be to either go to the proper channels (#passenger or #apache) to get your own server running, *or* just say screw it and use heroku.
[19:05:40] tubbo: it all kinda depends what you want to learn right now
[19:05:45] smathy: sleungcy, you should do it for every request.
[19:05:59] HAL2328: has joined #RubyOnRails
[19:06:13] smathy: sleungcy, "system wide" doesn't really have a meaning, it will be set for the entire process.
[19:07:13] smathy: sleungcy, this will probably be both a wider and narrower context than you expect (in different situations)
[19:07:23] smathy: sleungcy, hence, set it on every request.
[19:07:34] sleungcy: So if another request come in without a defining in the params, will it use the default languauge? Or the one requested by the previous user?
[19:07:46] smathy: sleungcy, depends which process handles that request.
[19:07:58] jaequery: has joined #RubyOnRails
[19:08:01] smathy: sleungcy, if the same process, then the previous locale will be used.
[19:08:13] smathy: sleungcy, hence the "wider context"
[19:08:24] toretore: has joined #RubyOnRails
[19:08:41] Pupeno: has joined #RubyOnRails
[19:08:50] smathy: sleungcy, then if the person whose request actually set that locale gets served by a different process on their next request then they won't get the locale that was set for them, hence the "narrower context"
[19:09:18] mices: i get the feeling like i'm the only one in here using freebsd for rails
[19:09:30] d08z: has joined #RubyOnRails
[19:09:34] mices: i'm married to rails now, not freebsd
[19:09:39] rromanch_: has joined #RubyOnRails
[19:11:29] tubbo: mices: the OS is not the problem here.
[19:11:48] tubbo: mices: even if you switched to ubuntu, you'd probably have the same or similar issues
[19:11:59] mices: could it be the apache version?
[19:12:05] smathy: mices, no, it's you!
[19:12:07] chipotle: has joined #RubyOnRails
[19:12:13] smathy: mices, use heroku,
[19:12:15] smathy: stop talking about this.
[19:12:17] smathy: It's been days now.
[19:12:52] mices: you want me to stop hosting my own site on my server and host it on a machine somewhere else just because i'm stuck on this one bug?
[19:12:53] ror15: has joined #RubyOnRails
[19:12:57] d08z: has left #RubyOnRails: ()
[19:13:03] FailBit: no, because you're clueless
[19:13:05] bricker: nobody is saying that
[19:13:11] rromanch_: has joined #RubyOnRails
[19:13:28] smathy: mices, actually I don't care. I just want you to stop filling up this Rails channel with unrelated conversation about a server setup that my 11 year old son worked out in one day.
[19:13:44] smathy: mices, I was generously offering you a suggestion of heroku so you can get your app up and running.
[19:13:53] smathy: mices, but do what you please, just stop talking about it here.
[19:14:01] rhizome: i use passenger in apache on freebsd. have been for years.
[19:14:05] dobs: has joined #RubyOnRails
[19:14:10] arup_r: I am searching my Asset model using asset name or user (first and last name). i m using https://github.com/Casecommons/pg_search gem.. but it is not working when doing https://gist.github.com/aruprakshit/bf2ddc36b4f2c79b26f5
[19:14:11] dobs: does anyone know why i keep getting a warning message "Warning: Running `gem pristine --all` to regenerate your installed gemspecs" each time i start the rails server or the rails console? (YES i DID run the command and YES i did go on stackoverflow before and read each threads twice)
[19:14:22] mices: smathy: which apache version?
[19:14:31] smathy: Sometimes my cat walks across my keyboard and accidentally sets up passenger.
[19:14:40] mices: i hear you
[19:14:57] djbkd: has joined #RubyOnRails
[19:14:59] mary5030: has joined #RubyOnRails
[19:15:03] mices: it's one click config
[19:15:15] mices: but something's wrong on my machine
[19:15:19] smathy: mices, 2.0, 2.2, 2.4.
[19:15:52] smathy: mices, yes there is something wrong. So, go elsewhere and work out what that is.
[19:16:01] smathy: mices, if you have a Rails question then we'd love to hear it.
[19:16:16] sandstrom: has joined #RubyOnRails
[19:16:20] tubbo: dobs: you're running Spring?
[19:16:38] dobs: tubbo: not sure .. "default" rails installation ...
[19:16:45] mices: no response today in passenger
[19:16:46] tubbo: dobs: then yes. happens to me, too.
[19:16:52] smathy: mices, not our problem.
[19:16:54] tubbo: mices: ask on stackoverflow.
[19:16:59] mices: my apache server is working
[19:17:01] dobs: tubbo: how did you get rid of it?
[19:17:07] mices: just when i add the vhost it fails
[19:17:21] Lytol: has joined #RubyOnRails
[19:17:23] tubbo: dobs: don't believe i did. :)
[19:17:33] smathy: mices, last warning, no more talk about your apache/nginx/passenger/OS setup issues.
[19:17:44] dobs: tubbo: are you telling me ive been busting my a** for 4 hours for nothing? :)
[19:17:52] chills42: has joined #RubyOnRails
[19:18:06] tubbo: dobs: you spent 4 hours on a warning that had no functional issue? :P
[19:18:18] tubbo: i mean it's a warning, not a fatal error...
[19:18:21] dobs: well ...
[19:18:39] dobs: how am i supposed to know that :(
[19:18:52] arup_r: any thought ?
[19:18:55] tubbo: dobs: because 1.) it didn't crash your server, and 2.) THE MESSAGE BEGINS WITH WARNING.
[19:19:21] Axilla: has joined #RubyOnRails
[19:19:22] dobs: i thought ... well.. "warning" ... ok nevermind :)
[19:19:30] smathy: dobs, c'mon, you even said it in your question: "why i keep getting a warning message" :)
[19:19:39] tubbo: dobs: lol it's cool i was just being unnecessarily intense
[19:19:53] mehwork: are most companies that use rails still happy with rails or are they trying to move to node?
[19:19:57] dobs: so there is no "solution" to my ""problem"" ?
[19:20:42] tubbo: dobs: there is...like you can run that `gem pristine` command and the warning will go away, but it gave me segfaults...
[19:20:48] tubbo: mehwork: yes.
[19:21:03] FailBit: mehwork: yes
[19:21:11] dobs: well i did run it and everything runs perfectly but i keep getting the warning
[19:21:12] tubbo: mehwork: the real answer is, there are companies happy with rails and there are companies that have moved stacks for whatever reason.
[19:21:13] smathy: mehwork, yes.
[19:21:23] tubbo: i work for one who is quite happy with rails
[19:21:33] tubbo: that being said, we have a lot of problems with rails
[19:21:34] mehwork: tubbo: makes sense
[19:21:36] dobs: anyway thanks for your time
[19:21:37] smathy: dobs, the SO answers speak about deleting gemsets and various other fixes.
[19:21:40] chouhoulis: has joined #RubyOnRails
[19:21:46] smathy: dobs, try those if you want.
[19:21:48] tubbo: but imho it's better that we figure out those problems and go back to rails/rails with them, than just use a different stack and have to re-solve a bunch of BS problems.
[19:21:51] mehwork: tubbo: what's the main problem with rails that node can fix?
[19:22:14] tubbo: mehwork: node and rails are incomparable. they do not "sit on the same level" of the stack.
[19:22:37] mehwork: tubbo: they kind of do if you're talking about ExpressJS don't they?
[19:22:40] tubbo: mehwork: kinda like comparing MS SQL Server to Apple's Pages.app
[19:22:50] tubbo: mehwork: well now that's totally different isn't it :)
[19:22:52] Pupeno: has joined #RubyOnRails
[19:22:54] smathy: Heh, they're closer than that tubbo
[19:22:55] tubbo: ExpressJS, now that's a framework.
[19:23:00] Lytol: has joined #RubyOnRails
[19:23:08] tubbo: rails is a framework
[19:23:12] mehwork: which is the only reason a company would move from rails to node
[19:23:13] smathy: node.js is more like Ruby's stdlib
[19:23:14] tubbo: i like to think of node.js as "a stdlib for javascript"
[19:23:23] tubbo: mehwork: that's not the *only* reason
[19:23:34] smathy: ...still closer than MSSQL and Pages :)
[19:23:36] mehwork: only reason i can think of anyway
[19:23:47] chipotle: has joined #RubyOnRails
[19:24:03] tubbo: mehwork: node has a lot of other things going for it, but you still have to write JS all day, and i've had a lot of trouble programming JS "in the large"
[19:24:51] mehwork: i think the only 'good' reason i've heard for moving to a web stack completely to node is that the entire thing is javascript, rather than 2 diff languages
[19:24:54] mehwork: if that's even a good reason
[19:25:02] mehwork: seems like more of a good reason to start a new project
[19:25:11] mehwork: than to port
[19:25:18] tubbo: mehwork: true, but it's the same language on top of N interpreters.
[19:25:27] tubbo: which is not "just one language"
[19:25:34] tubbo: the devil is in the details
[19:25:44] smathy: mehwork, server side and client side have very little cross over anyway.
[19:26:02] mehwork: i do like npm more than i liked dealing with gems, but that's a package management issue which most languages have
[19:26:13] tubbo: mehwork: companies that claim they are a "<language> shop" are destined for a shit-nado. you have to use the right tool for the job, even if it's not ruby :P
[19:26:32] smathy: mehwork, and the skills a dev team has to do some jquery here and there, don't necessarily translate to a full server-side stack.
[19:26:44] mehwork: but how do you convince someone to use rails over express, today?
[19:26:57] mehwork: not saying it can't be done, i'm genuinely curious
[19:27:02] tubbo: i've had a LOT less problems with my paths in NPM than with RubyGems
[19:27:13] smathy: Why would I want to convince someone of which tool they should use?
[19:27:23] mehwork: smathy: because it's your job, say
[19:27:28] FailBit: they should pick the right tool for the job
[19:27:46] tubbo: mehwork: i tell them "hey, you want to work for my company? we mostly make rails apps for fashion clients. you get paid." and they say "ok"
[19:27:53] smathy: mehwork, explain the job. You either are the decision maker or you're not.
[19:28:14] mehwork: hypotheticals should be enough for my question, though
[19:28:24] smathy: mehwork, ok, so explain the hypothetical.
[19:28:47] tubbo: i found rails one day and fell in love with how easy it made what i was doing. additionally, i had designed a kind-of MVC architecture for my PHP apps years before and Rails, to me, was taking "the good parts of my design" and making them even better, discarding the BS.
[19:29:08] mehwork: hypothetically, a company wants to move to node/express.js because they have a lot of tech debt with their rails usage. My job is to convince them that they will have the same tech debt, if not more, in the process of porting an existing app
[19:29:13] mehwork: or to explain why it's worth doing it. Pros and Cons
[19:29:22] smathy: mehwork, there's no professional situation I can think of where I'd be trying to justify a technical choice like this. I'm either not that decision maker (in which case I decide whether I want to work there or not) or I am the decision maker (in which case I pick whatever tool I want for my team to use for the problem at hand).
[19:29:35] tubbo: mehwork: why would you ever want to rewrite anything? just let it die.
[19:29:42] cornerma1: has joined #RubyOnRails
[19:29:52] arup_r: Any one would tell me why my pg_search not working with belongs_to assoc ? :(
[19:30:12] mehwork: tubbo: because it's a revenue generating app, that needs to live for many years
[19:30:27] smathy: mehwork, so you're what? A consultant that the company hired to inform their choice?
[19:30:28] tubbo: mehwork: so refactor the rails app. why change stacks?
[19:30:37] mehwork: smathy: sure
[19:30:56] smathy: mehwork, then just bullshit them, that's what consultants like that do. You don't have to worry because you won't be implementing it.
[19:31:05] tubbo: yeah we do that :P
[19:31:09] mehwork: tubbo: they want to change stacks so that everyone is using javascript, and because node seems more popular with hiring new engineers
[19:31:20] tubbo: remember how i said "don't rewrite anything"? turns out rewriting apps from coldfusion -> rails is super profitable :P
[19:31:34] mehwork: smathy: no, i'll also be implementing it and helping lead them in it
[19:31:35] smathy: mehwork, "they" and "the company" is hiding important details. Who is making this decision?
[19:31:35] tubbo: mehwork: decent reason.
[19:32:21] Maletor: has joined #RubyOnRails
[19:32:29] tubbo: mehwork: you are also making a choice here. what's the TOP inspiration behind the decision? just to be able to have the pick of the litter in terms of programmers?
[19:32:33] mehwork: i think it's a dumb reason, personally. It just brings in inexerpienced people who know less languages, and on a less mature framework.
[19:32:41] tubbo: if that's the case you have two choices: Java and PHP. .NET gets an honorable mention.
[19:33:11] mehwork: i would pick django before java or php
[19:33:13] smathy: "the litter" is right.
[19:33:32] mehwork: it really does come down to opinions, not objective facts for the most part
[19:33:52] smathy: Only if you don't know enough.
[19:33:58] idd2d: has joined #RubyOnRails
[19:33:58] mehwork: there is no way to know up front if it will be worth ti
[19:34:09] baweaver: has joined #RubyOnRails
[19:34:13] mehwork: the existing developers will now have to become experts in node, to help port it
[19:34:16] tubbo: mehwork: i know 2x more PHP devs than Python, Ruby and Node devs *combined*.
[19:34:28] tubbo: mehwork: so if your main goal is to be able to hire easily, then use PHP. definitely PHP.
[19:34:36] smathy: tubbo, if only programming was about #s of devs.
[19:34:41] Linuus: has joined #RubyOnRails
[19:34:50] tubbo: yeah that's the issue, you have a lot more devs but they're a lot shittier
[19:34:51] mehwork: that's because everyone and their grandma can write some php, but very few will do it in a quality fashion similar to rails, django or node express communities
[19:34:52] baweaver: what fresh hell is this?
[19:35:16] tubbo: mehwork: i just taught two non-programmers how to code in ruby and they're doing billable work now. tell me again how hard ruby is. ;)
[19:35:16] smathy: When I tool over at Amco it was all PHP, I replaced 10 PHP devs with 2 Rails devs.
[19:35:28] tubbo: it's all about how you learn and what you learn
[19:35:40] siddart_: has joined #RubyOnRails
[19:35:42] smathy: ...and the environment/teacher.
[19:35:50] tubbo: the reason why everyone can write PHP is because we all learned how to do it, and it was the *only* choice for a long time.
[19:35:53] mehwork: ruby isn't hard, it's just a better community (they write tests, framework is better than php framework equivalents)
[19:36:14] smathy: Actually, the PHP frameworks are decent. It's the language that blows.
[19:36:24] mehwork: anyway we can change the subject. I don't think there is a right answer to this question
[19:36:32] tubbo: there are amazing test frameworks for JS as well. why can't you apply what the rails community has taught you to a different paradigm?
[19:36:56] mehwork: tubbo: you can, i was refering to php
[19:37:02] smathy: I'm still not even sure what the question was.
[19:37:17] tubbo: but php can be written in a way that isn't BS, right?
[19:37:26] tubbo: most people just don't do it
[19:37:36] smathy: We did a project in node at Amco, it was the right tool for that project and it went very well.
[19:38:06] bricker: what a great story smathy, thanks for sharing.
[19:38:14] smathy: ...it was no better/worse than Rails for the fact that we were using JS in both server and client.
[19:38:18] bricker: it had everything: a beginning, a middle, and an end.
[19:38:29] tubbo: "A story about things working out just fine."
[19:38:36] smathy: bricker, you can tell how I still don't really understand the question :)
[19:38:39] rushed: has joined #RubyOnRails
[19:38:49] smathy: Talking about node vs Rails to me is like talking about hammer vs saw.
[19:38:53] tubbo: no isomorphism smathy?
[19:39:01] bricker: smathy: I don't know what question you're talking about but I trust you
[19:39:14] smathy: "What would you say to a builder to get him to switch from using a hammer to using a saw?"
[19:39:15] bricker: omg node vs rails whyyyyyyyyyyyyyyy
[19:39:42] bricker: please move the discussion to #BoringConversations
[19:39:43] smathy: tubbo, from client to server?
[19:39:51] smathy: ...or node <-> ruby?
[19:40:02] tubbo: smathy: from client to server
[19:40:13] tubbo: like running the same JS code in both places
[19:40:14] bricker: #BoringConversationsFrom2012
[19:40:18] mices: puma then
[19:40:37] smathy: tubbo, very little. We had actually tried to reuse the same models on server and client - but it just became pointless because of the sort of things you wanted to do at each point.
[19:40:45] smathy: +b *!~mices@unaffiliated/mices
[19:40:46] diegoviola: I've applied for a company but they want me to complete some coding challenges in codility, but man, those exercises are tough... they're nothing like I usually have to solve when I work with a rails app
[19:40:47] smathy: smathy kicked mices: enough now.
[19:40:47] smathy: -o smathy
[19:40:56] kadoppe: has joined #RubyOnRails
[19:41:13] smathy: (he was warned previously)
[19:41:38] tubbo: smathy: yeah that's the general consensus it seems
[19:41:59] tubbo: meaning...it actually is *worse* if you use JS on the server, because typically the backend cannot be modeled in a prototypal style
[19:42:01] dopamean_: has joined #RubyOnRails
[19:42:03] tubbo: or it can, but it sucks to do that.
[19:42:29] smathy: tubbo, right, you really want more functional code on the backend
[19:42:44] diegoviola: do you guys have any experience with codility?
[19:42:49] tubbo: i suppose
[19:42:57] tubbo: TBH i've never tried coding a backend in a non-classical OOP language
[19:43:07] tubbo: i can't even think of where i would start
[19:43:16] capin: damn i was going to try and point mices in the right direction with using puma :/
[19:43:27] FailBit: don't bother
[19:43:27] arup_r: any idea ? :)
[19:43:33] smathy: tubbo, funny actually, Trailblazer (and friends) remind me a lot of how our JS ended up on the server.
[19:43:39] FailBit: mices doesn't know 2 things about what he's really doing
[19:43:51] smathy: I hadn't really thought about applying those lessons to Ruby.
[19:43:54] kh0d: has joined #RubyOnRails
[19:43:59] maz-dev: has joined #RubyOnRails
[19:44:02] tubbo: smathy: what do you mean?
[19:44:17] maz-dev: has joined #RubyOnRails
[19:44:25] baweaver: I've started contributing to it, at least cleaning up specs and docs for now.
[19:44:44] capin: well i remember when i was learning, and it was nice when people helped, i suprised no one suggested he check the apache logs :l
[19:44:46] smathy: tubbo, well, the style of using operations to capture domain functions. When you have no "MVC" framework like Rails, that ended up being how we wrote our node backend.
[19:44:57] tubbo: smathy: oh good point, yeah
[19:45:13] smathy: tubbo, and everything's very much input > function > output
[19:45:21] tubbo: smathy: been thinking about experimenting with that kind of thing on AWS Lambda.
[19:45:23] smathy: ...which is how a Trb::Operation is too.
[19:46:01] smathy: arup_r, sorry, not ignoring you, but no clue about that pg tool.
[19:46:02] tubbo: i feel like Lambda, S3 and CloudFront is one of the cheapest ways to run a scalable, sophisticated web app
[19:46:33] baweaver: cheapest, no. Fastest, probably.
[19:46:35] arup_r: Yes, I am also not able to manage it.. No idea how it work with belongs_to
[19:46:50] smathy: tubbo, yeah, probably.
[19:47:05] Axilla: man, intercom is the coolest shit since sliced bread
[19:47:26] Axilla: we're moving to intercom and away from Olark, Highrise, Campaign Monitor, and on and on
[19:47:43] chills42: has joined #RubyOnRails
[19:47:43] Axilla: and this shit is so freaking awesome.. i'd ahve to say it might be one of the best made apps i've used in a very very long time.
[19:48:23] Axilla: tubbo: i completely agree w/ that.
[19:48:38] smathy: tubbo, Lambda is all async right?
[19:48:40] baweaver: I've seen the prices, so I'd argue the cheapest part.
[19:49:06] baweaver: though depends if you're solely talking monetary cheapness or including cheapness of ops effort in there.
[19:49:23] smathy: axilla, yeah, we're using intercom too. Happy with it so far.
[19:49:44] mehwork: what's better about it?
[19:49:55] tubbo: baweaver: both, because they both eventually boil down to dollar amounts.
[19:49:59] bePolite: has joined #RubyOnRails
[19:50:13] mehwork: everyone has the same webpage on their .io domain, makes it hard to know what's actually good underneath the surface
[19:50:19] smathy: baweaver, looking at the price - it seems cheap, monetarily, to me too.
[19:50:20] MrPunkin: has joined #RubyOnRails
[19:50:32] tubbo: well with lambda you can run a function on the server-side without actually having to set up a server.
[19:50:39] baweaver: It's cheaper to in-house, only on terms of surface price.
[19:50:44] Axilla: smathy: i'm just digging in, but the intercom team was pretty awesome as we have some pretty strict security demands, setup has been a breeze, and now getting all the custom attributes and client shit in there.. been playing with messaging and i'm just shocked at the experience for our users.. When I was testing a bunch of these I soley interacted with their teams via their apps and intercom hands down
[19:50:45] tubbo: and of course S3/CloudFront will be the CDN front-end side of things
[19:50:49] baweaver: ops costs though, definitely.
[19:50:50] Axilla: is the best experience as a user imo.
[19:51:13] baweaver: We use EC2 heavily here.
[19:51:15] smathy: axilla, yeah, same experience here.
[19:51:28] chills42_: has joined #RubyOnRails
[19:51:31] tubbo: because you have no control over the server, AWS handles all the scaling for you, automatically.
[19:51:33] gerep: Why am I'm being redirect in this test? https://gist.github.com/gerep/912e84a7455d0561e410
[19:51:59] gerep: It is not a permission problem, the billing is created, the response.body is showing a redirect message
[19:52:00] tubbo: so you don't need to set up auto-scaling EC2 groups, you just upload a bunch of node.js code to Lambda, give it HTTP endpoints and call said endpoints from the client-side app.
[19:52:29] tubbo: gerep: Rack::Test does not follow redirects, not sure if you can configure it to though.
[19:52:31] Axilla: smathy: what all are yall using? Any cool tips to pass along? We're signed up for Acquire, Engage, and Learn and we're sticking with Groove for support + knowledgebase and integrating via Zapier.
[19:52:33] tubbo: which is what you're using
[19:52:51] gerep: tubbo, but I'm not redirecting
[19:53:03] mehwork: lambda looks dumb to me because you don't have any control over how they're doing things, and it requires you to run outdated versions of software
[19:53:28] smathy: gerep, respond_with will redirect on successful create.
[19:53:29] mehwork: i guess it might be ok if you don't have any dependencies
[19:53:31] tubbo: gerep: create will redirect by default to your show action
[19:53:40] tubbo: yeah, when its successful :)
[19:53:44] tubbo: mehwork: outdated?
[19:53:49] smathy: gerep, so that a refresh won't create the same record again.
[19:53:59] tubbo: mehwork: what's outdated in lambda (haven't actually looked too deep into it)?
[19:54:03] mehwork: tubbo: https://docs.aws.amazon.com/lambda/latest/dg/current-supported-versions.html
[19:54:23] gerep: smathy and tubbo got it =)
[19:54:26] badfish129: has joined #RubyOnRails
[19:54:45] gerep: smathy, so how can I make that assert_match work?
[19:54:50] sonofdirt: has joined #RubyOnRails
[19:54:55] badfish129: whats the best way to verify that a rails schema.rb matches the actual schema in a mysql instance
[19:55:02] smathy: mehwork, yes, the trade-off for any computer/platform service is that you don't have (or want/need/care about) control over the underlying architecture.
[19:55:08] manfrin: has joined #RubyOnRails
[19:55:10] tubbo: mehwork: interesting. i suppose they're on linux kernel 3.x because it's LTS at this point, not as susceptible to bugs.
[19:55:20] mehwork: i also imagine that being forced to use an AMI would make dockerizing hard
[19:55:22] tubbo: mehwork: the node thing is not surprising since the new version was *just* released this week
[19:55:26] smathy: gerep, you can't, you can only assert on the response itself. You want an integration test if you want to follow redirects.
[19:55:42] tubbo: mehwork: you don't need to "dockerize" anything in this case, all you need to do is write the JS code. period.
[19:55:45] smathy: gerep, the place to test for the existence of text on the show page is the show test.
[19:56:01] tubbo: you can write the code locally, test it locally, and then upload it to Lambda to run it in the real world.
[19:56:08] mehwork: tubbo: writing code that you upload to a server, sounds like ftp days
[19:56:09] gerep: smathy, which would be an integration test?
[19:56:22] jaequery: has joined #RubyOnRails
[19:56:25] tubbo: mehwork: yeah because that's not how we do things anymore or anything :rolleyes:
[19:56:30] tubbo: how does the code get to the server? :P
[19:56:31] smathy: badfish129, run rake db:schema:dump and see if the file changes?
[19:56:40] mehwork: tubbo: i mean the way lambda wants you to upload
[19:57:03] hahuang65: has joined #RubyOnRails
[19:57:05] tubbo: it's all part of an API though
[19:57:14] tubbo: theoretically you could write something automated to get the code up there.
[19:57:22] mehwork: just seems scary to have to rely on aws support when things go wrong
[19:57:25] gerep: smathy, I have updated the gist with another controller and another test that are basically doing the same thing: https://gist.github.com/gerep/912e84a7455d0561e410
[19:57:30] diegoviola: do you guys have any experience with codility?
[19:57:39] smathy: diegoviola, sorry, never heard of it.
[19:57:52] gerep: smathy, and it is working
[19:58:20] mary5030: has joined #RubyOnRails
[19:58:29] smathy: gerep, when the from and to are equal then it's an error scenario?
[19:58:37] tubbo: mehwork: but for small stuff, like let's say i wanted to make a little wiki that only has a couple actions: create page, edit page, log in, log out...it would be annoying to have to set up a whole VPS that runs all the time and costs money while it's running, it's much easier/cheaper to only run the code when you actually need to run it.
[19:58:47] tubbo: mehwork: and i think that's what Lambda is designed for.
[19:59:27] mehwork: tubbo: i guess, but you went from it was awesome for scaling and all you need, to just good for some unimportant small stuff hehe
[19:59:46] FailBit: you can get free VPSs from koding
[19:59:52] FailBit: https://koding.com
[20:00:05] FailBit: full root access, etc
[20:00:12] FailBit: I've destroyed a couple, lol
[20:00:26] mehwork: tubbo: netflix's use case for lambda seems good
[20:00:38] diegoviola: there's a client that wants to hire me, they have a rails app and they want me to implement some features, etc, I said I charge by the hour and they're asking me to charge them by the work instead... but I don't know how much time it'll take me to complete the work they want, I also don't know how to charge by features... any ideas?
[20:00:57] diegoviola: I'm thinking about charging for two weeks of my time and finish the work they want in that timeframe, is that reasonable?
[20:01:09] rakm: has joined #RubyOnRails
[20:01:11] mehwork: diegoviola: always charge by measurable time.
[20:01:21] diegoviola: mehwork: how? can you give examples?
[20:01:22] shinnya: has joined #RubyOnRails
[20:01:29] Linuus: has joined #RubyOnRails
[20:01:32] mehwork: keep a time daily time card
[20:01:37] smathy: mehwork, netflix's use case seems good? But what about the old versions and lack of control that you harpooned Lambda for at the start?
[20:01:38] workmad3: diegoviola: depends on how the contract is written... avoid fixed-price contracts
[20:01:42] siemprefresco: has joined #RubyOnRails
[20:01:45] gerep: smathy, yes, error scenario, got it :D
[20:01:47] mehwork: if you work 8 hours today, i would expect to be paid for it within 2 weeks
[20:01:50] gerep: smathy, it is not redirect
[20:01:54] smathy: gerep, bingo :)
[20:02:06] gerep: smathy, thanks a lot for your help, learned some important bits today :D
[20:02:11] diegoviola: mehwork: paid by the hour?
[20:02:17] smathy: gerep, you're welcome.
[20:02:31] gerep: smathy, one last thing, this kind of assertion I'm trying to do is a integration test?
[20:02:38] diegoviola: mehwork: I already said I charge by the hour but they mentioned if I can quote them a price for the tasks they sent me instead
[20:02:49] mehwork: diegoviola: hours are the best chunks of time to get paid in. If they have scope creep and say they also need you to tack on some new features, you'll be able to tack those on as billable hours
[20:03:19] mehwork: diegoviola: it's the same thing
[20:03:33] slash_nick: diegoviola: getting paid by the job can pay off pretty big. i had a contract once where i produced two estimates (one minimum, one maximum), took the average of the two, and that's what i charged.
[20:03:33] diegoviola: mehwork: they want me to translate their site to English and add some sort of authentication
[20:03:34] mehwork: diegoviola: in order for you to figure out how to charge by a task, you have to estimate how many hours it will take you
[20:03:46] diegoviola: mehwork: but I don't know how big their app is, if I'm going to run into issues, etc
[20:03:49] workmad3: diegoviola: I'd probably just tell the client that you only do hourly-charged contracts... I'd posit that it's better to lose the work over that than get into the fixed-price or piecework style contract game
[20:04:01] smathy: diegoviola, that's not at all unusual - wanting a fixed price.
[20:04:03] arup_r: smathy: any alternative to pg_search ? :) I want to search a table and its associated tables. what is the next gem ?
[20:04:09] workmad3: diegoviola: and all of those reasons are why you just tell the client you're not willing to do a fixed price contract ;)
[20:04:14] rushed: diegoviola: especially considering your history w/ clients~
[20:04:16] mehwork: slash_nick: true, if he can somehow decide up front that the entire job would be 20k, vs his hourly rate which ends up only 10k or something
[20:04:19] smathy: diegoviola, you will need to analyze the app and spec it out a bit so you can give them a quote.
[20:04:34] baweaver: It's called ActiveRecord, and it's built in, no gems required.
[20:04:36] diegoviola: rushed: what do you mean my history with clients?
[20:04:37] mehwork: but in those jobs, the contract will usually have room for a lot of scope creep and post production support
[20:04:50] workmad3: baweaver: err... ActiveRecord is a gem...
[20:05:03] slash_nick: ACTION punches scope creeps in the face
[20:05:06] baweaver: no _extra_ gems required, but you know what I meant
[20:05:13] smathy: diegoviola, I always negotiate to be paid by the hour to do that step, but I give them a cap - like 10 hours or something.
[20:05:15] rushed: diegoviola: based on your statements here in the past you have bad, lets call it luck?
[20:05:23] diegoviola: rushed: indeed
[20:05:32] mehwork: diegoviola: i'd just do whatever feels right to you, since you know more about the situation than we do
[20:05:49] smathy: arup_r, no idea, is it full text search that you're looking for?
[20:05:53] _orangejuice: has joined #RubyOnRails
[20:06:00] iamse7en: has joined #RubyOnRails
[20:06:00] rushed: diegoviola: or do the opposite of what feels right since you keep getting into quagmires~
[20:06:09] mehwork: if they pay you per task, then estimate tasks in days and raise your hourly rate behind the scenes to make up for it
[20:06:15] HAL2328: has left #RubyOnRails: ("Leaving")
[20:06:32] mehwork: this is why i can't do freelance anymore
[20:06:35] sininen: has joined #RubyOnRails
[20:06:36] workmad3: rushed: haha
[20:06:38] arup_r: cuurently name of the asset model and first and last name of the it belongs+to assoc Usser model
[20:06:40] smathy: ACTION prefers fixed price actually
[20:06:51] davidheward: has joined #RubyOnRails
[20:07:03] diegoviola: I think the best thing to do is I'll do the work and I'll request payment later, but that's risky
[20:07:15] smathy: arup_r, doesn't sound like something you need anything other than the AR finders for.
[20:07:15] workmad3: diegoviola: no... that is not the best thing to do
[20:07:30] smathy: diegoviola, that's actually the worst thing to do.
[20:07:30] workmad3: diegoviola: always make sure you have a contract before you start work
[20:07:32] slash_nick: that's a terrible idea...
[20:07:45] mehwork: diegoviola: that's a good way to never get paid
[20:07:46] smathy: diegoviola, well, worst thing besides paying THEM to do the work.
[20:08:04] smathy: ACTION never has a contract
[20:08:13] mehwork: 'we went bankrupt, sorry.'
[20:08:24] smathy: "We're not paying you, sue us!"
[20:08:40] smathy: If you're not setup to do that (which no one is for a few tens of thousands) then forget it.
[20:08:43] workmad3: smathy: you don't come on here asking for advice, and don't seem to have issues getting your invoices paid ;)
[20:08:45] mehwork: i've had both of those happen
[20:08:49] slash_nick: "we couldn't reach you yesterday so we had someone else do it... thanks though"
[20:08:50] smathy: Just get a good deposit up front, and regular payments through the projects.
[20:08:59] erichu: has joined #RubyOnRails
[20:09:08] mehwork: never trust people where money influences their trustworthiness
[20:09:22] mehwork: unless it's very very small time/money loss risk
[20:09:33] smathy: workmad3, yeah, but for diegoviola to think that a contract will protect him is probably not going to help either.
[20:09:54] mary5030: has joined #RubyOnRails
[20:10:01] agent_white: has joined #RubyOnRails
[20:10:13] smathy: I just imagine another month from now, "Ok, so they're not paying me, but I have the contract like you told me, what do I do now?"
[20:10:22] mehwork: there is no greater distraction than wondering "will they actually pay me?" the entire weeks you're working on something for them
[20:10:38] smathy: Never had that.
[20:10:44] smathy: I've never had anyone not pay actually.
[20:10:56] mary5030: has joined #RubyOnRails
[20:10:59] mehwork: i have when i was first starting to transition from open source to paid work
[20:11:30] smathy: I usually just break whatever quote it is into "months + 1" amounts, and I get the first payment up front, then each other one in each month of the project.
[20:11:38] yfeldblum: has joined #RubyOnRails
[20:12:02] workmad3: I don't do much freelance work tbh... I do a bit for one company, and invoice them for work done periodically... the worst they do is be a bit slow at times
[20:12:19] workmad3: but I'm never reliant on that for income, so I don't care too much
[20:12:44] Axilla: i freelance through odesk only...
[20:12:47] Axilla: well upwork now
[20:12:47] mehwork: there's no reason an employer should ask you to jump through hoops to get paid anyway. If they're positioning themselves as dominant it's not a good sign
[20:12:52] Axilla: i do side work through upwork.
[20:13:02] Axilla: only do hourly projects, and get paid every wednesday like clock work.
[20:13:11] momomomomo: has joined #RubyOnRails
[20:13:12] Axilla: and i can fetch a pretty fair hourly wage for a side job.
[20:13:14] mehwork: it should feel pretty mutual, with your outflow of work and the inflow of income, imo
[20:13:30] smathy: I stop work if the invoice goes past due (7 days).
[20:13:45] Axilla: i have one company i do side work for on an ongoing basis and i get between 5-20hrs of freelance work a week..
[20:13:48] smathy: I tell people to be ready for the invoice so they don't create that situation.
[20:13:48] _orangejuice: hi rubyists. whats going on with f.date_select :date not saving earlier selected dates. only todays
[20:13:48] mehwork: good idea, though even a week is a hell of a lot of lost time these days
[20:13:52] bricker: axilla: I've never used upwork, can you offer any advice for getting good sidework there?
[20:14:00] towski__: has joined #RubyOnRails
[20:14:05] chipotle: has joined #RubyOnRails
[20:14:20] Axilla: bricker: you have to take some low paying gigs to start.. i did a few really small projects for like $15/hr to get some completed jobs under my profile
[20:14:24] Axilla: now I get $33-40hr
[20:14:36] mehwork: you could create version 0.5 of a product that launches a future billiondollar startup in a week
[20:14:47] bricker: axilla: ah I see
[20:14:48] mehwork: or something ridiculous like that
[20:14:54] Axilla: you have to be pretty selective in the jobs you take on there, because you're competing with the indians and pakistanis who charge $3/hr
[20:14:57] smathy: mehwork, sure, but their loss is much worse. They've already paid and have no working product.
[20:15:01] Axilla: so i only take jobs where they're looking for experts, etc.
[20:15:09] bricker: $15/hour... almost not worth the time
[20:15:12] sargas: has joined #RubyOnRails
[20:15:17] smathy: mehwork, communicating the constantly slipping delivery date to them helps them focus.
[20:15:19] mehwork: smathy: i see, yeah if you regain control of the code / servers
[20:15:26] Axilla: but it is worht it to build your profile
[20:15:31] bricker: axilla: yeah
[20:15:43] mehwork: just don't end up sued yourself, for some contract loophole
[20:15:48] Axilla: i did like 4-5 jobs that were no more than an hour or two and charged between 15-20/hr
[20:15:58] Axilla: after that I bumped my pay up to what I wanted and only took expert jobs
[20:16:02] baweaver: I charged $20/hr for web design when I was in High School.
[20:16:22] smathy: mehwork, well, you don't push any code in that week, but my point was really just that even if you've pushed a month's worth of code, that's nowhere near as useful to them as a month's worth of payment is to you.
[20:16:27] Axilla: yep, problem with all these freelance sites is you gotta compete with the 3rd world country people.. the american companies on there though appreciate an english speaker
[20:16:40] smathy: ...so if you're getting paid through the project, you're always in a better position to down tools if a payment is late.
[20:16:41] mehwork: smathy: true, usually
[20:16:52] Axilla: and someone with real skills and will pay.. like i said i get a bit of side work each week and i'm happy with the extra $300-600 that i get on the side fo rnot that much effort.
[20:16:56] mehwork: unless they decided that whatver you worked on was something they decided not to want anymore
[20:17:03] Axilla: i dont think i'd ever try to live off upwork, but you could.
[20:17:14] mehwork: i've had that happen, "we're switching frameworks, and hired an ios guy"
[20:17:24] mehwork: luckily that one paid me anyway
[20:17:30] diegoviola: I'm happy to quote a price for 2 weeks of work but then if the work takes longer for me and I request another payment, they'll probably think I'm trying to screw them
[20:17:31] smathy: mehwork, sure, and I've had projects canceled halfway through - I've never had a company not pay what they owed me though.
[20:17:32] chipotle: has joined #RubyOnRails
[20:17:39] baweaver: Whenever I was in early college I was normally around $25-35/hr for web design
[20:17:40] bricker: axilla: does Upwork take responsibility for payment, help with contract, etc, or is it just a discovery tool?
[20:17:47] sloggerkhan: I'm salaried but it only works out to around $25/hr. (Excluding various benefits other than retirement.) Reason? I don't want to move. : /
[20:17:50] Axilla: they handle all payments
[20:17:59] Axilla: i get paid every wednesday like clock work
[20:18:04] diegoviola: and they'll say "You said the work would cost $500 dollars"
[20:18:09] Axilla: there is a 1 week review period where the person can dispute the charges
[20:18:13] Axilla: and then it gets sent to your account
[20:18:16] smathy: ...and with one payment up front, even if they did - I'd actually have lost very little.
[20:18:19] Axilla: but if you charge hourly they have an app that tracks your work
[20:18:27] smathy: They're really prepaying for most of the project.
[20:18:34] Axilla: and takes screen shots, so its pretty hard to dispute as a person looking for a developer
[20:18:42] bricker: axilla: oh interesting, so you turn it on when you start working, pause for breaks, etc. ?
[20:18:47] smathy: Have an app that tracks your work anyway.
[20:18:51] smathy: ...even for fixed.
[20:18:55] bricker: axilla: a little invasive but fair I guess
[20:18:56] smathy: Make sure you're not under-quoting.
[20:18:57] baweaver: salary kills those old rates though, about doubled it.
[20:19:09] Axilla: its been nice for me since my wife is now a stay at home mom
[20:19:18] Axilla: was able to suck up her income in very little work for me.
[20:19:22] greengriminal: has joined #RubyOnRails
[20:19:23] baweaver: half debating going contractor at some time.
[20:19:33] Axilla: and i got lucky and the company i'm working for nwo on there has me on an ongoing contract
[20:19:38] Axilla: limited to no more than 20hrs a week
[20:19:39] smathy: diegoviola, if they want a fixed quote, they'll expect the project done for that price.
[20:19:46] Axilla: so, i just pull tickets as i feel like it off their pivotal
[20:20:13] smathy: diegoviola, which is why I said that you should do a few hours of investigation (that they should pay by the hour for, with a cap) before quoting them.
[20:20:28] Axilla: it was worth the effort i put into it to get going and get my hourly up to $40/hr
[20:20:37] smathy: axilla, that's great work to have as a fallback for quiet times. I have that too. Very important for a freelancer.
[20:20:39] Axilla: i see some guys on there charging $75+/hr too
[20:20:54] baweaver: If I were to go back to freelancing I'd probably do similar.
[20:20:56] Axilla: adn they get tons of work.. so you can definatley climb higher.. after this current contract i'll probably bump mine to $45/hr
[20:21:01] smathy: I've only ever used those freelance sites as lead generation.
[20:21:05] diegoviola: smathy: indeed
[20:21:11] capin: axilla: $75+/hr ...which site is that?
[20:21:20] Axilla: formerly odesk
[20:21:27] arup_r: Yes. I am going to implement it using natural AR!! No idea why the gem didn't work for me. Really no idea. As per the README my code should work. This fellow(http://altoros.github.io/2013/implementing-and-improving-postgresql-fulltext-search/) also saying my code should work, but it DID NOT
[20:21:38] diegoviola: smathy: I've cloned their app already and I'm looking at it
[20:21:38] safetypin: has joined #RubyOnRails
[20:21:56] smathy: diegoviola, cool, just don't do that for free.
[20:21:57] Balzrael: guys, what is a good hourly rate for a regular dev job?
[20:22:02] _orangejuice: has left #RubyOnRails: ()
[20:22:06] smathy: Balzrael, there's no such thing.
[20:22:08] Axilla: freelance?
[20:22:18] Axilla: you gotta take into account you pay a shitload in taxes and your own insurance
[20:22:24] Axilla: so it should be pretty high..
[20:22:25] Balzrael: no, a job job, for the man
[20:22:28] capin: Balzrael: sh!t depends where you live, and what your skill-set is
[20:22:32] diegoviola: smathy: would you charge some hours for that upfront?
[20:22:36] Axilla: https://www.upwork.com/freelancers/~018eaddfc65d2da849
[20:22:47] Axilla: here is my profile if you want to see what all i've done to build myself up on that site
[20:22:55] smathy: arup_r, yeah, once you get to needing full text search I'd recommend going all the way for something like Solr.
[20:23:05] baweaver: getting warmer, but still vague
[20:23:26] smathy: Balzrael, depends on job, location, skills, company, negotiation, reputation, etc..
[20:23:34] arup_r: smathy: sure. I hate pg_search now onwards, it destroyed my 2 hours :(
[20:23:34] capin: Balzrael: do you have professional Ruby experience on your resume?
[20:23:37] baweaver: Go around San Francisco, you make $120k as a good dev shy of senior but pay $2-3k a month in rent
[20:23:41] Axilla: i was also awarded a top rated dev flag which gets me special gig opportunities, can't remember what i did to get that.
[20:23:41] smathy: arup_r, heh :)
[20:23:44] Balzrael: I am interested on average how much does an intermediate ror dev get in the us
[20:23:59] smathy: Balzrael, where in the US?
[20:24:03] Axilla: i started at 56k/yr at my first ROR gig, and within the first year am up to nearly 70k
[20:24:07] Axilla: can't complain there..
[20:24:07] mehwork: axilla: where is Huntington, United States?
[20:24:13] Balzrael: I don't care because I would work remote
[20:24:17] smathy: Balzrael, NYC rates are much higher than Cleavland.
[20:24:44] Balzrael: I mostly see remote jobs in San Francisco and NYC
[20:24:48] smathy: Balzrael, heh, ok - so remote will be lower.
[20:24:51] Axilla: use weworkremotely.com
[20:24:53] smathy: ...and harder to find.
[20:24:53] skyjumper: where's a good place to find small rails gigs?
[20:24:57] Axilla: that's where i got my remote RoR full time job.
[20:25:07] Axilla: the companies on there pay for their ads so they are very serious about hiring
[20:25:13] chipotle: has joined #RubyOnRails
[20:25:15] Balzrael: and how much does remote in the us pay per hour?
[20:25:15] skyjumper: axilla: was it a tough interview?
[20:25:21] smathy: Yeah, we used to hire from WWR
[20:25:37] baweaver: Balzrael: glassdoor, have fun
[20:25:42] Axilla: skyjumper: not really at all, i got lucky and ironically the company I applied to is in Burlington, VT and my co-worker literally lives 2 streets over from me.
[20:25:42] jgt: has joined #RubyOnRails
[20:25:44] smathy: Balzrael, I don't know the average over the whole country, better to talk to a recruiter about those stats.
[20:25:48] mehwork: moving to SF for a job is great, if you like living somewhere your family can't afford to live and rarely seeing them again, to work at a campus designed to never let you leave heh
[20:26:03] Axilla: we all live in Vermont, but work remotely because it's a pretty remote state.
[20:26:25] skyjumper: axilla: hmm. i applied for 2 remote jobs from there, got no response. both seemed like a perfect fit
[20:26:33] baweaver: you assume I have a family to bother with
[20:26:36] Axilla: i applied to quite a few before getting a response.
[20:26:43] Axilla: you're competing with top talent from all over the world on that site
[20:26:44] skyjumper: i assume they just have 10,000 resumes to go through
[20:26:44] smathy: Wow, such a happy outlook on life mehwork - I suppose the nick gave it away :)
[20:26:50] Balzrael: guess I'll get a recruiter on the phone to find out more :)
[20:27:10] Axilla: I love my job :D
[20:27:14] capin: Balzrael: that's a start
[20:27:18] smathy: skyjumper, the biggest problem with applying for a remote job is that you have to compete with everyone.
[20:27:26] smathy: ...rather than only the people for whom the location is convenient.
[20:27:29] Axilla: i was in telecom before i switched to development(have always coded though even in telecom, just in shitty stuff like bash, and php :P)
[20:27:33] bricker: mehwork: your family can afford to live there if you're making the salary that a developer in SF makes
[20:27:39] capin: Balzrael: have you looked over @ indeed ?
[20:27:49] diegoviola: axilla: telecom as in asterisk, etc?
[20:27:49] mehwork: bricker: i don't mean my wife/kids, i mean the rest of my family
[20:28:02] bricker: average there is high, so high that it makes decent salaries in other parts of the country technically below-average
[20:28:08] Axilla: you gotta make a life choice.. do you want the big bucks of san fran or new york and the high expenses, or the freedom being a dev brings you for lower pay, but working from wherever the fuck you want.
[20:28:08] skyjumper: here's a better question... how do you even become the top talent?
[20:28:21] Balzrael: yes I looked for stats on the salary, but was curious what us devs actually took home to spend
[20:28:25] skyjumper: if you're not building your skills all day every day, it seems like you'll never get there
[20:28:35] baweaver: skyjumper: if you ever figure out, write a book, people would buy it.
[20:28:36] Axilla: skyjumper: have a kick ass github account, work hard, build projects even if you don't launch them.
[20:28:38] skyjumper: so you need a job that's also a good learning environment
[20:28:43] mehwork: axilla: big bucks that balance out by the higher cost of living
[20:28:43] smathy: skyjumper, my #1 is: "get involved in OSS"
[20:28:58] Axilla: mehwork: yep, thats why i made the life style choice to live n Vermont and work remotely for a lower salary
[20:29:07] Axilla: i don't need to be rich, i'm happy with my work/life balance
[20:29:13] Axilla: i'm very happy not dealing with office politics
[20:29:26] badfish129: has joined #RubyOnRails
[20:29:27] mehwork: axilla: i think you made the right choice, but everyone is different. Some people are ambitious or dream of working at a company that just doesn't allow remote
[20:29:33] diegoviola: office politics... f*ck that
[20:29:50] diegoviola: I had to confront a manager recently, firs time I did that ever
[20:30:02] Axilla: mehwork: yep, its really up to the person.. I've turned down offers from Amazon and Seagate in the last year because they wanted me to move(both to washington state)
[20:30:13] Axilla: they offered me much bigger salaries than I get now, but VT is my place.
[20:30:16] mehwork: that amazon one was worth turning down regardless (if you read the news)
[20:30:20] smathy: Balzrael, you're contradicting yourself. You're asking for averages, but then saying that you've already looked at stats and want to know specifics.
[20:30:21] Balzrael: I am working remote now and there still are office politics ... more remote politics
[20:30:41] diegoviola: the guy was calling me by my nationality "Hey you paragua", I went to his place and said "Call me by my name"
[20:30:45] Axilla: i guess i'm lucky =/ i work for a pretty amazing company
[20:30:48] mehwork: working at home means everyday is bring-your-dog-to-work day
[20:30:59] p8m: Remote work is often differently than local work. It's necessarily more result driven, meaning less research and experimentation, just my experience
[20:31:00] capin: or cat ;)
[20:31:03] mehwork: but they try to pay you less, even though you're saving them money by not working there
[20:31:07] Balzrael: smathy: I don't know how things work in the US. If a job says it pays 100k for a year, how much of that do you actually take home
[20:31:20] MackSim: has joined #RubyOnRails
[20:31:23] Axilla: depends where you live
[20:31:27] Axilla: some states have state taxes, some don't
[20:31:35] mehwork: "oh you live in nebraska? well, we'll pay you the cost of living there" But i'm trying to save up to move to SF! "sorry."
[20:31:36] Axilla: everyone pays federal at a different rate based on all kinds of bullshit
[20:31:47] Axilla: do you own a home, do you have kids, blah blah garbage fucking terrible tax code.
[20:31:56] smathy: Balzrael, depends which state you're in as to how much tax you pay, plus depends on your tax deductions.
[20:32:15] smathy: Balzrael, I take it that you're not in the US?
[20:32:19] mehwork: just lie and tell them you live in a big city, have your mail forwaded :p
[20:32:24] capin: i guess that's why so many people have kids :P
[20:32:25] Axilla: the average based on all workers and how much income the goverment just took in taxes is $20k per worker
[20:32:31] Axilla: some of us are paying more and many pay far less.
[20:32:33] Balzrael: oh my god, but do you get to keep at least 50%?
[20:32:35] Axilla: but that gives you an idea.
[20:32:38] Axilla: of course.
[20:32:41] smathy: Balzrael, yes.
[20:32:54] Axilla: my tax rate with 1 child, a wife, and home is around 15%
[20:33:05] Axilla: on the federal level
[20:33:12] Axilla: plus another few percentage points at the state level
[20:33:15] skyjumper: so i got a high paying rails job a few months ago but all they have me do is fix regression tests... for months
[20:33:20] mehwork: rent has increased everywhere and inflation has caused 100k salary to not feel like that much most anywhere in america. You'll be doing ok though
[20:33:23] baweaver: 36% overall tax rate T-T
[20:33:31] mehwork: but 100k is not what it used to be
[20:33:35] Axilla: sure isn't
[20:33:47] Balzrael: it is in my country :)
[20:33:52] slash_nick: skyjumper: sounds boring, did you find any open source libraries to help out with in order to keep stimulated?
[20:33:53] skyjumper: how do you know if a job's going to be shit before you agree to take it?
[20:33:59] stamina: has joined #RubyOnRails
[20:34:03] Axilla: you can tell..
[20:34:04] mehwork: skyjumper: ask the right questions
[20:34:05] smathy: skyjumper, by interviewing them.
[20:34:08] Axilla: if they ask you to do a coding test
[20:34:12] Axilla: its probably gonna be shit.
[20:34:18] MartinElvar: has joined #RubyOnRails
[20:34:20] smathy: ...if they bring out a whiteboard during the interview ;)
[20:34:21] baweaver: axilla: define coding test though
[20:34:24] skyjumper: slash_nick: can't really, computer is locked down
[20:34:25] diegoviola: toptal asked me to do a coding test
[20:34:28] mehwork: skyjumper: do you use php? do you write tests? what is your vacation policy? etc
[20:34:32] skyjumper: net connection is monitored, etc
[20:34:32] Axilla: if they ask me to write any code during the interview i usually walk out.
[20:34:32] smathy: I don't mind coding tests.
[20:34:34] diegoviola: anyone know that company?
[20:34:39] waseem_: If they ask you how would you move mount fuji.
[20:34:40] mehwork: the php was a joke, but somewhat serious
[20:34:49] smathy: I've never hired anyone without getting them to code something.
[20:34:57] baweaver: I'm going to ask coding questions in the interview, period.
[20:35:07] slash_nick: axilla: what? i would've had to walk out of every interview i've ever had
[20:35:15] smathy: baweaver, when interviewing a candidate? Or you're the candidate?
[20:35:15] yaymukund: has joined #RubyOnRails
[20:35:19] mehwork: putting peopel on the spot with questions isn't as good as having them complete a code test in my experience
[20:35:22] baweaver: when interviewing
[20:35:23] diegoviola: baweaver: just don't ask people to build facebook or twitter clones with everything included please ;)
[20:35:39] smathy: baweaver, right, mostly. I ask a lot of other questions too.
[20:35:42] baweaver: normally I don't even expect them to remember anything
[20:35:43] Axilla: i have enough experience, github examples, project examples, that any coding test is pointless
[20:35:45] dman777_alter: has joined #RubyOnRails
[20:35:53] baweaver: If they can think it I'll point them in the right direction
[20:35:56] Axilla: what you want me to flatten an array in ruby? Oh i can't do it with .flatten?
[20:35:58] smathy: Get to know people, their motivators, how they'll fit with the team.
[20:35:58] baweaver: I just want to know if they have a sense for it.
[20:36:06] mehwork: i've yet to meet someone who knwos everything off the top of their head. Programmers shoul dbe able to use references + experience to find the solution very very quickly. So give them a time limit maybe
[20:36:12] Balzrael: baweaver: what are you looking for in a coding test?
[20:36:13] dman777_alter: is this correct? match 'foo/config/*device', to: "config#generate", via: [:post]
[20:36:15] Axilla: get outta here.. everything in my github is more advanced than anything a coding test is gonna teach you about my abilities =/.
[20:36:33] bricker: dman777_alter: you probably want :device
[20:36:34] baweaver: If I ask it, I've used it in the last few weeks in my job
[20:36:38] smathy: axilla, maybe they didn't want to know your abilities, maybe they wanted to know how you react to coding tests.
[20:36:50] skyjumper: axilla: nobody has time to dig through your github. they hardly ever read all of the resume either...
[20:37:02] mehwork: knowing you're hiring the right person is just as hard as knowing you're taking the right job
[20:37:12] Axilla: *shrug* i'm turning down work as it is.. i guess if i was hard up for work i might do a coding test..
[20:37:31] skyjumper: axilla: if you're turning down small gigs you can send them my way...
[20:37:46] Coldblackice: has joined #RubyOnRails
[20:37:46] smathy: I don't really like places that DON'T give me a coding test.
[20:37:51] Axilla: i can talk to another developer and just by the way they talk about code and engineering tell wether they know their ass from a hole in the ground.
[20:37:55] mehwork: everyone wants someone with a lot of experience, which makes it kind of hard for the noob to get a foot in the door
[20:37:56] dman777_alter: bricker: thanks
[20:37:59] baweaver: I'm more of interested in building a rapport than anything about the nature of the code
[20:38:01] capin: i did a coding test for an interview a while back ...didn't really like it much :/
[20:38:03] smathy: I want the job to be about the code, I don't trust them if they don't think the same.
[20:38:11] Axilla: for me hiring is more important to find the right personality fit..
[20:38:16] baweaver: and I will explicitly say a few things wrong to see if they're blindly agreeing with me or paying attention :D
[20:38:22] dstarh: has joined #RubyOnRails
[20:38:25] Axilla: and obviously if i find the right personality fit, i dig into their code, their portfolio, etc.
[20:38:29] smathy: mehwork, not true at all. I've hired plenty of noobs.
[20:38:39] mehwork: smathy: you're a good persont hen
[20:38:42] beauby: has joined #RubyOnRails
[20:38:48] Axilla: exactly baweaver
[20:38:49] mehwork: i believe in hiring noobs
[20:38:52] Axilla: youc an tell if someone can code or not.
[20:38:53] smathy: mehwork, just that the most exciting companies/projects want experienced people (because they can limit themselves to that and have the budget for it).
[20:38:59] skyjumper: how do you spot companies who actually want talent, rather than "are you familiar with XYZ tech that we use?"
[20:39:04] Axilla: i'll hire a noob, because they're hungry and not set in their ways
[20:39:12] Axilla: they're open to learning how we do things, etc.
[20:39:15] smathy: mehwork, ...and many noobs apply well beyond their level.
[20:39:16] Axilla: i love teaching too.
[20:39:24] mehwork: smathy: yeah
[20:39:26] baweaver: I could care less about inverting a binary tree. I want to see if you can solve the thing I did last week that drove me up a wall
[20:39:29] baweaver: or how you'd approach it
[20:39:30] tubbo: smathy: i know i do
[20:39:36] Axilla: smathy: very true, but you can tell if a noob is applying for a Sr. Engineering job and he's fresh outta college.
[20:39:38] mehwork: smathy: and many experienced people are over proving themselves, so they pace more
[20:39:49] mehwork: not always, i still over achieve
[20:39:51] smathy: skyjumper, a lot of it is by their ad and website, how do they present themselves?
[20:39:54] Axilla: it's not easy finding the right developer that's for sure.
[20:40:06] baweaver: my biggest instant no is lack of passion
[20:40:12] mehwork: but i refuse to over work (hours wise), except once in a while for important production releases
[20:40:12] sloggerkhan: I don't know. I find a lot of coding interviews are all about remembering stuff of your head that you knew in college but have mostly forgotten, but could look up on Wikipedia or something in a couple of minutes and will probably never use in the real world anyway. Which isn't a problem per se, but it is rather tiresome and seems like selecting for the wrong things.
[20:40:19] baweaver: I can tell a hacker from someone who just does it to get by.
[20:40:25] Axilla: mehwork: the company i work for has a strict 40hr maximum work week
[20:40:27] smathy: skyjumper, are they just listing a bunch of skill checkboxes in their ad, or are they talking about their culture, how they approach problems and their staff, and what their product means to them, etc..
[20:40:35] tubbo: SloggerKhan: most of those interviews are for shitty companies. you've been warned ;)
[20:40:36] gerep: how can my model test reach this line? https://gist.github.com/gerep/ce74b51f5136d040a2a0#file-transaction_cost-rb-L12 I'm asking that because of the test coverage result, this model is missing just this line to be 100% tested
[20:40:42] mehwork: axilla: what if something goes wrong, do you just wait to patch it?
[20:40:44] Axilla: we also have unlimited flex time for family, sickness, errand, exercise, whatever.
[20:40:54] skyjumper: smathy: we need a wiki for this stuff
[20:41:00] smathy: SloggerKhan, sure, "coding test" means a lot of different things. I'm not talking about a stupid memory test.
[20:41:00] tubbo: skyjumper: `, reject_if: :blank`?
[20:41:09] Axilla: mehwork: of course not, but we do an extremely good job of not needing to patch very often.. we're a small team so its important to use to test A LOT before pushing.
[20:41:19] smathy: SloggerKhan, I'm really talking about an actual task, just like I'll be doing once I work there.
[20:41:23] slash_nick: tubbo: new relic's process had ~8 hours of coding challenges, whiteboard interviews, etc...
[20:41:25] Axilla: emergencies are rare for us, but we step up when needed.
[20:41:31] mehwork: axilla: that's good
[20:41:40] tubbo: slash_nick: "most". :P
[20:41:54] Axilla: and people actually want to step up because they haven't been over worked.. over work leads to very boom bust performance cycles
[20:41:59] tubbo: slash_nick: like if it's New Relic, i've used New Relic. i love New Relic. i'll do whatever they want me to do to get the position, na mean?
[20:41:59] Axilla: its why we also don't use sprints anymore
[20:42:00] smathy: gerep, stub the method out, and check that your stub is called.
[20:42:08] Axilla: because people cram at the end of the sprint and are burned out to start the next one
[20:42:12] slash_nick: tubbo: right-o
[20:42:18] gerep: smathy, ;)
[20:42:47] tubbo: axilla: instead of not doing sprints, your developers should learn better time management skills
[20:43:01] Axilla: tubbo: i guess, i think the way we roll is excellent :)
[20:43:24] slash_nick: here's a coding challenge for yall: https://gist.github.com/scottburton11/a2d8afcee57d13232ed4
[20:43:24] smathy: gerep, sorry, I wasn't kidding. Did you not actually want to test that your model reaches that line?
[20:43:29] sloggerkhan: I don't think sprints would be so bad except that people alway drastically underestimate time/complexity no matter what you do.
[20:43:34] sloggerkhan: It seems like.
[20:43:42] tubbo: sprints aren't that bad
[20:43:54] tubbo: they're better than "i have no fucking clue how long this is going to take"
[20:43:54] Balzrael: how important is it to also be good at js to get a ror job?
[20:44:08] tubbo: Balzrael: it's important to be good at JS to get a web development job, period.
[20:44:10] gurnoorinder: has joined #RubyOnRails
[20:44:13] smathy: I hate sprints too.
[20:44:15] gerep: smathy, Yes, but I didn't mean that :D I'll do as you suggested, I'll stub that! :D
[20:44:18] smathy: I hate all project management.
[20:44:29] Axilla: Balzrael: its pretty important imo.. most want a full stack dev these days.
[20:44:49] capin: ^ yeah what he said
[20:44:53] skyjumper: axilla: or they just think adding "full stack" to the requirements will get better candidates
[20:45:03] Balzrael: that's the one part that I still need to polish then
[20:45:20] smathy: slash_nick, ok, I'd refuse to do that coding challenge.
[20:45:23] capin: Balzrael: i see a lot of job postings wanting people who know angular
[20:45:29] Axilla: skyjumper: i guess, but in rails and embeded ruby and such you're writing ruby and js and html in various places to get everything going.
[20:45:47] Axilla: it would be a pain in my ass if i had to wait for some guy to do my front end stuff for me
[20:45:50] baweaver: smathy: ....is it bad that I just solved that in my head?
[20:45:53] skyjumper: axilla: that's still only half the stack
[20:45:59] Axilla: or if i wanted to pop up a modal or something after in action and i didn't know any JS =/
[20:46:03] tubbo: i am so glad we have front-end devs to deal with the myriad of problems i don't give a fuck about
[20:46:10] baweaver: mainly from scrabble solvers I'd screwed with earlier.
[20:46:13] smathy: Balzrael, the more of a business outcome you can deliver, the more useful you are, so the more $$ you can command.
[20:46:14] tubbo: not that i don't like doing front-end dev, but the back-end here is complex enough that it takes up all my time
[20:46:15] mehwork: i'm currently gambling on microservices to solve the inevitable tech-debt problems that come with large monolithic projects
[20:46:31] smathy: baweaver, heh, and that's the problem with those sorts of things.
[20:46:45] mehwork: unfortunately, i don't think it will help because most tech debt happens at a small scale and just piles up either way
[20:46:57] tubbo: microservices: trade in your old, dusty problems for brand new ones!
[20:47:02] tubbo: it's the auto leasing of problems
[20:47:07] mehwork: so you have a bunch of microservices with a little tech debt vs one big project with a lot
[20:47:09] Axilla: that'sgreat tubbo
[20:47:12] baweaver: In my case I play too much scrabble, so anything touching string manipulation will probably get destroyed.
[20:47:12] smathy: baweaver, there'll be someone with some remembered knowledge in some area who can re-solve the problem nicely - and so the interviewer just tested a skill that's not important to their actual business.
[20:47:41] diego2: has joined #RubyOnRails
[20:47:48] smathy: Give me a test in your own business domain, then you'll see the real value I'll have solving actual problems that you have.
[20:47:48] tubbo: it all boils down to data-driven problem solving being the king of it all
[20:47:56] baweaver: so if you want to get a huge false positive on me, ask anything related to word/string manipulation
[20:48:05] diego2: has joined #RubyOnRails
[20:48:12] tubbo: if your app is "slow" but you don't know why, find out. the choices become more clear when it's obvious where the problem is.
[20:48:15] mehwork: as smart as tech people may be, they still tend believe in silverbullets
[20:48:32] IceBear: has joined #RubyOnRails
[20:48:39] tubbo: oh are DB queries taking too long? maybe you should be query caching, or use SQL VIEWs to slice off some processing time
[20:48:47] IceBear: has joined #RubyOnRails
[20:48:59] baweaver: or checking for indexing with explains
[20:49:05] tubbo: precisely
[20:49:12] smathy: Some people, when confronted with a problem, think "I know, I'll use microservices." Now they have 100 tiny problems.
[20:49:26] mehwork: we don't have any sql at my job, except we have nosql instead. json everywhere. Better than xml everywhere, but not by much imo
[20:49:58] tubbo: smathy: some people, when confronted with a problem, go "oh great, a starting point for my experimentation"
[20:50:01] x-light: has joined #RubyOnRails
[20:50:06] skyjumper: did mongo/couchdb/etc really end up the SQL killer that people said it would be?
[20:50:19] tubbo: skyjumper: NoSQL means "Not only SQL", not "NEVER NO SQL DIE DIE DIE"
[20:50:26] baweaver: tubbo: those people are straight dangerous
[20:50:27] tubbo: skyjumper: and no, it didn't.
[20:50:27] mehwork: there had to be a reason developers demand a lot of money, beacuse we know it's still a lot of headaches/work. Otherwise i'd be happy with 60k
[20:50:33] smathy: skyjumper, those people who said that were idiots.
[20:50:57] mehwork: mongo is a mongo killer
[20:50:59] smathy: At Amco we were using CouchDB very effectively.
[20:51:11] baweaver: We use Cassandra a lot.
[20:51:21] tubbo: and we've so far deployed 6 or 7 client apps all running MongoDB at high volume
[20:51:21] smathy: ...but we had a very particular use case for it, and we still had a lot of RDBMSs
[20:51:33] arup_r: smathy: done.. search_by_hand ( https://gist.github.com/aruprakshit/d170b52726ca674adcec#file-asset-rb-L22 ) :;)
[20:51:37] mehwork: couch, cassandra, redis, and postgres i can do. yet mysql and mongo abound
[20:51:38] smathy: arup_r, nice.
[20:51:42] skyjumper: how about postgres... used more than mysql for serious stuff?
[20:51:52] smathy: skyjumper, probably not.
[20:52:02] capin: skyjumper: i'd say yes
[20:52:05] skyjumper: i've heard mixed opinions on that
[20:52:05] tubbo: skyjumper: definitely used more than mysql for *newer* stuff, but that's a tall order considering all the apps on mysql right now.
[20:52:12] tubbo: postgres can't ever compete
[20:52:12] smathy: skyjumper, used more than mysql by serious *people* :)
[20:52:14] arup_r: Mysql is not clever like Postgresql :D
[20:52:21] smathy: MySQL is great.
[20:52:22] mehwork: if programmers were construction workers, you'd look up at a house being built with everyone holding the wrong tool
[20:52:25] skyjumper: ACTION <-- trying to figure out what to study to get a better job
[20:52:26] tubbo: mysql has been the dominant DB since 2000. so it has a good 10 years of legacy apps :P
[20:52:28] capin: arup_r: indeed
[20:52:29] smathy: ...MyISAM is a clusterfuck.
[20:52:33] tubbo: at least 2000*
[20:53:00] arup_r: smathy: I know you didn't open the link.. :) when you have time .. please open and provide some feedbacks
[20:53:12] capin: last i checked stackoverflow was using Postgres
[20:53:16] smathy: arup_r, I did.
[20:53:18] chipotle_: has joined #RubyOnRails
[20:53:19] diego2: MariaDB replaced MySQL in most linux distros now
[20:53:20] tubbo: "JSON everywhere" is not a valid reason for using MongoDB, but "having to do type checking/conversion/migration for every stupid little thing" is very valid.
[20:53:22] mehwork: i would hope people aren't using myisam engine when they should be using innodb or whatever else makes mor esense
[20:53:25] arup_r: you are so quick
[20:53:27] smathy: It's waiting for CPU time.
[20:53:27] tubbo: s/having/not having
[20:54:10] arup_r: mehwork: why Mysql has too many engines.. ?
[20:54:19] mehwork: you know where else json was everywhere? Friday the 13th. And that was just scary
[20:54:19] sdwrage: has joined #RubyOnRails
[20:54:24] mehwork: ok, i admit that was bad
[20:54:43] tubbo: i mean, i chuckled
[20:54:51] smathy: mehwork, my point was just that virtually all the bad things that can be said about MySQL are really about MyISAM.
[20:55:04] tubbo: mehwork: your company seems to have a really bad time making technology decisions
[20:55:06] skyjumper: ACTION quickly let out air from his nose
[20:55:16] mehwork: smathy: idk, i thought it was mostly about their sql query language implementation of nonstandard features
[20:55:34] smathy: mehwork, a criticism you may as well level at all RDBMSs
[20:55:38] tubbo: smathy: where da HSTOREz at
[20:55:48] smathy: mehwork, postgres has its share ^^^
[20:55:59] mehwork: smathy: true
[20:56:13] tubbo: yeah i mean, JSON/JSONB/MONEY aren't actually in the SQL spec
[20:56:14] smathy: It's funny, pg folks criticize mysql for being non-standard SQL AND for not having the cool non-standard extensions pg has :)
[20:56:18] smathy: Make up your mind!
[20:56:26] tubbo: i think mysql is harder to optimize
[20:56:28] tubbo: harder to shard
[20:56:37] mehwork: fanboys will always use flawed logic
[20:56:43] smathy: tubbo, I don't think either of those is true.
[20:56:46] tubbo: that was always pg's big feature, if you needed to shard the DB it was easier to do with pg (back in the day)
[20:56:49] mehwork: including saying fanboys, when there's plenty of fangirls out there too
[20:56:49] smathy: tubbo, maybe harder for you.
[20:56:53] tubbo: smathy: that may or may not be because i haven't had as much experience :D
[20:57:14] smathy: tubbo, I will agree that pg was first to market with some very sophisticated tools.
[20:57:22] slash_nick: smathy: or this one https://gist.github.com/scottburton11/54337adb16252d6af8b6
[20:57:28] smathy: (except replication ;)
[20:57:35] tubbo: but yeah, i've heard from experts that MySQL is just as easy to optimize as PG...and it *must* be true because tons of high-traffic sites use mysql
[20:58:04] pwnd_nfsw: Tons of high-traffic sites use PHP too
[20:58:05] mehwork: irc is where people who aren't working when they should be, go to talk about the most productive ways to work
[20:58:14] mehwork: guess i'll sign off for a bit and finish this project
[20:58:17] smathy: I do miss not having functional indexes when I'm in mysql land.
[20:58:21] pwnd_nfsw: lol mehwork
[20:58:26] smathy: (gotta fake them with triggers)
[20:58:39] tubbo: mehwork: =D hey my test suite takes a while!!
[20:58:47] pwnd_nfsw: I've often wondered if stored procedures are worth the trouble
[20:59:03] pwnd_nfsw: tubbo, I go do pushups when i'm waiting for tests
[20:59:12] smathy: ...but like everything, tools are good for different things. MySQL's collation customizations are much better than PG's, so we used MySQL at Amco because most of our market were Spanish speaking.
[20:59:49] arBmind: has joined #RubyOnRails
[20:59:51] troyreadyy: has joined #RubyOnRails
[20:59:57] smathy: ...of course, I configured it off the default transaction isolation, and single innodb file.
[21:01:07] tubbo: smathy: interesting
[21:01:20] smathy: arup_r, yeah, very nice solution!
[21:01:21] tubbo: i never played with mysql's collation
[21:01:23] slash_nick: https://github.com/indirect/challenges ... having fun digging up coding challenges here
[21:01:38] smathy: tubbo, it's customizable, and you can set it on a per-field basis.
[21:02:01] arup_r: smathy: thanks :D
[21:02:05] slash_nick: https://github.com/alexkroman/word-ladder/blob/master/README.md
[21:02:20] smathy: tubbo, so for example in Spanish ?? and n are different letters, but plenty of people use n because they don't know how to make ??. So nice to be able to customize (ie. break) the collation to make n and ?? equivalent for searches etc.
[21:02:20] TomyLobo: has joined #RubyOnRails
[21:02:31] edwinvdgraaf: has joined #RubyOnRails
[21:02:58] tubbo: smathy: wait, people in spanish-speaking countries don't have an easy way to type 'n'?
[21:03:15] tubbo: i assumed it was similar to the european keyboards which have umlauts and all kind of other chars
[21:03:21] smathy: tubbo, plenty in Mexico are using ex-US-govt computers/keyboards.
[21:03:28] tubbo: interesting
[21:03:31] smathy: Part of school programs.
[21:03:44] tubbo: we're currently deploying to Colombia but we're also gonna deploy to Mexico and Brazil
[21:03:49] tubbo: so this will be quite an interesting problem
[21:04:00] sonofdirt: has joined #RubyOnRails
[21:04:13] tubbo: how do we get ElasticSearch to index "Nino" and "Ni??o" to be the same?
[21:05:15] sam_weerasinghe: has joined #RubyOnRails
[21:05:38] badfish129: has joined #RubyOnRails
[21:06:16] slash_nick: tubbo: you'd just write a custom analyzer, no?
[21:06:21] smathy: We were able to configure that sort of stuff in sphinx, I'd be stunned if lucene couldn't.
[21:06:48] slash_nick: https://www.elastic.co/guide/en/elasticsearch/guide/current/asciifolding-token-filter.html
[21:07:08] annlewis: has joined #RubyOnRails
[21:07:23] siemprefresco: has joined #RubyOnRails
[21:07:49] smathy: I should also pay dues to Microsoft - they ship a whole heap of computers into Mexican schools just as a charitable thing.
[21:07:51] diegoviola: do you guys code on a laptop or desktop? odd question I know
[21:07:56] smathy: ...same issue though, plenty are US keyboards.
[21:08:01] smathy: diegoviola, laptop.
[21:08:19] capin: diegoviola: ^ ditto
[21:08:19] diegoviola: cool, don't you mind the small keyboard or screen?
[21:08:20] skyjumper: diegoviola: i prefer full desktop keyboard+mouse, but that's a rarity these days
[21:08:25] slash_nick: diegoviola: laptop... i have an external monitor, but rarely connect
[21:08:40] FailBit: desktop for me
[21:08:41] slash_nick: diegoviola: i have a 17.5 inch screen on my laptop... it's not small.
[21:08:55] diegoviola: I'd probably break the laptop keyboard if I use it all day
[21:09:06] unholycrab: has joined #RubyOnRails
[21:09:15] slash_nick: i do use an external keyboard at work
[21:09:19] skyjumper: how many of the laptop people use a macbook pro?
[21:09:21] diegoviola: I have a ThinkPad T450 but I don't know why it feels so fragile these days compared to the older models
[21:09:24] capin: diegoviola: do you type with a hammer?
[21:09:25] smathy: diegoviola, I have a 27" display too.
[21:09:50] Lightsword: has joined #RubyOnRails
[21:09:51] Macaveli: has joined #RubyOnRails
[21:09:54] smathy: diegoviola, sometimes I use just the laptop though, but retina and tiny fonts makes smathy a happy boy.
[21:09:59] slash_nick: tubbo: think that asciifolding filter will help?
[21:10:53] Balzrael: I use a desktop with two 27" displays. Really comfy
[21:11:16] gurnoorinder: hello everyone. when i try to install wget i get this errorDownload failed: https://raw.githubusercontent.com/DomT4/LibreMirror/master/OpenSSL/openssl-1.0.2c.tar.gz
[21:11:18] capin: i enjoy the MBP keyboard for the most part, but one of the keys keeps poping out sometimes :l
[21:11:53] skyjumper: diegoviola: did you see this / take the surveys? http://blog.lenovo.com/en/blog/retro-thinkpad-time-to-think/
[21:11:54] smathy: gurnoorinder, I think you're in the wrong channel.
[21:11:57] capin: gurnoorinder: i think your in the wrong channel?
[21:12:15] diegoviola: skyjumper: I saw but I didn't bother
[21:12:35] diegoviola: Lenovo has been doing some nasty things last time I checked
[21:12:37] smathy: I can't use non-Apple laptops.
[21:13:01] skyjumper: as a long-time thinkpad user i'll probably go mac next time
[21:13:01] diegoviola: shady things, like that superfish stuff
[21:13:02] gurnoorinder: smathy: but i was trying to following instructions to install ruby and rails with chruby
[21:13:23] gurnoorinder: capin: but i was trying to following instructions to install ruby and rails with chruby
[21:14:06] diegoviola: but I don't care what Lenovo preinstalls or any OEM for that matter as I always remove Windows and install Arch Linux anyway
[21:14:41] capin: gurnoorinder: you on OS X?
[21:14:52] FailBit: don't buy lenovo laptops
[21:15:07] diegoviola: FailBit: why not?
[21:16:08] FailBit: I have read many a tech article about things they do to their preinstalls, but now it's supposedly adding re-installing bloatware to the BIOS
[21:16:08] capin: diegoviola: because it's not an apple laptop ;P
[21:16:40] skyjumper: FailBit: that's superfish which diegoviola just mentioned... and fwiw it was only on the lower-end consumer grade machines
[21:16:50] gurnoorinder: capin: yes sir
[21:17:08] skyjumper: probably some manager of that product line thought they were cutting costs in a clever way
[21:17:10] FailBit: just get like a toshiba or something...
[21:17:15] FailBit: will be better worth your while
[21:17:27] capin: gurnoorinder: are you using homebrew to get ruby and rails setup using chruby?
[21:17:35] diegoviola: Windows 10 also has backdoors
[21:18:21] diegoviola: and there's also Intel ME which can be seen as a backdoor at the CPU level
[21:18:23] smathy: gurnoorinder, it still has nothing to do with Rails.
[21:18:27] capin: gurnoorinder: is this for a local dev machine or prod box?
[21:18:38] gurnoorinder: capin: loca dev machine
[21:19:09] diegoviola: everything is getting backdoored these days, that's why free and open source software is more relevant than ever
[21:19:14] capin: gurnoorinder: have you looked at using http://rvm.io to manage your rubies?
[21:20:00] skyjumper: diegoviola: what's your preferred desktop environment?
[21:20:26] diegoviola: skyjumper: I currently use i3wm, I'm very happy with it :)
[21:20:31] tubbo: diegoviola: lol "Intel ME" really?
[21:20:36] tubbo: what's next, Intel Vista?
[21:20:50] rushed: has joined #RubyOnRails
[21:21:14] diegoviola: Lol, intel ME stands for "Management Engine", some remote thingy they added...
[21:21:21] gurnoorinder: capin: yes. but i was trying to upgrade homebrew. i got this error while doing it
[21:21:23] diegoviola: but brings many security concerns
[21:21:50] ProLoser: has joined #RubyOnRails
[21:21:55] IceBear: has joined #RubyOnRails
[21:22:01] capin: gurnoorinder: i would check the #machomebrew channel
[21:22:10] simkessy: Has anyone used s3_direct_upload with newer versions of Rails and PaperClip?
[21:22:11] diegoviola: http://libreboot.org/faq/#intelme
[21:22:19] gurnoorinder: capin: thanks
[21:22:27] hahuang65: has joined #RubyOnRails
[21:22:31] gurnoorinder: has left #RubyOnRails: ()
[21:22:43] smathy: simkessy, !used
[21:22:43] helpa: simkessy: Don't ask "does anyone use <thing>?". It's better to just state your problem and if anyone has used <thing> they will most likely answer.
[21:22:47] capin: gurnoorinder: good luck, ...and there's some helpful people in there
[21:23:44] diegoviola: skyjumper: before going with tiling wm's I've been using KDE and traditional DEs, but after going with i3 now going back to traditional/floating WMs it's become too painful for me, I feel slow without tiling now
[21:24:01] Pupeno: has joined #RubyOnRails
[21:24:49] mwlang: tiling WM???s? Has Windows 1.0 made a comeback? :-p
[21:24:52] skyjumper: diegoviola: it seems like a difficult transition
[21:25:12] capin: ACTION uses KDE :)
[21:25:12] smathy: I always liked fvwm's MinOverlapPlacement - was a great combination of using screen real estate, but without going all "fuck you window size" on me.
[21:25:48] diegoviola: I just like to type Super+Return and have Firefox made some space automatically for my Terminal, instead of point, clicking, move with mouse, right click, etc
[21:26:20] smathy: I would bind window resizing to keyboard combos.
[21:26:36] smathy: Mice are for drawing programs.
[21:27:04] SteenJobs: has joined #RubyOnRails
[21:28:26] mary5030: has joined #RubyOnRails
[21:30:00] FailBit: no, tablets are
[21:31:00] kitsuneyo: has joined #RubyOnRails
[21:32:42] kitsuneyo: hey smathy, i was thinking about my split seeds thing some more... is there a way to kind of 'render' the .rb files like partials, so they run as one file and share variables that way?
[21:33:20] diegoviola: At the last shop I worked it was painful because everyone were using Windows there... I was the only Linux person, and they didn't allow me to install Linux but instead install it on VirtualBox, so I was using a fullscreen VM with Arch and i3, etc. Some of the dudes there were impressed I did all my stuff in terminals
[21:33:51] diegoviola: but the manager was like "You have to use Windows if you want to work with us"
[21:34:23] skyjumper: diegoviola: same happened to me, and was laughed at for preferring linux
[21:34:42] skyjumper: skyjumper: talked the manager into letting me install it, then 2 other devs followed suit and we became a mixed-OS shop
[21:34:51] diegoviola: he didn't like me... he fired me, I think being immigrant was another reason
[21:35:27] diegoviola: but he said he fired me by my "personality"
[21:35:30] capin: diegoviola: that sucks dude :'(
[21:35:35] kitsuneyo: is it possible to use render in an .rb file, or only in erb?
[21:35:51] ivanskie: has joined #RubyOnRails
[21:35:55] capin: kitsuneyo: why not try and see if it works?
[21:36:17] notori0us: has left #RubyOnRails: ("WeeChat 0.4.1")
[21:36:20] kitsuneyo: yeah i guess i should just try it capin
[21:36:25] skyjumper: kitsuneyo: depends on where in the app that you are, rather than .rb vs .erb
[21:36:25] siemprefresco: has joined #RubyOnRails
[21:37:04] kitsuneyo: skyjumper, i'm in seeds.rb
[21:37:58] skyjumper: you're trying to render view output from seeds.rb?
[21:38:05] diegoviola: capin: don't worry, I'm ok, what doesn't kill you only makes you stronger, right?
[21:38:17] capin: diegoviola: were you working in the US?
[21:38:30] diegoviola: capin: no, Brazil, but this shit happens everywhere...
[21:38:50] capin: diegoviola: i wouldn't want to work in a microshop anyways FWIW
[21:39:04] diegoviola: capin: why though?
[21:39:17] diegoviola: capin: do you prefer to work at large organizations?
[21:39:56] capin: diegoviola: by microshop i mean a shop that relys on M$ products :l
[21:40:25] FailBit: what shop doesn't >_<
[21:40:47] capin: hehe, i hear that
[21:40:49] wildlander: has joined #RubyOnRails
[21:41:02] simkessy: I'm getting an error from the tpml.js file trying to setup s3_direct_upload with paperclip and jquery-file-upload. I've tried to put as much information here if anyone could take a look: http://stackoverflow.com/questions/32596142/error-setting-up-s3-direct-upload
[21:41:07] FailBit: "you could save a shitton of money by using linux"
[21:41:47] FailBit: uh oh, github exploded
[21:41:50] FailBit: getting unicorns
[21:42:13] smathy: kitsuneyo, using `load` does basically that, which is why it's so bad.
[21:42:18] diegoviola: LOL I recall some dude using Windows was telling me how to install Elasticsearch, he was like "You need to download elasticsearch from their website, but you need to install Java first and then add it to your path, then run the service", although he was technically correct I still recall how he was impressed when I showed him sudo pacman -S elasticsearch && systemctl start elasticsearch :D
[21:42:21] kitsuneyo: NoMethodError: undefined method `render' for main:Object
[21:42:22] capin: the problem is when you use Linux there's not much room to call a support line, especially if your using a distro ie Arch
[21:42:45] momomomomo: has joined #RubyOnRails
[21:42:48] FailBit: but how often do you need it
[21:42:51] kitsuneyo: but i don't understand why the variables aren't passed through
[21:43:01] FailBit: with windows it's "does it work? reimage"
[21:43:09] kitsuneyo: in html.erb partials, they are
[21:43:15] diegoviola: capin: yeah same here
[21:43:58] capin: managers don't understand that Linux can be a viable solution *sigh*
[21:44:02] smathy: kitsuneyo, local variables are only local to a file.
[21:44:14] smathy: kitsuneyo, but everything else is passed in/out.
[21:44:26] davidheward: has joined #RubyOnRails
[21:44:26] kitsuneyo: but there must be a way to run a bunch of different files together as one?
[21:44:43] diegoviola: capin: Sadly some people still think "You get what you pay for" and they think FOSS is worthless, but that's just ignorance
[21:44:55] capin: diegoviola: word
[21:44:58] bahar: has joined #RubyOnRails
[21:44:59] bahar: has joined #RubyOnRails
[21:45:06] smathy: kitsuneyo, eval `cat filename` - but don't do that even more.
[21:46:05] kitsuneyo: capin, at enterprise level many organisations are running linux, stuff like ibm power 8 has linux solutions
[21:46:13] kitsuneyo: smathy, what's the danger?
[21:47:15] capin: kitsuneyo: i think the Linux mainframe introduced by IBM is pretty new to the scene, but it's a good place to start
[21:48:23] smathy: simkessy, and which is line 36 of your JS?
[21:48:41] diegoviola: if it weren't for Linux and FOSS I probably wouldn't be a programmer today...
[21:49:28] simkessy: smathy: tmpl.load = function (id) { return document.getElementById(id).innerHTML; };
[21:49:29] smathy: kitsuneyo, many many reasons, eg. any variable in any of the files will clobber any other variable you've set elsewhere.
[21:49:45] smathy: kitsuneyo, you've also made it impossible for the ruby interpreter to report where problems happen back to you.
[21:49:55] capin: diegoviola: i prefer the term software engineer ;-)
[21:49:57] smathy: simkessy, and which id is it?
[21:50:21] smathy: kitsuneyo, also, nothing prevents the same file being run more than once.
[21:50:35] smathy: kitsuneyo, but really, many more problems.
[21:50:41] simkessy: smathy: I'm not sure, it's all coming from the script tag which I didn't write. I don't know what it's looking for.
[21:53:12] smathy: simkessy, ok, I'll guess :) Check the HTML that has been generated in the page for s3_uploader - maybe that s3_uploader_form doesn't work the way you think.
[21:53:42] kitsuneyo: ok, i won't even try that
[21:53:48] nettoweb: has joined #RubyOnRails
[21:53:51] diegoviola: I remember assembling a computer from the pile of obsolete hardware and running Slackware back in the days and learning everything I could about Linux, man pages, etc, I miss those old days
[21:54:17] wethu: has joined #RubyOnRails
[21:54:40] simkessy: smathy, I looked at the source and there's a form with 's3_uploader' as the ID
[21:54:54] baweaver: has joined #RubyOnRails
[21:55:29] smathy: simkessy, and it's the only thing on the page with that ID?
[21:56:03] Jasaka: has joined #RubyOnRails
[21:56:30] kitsuneyo: i think given the number of variable i have, my best option is stuff like "game.genres << Genre.where( name: ["Action", "Adventure"]" that you suggested before. it's the simplest and easiest to manage, and these files only have to run occasionally
[21:56:59] troyready: has joined #RubyOnRails
[21:57:36] pixelhandler: has joined #RubyOnRails
[21:58:32] richipargo: has joined #RubyOnRails
[21:59:23] Jon30: has joined #RubyOnRails
[22:00:01] chipotle: has joined #RubyOnRails
[22:00:22] simkessy: smathy, yea nothing else has it
[22:02:22] smathy: simkessy, sorry, I just don't know what's calling that tmpl.load function (and with what argument).
[22:02:45] smathy: kitsuneyo, sounds good.
[22:03:12] simkessy: smathy, yea it's fine. I'll keep looking into it or try to find a better tutorial, thx
[22:05:10] capin: anyone know when the paperback version of rails 4 in action is shipping?
[22:06:37] kitsuneyo: capin, think it's next year
[22:07:24] Synthead: has joined #RubyOnRails
[22:07:28] capin: the same time rails 5 gets released :P
[22:07:28] kitsuneyo: i could be wrong
[22:07:33] EasyCo: has joined #RubyOnRails
[22:07:42] kitsuneyo: it could be autumn
[22:08:14] capin: i have the PDF version i bought, just would like a physical copy of the book :/
[22:08:18] annlewis: has joined #RubyOnRails
[22:08:54] f00dMonsta: has joined #RubyOnRails
[22:10:17] darrencauthon: has joined #RubyOnRails
[22:11:05] bePolite: has joined #RubyOnRails
[22:12:15] nettoweb: has joined #RubyOnRails
[22:13:51] chipotle: has joined #RubyOnRails
[22:14:43] mikecmpbll: has joined #RubyOnRails
[22:17:21] jaequery: has joined #RubyOnRails
[22:18:53] hahuang65: has joined #RubyOnRails
[22:21:21] EminenceHC: has joined #RubyOnRails
[22:21:40] kitsuneyo: has joined #RubyOnRails
[22:22:12] smathy: capin, the authors received their copies the other day.
[22:22:22] smathy: Nor sure if that means anything.
[22:25:10] maz-dev: has joined #RubyOnRails
[22:28:42] f00dMonsta: has joined #RubyOnRails
[22:29:31] JimmyNeutron: has joined #RubyOnRails
[22:30:00] dideler: has joined #RubyOnRails
[22:31:06] jaequery: has joined #RubyOnRails
[22:34:33] Pupeno: has joined #RubyOnRails
[22:35:16] fschuindt: has joined #RubyOnRails
[22:37:33] chrisco: has joined #RubyOnRails
[22:39:06] baweaver: has joined #RubyOnRails
[22:43:39] quazimodo: has joined #RubyOnRails
[22:43:42] johnflux: has joined #RubyOnRails
[22:45:56] superlou: has joined #RubyOnRails
[22:46:50] jaequery: has joined #RubyOnRails
[22:48:34] Scriptonaut: has left #RubyOnRails: ()
[22:49:27] yairgo: has joined #RubyOnRails
[22:51:43] rickmasta: has joined #RubyOnRails
[22:53:20] FCser: has joined #RubyOnRails
[22:56:52] unholycrab: has joined #RubyOnRails
[22:57:31] x-light: capin: September 10 (quote radar)
[22:58:03] x-light: capin: that would be 2015, too :)
[23:00:16] badfish129: has joined #RubyOnRails
[23:00:51] milchschaum: has joined #RubyOnRails
[23:02:00] rakm: has joined #RubyOnRails
[23:03:20] baweaver: x-light: ???
[23:03:22] yaymukund: has joined #RubyOnRails
[23:04:04] x-light: baweaver: that was when r4ia is shipping paper copies iirc
[23:04:15] baweaver: context was off-screen
[23:04:36] x-light: ACTION scrolls up
[23:05:02] x-light: oh yeah, nearly an hour. :)
[23:05:12] x-light: better late than never!
[23:08:55] kitsuneyo: yeah i knew early 2016 was wrong as soon as i said it
[23:09:04] annlewis: has joined #RubyOnRails
[23:09:47] baash05: has joined #RubyOnRails
[23:09:58] Linell: has joined #RubyOnRails
[23:11:58] Linell: Has anyone built the backend for a facebook game (for phones) with rails?
[23:13:10] drale2k: has joined #RubyOnRails
[23:13:12] arBmind1: has joined #RubyOnRails
[23:13:35] Linell: I was hoping I could find someone and pick their brains on the way they stored/interacted with their users
[23:13:58] Radar: good evening
[23:14:10] paulcsmith: has joined #RubyOnRails
[23:14:39] totimkopf: Radar: did you write that emberbites tutorial 'blorgh'?
[23:15:14] Radar: totimkopf: yeah, it's out of date
[23:16:00] totimkopf: Radar: ah, do you plan on updating it in the near future?
[23:16:05] Radar: totimkopf: No plans for it yet.
[23:16:19] Radar: totimkopf: I've not used Ember in > 1 year
[23:16:38] Radar: I suspect it's changed a bit
[23:16:45] Radar: and what I would do now is build an API and the Ember app separately
[23:16:53] Radar: Since that *seems* to be the way people are doing it
[23:16:56] totimkopf: Radar: have you forsaken ember for angular?
[23:17:12] Radar: totimkopf: nope. I use Angular at work, but we're switching over to React now.
[23:17:18] Radar: For my personal stuff I'm also using React.
[23:19:43] Radar: aaand I'm off. Have fun all :)
[23:19:46] totimkopf: Radar: I need to learn a JS library but I'm a bit torn
[23:19:49] totimkopf: okay, have fun
[23:19:53] Radar: totimkopf: Give Ember a go. It's fun.
[23:19:59] Radar: React has a much nicer learning curve
[23:20:01] Radar: *disappears*
[23:20:05] nettoweb: has joined #RubyOnRails
[23:20:41] EminenceHC: has joined #RubyOnRails
[23:22:02] totimkopf: er, s/library/framework
[23:23:09] diego2: has joined #RubyOnRails
[23:23:20] FailBit: https://github.com/shinh/makelisp
[23:23:55] diego2: has joined #RubyOnRails
[23:24:17] beauby: Let's say I have nested classes `class A; class B; class C; end; end; end;`, how would I go around "going up one level" from A::B::C?
[23:25:17] bricker: beauby: It really depends what you're trying to access, but you can come in from the top with ::A::B
[23:25:32] bricker: beauby: in most cases, just referencing B will be fine
[23:27:01] beauby: bricker: I'm trying to lookup constants in the following order: A::B::C::D, A::B::D, A::D, D
[23:27:12] beauby: where D is the constant I'm looking up
[23:27:33] bricker: beauby: well lucky for you you've just described ruby's constant lookup chain
[23:27:38] bricker: beauby: just typing "D" will do that
[23:27:47] beauby: No wait, I meant A::B::C::D, B::C::D, C::D, D
[23:28:11] beauby: (in case there exists a toplevel B, or a toplevel C, etc.)
[23:28:34] smathy: beauby, that's not how constant lookup works.
[23:28:42] bricker: ::A::B::C::D, ::B::C::D, ::C::D, ::D ?
[23:28:51] smathy: beauby, this is probably more a question for #ruby-lang or #ruby-pro btw.
[23:28:53] FailBit: :::::::::::::::::::::::::::::::
[23:29:35] beauby: smathy: Yeah I'll ask there, but I figured rails might have a helper method that does just that
[23:29:45] beauby: bricker: yes
[23:30:14] smathy: beauby, not that I'm aware of, I don't think stdlib has anything either, I think you'll be manually ripping the top levels off the namespaces.
[23:30:37] Pupeno: has joined #RubyOnRails
[23:30:41] livecano: has joined #RubyOnRails
[23:31:21] bricker: beauby: you'll have to do it manually, otherwise Ruby would have to traverse every existing module looking for some module "D", which is of course ridiculous. You could write something simple that traverses just a given list of modules.
[23:32:12] beauby: bricker: Yeah, of course, I wasn't expecting ruby to do that on actual lookups, I was merely enquiring about a few pointers on how to deal with it manually
[23:32:15] Linell: has joined #RubyOnRails
[23:32:16] bricker: Using A.constants, etc.
[23:33:08] EminenceHC: has joined #RubyOnRails
[23:33:50] bricker: beauby: Well I guess you'll just need to give it a list of module to traverse, my_const = [A, B, C].select { |c| c.constants.include?(:D) }; my_const::D
[23:33:53] bricker: something like that
[23:34:26] beauby: bricker: right, thanks for your help
[23:36:51] webguynow: has joined #RubyOnRails
[23:37:48] ellisTAA: has joined #RubyOnRails
[23:38:59] t3rm: has joined #RubyOnRails
[23:39:17] ckinniburgh_: has joined #RubyOnRails
[23:39:17] goodcodeguy: has joined #RubyOnRails
[23:39:34] lessless: has joined #RubyOnRails
[23:40:10] ellisTAA: anyone know how to add css to the form for forms? i???ve tried to add classes to them but that doesn???t seem to work ...
[23:40:27] baweaver: perhaps you all can enlighten me on this one. Someone screwed the DB migration process and I really don't want to go through and comment every dang table creation. Why does Rails not just ignore create_table when it exists?
[23:40:52] smathy: EllisTAA, it does work.
[23:41:23] smathy: baweaver, because ignoring it could hide a problem.
[23:41:40] ellisTAA: smathy: so just wrap the forms in divs, give them classes, and then style them?
[23:41:52] smathy: baweaver, eg. creating a table the same name as an existing one.
[23:42:02] baweaver: perhaps, but dang annoying when someone screws something up.
[23:42:04] smathy: EllisTAA, or just add a class to the form itself.
[23:42:12] smathy: baweaver, get a better team ;)
[23:42:29] baweaver: I'll at least have some strong words for people....
[23:42:39] ellisTAA: smathy: would i have to wrap the form in a div or can i add it to the form without divs
[23:42:42] badfish129: has joined #RubyOnRails
[23:43:04] smathy: EllisTAA, you could do either.
[23:43:45] da3mian: has joined #RubyOnRails
[23:43:56] centrx: has joined #RubyOnRails
[23:44:09] ellisTAA: doesnt work
[23:45:11] FailBit: "doesnt work"
[23:45:16] FailBit: you haven't showed any code at all
[23:45:23] centrx: dude, it doesn't work
[23:45:28] centrx: how can he show code if it doesn't work
[23:45:46] ellisTAA: rhttps://gist.github.com/ellismarte/a88902708175c8fc8998
[23:47:17] FailBit: https://stackoverflow.com/questions/9090994/how-to-set-class-attribute-with-form-tag-in-rails
[23:47:23] FailBit: a quick google revealed such
[23:47:31] FailBit: =form_tag named_route, :method => :put, :class => 'disable_on_submit'
[23:47:37] smathy: EllisTAA, what you have works fine.
[23:47:57] one_zero: has joined #RubyOnRails
[23:48:04] bendangelo: has joined #RubyOnRails
[23:48:52] smathy: EllisTAA, I'm going to guess that the CSS you're showing isn't being included in your page because your application.css manifest is broken.
[23:49:25] ellisTAA: smathy: why would it be broken
[23:49:43] smathy: EllisTAA, add the app/assets/stylesheets/application.css file to your gist.
[23:50:05] smathy: EllisTAA, also, where is that city.css located?
[23:50:27] ellisTAA: https://gist.github.com/ellismarte/a88902708175c8fc8998
[23:50:34] ellisTAA: it???s located in the css folder in app
[23:50:35] livecano: has joined #RubyOnRails
[23:50:41] ellisTAA: i mean stylesheets
[23:50:54] smathy: EllisTAA, so under app/stylesheets ?
[23:51:38] smathy: EllisTAA, it needs to be in app/assets/stylesheets - that's your problem.
[23:51:40] fschuindt: has joined #RubyOnRails
[23:52:02] ellisTAA: oo sorry that???s what i meant. it???s in there
[23:53:12] smathy: EllisTAA, so is it actually called city.css and not city.scss ?
[23:53:26] ellisTAA: it???s called cities.css
[23:54:23] smathy: Rename it to .scc
[23:54:29] smathy: Sorry, .scss
[23:54:40] smathy: (ie. cities.scss )
[23:55:27] ellisTAA: that didn???t work
[23:56:15] smathy: There we go :)
[23:56:18] ellisTAA: so why did it have to be .scss?
[23:56:29] smathy: http://guides.rubyonrails.org/asset_pipeline.html
[23:57:22] ellisTAA: thanks for the help
[23:57:34] smathy: EllisTAA, you're welcome.
[23:59:40] FailBit: https://blog.newrelic.com/2013/04/10/x-ray-sessions/
[23:59:42] FailBit: im gonna try this