adam12 changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.0.1, 2.7.3, 2.6.7: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | BLM <3
jenrzzz has joined #ruby
TCZ has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
bonhoeffer has quit [Ping timeout: 240 seconds]
crankharder has joined #ruby
bonhoeffer has joined #ruby
gray-_-wolf has joined #ruby
<gray-_-wolf> Hello, quick question: does bundler support other transport protocols beside http(s)? For example, I would like to use it with S3 (pull gems from S3). Is that possible?
jenrzzz has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
crankharder has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
akem has joined #ruby
znz_jp has quit [Remote host closed the connection]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
MalkbabY_ has joined #ruby
znz_jp has joined #ruby
MalkbabY has quit [Ping timeout: 240 seconds]
bonhoeffer has quit [Ping timeout: 258 seconds]
<weaksauce> gray-_-wolf not natively i don't think
<gray-_-wolf> weaksauce: That looks interesting, will look into it, thank you :)
jenrzzz has joined #ruby
gray-_-wolf has quit [Quit: WeeChat 3.1]
elcuervo has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
patr0clus has quit [Remote host closed the connection]
crankharder has joined #ruby
TCZ has quit [Quit: Do nothing unless you must, and when you must act -- hesitate.]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
dan64- has quit [Quit: ZNC - http://znc.in]
Arahael has quit [Ping timeout: 240 seconds]
dan64 has joined #ruby
gearnode has quit [Ping timeout: 258 seconds]
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
Arahael has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
crankharder has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
crankharder has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
crankharder has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
duderonomy has joined #ruby
akem has quit [Ping timeout: 240 seconds]
akem has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
gix has quit [Ping timeout: 240 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
jenrzzz has joined #ruby
ChmEarl has quit [Quit: Leaving]
jenrzzz has quit [Ping timeout: 252 seconds]
andremedeiros has quit [Quit: ZNC 1.8.2 - https://znc.in]
andremedeiros has joined #ruby
jenrzzz has joined #ruby
alexherbo2 has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 260 seconds]
cd has quit [Quit: cd]
ur5us has quit [Ping timeout: 258 seconds]
m27frogy has quit [Ping timeout: 240 seconds]
shtirlic_ has joined #ruby
jetchisel has joined #ruby
shtirlic has quit [Ping timeout: 265 seconds]
jenrzzz has joined #ruby
ur5us has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
Furai has quit [Quit: WeeChat 3.1]
neshpion has quit [Quit: neshpion]
<nakilon> how to write "class << self ; attr_accessor :x ; end" in a single line? the self.attr_accessor throws an error
jenrzzz has quit [Ping timeout: 268 seconds]
Furai has joined #ruby
robotbee has quit [Ping timeout: 252 seconds]
MalkbabY has joined #ruby
MalkbabY_ has quit [Ping timeout: 240 seconds]
purple_lotus has joined #ruby
<purple_lotus> Hi! I've got an instance method whose last three lines look like this: `val = { foo: :bar, boo: 42 } \n @values << val \n val` Is there a way to condense that down to one line? I'd ideally like to do something along the lines of: `@values.append { foo: :bar, boo: 42 }` (but Array#append doesn't return the appended value of course)
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
<nakilon> purple_lotus val.tap{ @values << val }
<purple_lotus> nice
patr0clus has joined #ruby
<purple_lotus> yep, that worked perfectly. thanks!
purple_lotus has quit [Quit: Connection closed]
Mrgoose has quit [Ping timeout: 240 seconds]
ur5us has quit [Ping timeout: 258 seconds]
patr0clus has quit [Quit: Textual IRC Client: www.textualapp.com]
Furai has quit [Quit: WeeChat 3.1]
Furai has joined #ruby
Mrgoose has joined #ruby
Furai has quit [Ping timeout: 258 seconds]
Furai has joined #ruby
drusepth has joined #ruby
<drusepth> I understand this is a terrible thing to do but is there any (hacky) way to pass params to a method without comma-delimiting them? for example, foo(x y) instead of foo(x, y)
robotbee has joined #ruby
<drusepth> context: just exploring oddities of the language while hacking together a dsl for inline tests, right now I'm doing `tested def method(blah); stuff(); end, tests do; tests(); end; ... but I'd really love to not need that comma after end
<nakilon> I feel like you copypasted something wrong here
<nakilon> can you use https://dpaste.org/ ?
<drusepth> ah yeah, was just trying to hand-wave vague code, here's the actual syntax i'm working with currently: https://dpaste.org/AKPJ
<drusepth> basically just trying to make it a little less weird by potentially scrapping the , after the method definition's end (though tbh i don't know if that'd actually be less weird, mostly just curious at how it could possible even be done)
<drusepth> possibly*
blackmesa has joined #ruby
MalkbabY has quit [Remote host closed the connection]
MalkbabY has joined #ruby
teclator has joined #ruby
MalkbabY has quit [Ping timeout: 240 seconds]
jinie has quit [Quit: ZNC 1.8.2 - https://znc.in]
vondruch has joined #ruby
jla has joined #ruby
jinie has joined #ruby
Rounin has joined #ruby
Tempesta has quit [Quit: See ya!]
robotbee has quit [Ping timeout: 252 seconds]
postmodern has quit [Quit: Leaving]
blackmesa has quit [Ping timeout: 258 seconds]
Tempesta has joined #ruby
nofxx has quit [Read error: Connection reset by peer]
nofxx has joined #ruby
DaRock has joined #ruby
KeyJoo has joined #ruby
gearnode has joined #ruby
blackmesa has joined #ruby
jla has quit [Ping timeout: 240 seconds]
al2o3-cr has quit [Read error: Connection reset by peer]
al2o3-cr has joined #ruby
KeyJoo has quit [Ping timeout: 260 seconds]
Jonopoly has joined #ruby
Theora[m] has quit [Quit: Idle for 30+ days]
StarOnD has joined #ruby
<NL3limin4t0r_afk> nakilon: I'm not sure if `attr_accessor` is a private method, but if it isn't you can use `singleton_class.attr_accessor :x`
NL3limin4t0r_afk is now known as NL3limin4t0r
ur5us has joined #ruby
<NL3limin4t0r> It seems to work using Ruby 2.6.5 on my machine.
jla has joined #ruby
StarOnD has quit [Quit: Connection closed]
drusepth has quit [Ping timeout: 240 seconds]
Jonopoly has quit [Quit: WeeChat 3.0.1]
vondruch has quit [Ping timeout: 240 seconds]
TCZ has joined #ruby
ur5us has quit [Ping timeout: 258 seconds]
MalkbabY has joined #ruby
shtirlic has joined #ruby
MalkbabY has quit [Ping timeout: 252 seconds]
shtirlic_ has quit [Ping timeout: 240 seconds]
m27frogy has joined #ruby
shtirlic has quit [Ping timeout: 265 seconds]
greengriminal has joined #ruby
shtirlic has joined #ruby
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
shtirlic has quit [Ping timeout: 246 seconds]
shtirlic_ has joined #ruby
alexherbo2 has joined #ruby
dviola has quit [Ping timeout: 265 seconds]
stryek has joined #ruby
StarOnD has joined #ruby
shtirlic_ has quit [Ping timeout: 260 seconds]
shtirlic has joined #ruby
gawlinski has quit [Ping timeout: 240 seconds]
gawlinski has joined #ruby
shtirlic has quit [Ping timeout: 240 seconds]
shtirlic has joined #ruby
crankharder has joined #ruby
crankharder has quit [Ping timeout: 252 seconds]
TCZ has quit [Quit: Do nothing unless you must, and when you must act -- hesitate.]
AndreYuhai has joined #ruby
<AndreYuhai> Hey there, in my RSpec how can I expect the response to have some css or xpath?
<AndreYuhai> When I do expect(response.body).to have_css I get an error saying:
<AndreYuhai> expected #<ActionDispatch::TestResponse:0x00000001370a9618 @mon_data=#<Monitor:0x00000001370a95a0>, @mon_data_..._revalidate=>true}, @request=#<ActionDispatch::Request GET "http://www.example.com/" for 127.0.0.1>> to respond to `has_selector?`
cd has joined #ruby
<AndreYuhai> have_css instead of 'has_selector?' *
<AndreYuhai> Or I think another way of asking would be, how can I find an xpath on a response body in RSpec?
<AndreYuhai> Because response.body basically returns a String with HTML
<AndreYuhai> Normally I would parse with Nokogiri but not sure whether there's an easy way in RSpec
StarOnD has quit [Ping timeout: 240 seconds]
jla has quit [Ping timeout: 240 seconds]
MalkbabY has joined #ruby
ChmEarl has joined #ruby
MalkbabY has quit [Ping timeout: 240 seconds]
elcuervo has quit [Read error: Connection reset by peer]
elcuervo has joined #ruby
crankharder has joined #ruby
crankharder has quit [Client Quit]
lockweel has joined #ruby
Rudd0 has quit [Ping timeout: 240 seconds]
lockweel has quit [Read error: Connection reset by peer]
TeDChange has quit [Ping timeout: 248 seconds]
TeDChange has joined #ruby
lockweel has joined #ruby
AndreYuhai has quit [Quit: Lost terminal]
AndreYuhai has joined #ruby
<AndreYuhai> I am using RVM, and have changed my Ruby version from 2.7.2 to 2.7.3 in Gemfile. Why didn't RVM pick up the changes from the Gemfile?
<AndreYuhai> I've got a few branches
<AndreYuhai> when I do rvm use it still uses 2.7.2
<AndreYuhai> At first it had picked up the changes and had changed to 2.7.3 but then it kept using 2.7.2 somehow, I don't know why.
lockweel has quit [Quit: Leaving]
lockweel has joined #ruby
ejjfunky has joined #ruby
camilasan_ has quit [Remote host closed the connection]
vondruch has joined #ruby
<AndreYuhai> when doing bundle install I am getting this error:
<AndreYuhai> An error occurred while installing nokogiri (1.11.2), and Bundler cannot continue.
camilasan_ has joined #ruby
<AndreYuhai> Make sure that `gem install nokogiri -v '1.11.2' --source 'https://rubygems.org/'` succeeds before bundling.
<AndreYuhai> bundler --version #=> 2.2.16
<AndreYuhai> ruby --version #=> 2.7.3
mic_e has quit [Ping timeout: 260 seconds]
camilasan has quit [Ping timeout: 252 seconds]
mic_e has joined #ruby
camilasan_ has quit [Ping timeout: 252 seconds]
hiroaki_ has quit [Ping timeout: 260 seconds]
TomyWork has joined #ruby
camilasan has joined #ruby
camilasan_ has joined #ruby
mic_e has quit [Ping timeout: 240 seconds]
hiroaki_ has joined #ruby
howdoi has joined #ruby
nofxx_ has joined #ruby
<AndreYuhai> There is this test: https://paste.ofcode.org/72fuzJ5LSDYnsMYih68dkw
<AndreYuhai> However I am using RSpec
<AndreYuhai> How and where (in which folder) am I supposed to write that?
nofxx has quit [Ping timeout: 240 seconds]
cthulchu_ has joined #ruby
ejjfunky has quit [Ping timeout: 240 seconds]
MalkbabY has joined #ruby
jla has joined #ruby
gigetoo has quit [Ping timeout: 265 seconds]
MalkbabY has quit [Ping timeout: 240 seconds]
Rounin has quit [Ping timeout: 240 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
alexherbo20 has joined #ruby
alexherbo20 is now known as alexherbo2
alexherbo2 has quit [Ping timeout: 240 seconds]
AndreYuhai has quit [Quit: Lost terminal]
alexherbo20 has joined #ruby
alexherbo20 is now known as alexherbo2
gearnode has quit [Ping timeout: 252 seconds]
gearnode has joined #ruby
dhollinger has joined #ruby
KeyJoo has joined #ruby
dviola has joined #ruby
dviola has quit [Changing host]
dviola has joined #ruby
jla has quit [Ping timeout: 252 seconds]
vondruch has quit [Quit: vondruch]
Rudd0 has joined #ruby
vondruch has joined #ruby
bukkitgerman8608 has quit [Read error: Connection reset by peer]
bukkitgerman8608 has joined #ruby
supercoven has joined #ruby
supercoven has quit [Max SendQ exceeded]
supercoven has joined #ruby
robotbee has joined #ruby
DaRock has quit [Ping timeout: 268 seconds]
jla has joined #ruby
TCZ has joined #ruby
MalkbabY has joined #ruby
MalkbabY has quit [Ping timeout: 252 seconds]
blackmesa has joined #ruby
jla has quit [Ping timeout: 268 seconds]
blackmesa has quit [Ping timeout: 258 seconds]
blackmesa has joined #ruby
blackmesa has quit [Ping timeout: 258 seconds]
blackmesa has joined #ruby
Rudd0 has quit [Ping timeout: 240 seconds]
andremedeiros has quit [Read error: Connection reset by peer]
andremedeiros has joined #ruby
goepsilongo has joined #ruby
jla has joined #ruby
TCZ has quit [Quit: oh eh ah]
reyfi9e has joined #ruby
blackmesa has quit [Quit: WeeChat 3.1]
roshanavand_ has joined #ruby
TomyLobo has joined #ruby
roshanavand__ has joined #ruby
TomyWork has quit [Quit: Leaving]
roshanavand_ has quit [Ping timeout: 240 seconds]
ua has quit [Read error: Connection reset by peer]
NL3limin4t0r is now known as NL3limin4t0r_afk
jla has quit [Ping timeout: 265 seconds]
patr0clus has joined #ruby
gix has joined #ruby
ua has joined #ruby
al2o3-cr has quit [Ping timeout: 240 seconds]
TCZ has joined #ruby
MalkbabY has joined #ruby
MalkbabY has quit [Ping timeout: 240 seconds]
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
TorpedoSkyline has quit [Ping timeout: 260 seconds]
splud has quit [Quit: Leaving]
splud has joined #ruby
Rounin has joined #ruby
splud has quit [Client Quit]
splud has joined #ruby
MalkbabY has joined #ruby
dviola has quit [Quit: WeeChat 3.1]
dviola has joined #ruby
Iarfen has joined #ruby
Jello_Raptor has quit [Remote host closed the connection]
drusepth has joined #ruby
MalkbabY has quit [Remote host closed the connection]
MalkbabY has joined #ruby
KeyJoo has quit [Ping timeout: 268 seconds]
MalkbabY has quit [Ping timeout: 252 seconds]
neshpion has joined #ruby
neshpion has quit [Remote host closed the connection]
robotbee has quit [Changing host]
robotbee has joined #ruby
neshpion has joined #ruby
mic_e has joined #ruby
mic_e has quit [Ping timeout: 240 seconds]
akem has quit [Quit: leaving]
vondruch has quit [Read error: Connection reset by peer]
vondruch has joined #ruby
<regent> Anybody know why the last line at `url = "https://www.blabla/25849" ; json = URI.open(url) ; data = JSON.parse(json)` is giving me `TypeError: no implicit conversion of StringIO into String`?
mcspud has quit [Ping timeout: 260 seconds]
<regent> If I download it manually into a file instead, then `file = File.read('/path/to/some_file.json') ; data = JSON.parse(file)` works just fine.
<drusepth> does `data = JSON.parse(json.string)` throw the same error?
<regent> drusepth: bless you! no it didn't <3
<drusepth> URI.open returns a StringIO object, which has #string to return the actual string :) TypeError: no implicit
<drusepth> conversion of StringIO into String
<drusepth> er disregard that random copy heh
<regent> hehe
<regent> i did try to_s though *shrug*
duderonomy has quit [Ping timeout: 246 seconds]
<drusepth> irb(main):018:0> StringIO.new("wow").to_s
<drusepth> => "#<StringIO:0x000055aba7b2c318>"
<drusepth> stringio is odd
<regent> hmmm
<regent> anyway i love you, hope i can return the favor some day!
<drusepth> haha thanks, https://ruby-doc.org/stdlib-2.5.1/libdoc/stringio/rdoc/StringIO.html#method-i-string is where i found the answer btw, list of methods there might help future questions :)
duderonomy has joined #ruby
ianmacd has quit [Changing host]
ianmacd has joined #ruby
mcspud has joined #ruby
duderonomy has quit [Ping timeout: 240 seconds]
duderonomy has joined #ruby
greengriminal has quit [Quit: This computer has gone to sleep]
greengriminal has joined #ruby
greengriminal has quit [Client Quit]
greengriminal has joined #ruby
TCZ has quit [Quit: oh eh ah]
nofxx__ has joined #ruby
nofxx_ has quit [Ping timeout: 260 seconds]
lockweel has quit [Quit: Leaving]
ur5us has joined #ruby
neshpion has quit [Quit: neshpion]
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
akem has joined #ruby
BTRE has quit [Ping timeout: 240 seconds]
BTRE has joined #ruby
Rudd0 has joined #ruby
robotbee has quit [Ping timeout: 260 seconds]
dpl has joined #ruby
MalkbabY has joined #ruby
Xiti has quit [Quit: Leaving]
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
AndreYuhai has joined #ruby
<AndreYuhai> Hey there, I am trying to reproduce an error I was getting today with nokogiri 1.11.2.
<AndreYuhai> I've deleted the dependency nokogiri 1.11.3 from my Gemfile
<AndreYuhai> However it's still in the Gemfile.lock
<AndreYuhai> How can I remove it from there, so that instead bundle install nokogiri 1.11.2? Without adding the dependency into the Gemfile
<AndreYuhai> bundle installs*
<weaksauce> bundle update
<AndreYuhai> weaksauce, That's still trying to install nokogiri 1.11.3, is that because I don't have any other nokogiri version
<weaksauce> how are you specifying nokogiri?
<AndreYuhai> I've installed nokogiri 1.11.2 but bundle update still tries to install 1.11.3
<weaksauce> just change the version from 1.11.3 to 1.11.2
<AndreYuhai> weaksauce, where?
jetchisel has quit [Ping timeout: 268 seconds]
<AndreYuhai> I was not specifying nokogiri in my Gemfile before.
<weaksauce> well you need to add it to your gemfile or install nokogiri separately with gem install
<weaksauce> nokogiri might also be a dependency to some other gem
<AndreYuhai> After I installed version 1.11.2, bundle update still tries to install nokogiri 1.11.3
<AndreYuhai> weaksauce, It looks like it is.
<AndreYuhai> I just wanted to reproduce an error that I was having in the morning with 1.11.2
<AndreYuhai> Workaround was to simply use 1.11.3 :D
patr0clus has quit [Quit: Textual IRC Client: www.textualapp.com]
<AndreYuhai> But now I want to figure out what was wrong
<AndreYuhai> So I deleted that dependency from Gemfile and only installed nokogiri 1.11.2 gem
<AndreYuhai> But now bundle install or bundle update still tries to install 1.11.3
<weaksauce> put the 1.11.2 in the gemfile for a bit to diagnose it
<weaksauce> and it will likely use that over .3
<weaksauce> when it satisfies the dependency
<AndreYuhai> weaksauce, Alright I will try that, thanks!
robotbee has joined #ruby
<AndreYuhai> Hmm, now everything worked fine on my machine.
robotbee has quit [Changing host]
robotbee has joined #ruby
BTRE has quit [Remote host closed the connection]
bucareli has joined #ruby
Xiti has joined #ruby
<AndreYuhai> I wonder what the difference is between "building with native extensions" and just doing gem install
<AndreYuhai> Because when I did bundle update it still installed nokogiri 1.11.2 with native extensions even though I had nokogiri 1.11.2
BTRE has joined #ruby
<AndreYuhai> Alright, gotta sleep now. Night everyone!
AndreYuhai has quit [Quit: Leaving]
shtirlic has quit [Ping timeout: 240 seconds]
markong has quit [Remote host closed the connection]
<scriptonaut> I'm having a weird issue with bundler or ruby gems or possibly rbenv. When I type: which bundle, it shows an exe in /usr/local/bin. But gem env, shows me the proper rbenv executable directory
<scriptonaut> I've done rbenv rehash, I've confirmed I'm using the right version of ruby, etc
shtirlic has joined #ruby
<scriptonaut> when I type: whereis bundle, it shows both the /usr/local/bin path, and the proper rbenv path, but the /usr/local/bin path is first
jetchisel has joined #ruby
dpl_ has joined #ruby
markong has joined #ruby
roshanavand has joined #ruby
roshanavand__ has quit [Ping timeout: 252 seconds]
dpl has quit [Ping timeout: 268 seconds]
rotcev has joined #ruby
roshanavand has quit [Ping timeout: 246 seconds]
stryek has quit [Quit: Connection closed for inactivity]
weaksauce has quit [Quit: Textual IRC Client: www.textualapp.com]
weaksauce has joined #ruby
TCZ has joined #ruby
jenrzzz has joined #ruby
cthulchu_ has quit [Ping timeout: 240 seconds]