vondruch has quit [Read error: Connection reset by peer]
<pepperoni>
i have the error "Could not find concurrent-ruby-1.1.8 in any of the sources" when running 'bundle install', however, if i do "gem info concurrent-ruby", it shows it as a local install. how to get past this?
<adam12>
havenwood: ohai
tpanarch1st has quit [Ping timeout: 260 seconds]
<adam12>
pepperoni: What does the line in your gemfile for concurrent-ruby look like?
gueorgui has quit [Ping timeout: 265 seconds]
<pepperoni>
adam12: i don't have a line in the Gemfile with that in it, should i?
<pepperoni>
i was always able to run my jekyll app before w/o it
<adam12>
pepperoni: Can you paste `bundle config` to dpaste.org or similar service? Retract any sensitive info.
gueorgui has joined #ruby
<adam12>
pepperoni: And actually, what's the output of `bundle -v`?
<pepperoni>
adam12: when i type "$ bundle config", the only thing that shows up is "Settings are listed in order of priority. The top value will be used." But that's it. Nothing afterwards.
<adam12>
pepperoni: That's OK! I was lookign to see if it said anything about deployment.
<adam12>
pepperoni: What version of bundler? And if you can just share Gemfile/Gemfile.lock it might help me cut down questions.
<pepperoni>
Linux Numbers 5.4.72-gentoo #2 SMP Wed Jan 20 15:45:34 CST 2021 x86_64 Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz GenuineIntel GNU/Linux
<pepperoni>
issuing "$ bundle doctor" listed more output than my console buffer has, but in the end says "No issues found with the installed bundle"
moldorcoder7 has joined #ruby
<adam12>
pepperoni: Is there more to the error in `bundle exec ...`?
<pepperoni>
adam12: no, just "could not find concurrent-ruby-1.1.8 ..." followed by "Run 'bundle install' to install missing gems."
<adam12>
pepperoni: How did you install ruby? and what's the path to bundle? `which bundle`
<pepperoni>
does installing using "bundle" vs. "gem" place stuff in diff locations?
<pepperoni>
ruby is installed on gentoo via portage as it's management system
<pepperoni>
which reports /usr/bin/bundle
<adam12>
pepperoni: It depends. Unprivilged gem will usually error out, but if it's gem from a user-writable path (ie. you used rbenv) then it might work because it might be in ~/.rubies.
<adam12>
pepperoni: Similarly, with bundle. It will default to trying to install via `gem`, which has the same rules. But `bundle` supports `--path` which will write anywhere it has permissions.
<adam12>
pepperoni: What user are you running bundler as? and did you install concurrent-ruby manually? if so, did you use sudo/doas?
<pepperoni>
i feel like there's something to the locations. 'bundle install' can't find it, but 'gem info <gem>' says it's there
<adam12>
pepperoni: How about `bundle install --path vendor/bundle && bundle exec jekyll server`. Then it will be local to this project and would eliminate that.
lordarkmemo has joined #ruby
<pepperoni>
i'm running as a non-root user. and when i run 'bundle install' that also as non-root user. however, if somemthing needs sudo, it will switch to sudo and ask for passwd
s3nd1v0g1us has joined #ruby
<adam12>
pepperoni: OK. Try my suggestion for installing to a path and then.. I'm not sure. But we can go from there.
<pepperoni>
ok, running bundle install --path vendor/bundle ... caused bundle exec jekyll server to report another error, i'll dpaste ...
<pepperoni>
i wonder if it's working and that's an error in the site it's trying to generate
<pepperoni>
because it gets passed all that and into "Generating ..."
gearnode has quit [Ping timeout: 260 seconds]
gix has joined #ruby
<adam12>
pepperoni: Yeah. That looks like an issue with the frontmatter in that one post.
<pepperoni>
adam12: thanks for getting me this far, i'll try to follow from here
<adam12>
pepperoni: No problem. Good luck!
actuallybatman has quit [Ping timeout: 240 seconds]
GodFather has quit [Read error: Connection reset by peer]
GodFather has joined #ruby
dfucci has quit [Read error: No route to host]
duderonomy has joined #ruby
weaksauce has joined #ruby
Xiti` has quit [Quit: Leaving]
andremedeiros has quit [Read error: Connection reset by peer]
Xiti has joined #ruby
andremedeiros has joined #ruby
powerhouse has quit [Quit: Leaving]
kashike has joined #ruby
nertzy has joined #ruby
tempate has joined #ruby
<tempate>
Is there a way to iterate over a piece of code n times and collect all the results into an array?
<adam12>
tempate: 5.times.map { do_something }
<tempate>
oh, marvelous
<tempate>
thanks
<adam12>
tempate: Enumerable is nicely chainable.
<tempate>
adam12: yeah, I obviously knew about n.times. I had forgotten you could just add .map. :^)
nertzy has quit [Ping timeout: 272 seconds]
landakram has joined #ruby
<tempate>
What about this: I have an array with many repeated elements. I want to pick n of them, at random, and remove one instance of all the elements I've chosen. So, for example, say may initial array was [1, 1, 2, 2, 2, 3] and I pick 3 elements at random ([2, 2, 3]), I want the initial array to be: [1, 1, 2]
Xiti` has joined #ruby
<tempate>
Is there an idiomatic way to do it?
lordarkmemo has quit [Ping timeout: 240 seconds]
hiroaki_ has quit [Ping timeout: 272 seconds]
<tempate>
Never mind. Got it
supercoven has joined #ruby
Xiti has quit [Ping timeout: 276 seconds]
supercoven_ has quit [Ping timeout: 245 seconds]
Swyper has joined #ruby
<weaksauce>
.sample(n)
hiroaki_ has joined #ruby
Xiti` has quit [Quit: Leaving]
<tempate>
weaksauce: .sample(n) doesn't remove the elements from the original array though
<weaksauce>
ah yeah that's true
<tempate>
What about deleting the first instance of an element in an array?
cd has joined #ruby
hiroaki_ has quit [Ping timeout: 245 seconds]
<weaksauce>
tempate delete_at paired with another method to find the index
<tempate>
Yeah, that's what I did
<tempate>
Thanks
Iarfen has joined #ruby
sevvie has quit [Ping timeout: 256 seconds]
sevvie has joined #ruby
hiroaki_ has joined #ruby
kashike has quit [Ping timeout: 240 seconds]
kristian_on_linu has joined #ruby
supercoven has quit [Ping timeout: 245 seconds]
kashike has joined #ruby
Xiti has joined #ruby
kristian_on_linu has quit [Remote host closed the connection]
qizwiz has joined #ruby
quazimodo has quit [Ping timeout: 260 seconds]
AndreYuhai has joined #ruby
<AndreYuhai>
With xpath how can I select the following sibling only if there wasn't any other tag in between? For example I want to select second <p> tag only if there is not any other tag in between the first <p> tag and 2nd <p> tag
<nakilon>
can't tell exactly but to AND several conditions you just write them as [...][...][..]...
<nakilon>
so probably you should just chose the next tag and append the condition that it's <p>
goepsilongo has joined #ruby
hiroaki_ has quit [Ping timeout: 272 seconds]
Danishman has joined #ruby
hiroaki has quit [Ping timeout: 264 seconds]
hiroaki has joined #ruby
hiroaki_ has joined #ruby
split-brain has quit [Remote host closed the connection]
qizwiz has quit [Remote host closed the connection]
cognemo has quit [Ping timeout: 265 seconds]
cognemo has joined #ruby
Iarfen has quit [Remote host closed the connection]
BTRE has joined #ruby
Iarfen has joined #ruby
<Iarfen>
hi!
<Iarfen>
is there a way to sort an array by some attribute of the objects it contains, and to sort after that again by another attribute for the objects which have been equal in the first attribute (sorting only in a relative position, then)?
jenrzzz has joined #ruby
<weaksauce>
larfen why not just sort it all at once?
Danishman has quit [Ping timeout: 272 seconds]
actuallybatman has quit [Ping timeout: 240 seconds]
<Iarfen>
weaksauce: how?
<Iarfen>
how I can sort by more than one value at the same time?