<Cork>
leftylink: tails would be nice ya, how would drop solve it??
<Cork>
ah i think i know what you mean
<leftylink>
well with drop 0 you'll have %w(test example com), with drop 1 you'll have %w(example com), with... oh okay if you see what I mean it's all good then hopefully
centrx has joined #ruby
<Cork>
won't drop remove the first entry before it is added to the map though?
<leftylink>
drop 0 drops no elements so I think it's still doable, but if it's too bad then I'm sure we can arrange for solutions not involving drop
cthu| has joined #ruby
<Cork>
hmm (0..list.size).map {|i| list[i..-1].join(".") } would do it
<Cork>
leftylink: thx for the idea!
<leftylink>
👍
<leftylink>
pinkpandabot: learn thumbupemoji 👍
<pinkpandabot>
Learned new fact thumbupemoji; 90 facts total
Mia has joined #ruby
Mia has joined #ruby
wallacer has quit [Ping timeout: 245 seconds]
MalkbabY_ has joined #ruby
bb8 has quit [Ping timeout: 265 seconds]
MalkbabY has quit [Ping timeout: 265 seconds]
rubydoc__ has joined #ruby
rubydoc_ has quit [Remote host closed the connection]
wallacer has joined #ruby
jla has quit [Ping timeout: 268 seconds]
centrx_ has joined #ruby
bb8 has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
centrx has quit [Ping timeout: 245 seconds]
vondruch has joined #ruby
cow[moo] has joined #ruby
centrx has joined #ruby
centrx_ has quit [Ping timeout: 245 seconds]
bb8 has quit [Ping timeout: 240 seconds]
centrx has quit [Remote host closed the connection]
centrx has joined #ruby
TCZ has joined #ruby
<AndreYuhai>
Hey everyone, I've got locales in my Rails app and when I am doing a test with one of my views render method returns:
<AndreYuhai>
form_with doesn't infer the URL from the mdoel
<AndreYuhai>
model*, I have to explicitly pass the URL
<AndreYuhai>
Not sure whether there's any other way
<AndreYuhai>
Or whether I am doing something wrong
<markong>
I'm trying to install ruby 2.7.2 with rvm on GNU/linux, but compilation always halt with: ./tool/file2lastrev.rb:6:in `require': cannot load such file -- optparse (LoadError) from ./tool/file2lastrev.rb:6:in `<main>' any ideas on how to proceed ?
<jhass>
that's weird, do you have an existing (maybe buggy) ruby installation in your PATH? What distribution and installation method are you using?
meinside has quit [Quit: Connection closed for inactivity]
kinduff8 has joined #ruby
Technodrome has joined #ruby
kinduff9 has joined #ruby
<markong>
jhass, i've installed rvm following the simple steps here https://rvm.io/ ... the first time I issued rvm install 2.7.2 it suggested installing ruby and a bunch of other devel deps on my system before proceed with configuration/compilation
kinduff9 is now known as kinduff
kinduff has quit [Ping timeout: 240 seconds]
stryek has joined #ruby
<jhass>
which distribution are you using?
<markong>
if inside irb I try "require 'optparse'" i get "=> true"
fercell has quit [Read error: Connection reset by peer]
fercell has joined #ruby
<markong>
jhass, "Install of ruby-3.0.1 - #complete" ...strange? I'm just starting with ruby and I've books about v.2.x.x versions ... is 3.X backward compatible in syntax etc..?
<jhass>
for the vast majority yes. I actually meant 2.7.3 instead of 2.7.2 though :D
<jhass>
3.0 might still give you a bit of a hard time eco-system wise
<jhass>
but for the basics it does not make a difference
<markong>
2.7.{2,3} both failed with the above message during compilation :(
<jhass>
ah :(
<jhass>
well see how far you get with 3.0, might be easiest for now
<markong>
is rbenv worth a try?
<markong>
anyway /usr/bin/ruby --version is ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-linux] ... has ruby some mechanism to install libs/gems locally in a specific directory ?
<jhass>
yes, gem install --user-install does it ($HOME/.gemrc with install: --user-install sets it as a default). For projects I can recommend setting up bundler always and then install with bundle install --path vendor/bundle
Technodrome has quit [Remote host closed the connection]
<havenwood>
markong: In Ruby 3.0, optparse from the stdlib was "gemified" and extracted into a library.
<havenwood>
Unsure why it's causing a problem there but I imagine related.
ua has quit [Ping timeout: 252 seconds]
<markong>
havenwood, funny thing is that I cannot compile 2.7.X with the same message but 3.0.1 installed fine... :\
<havenwood>
markong: I guess extracting the gem worked around the problem, whatever it is.
<havenwood>
markong: 3.0.1 is latest stable, so not a bad Ruby to have installed. :)
<markong>
I'm now trying a ./configure + make in the src directory...let's see.
<markong>
It went through without a problem :)
<markong>
havenwood, I don't think 3.0.1 with external optparse gem is the issue because I can install it, while #5065 op can't
jenrzzz has joined #ruby
ua has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
rubydoc__ has quit [Ping timeout: 252 seconds]
phaul has quit [Ping timeout: 246 seconds]
hiroaki has quit [Ping timeout: 260 seconds]
jla has joined #ruby
rubydoc__ has joined #ruby
phaul has joined #ruby
ChmEarl has joined #ruby
AndreYuhai has quit [Quit: leaving]
rubydoc__ has quit [Ping timeout: 246 seconds]
rubydoc__ has joined #ruby
centrx has quit [Remote host closed the connection]
claw has quit [Ping timeout: 260 seconds]
centrx_ has joined #ruby
centrx_ has quit [Ping timeout: 250 seconds]
centrx has joined #ruby
cyberarm has quit [Quit: Idle for 30+ days]
micah has joined #ruby
rubydoc__ has quit [Ping timeout: 268 seconds]
rubydoc__ has joined #ruby
<micah>
i've got a simple sinatra app. I've done bundle install, and it installed sinatra, but when I do `ruby app.rb` it says, "`require': cannot load such file -- sinatra (LoadError)" what am I missing?
JaredCE has quit [Ping timeout: 268 seconds]
<adam12>
micah: Try running with `bundle exec ruby app.rb`
<havenwood>
micah: bundle exec ruby app.rb
<adam12>
micah: Bundler manipulates the load paths for your libraries. You can either use `bundle exec` before running a command, or require `bundler/setup` inside your app. They both do the same thing.
TCZ has quit [Quit: ...]
<havenwood>
Or generate binstubs, yet another option.
<micah>
adam12: havenwood: aha, thanks
bamdad_ has quit [Ping timeout: 240 seconds]
bamdad has joined #ruby
hiroaki has joined #ruby
Xiti` has quit [Quit: Leaving]
Caerus has joined #ruby
Caerus has quit [Client Quit]
howdoi has joined #ruby
MalkbabY_ has joined #ruby
Xiti has joined #ruby
MalkbabY has quit [Ping timeout: 260 seconds]
Caerus has joined #ruby
noboruma has joined #ruby
robotbee has joined #ruby
Caerus has quit [Quit: ZNC 1.6.5+deb1+deb9u2 - http://znc.in]
kinduff has joined #ruby
jla has quit [Ping timeout: 240 seconds]
evdubs_ is now known as evdubs
rubydoc__ is now known as rubydoc
pgib has joined #ruby
cd has joined #ruby
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
jla has joined #ruby
al2o3-cr has joined #ruby
gix has joined #ruby
universa1 has joined #ruby
nirix_ has joined #ruby
liKe2k1- has joined #ruby
rubydoc_ has joined #ruby
rubydoc has quit [Remote host closed the connection]
coniptor has quit [Ping timeout: 252 seconds]
tosaraja_ has joined #ruby
nertzy has joined #ruby
DEac-_ has joined #ruby
nemesit|znc_ has joined #ruby
spk_ has joined #ruby
nemesit|znc has quit [Ping timeout: 276 seconds]
liKe2k1 has quit [Ping timeout: 276 seconds]
Hanma[m] has quit [Ping timeout: 276 seconds]
spk has quit [Ping timeout: 276 seconds]
tosaraja has quit [Ping timeout: 276 seconds]
universal has quit [Ping timeout: 276 seconds]
nirix has quit [Ping timeout: 276 seconds]
DEac- has quit [Ping timeout: 276 seconds]
spk_ is now known as spk
coniptor has joined #ruby
Hanma[m] has joined #ruby
hiroaki has quit [Ping timeout: 260 seconds]
jla has quit [Ping timeout: 240 seconds]
patr0clus has joined #ruby
hiroaki has joined #ruby
vondruch has quit [Read error: Connection reset by peer]
patr0clus has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
DTZUZU has quit [Read error: Connection reset by peer]
rubydoc_ is now known as rubydoc
supercoven_ has quit [Read error: Connection reset by peer]