havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.7.1, 2.6.6, 2.5.8: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.de/ and select Ruby as the language | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
bga57 has quit [Ping timeout: 258 seconds]
<xco> i have no indication of whether or not i'm still connected to the internet. can anyone see this msg?
<xco> i mean still connected to this IRC channel
<havenwood> xco: Can confirm.
<xco> havenwood <3 thank you
<leftylink> interesting
ur5us has quit [Ping timeout: 260 seconds]
<jhass> IME IRC survies a lot that takes other things down :D
fercell has quit [Quit: WeeChat 2.8]
<xco> i'm trying to return a hash based on the true values of another hash in some array
<xco> i think i could use a #map here
<xco> not sure how to manipulate it though
tau has joined #ruby
tau has joined #ruby
tau has quit [Changing host]
ur5us has joined #ruby
<adam12> xco: reduce or each_with_object. Reduce being more classic and each_with_object maybe being a bit easier to get your feet wet with.
darkstardevx has quit [Ping timeout: 246 seconds]
imode has joined #ruby
<adam12> xco: Could probably also use Enumerable#select here.
<xco> adam12 i was thinking more along the lines of select and map in fact
<xco> adam12 digging in usages of each_with_object too now
<xco> into*
RingtailedFox has joined #ruby
<RingtailedFox> hiya guys! can i install newer versions of Ruby for Windows on top of older ones, or do i need to uninstall them first?
Archenoth has quit [Quit: Leaving]
<RingtailedFox> like, if i installed ruby to C:\Ruby-x64\ instead of C:\Ruby27-x64\.... would i be able to just plop a newer version on top of it?
darkstardev13 has joined #ruby
<adam12> RingtailedFox: Should be fine? Only issue I foresee is the ruby in your PATH, if there is one.
<adam12> xco: If you're on Ruby 2.7, hash.select { _2 }. Which looks absolutely magical but it's taking the second value to the block and selecting it if it's truthy.
<RingtailedFox> yeah
bruce_lee has quit [Ping timeout: 260 seconds]
<RingtailedFox> i just uninstalled both Ruby 2.6 and Ruby 2.5... i can fix the path if needed
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
bruce_lee has joined #ruby
<xco> adam12 hash.select { _2 } looks too magical. i'll prefer the other methods
<adam12> xco: hash.select {|_key, value| value } if you like verbosity :)
<adam12> "verbosity"
<adam12> xco: Lots of ways to approach this. Definitely explore each_with_object and/or reduce tho.
<leftylink> I thought it wasn't to be based on the values of the same hash though
<xco> adam12 hash.select {|_key, value| value } how's this supposed to work?
<xco> adam12 when does the array come in?
<adam12> Maybe I misunderstood?
<xco> i think you did
<adam12> Ah. I thought you just wanted hash -> result, with truthy values.
<xco> i'm selecting bases on values from an array
<xco> nooooo
<xco> :D
<xco> that would be too easy
<adam12> My bad; it's been a long day :)
<xco> adam12 yeah no worries
<leftylink> I think I'd merge all elts of the array into one Hash[String => Boolean], and then I'd `hash.select { ... }` as appropriate
leitz has quit [Quit: Leaving]
<xco> adam12 and i'd definitely avoid hash.select { _2 } for 1. too magical 2. not many people are on latest ruby versions
<leftylink> could skip the merge and just do hash.select { array.find { ... }.values[0] } but I dislike unnecessary scan...
<xco> leftylink hmmmm. that sounds legit. i thought it could be done on the fly without merging
<leftylink> I guess that's OK if the scan time is acceptable!
<xco> leftylink no go for the scan
<leftylink> another way you can approach it, if the values in the array are guaranteed to be the same order as the kv pairs in the hash, is to zip, followed by... well, I'd say filter_map, but since you said you didn't want to rely on 2.7, then I guess you'd do map and compact
davispuh has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
jinmiaoluo has joined #ruby
j416 has quit [Ping timeout: 260 seconds]
lesha has quit [Ping timeout: 258 seconds]
Arahael has quit [Ping timeout: 272 seconds]
<leftylink> am worried that i was too helpful
<xco> leftylink how so? :)
<xco> leftylink i'm experimenting with your suggestions and learning along the way. sorry for the silence but it looks like zip is what i was missing which you suggested
<leftylink> well, the reason I would be worried about that is because https://i.imgur.com/bf0ZlcD.jpg ("good grief. if you copy the homework, you learn nothing")
<leftylink> I see
<leftylink> well, I think we are good then
<leftylink> leading to experimentation
<xco> leftylink we're good! really good thank you. after applying zip i see how easy this is actually but i'm busy in the lab with all the other suggestions
<xco> my explanation wasn't good enough so adam12 suggested things of how he understood my shitty explanation but then you too adam12 :D
<xco> thank you too**
RingtailedFox has quit [Read error: Connection reset by peer]
jinmiaoluo has quit [Ping timeout: 258 seconds]
RingtailedFox has joined #ruby
dviola has quit [Ping timeout: 265 seconds]
gix has quit [Ping timeout: 258 seconds]
s2013 has joined #ruby
clemens3 has joined #ruby
Sina has quit [Quit: Connection closed for inactivity]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rudd0 has quit [Read error: Connection reset by peer]
orbyt_ has joined #ruby
kinduff has quit [Read error: Connection reset by peer]
kinduff has joined #ruby
bga57 has joined #ruby
Arkantos has quit [Ping timeout: 258 seconds]
Rudd0 has joined #ruby
jinmiaoluo has joined #ruby
<havenwood> xco: Where did `array` come from? An Array of Hashes like that is a bit awkward, which makes me want to just make it a Hash ASAP.
<havenwood> xco: array.reduce({}, :merge) #=> {"car"=>true, "house"=>false, "pet"=>true}
<havenwood> xco: It's actually a bit easier to deal with if the `false` is `nil` in a Hash structure.
<xco> havenwood i got that array from doing something like this YAML.load_file(File.join(__dir__, 'config.yml'))
<xco> it's from a config yaml
<havenwood> xco: gotcha
Arkantos has joined #ruby
<havenwood> xco: Just some food for thought: array.reduce({}, :merge).merge(hash) { |_key, old, new| old && new }.transform_values { |value| value if value }.compact
<havenwood> xco: I mean: array.reduce({}, :merge).merge(hash) { |_key, left, right| right if left }.transform_values { |value| value if value }.compact
<xco> 👀
<xco> havenwood this one works nicely too.. thanks :)
cd has joined #ruby
<havenwood> xco: Or consider: hash.slice(*array.map(&:to_a).map(&:first).filter_map { |key, value| key if value })
<xco> havenwood this is also nice
<havenwood> xco: With fewer loops: hash.slice(*array.filter_map { |h| h.to_a.first.then { |key, value| key if value } })
<havenwood> xco: They Array of Hashes is just a bit awkward.
<havenwood> The*
<xco> havenwood i can understand that but awkard in this context or as a data structure?
<xco> i believe you mean for our purpose here
<havenwood> xco: As a data structure, just since it's both nested and a Hash is used as a Tuple.
<xco> havenwood understand your point. i sort of read it as "Array of objects which is OK. the objects are Hashes"
<havenwood> xco: It's often worth getting your data sorted first, as a threshold step.
<havenwood> xco: Then you have to do fewer contortions down the line.
<xco> havenwood won't that depend on the use case, the array is fixed size
CrazyEddy has quit [Remote host closed the connection]
<havenwood> xco: Here, for example, I just mean first process `array` to get the keys. Extract that step to a method.
<xco> plus the order is important here
<havenwood> xco: I'm saying consider breaking the problem down to:
<havenwood> I have: [{"car"=>true}, {"house"=>false}, {"pet"=>true}]
<havenwood> I want: ["car", "pet"]
<xco> oh i get it
<xco> havenwood then using ["car", "pet"] i can select them from the hash as keys
<xco> havenwood is that what you mean?
<havenwood> xco: Yup: hash.slice(*keys)
<xco> havenwood hm. this is a way better way of thinking around the problem
<havenwood> &>> [{"car"=>true}, {"house"=>false}, {"pet"=>true}].reduce(:merge).filter_map { |key, value| key if value }
<rubydoc> # => ["car", "pet"] (https://carc.in/#/r/9779)
<havenwood> &>> [{"car"=>true}, {"house"=>false}, {"pet"=>true}].map(&:to_a).flatten(1).map { |key, value| key if value }.compact
<rubydoc> # => ["car", "pet"] (https://carc.in/#/r/977a)
<xco> havenwood this works too but the filter_map is faster
<havenwood> xco: Just remember it's a Ruby 2.7 feature. :)
<xco> si
jinmiaol1 has joined #ruby
<xco> havenwood thank you
<havenwood> you're welcome
jinmiaoluo has quit [Remote host closed the connection]
jinmiaoluo has joined #ruby
RingtailedFox has quit [Read error: Connection reset by peer]
RingtailedFox has joined #ruby
jinmiaol1 has quit [Ping timeout: 260 seconds]
tau has quit [Ping timeout: 272 seconds]
ChmEarl has quit [Quit: Leaving]
gavlee has quit []
gavlee has joined #ruby
<xco> #yield_self came in 2.5, #then came in 2.6 correct?
<havenwood> xco: yup
<xco> ok :)
<xco> thinking of how far back i'd want my program to run
<xco> so i can avoid both methods in envs with Ruby <2.5
<havenwood> xco: "Support of Ruby 2.4 has ended"
RingtailedFox has quit [Read error: Connection reset by peer]
<xco> aha!
RingtailedFox has joined #ruby
code_zombie has quit [Quit: Leaving]
CrazyEddy has joined #ruby
Arkantos has quit [Quit: ZNC 1.6.6+deb1ubuntu0.2 - http://znc.in]
Arkantos has joined #ruby
imode has quit [Ping timeout: 256 seconds]
darkstardev13 has quit [Remote host closed the connection]
RingtailedFox has quit [Read error: Connection reset by peer]
coniptor has quit [Ping timeout: 272 seconds]
RingtailedFox has joined #ruby
RingtailedFox has quit [Read error: Connection reset by peer]
RingtailedFox has joined #ruby
imode has joined #ruby
RingtailedFox has quit [Max SendQ exceeded]
RingtailedFox has joined #ruby
RingtailedFox has quit [Read error: Connection reset by peer]
RingtailedFox has joined #ruby
coniptor has joined #ruby
darkstardev13 has joined #ruby
j416 has joined #ruby
Archenoth has joined #ruby
lesha has joined #ruby
jinmiaoluo has quit [Ping timeout: 258 seconds]
jinmiaoluo has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ur5us has quit [Ping timeout: 240 seconds]
ho0po3 has joined #ruby
ho0po3 has quit [Max SendQ exceeded]
ho0po3 has joined #ruby
sauvin has joined #ruby
iNs_ has joined #ruby
iNs has quit [Remote host closed the connection]
alexherbo2 has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
teclator has quit [Ping timeout: 256 seconds]
evert has quit [Quit: ZNC - https://znc.in]
evert has joined #ruby
akem_ has joined #ruby
akem_ has quit [Read error: Connection reset by peer]
akem has quit [Ping timeout: 265 seconds]
akem_ has joined #ruby
akem_ has quit [Read error: Connection reset by peer]
teclator has joined #ruby
akem_ has joined #ruby
akem has joined #ruby
akem_ has quit [Ping timeout: 240 seconds]
teclator has quit [Ping timeout: 256 seconds]
teclator has joined #ruby
miskatonic has joined #ruby
Tuor has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
Tuor has joined #ruby
akem has quit [Read error: Connection reset by peer]
akem has joined #ruby
akem_ has joined #ruby
akem has quit [Ping timeout: 246 seconds]
conta has joined #ruby
imode has quit [Ping timeout: 246 seconds]
jinmiaoluo has quit [Ping timeout: 246 seconds]
jinmiaoluo has joined #ruby
j416 has quit [Ping timeout: 260 seconds]
j416 has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
akem_ has quit [Remote host closed the connection]
howdoi has quit [Quit: Connection closed for inactivity]
Rudd0 has quit [Ping timeout: 256 seconds]
schne1der has joined #ruby
conta has quit [Quit: conta]
Archenoth has quit [Read error: Connection reset by peer]
donofrio has quit [Read error: Connection reset by peer]
Archenoth has joined #ruby
donofrio has joined #ruby
conta has joined #ruby
Tuor has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
erpel has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
<erpel> heyho - I'm publishing a gem that needs eventmachine with tls but if people don't have openssl headers installed on their machine when they do 'gem install mygem' they can't use the software. Is there a way to make dependencies indicate something is missing earlier than when running my software for the first time?
akem has joined #ruby
akem has quit [Max SendQ exceeded]
akem has joined #ruby
cnsvc_ has joined #ruby
TzilTzal has joined #ruby
cnsvc_ has quit [Ping timeout: 240 seconds]
darkstardev13 has quit [Remote host closed the connection]
<Manchotix[m]> <erpel "heyho - I'm publishing a gem tha"> Heyho maybe you can check gem like mysql or the ruby gem for postgresql. This gem need the db-client libs install on the system otherwise the installation will break. Maybe you can to it in the same way.... something like please install the openssl-head files and check this if people install your gem. but is only my first idea to that :)
<Manchotix[m]> > <@freenode_erpel:matrix.org> heyho - I'm publishing a gem that needs eventmachine with tls but if people don't have openssl headers installed on their machine when they do 'gem install mygem' they can't use the software. Is there a way to make dependencies indicate something is missing earlier than when running my software for the first time?
<Manchotix[m]> * Heyho maybe you can check gem like mysql or the ruby gem for postgresql. This gem need the db-client libs install on the system otherwise the installation will break. Maybe you can do it in the same way.... something like please install the openssl-head files and check this if people install your gem. but is only my first idea to that :)
<erpel> Manchotix[m] that sounds like a great resource to look at, thanks for thinking about it
<Manchotix[m]> <erpel "Manchotix that sounds like a gre"> no problem :)
jenrzzz has quit [Ping timeout: 258 seconds]
conta has quit [Quit: conta]
RingtailedFox has quit [Read error: Connection reset by peer]
RingtailedFox has joined #ruby
jenrzzz has joined #ruby
BH23 has quit [Quit: Leaving]
BH23 has joined #ruby
ur5us has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 246 seconds]
jokester has quit [Ping timeout: 272 seconds]
Rudd0 has joined #ruby
Arahael has joined #ruby
Emmanuel_Chanel has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
InfosecTai has joined #ruby
<InfosecTai> join #perl
<RingtailedFox> hrm, i'm having an odd issue now....ERROR: While executing gem ... (Errno::EACCES)
<RingtailedFox> Permission denied @ rb_sysopen in C:\users\user\.gem\specs\rubygems.org%443\Marshal.4.8\
AndreYuhai has joined #ruby
greengriminal has quit [Quit: Leaving]
jinmiaoluo has quit [Ping timeout: 240 seconds]
jinmiaoluo has joined #ruby
vondruch has quit [Ping timeout: 256 seconds]
<AndreYuhai> Hey there, so I was trying to write an API wrapper by reading another one on Github. So the website basically has topics and entries. When I send a request to either 'api../topic' or 'api../entry' both return the same structured response. The difference is one has only one entry and the one has multiple (since it's a topic request)
<AndreYuhai> So I am confused as to how to implement this. I have two classes called entry and topic.
<AndreYuhai> Here are the responses from both endpoints: https://dpaste.org/A9On#L , https://dpaste.org/1ms8
<AndreYuhai> I also tried to explain in detail in one of the links.
<AndreYuhai> I want something like client.entry(entry_id) to return an entry. But that entry should also have topic details. But in the api response topic details always come first and then inside there is a variable called entries.
<AndreYuhai> I want entry to have topic as well so the user can simply do entry.topic.title or something like this.
jenrzzz has quit [Ping timeout: 260 seconds]
<RingtailedFox> no matter what i do, i keep getting this error: ERROR: While executing gem ... (Errno::EACCES)
<RingtailedFox> Permission denied @ rb_sysopen - C:/Users/User/.gem/specs/rubygems.org%443/quick/Marshal.4.8/addressable-2.7.0.gemspec
<RingtailedFox> do i have to run gem as admin?
<RingtailedFox> i'm on Windows 10 64-bit
<jhass> probably
<jhass> maybe gem install --user-install works on windows too
miskatonic has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
<RingtailedFox> nope, that still gives the same error
naught-fowl has quit [Remote host closed the connection]
<jhass> I don't know windwos well enough on why you would not be able to access files in your own C:/Users/User
jinmiaoluo has quit [Ping timeout: 246 seconds]
<jhass> seems weird and broken
<RingtailedFox> this is a clean fresh ruby install
<RingtailedFox> it shouldn't be broken
<AndreYuhai> Use rbenv, if you can on Windows. I had similar permission issues when installing gems on linux. Rbenv is really good.
<CommunistWolf> I like chruby + ruby-install. enjoyable separation of concerns
<RingtailedFox> i'll try re-installing ruby 2.7.1 x64 again...
<RingtailedFox> this time, do i run the installer as admin?
krillbat has joined #ruby
<RingtailedFox> i'm tempted to just have chocolatey manage ruby for me
InfosecTai has quit [Ping timeout: 246 seconds]
TCZ has joined #ruby
Tuor has joined #ruby
<RingtailedFox> grr, the only downside with choco is that it insists on ruby being in C:\Tools\Ruby... i don't want it there
<jhass> use WSL? :P
<RingtailedFox> maybe but i'm waiting for the may 2020 update to be released for my laptop so i can ugprade to WSL 2
<RingtailedFox> ruby.....
<RingtailedFox> i love ya but why ya gotta be a butt and give me headaches like this? :P
<RingtailedFox> uninstalled for now becuase i have to do a bunch-o-crap for now
<RingtailedFox> i'll try again later
venmx has quit [Quit: leaving]
drincruz_ has joined #ruby
jokester has joined #ruby
jenrzzz has joined #ruby
<jhass> because windows, honestly :D
<jhass> the community overlap just isn't that big
cd has quit [Quit: cd]
jetchisel has quit [Quit: Unfortunately time is always against us -- [Morpheus]]
drincruz_ has quit [Ping timeout: 260 seconds]
conta has joined #ruby
conta1 has joined #ruby
conta1 has quit [Client Quit]
conta has quit [Ping timeout: 256 seconds]
conta has joined #ruby
conta1 has joined #ruby
TCZ has quit [Quit: Leaving]
drincruz_ has joined #ruby
conta has quit [Ping timeout: 240 seconds]
conta1 is now known as conta
hightower4 has quit [Remote host closed the connection]
hightower4 has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
vondruch has joined #ruby
dviola has joined #ruby
Besnik_b has quit [Ping timeout: 272 seconds]
jinmiaoluo has joined #ruby
burningserenity has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
jinmiaoluo has quit [Ping timeout: 256 seconds]
jinmiaoluo has joined #ruby
jinmiaoluo has quit [Remote host closed the connection]
jinmiaoluo has joined #ruby
bvdw has quit [Remote host closed the connection]
bvdw has joined #ruby
tau has joined #ruby
tau has joined #ruby
tau has quit [Changing host]
jinmiaoluo has quit [Ping timeout: 264 seconds]
jinmiaoluo has joined #ruby
cassolas has joined #ruby
cassolas is now known as cassoals
cassoals is now known as haroldofurtado
gavlee has quit []
cd has joined #ruby
Besnik_b has joined #ruby
spiette has quit [Quit: ZNC 1.7.5 - https://znc.in]
spiette has joined #ruby
vagrantnoob has joined #ruby
gavlee has joined #ruby
conta has quit [Quit: conta]
krillbat has quit [Quit: Connection closed for inactivity]
cnsvc_ has joined #ruby
lesha_ has joined #ruby
lesha has quit [Ping timeout: 265 seconds]
cnsvc_ has quit [Ping timeout: 240 seconds]
haroldofurtado has quit []
haroldofurtado has joined #ruby
ho0po3 has quit [Quit: Leaving]
<haroldofurtado> Memory use of Textual: 42,6 MB • Visible lines: 87
burningserenity has quit [Quit: Leaving.]
haroldofurtado has quit [Quit: Textual IRC Client: www.textualapp.com]
burningserenity has joined #ruby
BTRE has quit [Remote host closed the connection]
jinmiaoluo has quit [Read error: Connection reset by peer]
cassolas has joined #ruby
cassolas has quit [Client Quit]
cassolas has joined #ruby
matju has joined #ruby
jinmiaoluo has joined #ruby
cassolas has quit [Client Quit]
vagrantnoob has quit [Remote host closed the connection]
BTRE has joined #ruby
cassolas has joined #ruby
cassolas has quit [Client Quit]
cassolas has joined #ruby
jinmiaoluo has quit [Ping timeout: 272 seconds]
tau has quit [Ping timeout: 265 seconds]
tf2ftw has joined #ruby
<tf2ftw> hi. is there a simple way to get a Time or Date object set to today at a certain time without explicitly declaring what the date is?
<tf2ftw> Something like Time.now at 9am
<tf2ftw> * scratch that, more like Date.today at 9am
jenrzzz has joined #ruby
<matju> tf2ftw: a=Time.now; b=Time.new(a.year,a.month,a.day,9,0,0)
jenrzzz has quit [Ping timeout: 272 seconds]
<tf2ftw> matju, thank you!
blessedonekobo has joined #ruby
spiette has quit [Quit: ZNC 1.8.0 - https://znc.in]
ChmEarl has joined #ruby
<jhass> tf2ftw: in Rails/ActiveSupport: Time.now.change(hour: 9)
spiette has joined #ruby
naught-fowl has joined #ruby
InfosecTai has joined #ruby
dadoce has joined #ruby
jinmiaoluo has joined #ruby
InfosecTai has quit [Ping timeout: 256 seconds]
jinmiaoluo has quit [Ping timeout: 260 seconds]
conta has joined #ruby
matju has quit [Quit: Leaving]
dviola has quit [Ping timeout: 272 seconds]
lucasb has joined #ruby
jinmiaoluo has joined #ruby
jenrzzz has joined #ruby
DaRock has quit [Ping timeout: 256 seconds]
AndreYuhai has quit [Quit: Leaving]
yxhuvud has quit [Read error: Connection reset by peer]
yxhuvud has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
conta has quit [Quit: conta]
cassolas has quit [Quit: cassolas]
cnsvc_ has joined #ruby
venmx has joined #ruby
rippa has joined #ruby
cassolas has joined #ruby
cnsvc_ has quit [Ping timeout: 240 seconds]
dviola has joined #ruby
dadoce has quit [Remote host closed the connection]
venmx has quit [Ping timeout: 246 seconds]
howdoi has joined #ruby
Caius has quit [Ping timeout: 260 seconds]
tvw has joined #ruby
Caius has joined #ruby
Caius has quit [Changing host]
Caius has joined #ruby
tvw has quit [Remote host closed the connection]
tvw has joined #ruby
jinmiaoluo has quit [Ping timeout: 246 seconds]
venmx has joined #ruby
jinmiaoluo has joined #ruby
alexherbo2 has quit [Ping timeout: 256 seconds]
alexherbo2 has joined #ruby
wogi has joined #ruby
jinmiaoluo has quit [Ping timeout: 256 seconds]
burningserenity has quit [Ping timeout: 264 seconds]
jinmiaoluo has joined #ruby
ellcs1 has joined #ruby
cnsvc_ has joined #ruby
cd has quit [Quit: cd]
cnsvc_ has quit [Ping timeout: 240 seconds]
cassolas has quit [Quit: cassolas]
burningserenity has joined #ruby
tvw has quit [Ping timeout: 256 seconds]
chalkmonster has quit [Quit: WeeChat 2.8]
<phenom> In short, I'm trying to install the following application in a container: https://www.edrawsoft.com/download-edrawmax.html
<phenom> Snap,, sorry everyone.
<phenom> Lol
chalkmonster has joined #ruby
<apotheon> In short?
<apotheon> Did I miss something?
tvw has joined #ruby
burningserenity has quit [Ping timeout: 240 seconds]
Arkantos has quit [Quit: ZNC 1.6.6+deb1ubuntu0.2 - http://znc.in]
Arkantos has joined #ruby
zell has joined #ruby
zell has left #ruby [#ruby]
brendan- has quit [Ping timeout: 272 seconds]
burningserenity has joined #ruby
fercell has joined #ruby
tvw has quit []
miskatonic has joined #ruby
englishm has quit [Excess Flood]
burningserenity has quit [Ping timeout: 244 seconds]
englishm has joined #ruby
ellcs1 has quit [Ping timeout: 252 seconds]
rapha has quit [Quit: WeeChat 2.3]
greengriminal has joined #ruby
jenrzzz has joined #ruby
orbyt_ has joined #ruby
burningserenity has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
blessedonekobo has quit [Read error: Connection reset by peer]
cacheeror has joined #ruby
banisterfiend has joined #ruby
TomyWork has joined #ruby
jackal has joined #ruby
<jackal> hi there
<jackal> can i get help with updating gems (debian)?
<RingtailedFox> how do i properly install ruby on 64-bit windows?
sagax has quit [Ping timeout: 256 seconds]
dostoyevsky has quit [Ping timeout: 240 seconds]
vondruch_ has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.8]
vondruch has quit [Ping timeout: 258 seconds]
vondruch_ is now known as vondruch
imode has joined #ruby
erpel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
banisterfiend has quit [Quit: Textual IRC Client: www.textualapp.com]
banisterfiend has joined #ruby
sauvin has quit [Ping timeout: 260 seconds]
<jhass> jackal: just install the newer version into your home with --user-install, it should shadow any globally installed one
<jhass> or use bundler & --path vendor/bundle
tvw has joined #ruby
<jackal> already installed but i get an error after update
<pwnd__> an error? :O
<jackal> let me pastebin it
InfosecTai has joined #ruby
<jhass> I don't know, maybe the jump is just too big, what's your installed version? gem -v
<jhass> also debian version?
chalkmonster has joined #ruby
Xiti has quit [Quit: Leaving]
<jackal> debian is testing
<jackal> gem is 3.1.3
<jhass> hum
alexherbo20 has joined #ruby
<jhass> maybe your best bet is to just remove that line from /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:
tvw has quit []
burningserenity has quit [Remote host closed the connection]
alexherbo2 has quit [Ping timeout: 272 seconds]
alexherbo20 is now known as alexherbo2
dostoyevsky has joined #ruby
InfosecTai has quit [Quit: Leaving]
InfosecTai has joined #ruby
InfosecTai has quit [Client Quit]
Xiti has joined #ruby
InfosecTai has joined #ruby
<adam12> Is that the latest Rubygems? I just saw a bug report on that today...
<adam12> Ah. 3.1.4 fixes that.
<jhass> do they provide upgrade instructions? :D
<adam12> jhass: Just looked. No :\
<adam12> jhass: Could do a manual unpack / ruby setup.rb
<jhass> walk jackal through it :)
<jackal> adam12, can you link to bug report?
<jackal> and yes, walk me :)
<adam12> jackal: I think it's this one: https://github.com/rubygems/rubygems/pull/3609
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<adam12> jackal: wget https://rubygems.org/rubygems/rubygems-3.1.4.tgz && tar xvzf rubygems-3.1.4.tgz && cd rubygems-3.1.4 && ruby setup.rb
<adam12> jackal: Presumingly, this is rubygems installed through non-apt means. Not sure what it looks like if you did apt-get install rubygems.
<jackal> i installed it via apt
<adam12> RingtailedFox: Using rubyinstaller.org is not working for you?
<adam12> jackal: Well I guess you can always try what I listed and then re-install through apt if it's broken.
cliluw has quit [Ping timeout: 256 seconds]
cliluw has joined #ruby
Jonopoly has joined #ruby
Koshian has quit [Ping timeout: 258 seconds]
linetrace has quit [Ping timeout: 260 seconds]
jinie has quit [Quit: ZNC 1.6.1 - http://znc.in]
jinie has joined #ruby
jinmiaoluo has quit [Remote host closed the connection]
<jackal> adam12, same error when i try the wget way
tf2ftw has quit [Ping timeout: 265 seconds]
jinie has quit [Quit: ZNC 1.6.1 - http://znc.in]
jinmiaoluo has joined #ruby
jinie has joined #ruby
<adam12> jackal: Very strange.
<jackal> if its fixed in the source, maybe i should wait debian port to be fixed?
tastemakerChuck has joined #ruby
<adam12> jackal: Maybe. Is this affecting anything else?
<adam12> jackal: You could try an older version, using the same steps I mentioned.
<jackal> no idea if it affects anything
<jackal> i came in here asking when i got the error
<jackal> havent tried any project using ruby
<jhass> jackal: is the 3.1.3 from debian or from a prior gem update --system?
<jackal> gem
<jackal> or maybe something conflicts with debian port
cliluw has quit [Quit: Leaving]
TomyWork has quit [Remote host closed the connection]
ellcs1 has joined #ruby
TzilTzal has quit [Quit: Leaving.]
<jhass> jackal: I'd try downgrading by reinstalling the debian package then
<jhass> do they still split ruby and rubygems into two packages? both to be sure
<jhass> and then upgrading again from the downgraded version
<RingtailedFox> adam12, it keeps whining about permissions errors when i try to run thigns like gem install... or even uninstalling it via control panel.. have to run the uninstaller as admin
cliluw has joined #ruby
orbyt_ has joined #ruby
tf2ftw has joined #ruby
plutes has joined #ruby
linetrace has joined #ruby
<adam12> RingtailedFox: Can you install to non-Program Files directory as non-admin?
<RingtailedFox> yes. i was trying to install ruby to C:\Ruby-x64 (it usually defaults to C:\Ruby27-x64)
<adam12> RingtailedFox: And once you do that, `C:\Ruby-x264\bin\gem install somegem` gives you a permissions error?
<RingtailedFox> i had ruby 2.6 installed a few weeks back but got rid of it.... trying to install 2.7 now but it's just been a headache... i forget which exact version i had previously
<RingtailedFox> well, here's the thing: ruby isn't installed right now. should i install it as admin, or non-admin?
<adam12> I'm not sure to be honest, but I'd say prefer install as non-admin, at least for now.
<adam12> I run Windows but use WSL religiously, so I dont' have a ton of experience with the RubyInstaller version.
<havenwood> RingtailedFox: Can you use WSL?
<RingtailedFox> yes, i can, though i was hoping to wait until the May 2020 update is approved for my laptop, then i'd upgrade to WSL 2
<havenwood> RingtailedFox: Ah, gotcha.
<RingtailedFox> what's the difference between RubyOnRails and RubyInstaller?
jinmiaoluo has quit [Ping timeout: 272 seconds]
<RingtailedFox> i'm running an ASUS ROG laptop... just wanna make sure it's compatible with the update so i don't have to spend a few days/weeks re-installing all my steam games :p
<havenwood> RingtailedFox: RubyInstaller is a Windows-specific tool for installing Ruby. Ruby on Rails is the most popular web framework for the Ruby language.
gerep has joined #ruby
<RingtailedFox> ahhh ok
<havenwood> RingtailedFox: RubyInstaller with DevKit should be fine for getting Ruby nominally working in Windows without WSL.
<havenwood> RingtailedFox: Or you can install via Chocolatey.
<gerep> Hello humans. I am trying to understand one thing about modules. I know what it does but I am reading this code https://github.com/slack-ruby/slack-ruby-bot/blob/master/TUTORIAL.md#application and trying to understand what is happening when I declare a module "SlackMathbot" in two different files, in runtime they get merged or something?
<havenwood> gerep: It reopens the module.
<havenwood> gerep: You can do that with both modules and classes.
<gerep> havenwood, and the `require` order is important?
<havenwood> gerep: Even at runtime, you can reopen a module and define new methods or redefine a method.
<havenwood> gerep: The require order is important if one is stomping on the other.
<adam12> 2.7.1 in available via scoop too.
<miskatonic> there are people who pretend obstinately that rails and similar frameworks is the one and only reason to use Ruby
<havenwood> RingtailedFox: https://chocolatey.org/packages/ruby
<RingtailedFox> chocolatey is obsessed with shoving Ruby into C:\Tools\Ruby, though
<RingtailedFox> and i don't want it there becuase i already have some tools in there and want to keep ruby seperate (preferrably in C:\Ruby-x64)
<gerep> havenwood, another question. What happens to the class defined inside the module? My understanding of modules is that I can create methods to reuse in different classes. I can do this by including the module in my class definition.
<gerep> I would I create a class inside a module?
<gerep> *why
<havenwood> gerep: Namespaces are just namespaces, nothing more. By defining a class inside a module, you give it a namespace.
<jackal> adam12, jhass, reinstalling debian and updating via gem later produces same error
<havenwood> gerep: Nothing else special happens.
<jackal> i guess i'll wait for debian/ruby fix
<jhass> might be best, yeah
<gerep> havenwood, so I cannot create an instance of a class inside a module?
<jhass> or just sidestep debian and use a ruby version manager like 80-90% of rubyists and probably 98% on debian
bga57 has quit [Ping timeout: 246 seconds]
m27frogy has quit [Ping timeout: 265 seconds]
greengriminal has quit [Quit: This computer has gone to sleep]
<jhass> gerep: yes you can for every possible interpretation of that I can come up with :)
<RingtailedFox> is there a way to tell chocolatey "no, you install it in C:\Ruby-x64\"?
greengriminal has joined #ruby
bga57 has joined #ruby
<RingtailedFox> attempting with choco install ruby --params "/InstallDir:C:\Ruby-x64"
jackal has left #ruby [#ruby]
<gerep> (sorry for keeping the subject but I am trying to understand) So, in the example I am following (https://github.com/slack-ruby/slack-ruby-bot/blob/master/TUTORIAL.md#application) the module SlackMathbot has a class definition inside of it, in the next code block I don't see this class Bot being used.
<gerep> Is there a practical reason why it is there?
<RingtailedFox> now, can chocolatey update ruby automatically, for if, say... Ruby 2.8 comes out?
<jhass> gerep: SlackRubyBot::Bot does some magic to detect that it's being inherited I think
<jhass> and hook up the new child class to things
<gerep> jhass, and by declaring the class, does it mean that the module SlackMathbot has the SlackRubyBot::Bot methods?
<RingtailedFox> okay, super strange error here
<RingtailedFox> C:\Users\User>gem install bundle
<RingtailedFox> ERROR: While executing gem ... (Errno::EACCES)
<RingtailedFox> Permission denied @ rb_sysopen - C:/Users/User/.gem/specs/rubygems.org%443/quick/Marshal.4.8/bundle-0.0.1.gemspec
<jhass> gerep: no, the module is just acting as namespace here
<RingtailedFox> do i need the MSYS crap too?
<gerep> jhass, and why is that required?
<gerep> I need to read more about namespaces hahaha
<jhass> gerep: it's not required, it just serves code organization. Bot is very generic name, if everybody would use the toplevel for everything it would likely conflict with something else
<gerep> Ah!!!!!
<gerep> Makes sense now jhass =)
<RingtailedFox> havenwood: got ruby installed now..... just, it seems to not like running anymore :P
<RingtailedFox> adam12, got ruby installed, though chocolatey seemed to have a conniption about it until i ran it as admin :P
<gerep> jhass, still testing your patience....the module class "Bot < SlackRubyBot::Bot" is probably used by the "SlackRubyBot" library and it is called in the Config.ru file. This file is calling "SlackMathbot::Bot.run", is that a call to the Bot class inside the "SlackMathbot" module?
<jhass> gerep: yes, :: here accesses the namespace
<jhass> in fact you could rewrite module A; class B; to module A; end; class A::B; end;
<gerep> jhass, cool! And when I have a module inside a module, I believe it serves the same purpouse you said before, code organization. If that is the case, the method inside a "sub-module" is available for the "parent" module?
<gerep> jhass, nice! That explanation about the rewrite clears my doubt about examples I have found where a class was defined outside the module.
<RingtailedFox> really.... i have to install gems as admin.... *sighs*
jenrzzz has joined #ruby
<RingtailedFox> is this normal behaviour for ruby installed via chocolatey?
<jhass> gerep: module's have dual use in Ruby, as namespaces like we talked about, but also to share functionality among classes. So a module within module can server to further organize the code as you say, or to collect some methods to be shared by multiple classes. Or both. A class does not inherit the methods a module defines unless it calls include TheModule; Where it's defined in scope makes no
<jhass> difference for this
<adam12> RingtailedFox: Afraid I don't know, but if you installed Ruby by Admin, then in theory gems would be as well. There's methods around that, such as --user-install and setting GEM_HOME environment variable.
<RingtailedFox> i installed ruby via chocolatey... and chocolatey seems to hate running as user and NOT admin...
<gerep> jhass, you shine in the darkness my friend, thank you so much for your time!
<jhass> yw :)
<RingtailedFox> i love the ability to update via choco, though
jenrzzz has quit [Ping timeout: 256 seconds]
TCZ has joined #ruby
davispuh has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.8]
alexherbo24 has joined #ruby
alexherbo2 has quit [Ping timeout: 260 seconds]
alexherbo24 is now known as alexherbo2
chalkmonster has joined #ruby
<havenwood> RingtailedFox: Typically if a package manager chooses a system location for gems, you can just move the gem location.
<havenwood> RingtailedFox: That way Ruby can still be updated by the package manager, but gems install into a local directory that you have permissions for.
<havenwood> RingtailedFox: It's *where* gems are installed that matters.
<havenwood> RingtailedFox: There's a default `gem env gemhome` but like adam12 mentioned, you can move that install directory anywhere you want.
<havenwood> RingtailedFox: All you need to do other than setting GEM_HOME or using --user-install flag (with command or in .gemrc) is to add the new `gem env gemhome`/bin to your PATH.
<havenwood> RingtailedFox: TL;DR: Install gems wherever you want and add the $GEM_HOME/bin to your $PATH.
gerep has quit [Quit: Leaving]
tvw has joined #ruby
m27frogy has joined #ruby
<RingtailedFox> gem install whines about permissions whenever i install ruby as admin... unless i run the command prompt as admin
<RingtailedFox> i just find it all very strange
fercell has quit [Quit: WeeChat 2.8]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jetchisel has joined #ruby
RingtailedFox has quit [Read error: Connection reset by peer]
RingtailedFox has joined #ruby
jenrzzz has joined #ruby
banisterfiend has quit [Quit: banisterfiend]
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
Jonopoly has quit [Quit: WeeChat 2.8]
TCZ has quit [Quit: Leaving]
orbyt_ has joined #ruby
houhoulis has joined #ruby
segy_ has joined #ruby
segy has quit [Ping timeout: 265 seconds]
segy_ is now known as segy
ur5us has joined #ruby
Archenoth has quit [Quit: Leaving]
kinduff has quit [Read error: Connection reset by peer]
kinduff has joined #ruby
r29v has joined #ruby
miskatonic has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
r29v has quit [Ping timeout: 264 seconds]
jetchisel has quit [Ping timeout: 256 seconds]
erpel has joined #ruby
schne1der has quit [Ping timeout: 272 seconds]
chalkmonster has quit [Quit: WeeChat 2.8]
xco has quit [Ping timeout: 256 seconds]
tau has joined #ruby
tau has joined #ruby
tau has quit [Changing host]
jetchisel has joined #ruby
dan64- has joined #ruby
dan64 has quit [Ping timeout: 256 seconds]
xco has joined #ruby
j416 has quit [Ping timeout: 260 seconds]
cloaked1 has joined #ruby
cloaked1 has quit [Changing host]
cloaked1 has joined #ruby
alexherbo2 has quit [Quit: The Lounge - https://thelounge.chat]
j416 has joined #ruby
erpel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
InfosecTai has quit [Ping timeout: 258 seconds]
chalkmonster has joined #ruby
bruce_lee has quit [Ping timeout: 246 seconds]
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
bruce_lee has joined #ruby
ellcs1 has quit [Ping timeout: 260 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
tvw has quit [Remote host closed the connection]
miah has quit [Remote host closed the connection]
wogi has quit [Quit: Leaving]
jenrzzz has joined #ruby
DaRock has joined #ruby
naught-fowl has quit [Remote host closed the connection]
tau has quit [Ping timeout: 264 seconds]
jenrzzz has quit [Ping timeout: 265 seconds]
sauvin has joined #ruby
drincruz_ has quit [Ping timeout: 246 seconds]
<RingtailedFox> okay, this is a super bizarre error:
<RingtailedFox> C:\WINDOWS\system32>gem install nokogiri
<RingtailedFox> The last version of nokogiri (>= 0) to support your Ruby & RubyGems was 1.10.9. Try installing it with `gem install nokogiri -v 1.10.9`
<RingtailedFox> nokogiri requires Ruby version >= 2.3, < 2.7.dev. The current ruby version is 2.7.1.83.
<RingtailedFox> ERROR: Error installing nokogiri:
<apotheon> What version of Ruby and RubyGems are you using?
ur5us has quit [Ping timeout: 260 seconds]
<xco> need some help here https://gist.github.com/xcobar/679de87e2724b68362a61b9711836e87#file-rb-rb-L44 i can't access @heads on L44 without dupilication L29-32 which is already on L16-19
<xco> the whole code is a mess, i'm very tired today so extra comments welcome
lesha__ has joined #ruby
<apotheon> Oh, I totally missed the "current ruby version is 2.7.1.83" part, somehow.
<apotheon> Okay, yeah, that's weird. I blame Microsoft.
lesha_ has quit [Ping timeout: 256 seconds]
<RingtailedFox> 2.7 for windows x64
<RingtailedFox> ruby version if 2.7.1.83
<RingtailedFox> rubygems is... how do i find THAT out
<RingtailedFox> ahh gem -v
<apotheon> gem -v
<apotheon> oh, too slow
<RingtailedFox> yeah, sorry. nearly passed out in the heat twice today, so please forgive me from being completely braindead
<apotheon> no . . . it's fine
<RingtailedFox> sorry jsut waiting for choco to finish installing msys2
<apotheon> Stuff happens, people forget things. It happens to me all the time.
<RingtailedFox> yeah, had to haul a bunch-o-crap to the city dump today... was doing that from... 8 AM local time until an hour ago
<apotheon> I wish I had a clue. I've never used Ruby on Windows.
<RingtailedFox> i have but it's... a chore :p
<RingtailedFox> this is the first time for me installing it via chocolatey though
<apotheon> interesting
<RingtailedFox> eyah
<RingtailedFox> RubyGems version: 3.1.2
<apotheon> It seems like nokogiri should install just fine. I don't know what's up.
ur5us has joined #ruby
NGC3982 has quit [Ping timeout: 258 seconds]
<RingtailedFox> yeah, i kinda need nokogiri installed... otherwise it kinda defeats the purpose of Ruby....
<apotheon> hmm
<apotheon> Maybe you should try a different OS. That is, unfortunately, the best advice I have at the moment.
<RingtailedFox> it gives that error no matter what version i ask for... if i tell it to install nokogiri 1.8.5, it says "the last version to support ya was 1.8.5, so try installing that"
<RingtailedFox> ugh
<RingtailedFox> i can't use another OS
<apotheon> I haven't used Widnows for a very, very long time.
<apotheon> . . . so I'm going to be zero help to you now.
<RingtailedFox> its ok
<RingtailedFox> you still helped me a bit
<apotheon> I'm assuming you did some web searching.
<apotheon> I'm guessing something like WSFL (or whatever it's called) or a VM won't help you.
<apotheon> Isn't there a version manager for Ruby that runs on Windows?
<apotheon> Pik? Is that it?
<RingtailedFox> i have no idea
<RingtailedFox> i have WSL
<RingtailedFox> but... i'm waiting for the May 2020 update to become available for my laptop so i can upgrade it to WSL 2
<apotheon> WSL, that must be it. Is there some way to install via WSL?
<apotheon> Windows Subsystem for Linux?
<RingtailedFox> i'm sure tehre is
<RingtailedFox> wut
<RingtailedFox> WUT
jenrzzz has joined #ruby
<RingtailedFox> gem install nokogiri --pre succeeded in installing 1.11.0.rc2
<apotheon> I see.
plutes has quit [Read error: Connection reset by peer]
<apotheon> That's a bit odd.
<RingtailedFox> yeah but if it works, i'll take it :P
<apotheon> Why would it allow a pre-release, but fail on everything else?
<apotheon> Good luck!
<apotheon> I'm glad you found something that works.
<RingtailedFox> yeah me too
<RingtailedFox> i have no idea
<RingtailedFox> i'll try to walk my way back with previous versions sinc eruby allows for multiple versions of gems
teclator has quit [Ping timeout: 240 seconds]
teclator has joined #ruby
sagax has joined #ruby
NGC3982 has joined #ruby