« Back to channel list

#RubyOnRails - 18 May 2017

« Back 1 day Forward 1 day »
[00:04:16] djinni`: has joined #RubyOnRails
[00:04:44] dustinm`: has joined #RubyOnRails
[00:11:15] rakm: has joined #RubyOnRails
[00:22:39] amperry: Radar: I got the routes and redirects to work, but I'm stuck on one thing: in the update_password method, redirecting to '/root' sends me back to a login screen, but (I thought) this all happened after I was already signed in: https://gist.github.com/amp108/c6b934d6af89718fbb97d71b7d4e84df
[00:24:29] amperry: wondering what that redirect (or render, or whatever else) action should be.
[00:34:31] ascarter: has joined #RubyOnRails
[00:37:17] shilon: has joined #RubyOnRails
[00:43:18] Rodya_: has joined #RubyOnRails
[00:51:35] aguynamedben: has joined #RubyOnRails
[00:51:48] wethu: has joined #RubyOnRails
[00:52:37] shilon: hello there, I’m trying to use Faker to seed some dummy data. I’m getting this error LoadError: cannot load such file -- faker
[00:54:16] Radar: Shilon: Did you add faker to your Gemfile and restart your server?
[00:54:33] shilon: I’ve added faker to development and test
[00:54:39] sevenseacat: has joined #RubyOnRails
[00:54:45] shilon: and rails db:drop db:create db:migrate db:seed
[00:55:01] shilon: it creates and migrate but when it tries to seed I get this error
[00:55:12] shilon: I’ve already added the requrie ‘faker’
[00:55:16] shilon: but still not working
[00:55:33] apparition: has joined #RubyOnRails
[00:56:26] duderonomy: has joined #RubyOnRails
[00:56:49] Radar: Shilon: Did you restart spring?
[00:56:51] Radar: spring stop
[00:57:23] shilon: think I’m not using spring...
[00:57:45] shilon: should I be using it?
[00:57:59] Radar: Did you remove it from the Gemfile?
[00:58:21] shilon: no, its in development, test
[00:58:28] Radar: So you'd be using it then.
[00:58:38] Radar: It's enabled by default. Removing it from the Gemfile is the way to disable it.
[00:58:44] shilon: I get -bash: spring: command not found
[00:58:45] Radar: It would lead to these sorts of issues.
[00:58:50] Radar: bundle exec spring stop
[00:59:30] shilon: bundler: command not found: spring
[00:59:30] shilon: Install missing gem executables with `bundle install`
[00:59:37] shilon: I do it and it always says the same
[00:59:52] Radar: Joy. I don't have any idea.
[01:00:16] shilon: do I need to specify a version
[01:00:25] sevenseacat: whats the problem?
[01:00:43] shilon: hey sevenseacat
[01:01:01] shilon: I was trying to use Faker to seed some data.
[01:01:15] shilon: and I get LoadError: cannot load such file -- faker
[01:01:30] shilon: I’ve added require ‘faker’ to the top of the file but it still doesn’t work
[01:01:58] Radar: Shilon: What's the command you're running when you get that error?
[01:02:12] shilon: rails db:drop db:create db:migrate db:seed
[01:02:26] sevenseacat: how did you install faker?
[01:02:46] shilon: added the gem ‘faker’ to development, test group and bundle install
[01:03:14] sevenseacat: can you gist that part of your Gemfile?
[01:03:54] shilon: https://gist.github.com/jamesalbuquerque/2952864ddece52c8f7683bf39295b383
[01:04:32] knight33: has joined #RubyOnRails
[01:04:37] sevenseacat: okay, and how are you using faker?
[01:05:55] shilon: I’ve added to the link
[01:06:46] sevenseacat: you are using spring!
[01:07:08] sevenseacat: I suspect you're looking at the wrong Gemfile, for a different app
[01:07:13] shilon: but spring stop doesn’t do anything
[01:08:18] sevenseacat: or you're in the terminal running commands for a different app
[01:09:03] shilon: it’s the correct one
[01:09:14] shilon: but I’m going to close the terminal
[01:09:15] shilon: and open again
[01:09:25] sevenseacat: well your Gemfile says you're using spring, and your terminal does not
[01:09:46] sevenseacat: are you running your commands in development?
[01:10:05] shilon: good question
[01:13:05] bobbobbins: has joined #RubyOnRails
[01:13:27] shilon: RAILS_ENV=development rails db:drop db:create db:migrate db:seed got the same error
[01:14:26] shilon: am I missing anything from faker?
[01:14:42] shilon: I don’t see anything else besides adidng the gem bundling and using...
[01:15:01] bobbobbins: has joined #RubyOnRails
[01:16:00] Radar: Shilon: what OS?
[01:16:21] Radar: Shilon: ps aux | grep spring
[01:16:24] Radar: What does that return?
[01:16:42] shilon: 59861 0.0 0.0 2443044 2008 s000 S+ 2:16AM 0:00.00 grep spring
[01:17:30] Radar: Ok, then it's not Spring.
[01:19:02] shilon: so spring is ok
[01:19:13] Radar: It doesn't make sense how this could be happening.
[01:19:15] shilon: I supose faker works with rails 5 right?
[01:19:36] shilon: my seed.rb is ok right?
[01:19:42] sevenseacat: in that folder, run `cat Gemfile` and make sure its the same Gemfile you're editing.
[01:20:02] Radar: Shilon: What happens if you restart your entire machine?
[01:20:19] Radar: I am serious.
[01:20:32] shilon: let me try after sevenseacat suggestion
[01:20:41] Radar: If it's still a problem after a reboot then it's not something caching the Ruby process.
[01:21:50] shilon: sevenseacat: its the one :/
[01:22:23] sevenseacat: ...yeah that doesn't make sense.
[01:22:34] aajjbb: has joined #RubyOnRails
[01:25:15] Radar: Shilon: Time to reboot!
[01:26:00] shilon: ill have to do that..
[01:26:07] shilon: in a few minutes
[01:26:14] shilon: just finishing something :P
[01:31:09] shilon: has joined #RubyOnRails
[01:33:30] shilon: still get the same error
[01:33:46] shilon: sou I require ‘faker’ in the application.rb?
[01:45:22] Rodya_: has joined #RubyOnRails
[01:47:18] Technodrome: has joined #RubyOnRails
[02:04:36] Technodrome: has joined #RubyOnRails
[02:13:48] Jameser: has joined #RubyOnRails
[02:16:11] Technodrome: has joined #RubyOnRails
[02:17:52] itarato: has joined #RubyOnRails
[02:18:14] webdestroya: has joined #RubyOnRails
[02:19:57] irishfromua: has joined #RubyOnRails
[02:23:43] mwlang: has joined #RubyOnRails
[02:31:14] uxp: has joined #RubyOnRails
[02:38:20] mwlang: So I want to do a page with tabs where tabs are essentially a type (or category) of the thing we’re editing. All CRUD operations are understood to have the tab’s indicated type/category. For example, Jurors can be either Grand Jury or Trial Jury so the CRUD operations would be /jurors/:category/…. where :category is either “trial” or “grand” How would I draw this route in the routes table? I have “resources :juror” there now and we
[02:38:21] mwlang: prevously were not distinguishing between the two types of jurors.
[02:39:10] bruno-: has joined #RubyOnRails
[02:46:06] Rodya_: has joined #RubyOnRails
[02:48:05] tanuki: has joined #RubyOnRails
[02:52:16] Talltree: has joined #RubyOnRails
[02:57:43] Saukk: has joined #RubyOnRails
[02:58:56] ResidentBiscuit: has joined #RubyOnRails
[02:59:28] Saukk: has joined #RubyOnRails
[03:02:24] webdestroya: has joined #RubyOnRails
[03:11:03] ascarter: has joined #RubyOnRails
[03:12:15] jphase: has joined #RubyOnRails
[03:23:36] ur5us: has joined #RubyOnRails
[03:26:24] Talltree: has joined #RubyOnRails
[03:33:13] cgfbee: has joined #RubyOnRails
[03:36:06] quirkycoders: has joined #RubyOnRails
[03:46:53] Rodya_: has joined #RubyOnRails
[03:47:54] Technodrome: has joined #RubyOnRails
[03:48:55] Technodrome: has joined #RubyOnRails
[03:51:50] quazimodo: has joined #RubyOnRails
[03:52:10] guest3456: has joined #RubyOnRails
[03:52:43] guest3456: i'm new to ruby, whats the difference between the Gemfile and Gemfile.lock
[03:53:29] sevenseacat: Gemfile specifies the gems you want to use. Gemfile.lock is what versions of those gems, their dependencies, etc.
[03:54:11] guest3456: so i'd edit both of those when i want to make changes?
[03:54:35] sevenseacat: no. don't edit Gemfile.lock, that gets managed automatically.
[03:55:14] guest3456: why is that always included in the github repos then
[03:56:05] sevenseacat: because its the versions of gems and their dependencies that the app was built against
[03:56:25] sevenseacat: you could specify `gem "rails"` in your Gemfile, but that could be any version
[03:56:55] sevenseacat: when you run `bundle install`, it will fetch a version and store that version in the Gemfile.lock, so next time you run bundle install, it will use the same version
[03:57:33] guest3456: im' trying to test out Ruby without installing it locally and just editing a test project on heroku
[03:57:56] guest3456: but the repo is listed in both Gemfile and .lock
[03:58:20] sevenseacat: you can't edit things on heroku
[03:58:35] guest3456: well was gonna push to github and then deploy to heroku
[03:58:58] guest3456: but not sure how to do it properly
[03:59:10] sevenseacat: well step 1 is to install all the dependencies of the app you want to edit
[04:00:26] guest3456: so i have to do it all locally then
[04:00:38] guest3456: cant just edit code, push to github, and see changes on heroku
[04:01:00] sevenseacat: that would be very risky and i would not recommend to anyone, especially not 'new to ruby' developers
[04:01:27] sevenseacat: how are you supposed to know if your code changes work?
[04:01:52] guest3456: haha good point. i was just gonna see if it worked in the browser
[04:02:30] sevenseacat: we don't encourage those sorts of practices.
[04:02:52] sevenseacat: if you want to work on ruby code, step 1 is to install ruby.
[04:06:07] guest3456: yea certainly i get that
[04:08:02] Technodrome: has joined #RubyOnRails
[04:12:57] mwlang: guest3456: another way developers “try out” code, ruby, etc. without installing “locally” to their main machine is to use vagrant, or virtualbox and virtual machine or docker images.
[04:13:16] guest3456: yeah watching a video on docker now
[04:13:29] guest3456: doesnt look like the repo i wanted to use has any of those supplied though
[04:13:33] guest3456: only a heroku deploy
[04:14:12] mwlang: so build a virtual machine with ruby installed. Its fairly straightforward.
[04:15:22] mwlang: guest3456: or borrow somebody else’s as your starting point: https://github.com/rails/rails-dev-box
[04:19:17] guest3456: thx will investigate
[04:31:09] iliketurtles: has joined #RubyOnRails
[04:39:39] uks: has joined #RubyOnRails
[04:47:35] Rodya_: has joined #RubyOnRails
[04:54:25] xall: has joined #RubyOnRails
[04:55:14] ascarter: has joined #RubyOnRails
[05:05:58] romeoh: has joined #RubyOnRails
[05:07:34] bobbobbins: has joined #RubyOnRails
[05:11:07] sevenseacat: has joined #RubyOnRails
[05:12:23] gusrub: has joined #RubyOnRails
[05:15:25] marr: has joined #RubyOnRails
[05:22:02] juggler: has joined #RubyOnRails
[05:22:58] ascarter: has joined #RubyOnRails
[05:28:29] atrius: has joined #RubyOnRails
[05:33:00] ascarter: has joined #RubyOnRails
[05:36:00] atrius: has joined #RubyOnRails
[05:42:58] brent__: has joined #RubyOnRails
[05:44:37] quirkycoders: has joined #RubyOnRails
[05:45:41] ascarter: has joined #RubyOnRails
[05:48:24] Rodya_: has joined #RubyOnRails
[05:53:41] patarr: has joined #RubyOnRails
[06:08:55] romeoh: has joined #RubyOnRails
[06:12:33] atrius: has joined #RubyOnRails
[06:13:03] alphaatom: has joined #RubyOnRails
[06:25:37] quirkycoders: has joined #RubyOnRails
[06:32:09] gambl0re: has joined #RubyOnRails
[06:32:24] uks: has joined #RubyOnRails
[06:34:37] conta: has joined #RubyOnRails
[06:46:30] ur5us: has joined #RubyOnRails
[06:49:05] Rodya_: has joined #RubyOnRails
[06:56:04] drale2k_: has joined #RubyOnRails
[06:57:33] quirkycoders: has joined #RubyOnRails
[06:58:23] Technodrome: has joined #RubyOnRails
[07:09:40] romeoh: has joined #RubyOnRails
[07:10:13] waseem_: has joined #RubyOnRails
[07:11:50] waseem_: has joined #RubyOnRails
[07:12:53] drale2k_: has joined #RubyOnRails
[07:28:58] asperon: has joined #RubyOnRails
[07:30:28] asperon: hi guys, i am using will_paginate to load the next page via replacement, is there a standardised way to run js/coffescript on the content being loaded before it is inserted into the container? i want to add an onclick event
[07:30:47] asperon: or if i can just rerun the "on page load" js/coffe that gets run on the first load
[07:31:11] sevenseacat: why do you need to re-run it again?
[07:32:04] srinidhi: has joined #RubyOnRails
[07:33:13] asperon: since i add new items, and i want the to react to the click event as well
[07:33:16] quirkycoders: has joined #RubyOnRails
[07:33:41] sevenseacat: the js that you run on page load shouldn't be tied to specific elements that can change
[07:33:47] sevenseacat: it should be tied to eg. the parent element
[07:34:16] asperon: its a selector along the lines of $('.preview-link').onclick( blalala )
[07:34:38] asperon: and since i add more items with the class they would need to get the onclick added as well
[07:34:59] sevenseacat: okay, so rewrite it as $(parent div).click('.preview-link', function() { blahblahbah })
[07:35:18] asperon: ah, thats a good idea :)
[07:35:28] asperon: now to get that to coffee script :)
[07:35:42] asperon: sevenseacat: thanks
[07:37:08] DriesS: has joined #RubyOnRails
[07:37:10] DriesS: I search an application to get some notifications send by tcp/ip messages or pushover for windows client. The notifications should be closed on user action and not automaticly. Somebody knows a tool for that?
[07:37:22] defsdoor: has joined #RubyOnRails
[07:40:08] jarr0dsz: has joined #RubyOnRails
[07:40:22] jarr0dsz: hello everyone could anyone advise me the best way to do do multitennant?
[07:40:55] jarr0dsz: would it be wiste to implement something like act_as_tennant gem
[07:41:33] jarr0dsz: or just make the config.yml dynamic so you load the correct database based based on a subdomain or login for a user?
[07:41:46] sevenseacat: there is no 'best' way
[07:41:50] sevenseacat: everything has tradeoffs
[07:41:56] helpa: Multitenancy With Rails - https://leanpub.com/multi-tenancy-rails-2 - An excellent book that teaches you about building a Multitenanted Rails application. Written by Ryan Bigg.
[07:49:49] Rodya_: has joined #RubyOnRails
[07:53:24] zacts: has joined #RubyOnRails
[07:54:32] patarr: has joined #RubyOnRails
[07:54:56] jarr0dsz: how about https://github.com/PHCNetworks/multi-tenancy-devise anyone have used this?
[07:55:21] jarr0dsz: i thought first of just making the config file modular, so it "just" loads the correct db; and thats it
[07:55:32] jarr0dsz: this would require no modifications to the codebasbe furthermore
[07:55:46] jarr0dsz: the only problem i can think of this, is having to run the migrations
[07:57:25] jarr0dsz: but would could write a script that runs all migrations for all db's; we want multi tennancy to seperate data for security and this seems best simplest solution; anyone have opinions on this approach? things i might overlook
[07:58:28] mikecmpbll: has joined #RubyOnRails
[07:58:30] brent__: has joined #RubyOnRails
[08:01:30] dionysus69: has joined #RubyOnRails
[08:05:39] workmad3: has joined #RubyOnRails
[08:07:59] drale2k_: has joined #RubyOnRails
[08:09:08] arBmind: has joined #RubyOnRails
[08:10:36] romeoh: has joined #RubyOnRails
[08:21:26] lxsameer: has joined #RubyOnRails
[08:37:09] DriesS: has joined #RubyOnRails
[08:37:37] aseibert: has joined #RubyOnRails
[08:38:37] dionysus69: has joined #RubyOnRails
[08:45:39] quirkycoders: has joined #RubyOnRails
[08:51:53] Rodya_: has joined #RubyOnRails
[09:01:11] armando: has joined #RubyOnRails
[09:11:14] romeoh: has joined #RubyOnRails
[09:12:07] ur5us: has joined #RubyOnRails
[09:17:10] itsgokul: has joined #RubyOnRails
[09:17:24] robotmay: has joined #RubyOnRails
[09:17:55] robotmay: Odd question: can I mount standard Rails apps inside a Rails API app? Or is that gonna fuck stuff up in interesting ways? (due to lack of sessions etc)
[09:19:16] gusrub: has joined #RubyOnRails
[09:21:17] quirkycoders: has joined #RubyOnRails
[09:29:15] ErhardtMundt: has joined #RubyOnRails
[09:29:16] Technodrome: has joined #RubyOnRails
[09:30:15] mahloun: has joined #RubyOnRails
[09:33:01] xall: has joined #RubyOnRails
[09:44:01] quazimodo: has joined #RubyOnRails
[09:45:59] dionysus69: has joined #RubyOnRails
[09:46:37] Doldge: has joined #RubyOnRails
[09:46:42] Radar: jarr0dsz: hi.
[09:46:49] Radar: Please real MTWR. It will save you so much time.
[09:47:01] jarr0dsz: hi Radar , what you mean with MTWR?
[09:47:06] helpa: Multitenancy With Rails - https://leanpub.com/multi-tenancy-rails-2 - An excellent book that teaches you about building a Multitenanted Rails application. Written by Ryan Bigg.
[09:47:24] ferr: has joined #RubyOnRails
[09:47:33] jarr0dsz: you wrote it? yes we will get a copy of the book don't have paypal at hand but the though would be to have not real multitennant
[09:47:42] jarr0dsz: we want to seperate db's and customers/ organisation data
[09:48:33] jarr0dsz: so basically making a different db for each organisation, using a mapping database db seperate to hook the right login to the right database so there is no option one can get data from another ones record
[09:48:38] jarr0dsz: but we will be reading your book thank you
[09:52:06] shotbug: has joined #RubyOnRails
[09:52:57] jarr0dsz: is there an easy way to create a custome database beside dev,prod,test in database.yml?
[09:53:03] Rodya_: has joined #RubyOnRails
[09:55:29] patarr: has joined #RubyOnRails
[09:57:13] quirkycoders: has joined #RubyOnRails
[09:59:12] robotmay: jarr0dsz: There's a gem called Apartment that manages multitenancy in a Rails app that might be worth looking at. It handles switching between multiple databases per customer etc (or schemas in the case of postgres)
[10:03:48] Ove_: has left #RubyOnRails: ()
[10:10:46] mrbubbles: has joined #RubyOnRails
[10:11:09] mrbubbles: Any way to show log how long a job in sidekiq took to complete?
[10:11:47] mikecmpbll: it tells you in the logs afaicr.
[10:12:01] romeoh: has joined #RubyOnRails
[10:17:02] itarato: has joined #RubyOnRails
[10:18:15] advorak: has joined #RubyOnRails
[10:18:58] duderonomy: has joined #RubyOnRails
[10:19:22] elsurudo: has joined #RubyOnRails
[10:19:29] Cache_Money: has joined #RubyOnRails
[10:20:12] elsurudo: Does anyone have any experience with the “typescipt-rails“ gem? Specifically, I’m trying to convert a JS file to a TS file, but it makes use of jQuery, and I get a bunch of errors like: “error TS2304: Cannot find name ‘$’”. Anyone know how to solve this?
[10:23:13] gil_: has joined #RubyOnRails
[10:24:47] djbkd: has joined #RubyOnRails
[10:28:40] Technodrome: has joined #RubyOnRails
[10:31:48] w0rd-driven: has joined #RubyOnRails
[10:42:08] drale2k_: has joined #RubyOnRails
[10:50:35] srinidhi: has joined #RubyOnRails
[10:54:25] srinidhi: has joined #RubyOnRails
[10:55:02] rgr: has joined #RubyOnRails
[10:58:30] wethu: has joined #RubyOnRails
[11:02:12] b0mbnet: has joined #RubyOnRails
[11:09:32] quirkycoders: has joined #RubyOnRails
[11:12:48] romeoh: has joined #RubyOnRails
[11:15:27] shotbug: has joined #RubyOnRails
[11:21:24] renegadeandy: has joined #RubyOnRails
[11:23:47] mikecmpbll: how would one go about using a rvm user-installed ruby as root?
[11:24:06] patarr: has joined #RubyOnRails
[11:26:03] mikecmpbll: xpost to #rvm
[11:26:04] itarato: has joined #RubyOnRails
[11:28:45] drale2k_: has joined #RubyOnRails
[11:36:24] romeoh_: has joined #RubyOnRails
[11:40:37] dionysus69: has joined #RubyOnRails
[11:42:24] drale2k_: has joined #RubyOnRails
[11:47:06] DriesS_: has joined #RubyOnRails
[12:00:24] knight33: has joined #RubyOnRails
[12:11:41] Ergo: has joined #RubyOnRails
[12:19:11] quirkycoders: has joined #RubyOnRails
[12:24:21] drale2k_: has joined #RubyOnRails
[12:28:48] dminuoso: mikecmpbll: Why the fuck would you want that?
[12:29:28] itarato: has joined #RubyOnRails
[12:34:46] lupine: insane deployment. bet you.
[12:39:51] mikecmpbll: dminuoso : because i've a service management tool in ruby and it needs root :)
[12:40:05] mikecmpbll: and 95% of my servers have a user install of ruby
[12:40:15] dionysus69: has joined #RubyOnRails
[12:40:25] dminuoso: mikecmpbll: Why does it need root?
[12:40:40] mikecmpbll: to manage services which are installed systemwide as root
[12:40:45] dminuoso: mikecmpbll: setuid?
[12:41:18] apparition: has joined #RubyOnRails
[12:42:10] mikecmpbll: idk anything about setuid but i'll take a look :)
[12:44:02] Abhijit: has joined #RubyOnRails
[12:45:04] Abhijit: I am getting syntax error, unexpected tSYMBEG, expecting keyword_do or '{' or '(' add_column :users, :uid, :string, For migration line add_column :users, :provider, :string,
[12:46:35] sevenseacat: not for that line
[12:46:41] Technodrome: has joined #RubyOnRails
[12:46:41] sevenseacat: can you gist the full error?
[12:48:54] mikecmpbll: setuid looks scary.
[12:49:26] Abhijit: sevenseacat: https://gist.github.com/anonymous/83b8206bf4bb4c6027dc26d3510d5b0f
[12:50:12] sevenseacat: oh, you actually have commas at the ends of the lines? remove them
[12:51:43] Abhijit: removed. sevenseacat but those were added automatically by rails g migartion commad
[12:51:56] sevenseacat: only if you incorrectly added commas in the command
[12:52:45] Abhijit: what am I doing! :-)
[12:56:03] dminuoso: mikecmpbll: It's not really. It's the same concept as "sudo"
[12:56:10] DriesS_: has joined #RubyOnRails
[12:56:12] dminuoso: mikecmpbll: excecute something as another user.
[12:56:34] dminuoso: Except it's tightly controlled what "something" may be executed as which user.
[12:56:44] mikecmpbll: dminuoso: as far as i understand it from the brief time i've been looking, it allows any user to execute a file as if they were the owner.
[12:57:17] dminuoso: mikecmpbll: Not freely.
[12:57:40] mikecmpbll: anyway, it's little a bit backwards. i have a ruby script that i'd like to run with sudo because it needs to do lots of stuff that requires sudo
[12:58:18] dminuoso: mikecmpbll: Is this for relevant production software? Is this in a company environment?
[12:58:31] mikecmpbll: to have to go through all that stuff and make it work for a non-privileged user isn't really the ideal approach
[12:58:45] dminuoso: mikecmpbll: Then only use elevated permissions, otherwise you open yourself to a can of neverending worms.
[12:59:51] dminuoso: mikecmpbll: You really should setuid everytime you need to interact with a privilged service -> that's *exactly* what setuid is for.
[13:00:12] dminuoso: Because since Ruby is Ruby, if your program runs as root it's basically free to do whatever the heck it pleases.
[13:00:31] mikecmpbll: that's exactly what i require.
[13:00:46] dminuoso: mikecmpbll: So if an attacker gains control, he gains full system control.
[13:00:56] mikecmpbll: gains control of what?
[13:01:01] dminuoso: Of the entire system.
[13:01:04] mikecmpbll: the first bit
[13:01:09] Abhijit: Twist: mikecmpbll is the attacker! :-p
[13:01:11] wethu: has joined #RubyOnRails
[13:01:12] dminuoso: Control of your program.
[13:01:33] dminuoso: Give me root access to your company servers then
[13:01:34] dminuoso: if its fine.
[13:01:40] mikecmpbll: this software is comparable to puppet
[13:01:50] mikecmpbll: if an attacker gains control of puppet he can do wtf he likes.
[13:02:01] dminuoso: fair enough
[13:02:17] dminuoso: mikecmpbll: even your initial desire is answered with:
[13:02:19] dminuoso: setuid. ;-)
[13:02:31] mikecmpbll: setuid on what?
[13:02:34] dminuoso: the ruby script
[13:02:42] dminuoso: or rather *ruby* executing the script
[13:04:08] mikecmpbll: so i have a ruby web app running as deploy user, ruby is installed via rvm for the deploy user. i want to install my other software on this machine and use the already installed ruby
[13:04:31] mikecmpbll: with sudo privileges
[13:05:07] mikecmpbll: if that all still makes sense with setuid then i'll do more reading
[13:05:56] quiller: has joined #RubyOnRails
[13:06:31] mikecmpbll: i might just be being an idiot and misunderstanding how rvm and sudo interact.
[13:10:33] aajjbb: has joined #RubyOnRails
[13:12:45] mikecmpbll: i think that's highly likely.
[13:17:40] Technodrome: has joined #RubyOnRails
[13:26:37] DLSteve: has joined #RubyOnRails
[13:27:15] bruno-: has joined #RubyOnRails
[13:29:12] cam27: has joined #RubyOnRails
[13:34:08] irishfromua: has joined #RubyOnRails
[13:41:04] drale2k_: has joined #RubyOnRails
[13:44:40] harfangk: has joined #RubyOnRails
[13:45:47] waseem_: has joined #RubyOnRails
[13:56:04] Rodya_: has joined #RubyOnRails
[13:56:40] fryguy: has joined #RubyOnRails
[14:01:52] drale2k_: has joined #RubyOnRails
[14:06:21] bheesham: has joined #RubyOnRails
[14:06:23] LightStalker: has joined #RubyOnRails
[14:07:40] mrbubbles: Hmm I'm using Thoughtbot's Scenic to generate a matview, but I have a migration that keeps freezing. Any tips for debugging?
[14:09:44] deur-_: has joined #RubyOnRails
[14:13:58] bmgoog: has left #RubyOnRails: ()
[14:16:21] tedwing: has joined #RubyOnRails
[14:17:47] User458764: has joined #RubyOnRails
[14:21:32] ascarter: has joined #RubyOnRails
[14:31:28] jerematic: has joined #RubyOnRails
[14:34:18] User458764: has joined #RubyOnRails
[14:35:08] hashrocket: has joined #RubyOnRails
[14:46:43] AzaToth: has joined #RubyOnRails
[14:48:30] xall: has joined #RubyOnRails
[14:50:10] jphase: has joined #RubyOnRails
[14:54:48] chouhoulis: has joined #RubyOnRails
[14:56:47] Rodya_: has joined #RubyOnRails
[15:07:07] ascarter: has joined #RubyOnRails
[15:08:02] DriesS: has joined #RubyOnRails
[15:08:39] quirkycoders: has joined #RubyOnRails
[15:09:02] Rodya_: has joined #RubyOnRails
[15:13:08] shilon: has joined #RubyOnRails
[15:14:00] shilon: Radar: hey mate! are you there
[15:14:11] shilon: still trying to figure out my faker problem :P
[15:14:24] Pumukel: has joined #RubyOnRails
[15:14:41] tbuehlmann: maybe others can help?
[15:22:01] srinidhi: has joined #RubyOnRails
[15:27:24] DriesS_: has joined #RubyOnRails
[15:33:03] itarato: has joined #RubyOnRails
[15:35:43] iliketurtles: has joined #RubyOnRails
[15:39:08] itarato: has joined #RubyOnRails
[15:39:45] rgr_: has joined #RubyOnRails
[15:40:06] hobodave: has joined #RubyOnRails
[15:40:49] gmoney: has joined #RubyOnRails
[15:44:43] hobodave_: has joined #RubyOnRails
[15:47:59] DrYockel: has joined #RubyOnRails
[15:48:17] shilon: tbuehlmann: I wish!
[15:50:11] shilon: https://stackoverflow.com/questions/27452632/nameerror-uninitialized-constant-faker-ruby-on-rails/44052277#44052277 If anyone could help me figure out what I’m doing wrong. It’s the first time I’m using faker. Thank you!
[15:50:42] eightlimbed: has joined #RubyOnRails
[15:55:28] arBmind: has joined #RubyOnRails
[15:57:04] Technodrome: haven't done rails in around 4-5 years as a job, if going in for an interview, i wonder what are some things I should do
[15:57:49] muhlisbc: has joined #RubyOnRails
[15:59:21] mrbubbles: Guys - I'm reading a file that is arriving via FTP. It's working most of the time, but sometimes silently failing. Doesn't seem able to read the contents of the file. I suspect that the FTP is not "releasing" the file when it's finished uploading, does that sound plausible? Any way I can check that?
[15:59:27] mrbubbles: (and girls!)
[15:59:44] ascarter: has joined #RubyOnRails
[16:00:08] bheesham: has joined #RubyOnRails
[16:01:15] ascarter: has joined #RubyOnRails
[16:01:48] patarr: has joined #RubyOnRails
[16:02:56] gusrub: has joined #RubyOnRails
[16:08:27] Technodrome: has joined #RubyOnRails
[16:12:18] bruno-: has joined #RubyOnRails
[16:12:51] gusrub: has joined #RubyOnRails
[16:13:24] muhlisbc: has joined #RubyOnRails
[16:14:08] tercenya: has joined #RubyOnRails
[16:15:53] drale2k_: has joined #RubyOnRails
[16:17:56] alphaatom: has joined #RubyOnRails
[16:18:33] tercenya: has joined #RubyOnRails
[16:20:47] arup_r: has joined #RubyOnRails
[16:20:49] dionysus69: has joined #RubyOnRails
[16:23:24] arup_r: I see the example of: `condition` option using `shoulda` matcher. https://gitlab.com/theodorton/shoulda-matchers/blob/83ba542b49530945cfc346c6b62f0131bfedc9c0/lib/shoulda/matchers/active_record/association_matcher.rb#L42 . How do I write for my code https://gist.github.com/aruprakshit/383366d35ada13bd08e5c05e4b621d5a ? I tried something https://gist.github.com/aruprakshit/383366d35ada13bd08e5c05e4b621d5a#file-compo
[16:23:24] arup_r: nent_spec-rb-L6 , and that didn't work which is make sense.
[16:23:39] arup_r: any help please?
[16:24:23] ascarter: has joined #RubyOnRails
[16:27:24] Cache_Money: has joined #RubyOnRails
[16:29:54] pupsicle: has joined #RubyOnRails
[16:34:15] bruno-: has joined #RubyOnRails
[16:35:11] tercenya: has joined #RubyOnRails
[16:36:56] rakm: has joined #RubyOnRails
[16:38:07] marr: has joined #RubyOnRails
[16:40:22] mikecmpbll: has joined #RubyOnRails
[16:44:49] itarato: has joined #RubyOnRails
[16:47:10] ascarter: has joined #RubyOnRails
[16:54:55] armyriad: has joined #RubyOnRails
[16:57:31] rgr: has joined #RubyOnRails
[16:58:23] Uranio: has joined #RubyOnRails
[16:58:40] TessaM: has joined #RubyOnRails
[17:01:55] ascarter: has joined #RubyOnRails
[17:03:19] Uranio: has left #RubyOnRails: ("while you read this, a kitty dies")
[17:07:51] bachmann: has joined #RubyOnRails
[17:12:20] ascarter: has joined #RubyOnRails
[17:15:31] aseibert: has joined #RubyOnRails
[17:22:18] theunraveler: has joined #RubyOnRails
[17:23:00] hobodave: has joined #RubyOnRails
[17:26:11] shilon: has joined #RubyOnRails
[17:26:50] Technodrome: has joined #RubyOnRails
[17:28:07] bheesham: has joined #RubyOnRails
[17:30:23] gusrub: has joined #RubyOnRails
[17:39:07] pLaTo0n: has joined #RubyOnRails
[17:43:22] polishdub: has joined #RubyOnRails
[17:50:26] Rodya_: has joined #RubyOnRails
[17:55:39] gusrub: has joined #RubyOnRails
[17:58:43] s2013: has joined #RubyOnRails
[17:59:06] aseibert: has joined #RubyOnRails
[17:59:13] polishdub: has joined #RubyOnRails
[18:05:34] duderonomy: has joined #RubyOnRails
[18:07:27] armyriad: has joined #RubyOnRails
[18:14:26] mikecmpbll: has joined #RubyOnRails
[18:16:06] User458764: has joined #RubyOnRails
[18:18:37] brent__: has joined #RubyOnRails
[18:22:47] gusrub_: has joined #RubyOnRails
[18:26:15] lxsameer: has joined #RubyOnRails
[18:28:31] cam27: has joined #RubyOnRails
[18:32:06] jmarchello: has joined #RubyOnRails
[18:38:04] itarato: has joined #RubyOnRails
[18:38:56] alphaatom: has joined #RubyOnRails
[18:39:30] xall: has joined #RubyOnRails
[18:50:28] dps: has joined #RubyOnRails
[18:54:59] srinidhi: has joined #RubyOnRails
[18:55:05] gusrub: has joined #RubyOnRails
[18:55:28] gil_: has joined #RubyOnRails
[19:04:05] User458764: has joined #RubyOnRails
[19:05:21] arup_r: has joined #RubyOnRails
[19:09:28] patarr: has joined #RubyOnRails
[19:13:26] romeoh: has joined #RubyOnRails
[19:15:55] xall: has joined #RubyOnRails
[19:19:39] tercenya: has joined #RubyOnRails
[19:30:22] srinidhi: has joined #RubyOnRails
[19:35:25] zacts: has joined #RubyOnRails
[19:41:53] shilon: has joined #RubyOnRails
[19:42:56] patarr: has joined #RubyOnRails
[19:43:08] DoubleMalt: has joined #RubyOnRails
[19:46:50] bachmann: has joined #RubyOnRails
[19:48:51] joaumg: has joined #RubyOnRails
[20:15:52] durango: has joined #RubyOnRails
[20:16:37] durango: Can CarrierWave support albums? I don't see anything in the code for the library but perhaps I'm missing some sort of rails/carrierwave/ruby idiom?
[20:19:58] tercenya: has joined #RubyOnRails
[20:23:00] ascarter: has joined #RubyOnRails
[20:24:08] patarr: has joined #RubyOnRails
[20:24:58] gusrub: has joined #RubyOnRails
[20:28:01] DriesS: has joined #RubyOnRails
[20:30:08] ascarter: has joined #RubyOnRails
[20:30:38] jmarchello: has left #RubyOnRails: ()
[20:33:42] mimico: has joined #RubyOnRails
[20:33:48] schuylr: has joined #RubyOnRails
[20:34:56] schuylr: Does anyone know the difference between how ActiveRecord determines schema dump column types between Rails 5.0.3 and 5.1.1? It broke my gem during the upgrade which extends the column types.
[20:35:16] schuylr: Changelog for ActiveRecord is not giving me much in clues...
[20:35:45] ascarter: has joined #RubyOnRails
[20:48:51] gambl0re: has joined #RubyOnRails
[20:54:21] SteenJobs: has joined #RubyOnRails
[20:55:18] dminuoso: durango: It supports arrays. Thats all there is to an album.
[20:55:59] durango: @dminuoso hmm that magical? ok
[20:56:05] durango: @dminuoso ty
[20:58:00] ascarter: has joined #RubyOnRails
[20:58:58] bronson: has joined #RubyOnRails
[21:05:05] arup_r: has joined #RubyOnRails
[21:05:47] patarr: has joined #RubyOnRails
[21:07:51] ascarter: has joined #RubyOnRails
[21:08:22] ur5us: has joined #RubyOnRails
[21:13:23] hobodave: does matthewd ever check in here?
[21:13:33] havenwood: hobodave: yes
[21:13:56] hobodave: he seems to be the concurrency "guru" for Rails, correct?
[21:17:13] Technodrome: has joined #RubyOnRails
[21:18:03] dminuoso: concurrency guru?
[21:18:40] gusrub: has joined #RubyOnRails
[21:18:59] dminuoso: hobodave: He is a rails core member if that's what you mean.
[21:19:02] hobodave: his name is all over GH re: Rails.application.executor and stuff
[21:19:12] hobodave: I've been banging my head against a bug or two in ActiveRecord that is concurrency related
[21:19:29] schuylr: Head banging in ActiveRecord for me too, but not concurrency
[21:19:38] dminuoso: schuylr: git diff, git blame
[21:19:46] hobodave: I've got a patch for one of the issues, but it exposes another :(
[21:20:04] schuylr: dminuoso: checked both. Nothing is obvious
[21:20:04] dminuoso: schuylr: And perhaps best: git bisect
[21:20:09] hobodave: and I'm not sure if my test case is correct
[21:20:09] dminuoso: schuylr: Then use git bisect.
[21:20:14] dminuoso: you *will* find the introducing commit with that.
[21:21:26] schuylr: not sure where I’m looking though. I _thought_ it was ActiveRecord::ConnectionAdapters::MySQL::ColumnDumper in the schema_type private method, but modifying that to even just return something like :foobar doesn’t modify the type in the returned ActiveRecord::ConnectionAdapters::MySQL::Column object
[21:21:36] dminuoso: schuylr: git-bisect.
[21:21:47] dminuoso: Dont guess, use tools to find facts. :P
[21:30:33] schuylr: dminuoso: And then symlink my bundler path to the activerecord lib of my cloned rails/rails repo?
[21:31:04] bheesham: has joined #RubyOnRails
[21:31:05] dminuoso: schuylr: you can actually just specify a local path in your Gemfile
[21:31:39] Technodrome: has joined #RubyOnRails
[21:32:00] schuylr: my vagrant box just has no knowledge of it but I’ll fix that part :P
[21:40:12] sloggerkhan: has joined #RubyOnRails
[21:44:47] hobodave: has joined #RubyOnRails
[21:47:58] schuylr: dminuoso: Flooded with dependency issues… this isn’t fun
[21:48:30] dminuoso: schuylr: What do you mean?
[21:50:19] schuylr: Well I initially tried pointing the activerecord gem directly to rails/activerecord and bundler complains about the version mismatch
[21:51:23] sloggerkhan: When working with binary in ruby is there an easy way of making the result of an op like ~0x0040 give 0xffbf instead of 0xfbf?
[21:51:33] dminuoso: schuylr: What line do you have in your Gemfile?
[21:51:39] dminuoso: schuylr: Do you have a version constraint *and* a local path?
[21:51:46] dminuoso: That will likely hit you in the back.
[21:51:57] schuylr: no version constraint
[21:52:02] dminuoso: Oh wait mm.
[21:52:06] schuylr: but I may have just been stupid and realized I should use update not install
[21:52:27] schuylr: brain mush. after 5pm, ya know
[21:53:07] schuylr: so if I’m testing activerecord, I’ll need this:
[21:53:08] schuylr: gem 'rails', path: '/vagrant/rails'
[21:53:09] schuylr: gem 'activerecord', path: '/vagrant/rails/activerecord'
[21:53:23] aperkins81: has joined #RubyOnRails
[21:54:55] schuylr: ugh but now my application.rb doesn’t match with the interim rails versions
[21:59:12] dminuoso: schuylr: It might be easier to create as separate testcase that just uses AR
[21:59:25] dminuoso: That way you wont be hindered by all the rails crap
[21:59:52] ascarter: has joined #RubyOnRails
[22:02:01] schuylr: or just bin/rails app:update each time without caring much for diffs
[22:09:31] hobodave: matthewd you busy?
[22:11:20] hobodave: would you guys expect this code to raise the error shown at the bottom?
[22:12:26] Technodrome: has joined #RubyOnRails
[22:15:05] hobodave: helps if I paste the link huh?
[22:15:38] hobodave: would you guys expect this code to raise the error shown at the bottom? https://gist.github.com/hobodave/972c209a22d54b0d1769b0701547404c
[22:17:40] hahuang65: anyone notice in Rails 5.1 when you try to assign an array of related child objects, only the first one retains the parent's ID? For example obj.children = [child1, child2], when you reload obj, and call obj.children, only child1 is there and child2 is gone
[22:20:31] amperry: is there way to require that a password_field matches a password confirmation field, or must I roll my own js? I can't find anything that documents it.
[22:21:48] Scriptonaut: has joined #RubyOnRails
[22:23:19] Scriptonaut: Hey y'all, I need an opinion on good/bad practices. My coworker insists that sleeping in capybara feature tests is the proper way to deal with things like ajax calls, turbolinks page vists/loads, etc. I think using sleep everywhere is a terrible idea. 1) What are your thoughts on using sleep() in capybara feature tests, and 2) if they are bad, what is a good way to deal with the issue of waiting n
[22:23:24] desnudopenguino: has joined #RubyOnRails
[22:23:25] Scriptonaut: ow that wait_until is no longer in capyabara 2.0+
[22:24:51] Scriptonaut: Currently, I've written my own `wait_until`, and I'm using that to define several wait methods: https://gist.github.com/c891fd583fbcc02521f34715137c0354
[22:24:54] patarr: has joined #RubyOnRails
[22:28:53] dps: has joined #RubyOnRails
[22:31:25] Technodrome: has joined #RubyOnRails
[22:38:14] bruno-_: has joined #RubyOnRails
[22:44:41] cagomez: has joined #RubyOnRails
[22:47:13] quiller: has joined #RubyOnRails
[22:47:54] amperry: before I roll my own, is there a way in rails 4 to require that a password and password confirmation field match before submitting a password reset form?
[22:54:42] aseibert: has joined #RubyOnRails
[23:05:18] cagomez: is there an activerecord way to find Objects like so? Foo.where(footype: 'constant_type', id: [Bar.where(bartype: 'other_const')])
[23:05:56] desnudopenguino: amperry: you could write a js to do it on the client to keep it from sending to the server
[23:07:05] gthank: has joined #RubyOnRails
[23:07:47] desnudopenguino: or a simple comparison in your server code will achieve the same (but with a request)
[23:08:48] gthank: has left #RubyOnRails: ()
[23:09:04] ascarter: has joined #RubyOnRails
[23:18:39] wethu: has joined #RubyOnRails
[23:23:18] gusrub: has joined #RubyOnRails
[23:26:54] duderono_: has joined #RubyOnRails
[23:29:34] knight33: has joined #RubyOnRails
[23:38:55] cam27: has joined #RubyOnRails
[23:41:03] patarr: has joined #RubyOnRails
[23:56:39] Nicmavr: has joined #RubyOnRails
[23:56:59] Nicmavr: Hi, is there anybody who's familiar with Rspec testing that can answer a quick question?