<weaksauce>
i compiled it fine through ruby-build and rbenv
bluedust_ has joined #ruby
bluedust has quit [Ping timeout: 240 seconds]
<John_Ivan>
hi. I'm new to ruby. I've updated rubygems to 3.3.3 and I'm running it on windows. I've "require `rubygems`" in a script.rb I wrote on my desktop. running "ruby script.rb" tells me that rubygems - no such file is found. any ideas?
bluedust has joined #ruby
<John_Ivan>
I ran `gem update --system` and it was succesful earlier.
lim has joined #ruby
bluedust_ has quit [Ping timeout: 268 seconds]
<adam12>
John_Ivan: You shouldn't need the require.
<adam12>
John_Ivan: On newish versions of Ruby, rubygems is auto required. I don't remember when that changed but like > 2.4
<adam12>
John_Ivan: Sounds like something else might be going wrong tho. Why did you upgrade rubygems?
Liexei has joined #ruby
<John_Ivan>
adam12, I found the error just 2 seconds ago, sorry. it seems I had require `` instead of ''
<John_Ivan>
sigh
<John_Ivan>
adam12, I got it working now. :)
<John_Ivan>
ty
<adam12>
Ah yeah. Backticks will execute.
<John_Ivan>
gotcha
<adam12>
You can still leave off the rubygems require, if you want. Likely... :)
<John_Ivan>
adam12, I'll remove it :)
<John_Ivan>
adam12, ok, and what about "uninitialized constants"? I installed the gem "zip" and calling it Zip::File::open()
<John_Ivan>
getting a NameError
<adam12>
John_Ivan: You'll need to require dependencies. Maybe just `require "zip"` (without the backticks obv :P)
bluedust has quit [Remote host closed the connection]
<leftylink>
pandabot: what's ruby flags
<pandabot>
rubyflags is: ruby -ple '$_.upcase!' < input.txt; ruby -nle 'BEGIN { i = c = 0 }; c += $_.size; puts "#{i += 1} #$_"; END { p c }' < input.txt
hd1 has joined #ruby
hd1 has left #ruby [#ruby]
gr33n7007h has quit [Quit: WeeChat 3.4]
gr33n7007h has joined #ruby
<John_Ivan>
anyone have any idea why a call to Zip::File::open() tells me a NameError with "uninitialized constant Zip::File"? I have require 'zip' and it is detected.
<havenwood>
John_Ivan: Just to sanity check, also returns false with?: require 'zip/file'
<weaksauce>
John_Ivan which version of rubyzip are you using?
<weaksauce>
and are you doing it in the context of a bundle exec?
<weaksauce>
though it would have to be really old and the zip would fail