#ruby - 11 June 2017
« Back 1 day Forward 1 day »
[13:39:04] MarcWeber: Which ruby http library supports get/post and socket connections (tor) ideally supporting proxy per request?
[18:09:51] eightlimbed: there is an array of prime numbers [7, 11, 13] ... I want to return the array with the numbers increased to the next prime number. In this case [11, 13, 17].
[18:11:02] eightlimbed: but how would i go about going beyond that, and finding the NEXT prime number?
[18:11:16] `derpy: eightlimbed: http://ruby-doc.org/stdlib-2.4.1/libdoc/prime/rdoc/Prime.html#method-i-prime-3F
[18:16:12] eightlimbed: uninitialized constant Prime - does that mean I have to create the Prime class first?
[22:08:56] physikoi: Hello #ruby. I'm trying to use custom gem path and installation directory. However, this is causing some sort of issue. Basically, executing gems with sudo -- as needed -- causes an error. I'm not sure what's causing this -- could someone help?
[22:14:55] physikoi: havenwood: any way to fix this? I mean, it wasn't a problem before changing the vars.
[22:15:15] havenwood: physikoi: see `sudo -E`, `sudo su -p` or you can make sure those env vars get set after sudoing
[22:18:37] jhass: that sudo/su by default throw away your env is a security feature of them, so prefer explicitly setting GEM_HOME (etc.) instead of disabling that feature
[22:22:09] jhass: you don't want to get things like SSH_AUTH_SOCK, GPG_AGENT or whatever else to get there
[22:23:06] physikoi: but i'm still confused about setting it after job is done. when i do, say, `sudo gembin` i get an error.
[22:26:35] jhass: also google for "sudo env_keep" on how you could configure to keep specific vars in your sudoers
[22:34:53] physikoi: jhass: ran into trouble at first, but figured out that vars come immediately after sudo. Anyway, it works! I think I will create an alias for sudo, including whitelisted vars, rather than editing sudoers