« Back to channel list

#ruby - 26 June 2019

« Back 1 day Forward 1 day »
[00:02:22] fphilipe_: has joined #ruby
[00:04:41] cd: has joined #ruby
[00:12:28] ramfjord: has joined #ruby
[00:12:52] queip: has joined #ruby
[00:16:44] ellcs: has joined #ruby
[00:17:55] n13z_: has joined #ruby
[00:20:41] sagax: has joined #ruby
[00:44:29] Swyper: has joined #ruby
[00:50:06] AJA4350: has joined #ruby
[01:00:13] Swyper: has joined #ruby
[01:20:55] n13z: has joined #ruby
[01:25:21] tranch: has joined #ruby
[01:28:58] ellcs: has joined #ruby
[01:29:20] hutch: has joined #ruby
[01:39:59] dviola: has joined #ruby
[01:42:00] Technodrome: has joined #ruby
[02:00:27] yokel: has joined #ruby
[02:15:41] cschneid: has joined #ruby
[02:19:22] crankharder: has joined #ruby
[02:27:10] duderonomy: has joined #ruby
[02:58:56] victorqueiroz: has joined #ruby
[02:58:57] sandstrom: has joined #ruby
[03:09:25] braincrash: has joined #ruby
[03:14:07] ellcs: has joined #ruby
[03:40:49] fphilipe_: has joined #ruby
[03:42:05] zapata: has joined #ruby
[03:48:34] houhoulis: has joined #ruby
[03:50:34] Swyper: has joined #ruby
[03:55:00] Swyper: has joined #ruby
[04:05:46] m_antis_: has joined #ruby
[04:13:05] uplime: has joined #ruby
[04:13:49] Swyper: has joined #ruby
[04:18:57] mozzarella: has joined #ruby
[04:19:18] cthu|: has joined #ruby
[04:51:15] sandstrom: has joined #ruby
[04:55:42] donofrio: has joined #ruby
[04:57:50] armyriad: has joined #ruby
[04:58:49] tranch: has joined #ruby
[05:06:19] uplime: has joined #ruby
[05:08:55] brett-soric: has joined #ruby
[05:09:06] fphilipe_: has joined #ruby
[05:16:58] sauvin: has joined #ruby
[05:17:15] cd: has joined #ruby
[05:20:43] conta: has joined #ruby
[05:42:29] tranch: has joined #ruby
[05:57:14] brett-soric: has left #ruby: ()
[06:00:24] schneider: has joined #ruby
[06:02:58] conta: has joined #ruby
[06:24:06] Technodrome: has joined #ruby
[06:31:32] queip: has joined #ruby
[06:39:55] Technodrome: has joined #ruby
[06:40:58] aupadhye: has joined #ruby
[06:41:43] tranch_: has joined #ruby
[06:41:49] kyrylo: has joined #ruby
[06:48:59] mayurvpatil: has joined #ruby
[06:53:18] houhoulis: has joined #ruby
[07:03:07] houhoulis: has joined #ruby
[07:03:51] sandstrom: has joined #ruby
[07:06:53] TomyWork: has joined #ruby
[07:13:03] houhoulis: has joined #ruby
[07:15:07] ramfjord: has joined #ruby
[07:17:24] tranch: has joined #ruby
[07:23:04] houhoulis: has joined #ruby
[07:26:30] schneider: has joined #ruby
[07:30:20] alem0lars: has joined #ruby
[07:32:18] jefffrails35: has joined #ruby
[07:33:03] houhoulis: has joined #ruby
[07:46:50] ramfjord: has joined #ruby
[07:49:58] jmcgnh_: has joined #ruby
[07:53:12] houhoulis: has joined #ruby
[07:55:11] mikecmpbll: has joined #ruby
[08:09:52] conta: has joined #ruby
[08:13:05] houhoulis: has joined #ruby
[08:15:15] Technodrome: has joined #ruby
[08:23:06] houhoulis: has joined #ruby
[08:30:21] deepredsky: has joined #ruby
[08:33:14] houhoulis: has joined #ruby
[08:43:09] houhoulis: has joined #ruby
[08:43:49] mayurvpatil: has joined #ruby
[08:53:06] houhoulis: has joined #ruby
[08:59:44] cca4: has joined #ruby
[09:00:30] yokel: has joined #ruby
[09:01:27] cca4: Hello I'm trying to display console https://github.com/rails/web-console from a container docker with rails and I have this Cannot render console from 172.24.0.1 error! Allowed networks: 127.0.0.0.0.0/127.255.255.255.255, ::1 how can I solve it? Thank you in advance
[09:03:02] houhoulis: has joined #ruby
[09:05:52] dtzuzu: has joined #ruby
[09:15:11] NL3limin4t0r: cca4: Bind it to 0.0.0.0 instead of 127.0.0.0 or localhost.
[09:15:49] alem0lars: has joined #ruby
[09:17:52] Technodrome: has joined #ruby
[09:19:17] cca4: Ok i tried thanks
[09:23:06] houhoulis: has joined #ruby
[09:28:22] leitz: has joined #ruby
[09:30:35] m_antis: has joined #ruby
[09:33:05] houhoulis: has joined #ruby
[09:35:01] ramfjord: has joined #ruby
[09:40:32] alem0lars: has joined #ruby
[09:43:06] houhoulis: has joined #ruby
[09:44:14] mikecmpb_: has joined #ruby
[09:48:06] ramfjord: has joined #ruby
[09:54:36] conta: has joined #ruby
[09:59:57] sina: has joined #ruby
[10:03:06] houhoulis: has joined #ruby
[10:04:51] queip: has joined #ruby
[10:08:54] guardian: has joined #ruby
[10:20:42] BH23: has joined #ruby
[10:21:15] tdy1: has joined #ruby
[10:24:38] za1b1tsu: has joined #ruby
[10:25:09] Technodrome: has joined #ruby
[10:32:01] BH23: has joined #ruby
[10:32:04] BTRE: has joined #ruby
[10:33:05] houhoulis: has joined #ruby
[10:43:50] mikecmpbll: has joined #ruby
[10:44:02] arup_r: has joined #ruby
[10:44:56] ur5us: has joined #ruby
[10:47:04] mayurvpatil: has joined #ruby
[10:50:40] Swyper: has joined #ruby
[10:54:50] arup_r: has joined #ruby
[10:59:20] Technodrome: has joined #ruby
[11:02:44] cd: has joined #ruby
[11:03:05] houhoulis: has joined #ruby
[11:13:09] houhoulis: has joined #ruby
[11:17:39] Xiti`: has joined #ruby
[11:18:50] Pixi_: has joined #ruby
[11:27:48] cek: has joined #ruby
[11:30:13] cek: has left #ruby: ()
[11:33:06] houhoulis: has joined #ruby
[11:35:20] conta: has joined #ruby
[11:36:15] BH23: has joined #ruby
[11:39:00] queip: has joined #ruby
[11:39:15] Technodrome: has joined #ruby
[11:40:03] rokra: has joined #ruby
[11:46:03] Xeago_: has joined #ruby
[11:48:44] ramfjord: has joined #ruby
[11:49:29] JjOtt: has joined #ruby
[11:52:17] AJA4350: has joined #ruby
[11:52:51] fuzzface: has joined #ruby
[11:53:05] houhoulis: has joined #ruby
[11:55:53] Technodrome: has joined #ruby
[11:57:02] reber: has joined #ruby
[11:58:25] jacksop: has joined #ruby
[11:59:56] ZAJDAN: has joined #ruby
[12:00:22] ZAJDAN: file_path = Rails.root.join('PDF','KW_list.pdf') is somehow possible in the filename use variable?
[12:01:35] yokel: has joined #ruby
[12:03:04] houhoulis: has joined #ruby
[12:04:37] BH23: has joined #ruby
[12:09:59] Technodrome: has joined #ruby
[12:12:54] houhoulis: has joined #ruby
[12:16:31] leitz: ZAJDAN, you might find more Rails-fu in #Rails.
[12:17:05] Josse: has joined #ruby
[12:17:30] Josse: Question: Is ruby still worth knowing, the day of today?
[12:17:36] leitz: On the other hand, I just realized that was a bad channel name.
[12:18:00] Josse: I'm really comfortable with JavaScript, is ruby able to compete with that?
[12:18:14] Josse: or could I use ruby to 'pair to' my JavaScript?
[12:18:24] leitz: ZAJDAN, #rubyonrails
[12:18:33] leitz: Josse, it depends on what you want to do.
[12:19:02] leitz: JS is good for a lot of things; I looked at the MEAN stack a while back and loved the idea.
[12:19:32] Josse: I'm just interested in broadening my understanding of full stack development, honestly
[12:19:33] leitz: What I find most important is how well the language fits me, personally, and secondarily how well it fits the tasks I want to do.
[12:19:40] Josse: so should I learn Ruby, or rather PHP or something?
[12:20:37] leitz: Josse, honestly, if you're into full stack I'd do some MongoDB. Mongo uses JS as the "SQL" language, so that's a plus.
[12:20:58] leitz: If I were starting out in Web, and I liked JavaScript, I'd just stay there.
[12:21:21] Josse: I've heard about MongoDB, but honestly, why would I want to use something like that compared to my own SQL database?
[12:21:25] Josse: I've got postgres, and it works great
[12:22:06] Josse: Yeah, but I feel like I've actually gotten comfortable enough with JavaScript so I'm looking to expand my horizon, so to speak
[12:22:23] leitz: Do you work in a JS based shop?
[12:22:48] Josse: No, I'm an amateur programmer, I'm not doing anything profesionally
[12:23:40] leitz: I found my understanding of how much I "knew" changed drastically when I had to do it for a living.
[12:24:16] Calinou: there are many practical use cases for NoSQL databases, but at a small scale, you probably won't notice the difference as much
[12:24:26] Calinou: the fact that many clients want NoSQL because it looks pretty on their PowerPoint also hurts :)
[12:24:32] Calinou: (rather than real, technical reasons)
[12:24:40] Josse: yeah, but I'm actually 15 years old so my living isn't my worry just yet
[12:24:42] leitz: My own path has been to add git and TDD. I'm an "Apprentice" in a few C based languages and want to get better.
[12:25:15] leitz: So I'm using Ruby to push towards mastery in programming topics like OOP, introspection, patterns, etc.
[12:25:27] Josse: so it is worth knowing?
[12:25:46] leitz: Ruby? I'd say not if you're really good at Javascript.
[12:25:56] leitz: Nor is PHP.
[12:25:56] victorqueiroz: has joined #ruby
[12:26:19] leitz: JS is actually taking over much of the web, outside of microservices type stuff.
[12:26:28] NL3limin4t0r: Josse: Although most developers hate php, me included, it's worth learning for legacy sake. More than 50% of website run a php backend.
[12:27:08] Josse: yeah recently I was looking for developer jobs just out of interest, to see what was out there
[12:27:09] leitz: NL3limin4t0r makes a good point, if you want to get hired for Web, then add PHP and Rails.
[12:27:22] Josse: and I noticed that the web app that we use for school was hiring PHP developers
[12:27:36] leitz: But you could master JS and have a good job selection.
[12:27:46] leitz: Or if you want something even better, Go.
[12:27:57] Josse: Yep, Go also seems to be really popular
[12:27:58] phaul: it's a shame that the good old "expressiveness - succintness" and so on of ruby doesn't come up any more in these discussions.
[12:29:11] phaul: I think the more languages you know especially the more come from different paradigms the better off you are
[12:29:23] leitz: IIUC, the guy who wrote Node.js now prefers Go.
[12:29:50] Josse: So rather than PHP or Ruby, I should learn go?
[12:30:09] leitz: phaul, I'm getting back into Ruby to retain what sanity remains, and finding it much more productive.
[12:30:30] leitz: Josse, yes. It'd probably add 10-15% to your salary if you learn and market well.
[12:30:50] leitz: And some MongoDB backend tools are written in Go. :)
[12:30:54] Josse: Allright. But does it have good learning resources?
[12:31:44] leitz: There's the walk through on golang.org, and Univ of Cali (something) has a free Coursera specialty on it.
[12:32:10] leitz: There's a few free on-line books, too.
[12:32:11] haylon: has joined #ruby
[12:32:29] leitz: ACTION is digging into "Head First Ruby" though.
[12:33:07] Josse: could you link to that?
[12:33:41] Calinou: PHP isn't just legacy, modern PHP is a pretty decent language to work with in my experience
[12:33:56] Josse: Allright, so I should learn both? PHP and Go? :)
[12:34:09] Calinou: sure, they each excel in different scenarios
[12:36:01] Josse: Thank you!
[12:36:15] NL3limin4t0r: Ruby is a fun language to learn. If you write it well it's one of the more (visually) beautiful languages out there.
[12:36:22] leitz: Josse, on-line Go intro. https://tour.golang.org/welcome/1
[12:36:22] Josse: I believe I'll go with PHP first then, because I've already got really good learning resources
[12:36:51] Calinou: once you get more seasoned in PHP, there's a fun minigame to do here: http://returntrue.win/ :P
[12:36:53] leitz: If you like that, then: https://www.coursera.org/specializations/google-golang
[12:37:30] miskatonic: has joined #ruby
[12:37:38] leitz: The coursera course lets you take for free, or you can pay and get a certificate. Which might help employment. PHP, Ruby, and Java have language certs, too.
[12:39:51] NL3limin4t0r: Josse: Another good language to learn is Java. It's not the most requested language, but it does offer a good base for a lot of programming concepts, since everything has to be written out explicitly. Things like classes, inheritance, abstract classes, interfaces, method overloading.
[12:42:14] al2o3-cr: has joined #ruby
[12:45:09] leitz: I wish I had been smart enough to find *and stick with* Ruby many years ago.
[13:02:25] BH23: has joined #ruby
[13:04:50] gigetoo: has joined #ruby
[13:10:00] codefriar: has joined #ruby
[13:11:13] codefriar: has joined #ruby
[13:11:17] yokel: has joined #ruby
[13:13:02] Technodrome: has joined #ruby
[13:21:36] ZAJDAN: Josse: a few Years I work with PHP ...it is nice language, but now Iam trying RubyOnRails and I have to say....it is perfect
[13:22:40] ZAJDAN: hard to learn, cause community is not so big as in PHP, but when you are patient you will like it
[13:23:14] BH23: has joined #ruby
[13:26:22] codefriar: has joined #ruby
[13:32:07] za1b1tsu: has joined #ruby
[13:32:27] yokel: has joined #ruby
[13:34:51] cthulchu_: has joined #ruby
[13:43:08] Rapture: has joined #ruby
[13:47:20] jokke: leitz: mongodb is terrible
[13:47:43] jokke: people using it as a general purpose db is a real pain
[13:48:19] jokke: it's a document based db. I've yet to see a standard web project that didn't have relational data
[13:49:21] jokke: heh rubyonrails is far from perfect but sure, it solves quite a range of standard problems pretty elegantly (i'm a long time rails dev)
[13:49:50] jokke: i haven't used it in a long time though
[13:50:11] jokke: still being high on crystal ;)
[13:50:39] jokke: the language, not the drug :)
[13:52:26] jokke: ZAJDAN: when it comes to ruby web frameworks, i really like how hanami is approaching things
[13:54:59] Inline: has joined #ruby
[13:55:08] clemens3: has joined #ruby
[13:57:09] ebbflowgo: has joined #ruby
[13:58:56] vondruch_: has joined #ruby
[14:01:25] sandstrom: has joined #ruby
[14:13:37] ebbflowgo: hey, what's the best way to normalize a compounded fastjson_api serialized hash?
[14:16:27] conta: has joined #ruby
[14:20:58] jefffrails35: has joined #ruby
[14:23:31] spiette: has joined #ruby
[14:29:08] jhass: has joined #ruby
[14:29:58] Esa_: has joined #ruby
[14:31:57] al2o3-cr: &>> %w(. - ').tap { |c| 0.step(75) { |i| $> << c[(Math.sin(i) + 1).round] } }
[14:31:57] znz_jp: has joined #ruby
[14:32:02] rubydoc: # => -''-..-''-...-''-..-''-..-''-..-'''-..-''-..-''-..-''-...-''-..-''-..-''-..-[".", "-", "'"] (https://carc.in/#/r/74x0)
[14:32:17] havenwood: ebbflowgo: Whatcha normalizing about it?
[14:33:13] ebbflowgo: i have a content list that includes lists and lists.user
[14:33:29] ebbflowgo: the list and lists.user gets seraizlied into a included array
[14:33:50] ebbflowgo: i'd like to be able to look at each content object and get the respective lists and user for each list
[14:34:02] ebbflowgo: in my react side i use normalizer which works great
[14:34:25] ebbflowgo: looking for something to normalize the included relationships
[14:34:52] havenwood: ebbflowgo: Have any example data before and after normalization?
[14:35:40] havenwood: It looks like you're talking about this? https://www.npmjs.com/package/normalizer
[14:36:57] ebbflowgo: yes that's the js normalizer
[14:39:13] schneider: has joined #ruby
[14:44:37] havenwood: ebbflowgo: It's easy with the stdlib to remove non-ASCII characters or replace them with an arbitrary character. I'd probably use the i18n gem for the transliteration.
[14:45:49] AJA4350: has joined #ruby
[14:47:25] havenwood: &>> 'André Alçada Padez'.encode(Encoding::ASCII, undef: :replace)
[14:47:25] rubydoc: stderr: -e:2: invalid multibyte char (US-ASCII) (https://carc.in/#/r/74x8)
[14:47:37] havenwood: #=> "Andr? Al?ada Padez"
[14:47:46] havenwood: 'André Alçada Padez'.encode(Encoding::ASCII, undef: :replace, replace: '')
[14:47:53] havenwood: #=> "Andr Alada Padez"
[14:48:37] havenwood: I18n.transliterate('André Alçada Padez')
[14:48:38] havenwood: #=> 'Andre Alcada Padez'
[14:48:39] havenwood: ebbflowgo: ^
[14:49:13] ebbflowgo: here's the data objects
[14:49:14] ebbflowgo: https://pastebin.com/P2mmdaP9
[14:49:14] ruby[bot]: ebbflowgo: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
[14:49:59] ebbflowgo: https://gist.github.com/1dolinski/d898bbe06ea714576128653e236c9acf
[14:55:25] ebbflowgo: @havenwood ^
[14:56:51] ebbflowgo: perhaps there's a misunderstanding, rather than removing non-ascii characters, i'm looking to return compound objects, ie content and it's lists and lists.user data
[15:01:26] jeremycw: has joined #ruby
[15:01:45] havenwood: ebbflowgo: And you're working with MongoDB?
[15:02:12] ebbflowgo: havenwood: postgres and netflix's fastjson_api serializer
[15:02:31] ebbflowgo: it turns active record relations into the json api spec
[15:02:37] havenwood: ebbflowgo: Can you just normalize the text before deserializing it?
[15:03:36] havenwood: ebbflowgo: I'd suggest searching for a gem that does this. I don't really get the "normalization" task. Is it just transliterating non-ASCII characters to their ASCII equivalent?
[15:05:10] ebbflowgo: i've looked all over, that's why i came here D:
[15:06:29] BH23: has joined #ruby
[15:07:13] havenwood: ebbflowgo: Can you just "normalize" the serialized JSON? Is there anything else going on other than transliterating non-ASCII characters?
[15:07:51] ebbflowgo: no need for the transliteration
[15:07:57] havenwood: ebbflowgo: what do you need?
[15:08:20] havenwood: I get there's a normalizer node package. I don't know what it does. The top of its docs seem to suggest transliteration.
[15:09:01] havenwood: ebbflowgo: https://github.com/mdeering/attribute_normalizer
[15:09:23] ebbflowgo: havenwood: ah miscommunication, this is the package
[15:09:23] ebbflowgo: https://www.npmjs.com/package/json-api-normalizer
[15:10:23] ebbflowgo: i have a structure same as the example json
[15:11:04] havenwood: ebbflowgo: https://freenode.irclog.whitequark.org/ruby/2019-06-26#1561559740-1561559817;
[15:11:36] havenwood: I guess I was looking at the wrong npm package. No wonder I'm confused.
[15:11:44] havenwood: ACTION goes to find coffee.
[15:11:51] ebbflowgo: yeah clearly
[15:17:17] ebbflowgo: sorry about that too, i've been looking at this all morning. the package text blended together
[15:23:29] ruby[bot]: -b *!*@gateway/web/irccloud.com/x-cpzxnddsgsqbamof$#ruby-banned
[15:25:29] ruby[bot]: -b *!*@31.173.240.2$#ruby-banned
[15:34:00] ebbflowgo: this package also takes the normalized json and turns it into the nested result :| https://github.com/yury-dymov/redux-object
[15:34:50] za1b1tsu: has joined #ruby
[15:35:36] codefriar: has joined #ruby
[15:37:35] havenwood: ebbflowgo: That looks like a tool for a very specific use case. You'll probably need to find a gem or write one to get this in Ruby.
[15:38:40] BH23: has joined #ruby
[15:38:58] ebbflowgo: havenwood, yeah.. i'm surprised because the gem fastjson_api seems to be a popular serializer.. so i'm curious as to what others are doing when they have any relationships on their objects
[15:41:01] havenwood: "Support for belongs_to, has_many and has_one"
[15:41:31] havenwood: ebbflowgo: Doesn't the fast_jsonapi just support that out of the box? https://github.com/Netflix/fast_jsonapi
[15:45:16] ebbflowgo: havenwood: here are my serializers, if that were the case id expect the data to show up in each data object
[15:45:16] ebbflowgo: https://gist.github.com/1dolinski/b4d15dcd545b1d242b56ee05ce3f788c
[15:52:45] ebbflowgo: as the data displayed in this gist, i believe fastjson_api shows the relationships, but i'd really expect an easy way to grab the relationship data for the content lists and list.user
[15:54:21] AJA4351: has joined #ruby
[15:58:39] BH23: has joined #ruby
[16:00:26] yokel: has joined #ruby
[16:06:39] orbyt_: has joined #ruby
[16:06:40] SeepingN: has joined #ruby
[16:10:37] jefffrails35: has joined #ruby
[16:11:20] fuzzface: has joined #ruby
[16:23:15] sagax: has joined #ruby
[16:26:20] rippa: has joined #ruby
[16:34:34] gix: has joined #ruby
[16:35:48] duderonomy: has joined #ruby
[16:36:16] queip: has joined #ruby
[16:49:39] mrpropa: has joined #ruby
[16:56:50] kenichi: has joined #ruby
[16:59:35] Dbugger: has joined #ruby
[17:00:54] AJA4351: has joined #ruby
[17:07:34] duleja: has joined #ruby
[17:08:41] solars: has joined #ruby
[17:12:35] duleja: Does it make a difference if I store json data to a file and then read it to a variable and pass that variable to a JSON.parse(variable-here) Or this is the same if I just send my json response to a JSON.parse(response)?
[17:14:20] mikecmpbll: has joined #ruby
[17:14:54] ebbflowgo: same result,
[17:16:04] duleja: I thought so... Thanks for answering
[17:23:59] themsay: has joined #ruby
[17:33:47] tdy2: has joined #ruby
[17:33:58] kyrylo: has joined #ruby
[17:35:37] rokra: Hey, how can I get the value of this variable only if it exists ? p r["interfaces"][0]["mac_address"] --> I have error <main>': undefined method `[]' for nil:NilClass
[17:36:45] lucasb: has joined #ruby
[17:39:06] phaul: there is fetch, for hash and array from built ins. then you have safe navigation &. altrough with addressing [] it'sa bit inonvinient. blah&.[](index) looks silly but works
[17:39:16] sandstrom: has joined #ruby
[17:39:59] phaul: inconvinient*
[17:41:12] phaul: so you can chain pr&.[]("interfaces")&.[](0)&. ...
[17:41:43] rokra: It s because I need to aprse a json with some sub array
[17:41:54] rokra: s/aprse/parse
[17:43:38] al2o3-cr: what's wrong with dig?
[17:43:46] rokra: https://dpaste.de/UUQa -> I need to get value which is the IP
[17:50:00] rokra: dig, checking
[17:53:23] michael_imac: has joined #ruby
[17:53:31] al2o3-cr: rokra: obj.dig(0, 'interfaces', 0, 'ip_addresses', 0, 'value')
[17:54:02] Linuus: has joined #ruby
[17:55:49] code_zombie: has joined #ruby
[17:57:50] cpallares: has joined #ruby
[17:59:11] Ropeney: has joined #ruby
[17:59:42] psmolen: has joined #ruby
[18:00:26] yokel: has joined #ruby
[18:01:18] ramfjord: has joined #ruby
[18:04:46] al-damiri: has joined #ruby
[18:09:05] RedSnarf: has joined #ruby
[18:10:19] hiroaki: has joined #ruby
[18:14:45] rippa: has joined #ruby
[18:22:18] dviola: has joined #ruby
[18:31:46] Fridtjof: has joined #ruby
[18:38:17] r29v: has joined #ruby
[18:44:28] fuzzface: has joined #ruby
[18:45:10] queip: has joined #ruby
[18:46:24] Freshnuts: has joined #ruby
[19:02:56] rokra: al2o3-cr: thx testing
[19:03:56] rokra: al2o3-cr: working using obj.dig('interfaces', 0, 'ip_addresses', 0, 'value')
[19:03:59] rokra: al2o3-cr: thx
[19:06:08] vjacob: has joined #ruby
[19:08:08] ytti: rokra, this looks somewhat like junos :)
[19:08:15] ytti: but not exactly
[19:12:26] brool: has joined #ruby
[19:16:38] HeavenDestroyer: has joined #ruby
[19:20:48] buckworst: has joined #ruby
[19:30:57] orbyt_: has joined #ruby
[19:36:21] AJA4350: has joined #ruby
[19:45:41] GodFather: has joined #ruby
[19:52:58] jeremycw: has joined #ruby
[19:54:04] englishm: has joined #ruby
[19:54:56] englishm: has joined #ruby
[19:55:51] englishm: has joined #ruby
[20:00:05] kyrylo: has joined #ruby
[20:02:04] Technodrome: has joined #ruby
[20:10:00] Fusl: has joined #ruby
[20:14:02] SeepingN: has joined #ruby
[20:18:18] Xeago_: has joined #ruby
[20:21:19] helpa-bot: has joined #ruby
[20:23:49] helpa: has joined #ruby
[20:29:53] hightower2: has joined #ruby
[20:30:12] CCDelivery: has joined #ruby
[20:41:18] nowhereman: has joined #ruby
[20:42:27] mrpropa: has joined #ruby
[21:00:56] yokel: has joined #ruby
[21:14:13] bougyman: #ruby, meet Ruby: https://photos.app.goo.gl/AisUH7pYtZ9ZJBPe9
[21:33:47] queip: has joined #ruby
[21:48:37] Technodrome: has joined #ruby
[21:56:44] cats: has joined #ruby
[21:58:45] AJA4350: has joined #ruby
[22:15:18] chris349: has joined #ruby
[22:15:34] chris349: Trying to setup RVM correctly, lots of steps say something about "$HOME/.rvm/scripts/rvm"
[22:15:59] chris349: What do I do if I do not have that file? I have /usr/local/rvm/bin/rvm instead where would .rvm directory be located?
[22:16:53] havenwood: chris349: That means you have a "global" install of RVM, which isn't recommended.
[22:17:23] chris349: Ok, so where is .rvm directory? Trying to adapt this command to my system:
[22:17:25] havenwood: chris349: Ideally, uninstall RVM, restart your terminal to drop env, and reinstall RVM as a non-root user without sudo.
[22:17:26] havenwood: chris349: rvm implode --force
[22:17:38] chris349: [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
[22:17:43] havenwood: chris349: There won't be one with a global install.
[22:17:56] SeepingN: same as ~/.rvm/scripts/rvm
[22:18:04] SeepingN: don't you have $HOME defined??
[22:18:24] chris349: I do not have ~/.rvm directory
[22:18:24] havenwood: SeepingN: They don't have RVM installed in the home dir, since they have it installed globally.
[22:18:35] havenwood: chris349: Did you install RVM?
[22:18:52] chris349: Maybe a better question, the bundle install fails with this error: usr/bin/env: ruby_executable_hooks: No such file or directory
[22:19:01] chris349: How do I fix that and make the bundle install succeed
[22:19:25] havenwood: chris349: Did you install RVM?
[22:19:38] havenwood: It's a threshold question, because if you did, you should stop and reinstall locally.
[22:19:46] chris349: with the command (running as root): \curl -sSL https://get.rvm.io
[22:20:05] havenwood: chris349: Okay, so you have a bad install of RVM. RVM isn't meant to work with the root user.
[22:20:12] havenwood: chris349: It is explicitly not supported.
[22:20:12] chris349: But thats not the question, I ssh in as the user and bundle command is found
[22:20:19] havenwood: chris349: rvm implode --force
[22:20:24] chris349: But then I try to run bundle install automated and it fails
[22:20:29] havenwood: chris349: Restart your terminal. Reinstall RVM as a non-Root user.
[22:20:49] SeepingN: ACTION hits the Nukem button
[22:20:52] chris349: So if I install as the user all these errors will go away?
[22:21:43] havenwood: chris349: Alternatively, you can manually work around root issues. The installation instructions advise to not install as root. You'll have an easier time on that path.
[22:21:47] chris349: Also how can I use that \curl -sSL https://get.rvm.io to install a specific version? I always need to run it, add the correct version, and then delete the default version it installed
[22:22:15] SeepingN: thus not the best way to install
[22:22:26] SeepingN: use your OS's package manage o' choice
[22:22:47] havenwood: chris349: Are you installing Ruby for a development or production environment?
[22:23:00] chris349: What is the best way?? I get \curl -sSL https://get.rvm.io from the RVM site!
[22:23:05] havenwood: chris349: Are you installing Ruby for a development or production environment?
[22:23:33] chris349: Right now its development. To run automated tests using Jenkins CI
[22:23:43] chris349: But normally I use the same process for production too
[22:24:39] havenwood: chris349: Okay, a local install is sane in development. Usually, it's advised not to use a version switcher in prod, fwiw.
[22:24:40] chris349: So anyways you say not to follow this instruction? https://rvm.io/rvm/install
[22:25:15] victorqueiroz: has joined #ruby
[22:25:32] havenwood: chris349: Those instructions advise to do a single-user install as a non-root user.
[22:25:35] havenwood: chris349: Do follow them.
[22:25:52] havenwood: chris349: If a part of those instructions isn't clear, let's fix it so it's clear.
[22:26:04] chris349: havenwood, Lets not debate that. The question is, can I specify the Ruby version from the start?
[22:26:24] m_antis: has joined #ruby
[22:26:24] havenwood: chris349: Yes, you can.
[22:26:45] chris349: havenwood, Would you mind sharing with me the command to do that?
[22:26:55] havenwood: chris349: The reason I'd want to debate it is I'm one of the maintainers of RVM, so I'd like the instructions to work. Just saying, if you think they're broken, let's fix them.
[22:27:27] havenwood: chris349: By default, installing RVM doesn't install a version of Ruby. Do you want to install RVM and a Ruby of a particular version or something else?
[22:27:46] havenwood: chris349: You can install RVM along with a Ruby if you want. Or do them in separate steps. Up to you.
[22:28:12] havenwood: By default, RVM does not install a Ruby. Normally, you install RVM, then use RVM to install a Ruby.
[22:29:06] havenwood: chris349: I'm unclear whether you want to install a particular version of RVM, or RVM alongside a particular version of Ruby?
[22:29:49] chris349: I would prefer to pass to the \curl -sSL https://get.rvm.io command the version of ruby I want
[22:30:11] chris349: The only way I know how to do it is run that command, install the ruby version, then uninstall the default version
[22:30:44] havenwood: chris349: You can see the installer help by running:
[22:30:46] havenwood: \curl -sSL https://get.rvm.io | bash -s stable --help
[22:31:26] havenwood: chris349: Oh, you want a version of Ruby.
[22:31:56] havenwood: chris349: \curl -sSL https://get.rvm.io | bash -s stable --ruby=2.6.3
[22:32:26] havenwood: chris349: Anyhoo, pass a --ruby flag with the engine and version you want.
[22:32:42] havenwood: chris349: Install RVM as a non-root user without sudo.
[22:33:28] havenwood: chris349: If you must use an unsupported root install, instructions are here: https://rvm.io/support/faq#i-want-to-install-for-root-only
[22:34:08] havenwood: chris349: Be sure to restart your terminal between uninstalling and reinstalling.
[22:34:41] havenwood: chris349: \curl -sSL https://get.rvm.io | bash -s head --ruby=2.6.3
[22:34:49] havenwood: (You were using master.)
[22:37:22] cats: has joined #ruby
[22:38:48] chris349: This is odd, its trying to install ruby from the system package manager? Installing required packages: ruby...jenkins password required for 'yum install -y ruby':
[22:41:05] havenwood: chris349: I think you'd have had better luck if you asked the channel how to install Ruby in development on your OS. :P
[22:41:06] chris349: Anyways I install as non-root user and in the shell rvm/ruby works fine, but in the Jenkins CI script it still fails: /tmp/jenkins8124905322485742601.sh: line 2: bundle: command not found
[22:41:26] havenwood: chris349: gem install bundler
[22:41:43] havenwood: chris349: What OS?
[22:41:55] havenwood: ACTION guesses CentOS
[22:44:10] havenwood: chris349: What OS/distro and version?
[22:44:38] havenwood: Anyhoo if it's CentOS you can use EPEL for Ruby 2.4: https://www.softwarecollections.org/en/scls/rhscl/rh-ruby24/
[22:44:50] chris349: havenwood, I do that but still same error. CentOS 7. I need Ruby 2.1.7 for this
[22:45:07] havenwood: Ah, EPEL does have Ruby 2.5.
[22:45:26] havenwood: chris349: Ruby 2.1 is sooo old!
[22:45:35] chris349: I can run the app in production on Centos 7, but I am trying to run these rspec tests under Jenkins CI. Unless theres a better system to use for that
[22:45:35] havenwood: chris349: It's past end of life, so you should use a package manager with LTS to get security backports.
[22:45:55] havenwood: chris349: Ruby 2.1 has known security vulnerabilities that are not patched if you compile it yourself.
[22:46:25] chris349: havenwood, Great. The issue is bundle command is found in my terminal and not found when I try to run this through Jenkins CI under the same user
[22:47:05] havenwood: chris349: https://rvm.io/integration/jenkins
[22:47:09] havenwood: gotta run, good luck!!
[22:49:49] chris349: I do that and still no go
[22:49:59] chris349: + bundle --version
[22:50:19] chris349: line 5: bundle: command not found
[22:50:40] cthu|: has joined #ruby
[22:55:55] staticx: has joined #ruby
[22:58:01] m_antis_: has joined #ruby
[23:05:25] hiroaki: has joined #ruby
[23:05:43] crankharder: has joined #ruby
[23:06:50] al2o3-cr: ACTION thinks this year has flown by
[23:14:39] Renich: has joined #ruby
[23:20:39] CCDelivery: has joined #ruby
[23:21:48] havenwood: ACTION flies away on a chariot pulled by cats...
[23:24:06] havenwood: chris349: Does RVM work from Jenkins?
[23:24:15] havenwood: chris349: Is it sourced?
[23:55:55] m_antis: has joined #ruby
[23:56:05] bambanx: has joined #ruby
[23:56:44] r29v: has joined #ruby