havenwood changed the topic of #ruby to: Ruby 3.3.0, 3.2.3, 3.1.4 https://www.ruby-lang.org | Rules https://ruby-community.com | Logs https://libera.irclog.whitequark.org/ruby
rvalue has quit [Ping timeout: 268 seconds]
rvalue has joined #ruby
gr33n7007h has quit [Ping timeout: 276 seconds]
Na_Klar has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
<Na_Klar> I try to prepare a byte string for a serial port communication "\xFE\xFE\x94...". By default ruby seems to encode that as utf-8. So I add .encode(Encoding::ASCII) to the string. But this fails with "encode: \xFE on UTF-8 (Encoding::InvalidByteSequenceError)". Why?
<Na_Klar> ah, because ruby tries to convert that from utf-8 to ascii. .. so how do I tell ruby, that the string should be ascii and not utf-8 in the frist place?
jenrzzz has joined #ruby
<Na_Klar> ah .force_encoding does the trick
c10l has quit [Remote host closed the connection]
gr33n7007h has joined #ruby
c10l has joined #ruby
<[0x1eef_]> Na_Klar: ""\xFE\xFE\x94...".b works as well.
<Na_Klar> ah, neat. thx
<[0x1eef_]> yw
reset has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
Na_Klar has left #ruby [https://quassel-irc.org - Komfortabler Chat. Überall. ]
Vonter has quit [Ping timeout: 252 seconds]
Vonter has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 276 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
r3m has quit [Quit: WeeChat 4.3.0-dev]
r3m has joined #ruby
jenrzzz has joined #ruby
szkl has joined #ruby
jenrzzz has quit [Ping timeout: 276 seconds]
jenrzzz has joined #ruby
kenyon has joined #ruby
Vonter has quit [Ping timeout: 252 seconds]
Vonter has joined #ruby
pkal has left #ruby [Killed buffer]
jenrzzz has quit [Ping timeout: 256 seconds]
_ht has joined #ruby
jenrzzz has joined #ruby
osc4rpt has quit [Ping timeout: 260 seconds]
osc4rpt has joined #ruby
jenrzzz has quit [Ping timeout: 276 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
szkl has quit [Quit: Connection closed for inactivity]
jenrzzz has joined #ruby
johnjaye has quit [Ping timeout: 255 seconds]
johnjaye has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
osc4rpt has quit [Ping timeout: 268 seconds]
osc4rpt has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
infinityfye has quit [Quit: Leaving]
jenrzzz has joined #ruby
johnjaye has quit [Ping timeout: 264 seconds]
johnjaye has joined #ruby
johnjaye has quit [Ping timeout: 256 seconds]
johnjaye has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
cek has joined #ruby
jenrzzz has joined #ruby
nmollerup has quit [Quit: Leaving]
FetidToot has quit [Quit: The Lounge - https://thelounge.chat]
FetidToot has joined #ruby
johnjaye has quit [Ping timeout: 252 seconds]
johnjaye has joined #ruby
osc4rpt has quit [Ping timeout: 264 seconds]
osc4rpt has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
osc4rpt has quit [Ping timeout: 264 seconds]
osc4rpt has joined #ruby
reset has quit [Quit: reset]
jenrzzz has joined #ruby
reset has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 276 seconds]
graywolf has joined #ruby
jenrzzz has joined #ruby
johnjaye has quit [Ping timeout: 264 seconds]
johnjaye has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
user71 has joined #ruby
jenrzzz has joined #ruby
johnjaye has quit [Ping timeout: 256 seconds]
johnjaye has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
axsuul has quit [Quit: 👋]
axsuul has joined #ruby
user71 has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
cek has quit [Quit: Connection closed for inactivity]
johnjaye has quit [Ping timeout: 260 seconds]
user71 has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
johnjaye has joined #ruby
jenrzzz has joined #ruby
johnjaye has quit [Ping timeout: 256 seconds]
johnjaye has joined #ruby
osc4rpt has quit [Ping timeout: 264 seconds]
osc4rpt has joined #ruby
ua_ has quit [Ping timeout: 260 seconds]
Neowise has joined #ruby
<Neowise> Hi! Using Ruby 3.3.0 and Jekyll 4.3.3, I cannot install a gem from a github repository. What's happening?
<Neowise> I reinstalled rbenv from 0, installed all the gems, and the problem is only from git
<Neowise> The same gem, from a local folder, works fine
<sam113101> well do you get any error message
<Neowise> Yes, starting with Git error: command `git fetch --force --quiet
<Neowise> git version is 2.11.0
<Neowise> /home/gerard/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/cache/bundler/git/sigma-theme-1947dec495d8deba052669088386475a3fc2e7bc --depth 1
<Neowise> 15f797160eff512b5712a20f892ba262cd5060d9` in directory /home/gerard/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/bundler/gems/sigma-theme-15f797160eff
<Neowise> has failed. (end of message)
<Neowise> I hadn't this problem with ruby 2.6.4
jenrzzz has quit [Ping timeout: 272 seconds]
jenrzzz has joined #ruby
Pixi` has joined #ruby
Pixi has quit [Ping timeout: 252 seconds]
graywolf has quit [Quit: WeeChat 4.0.4]
jenrzzz has quit [Ping timeout: 256 seconds]
ua_ has joined #ruby
<Neowise> However it's not merged yet, since 2 weeks ago
jenrzzz has joined #ruby
<Neowise> Actually, that hash starting with 1947dec495 does not exist in the repository. How is that possible?
jenrzzz has quit [Ping timeout: 252 seconds]
<Neowise> Is someone else unable to install gems from git source, with newer versions of ruby?
<Neowise> I'm using this theme: https://github.com/gerardbm/sigma-theme.git
<Neowise> Even this theme is not working: gem "sigma-theme", git: "https://github.com/jekyll/minima"
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
Neowise has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
Neowise has joined #ruby
Neowise_ has joined #ruby
Neowise_ has quit [Client Quit]
<Neowise> I'm gonna try ruby 2.7.0, then...
rvalue has quit [Ping timeout: 276 seconds]
reset has quit [Quit: reset]
jenrzzz has quit [Ping timeout: 264 seconds]
rvalue has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
<osc4rpt> can someone explain how this actually work?: ActiveRecord::Base.logger = ActiveSupport::Logger.new($stdout) I understand that ActiveRecord is a module defined by an activerecord gem and that Base is the class inherited by that method. Also, as far as i understand ActiveSupport::Logger.new($stdout) is creating a new instance of a class Logger, but what is .logger?
jenrzzz has joined #ruby
<osc4rpt> in my undestanding if we were to create an object of that Logger class, we would just do that outside of "ActiveRecord::Base" context, like that: somelogger = ActiveSupport::Logger.new($stdout)
<osc4rpt> so i guess the logger is a method, and everything points to that, but what are we doing with that method? are we overwriting it or adding something to it?
jenrzzz has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
MarvelousWololo has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
MarvelousWololo has quit [Remote host closed the connection]
jenrzzz has joined #ruby
rvalue has quit [Ping timeout: 272 seconds]
jenrzzz has quit [Ping timeout: 268 seconds]
rvalue has joined #ruby
<adam12> osc4rpt: Classes have instances themselves, called the eigenclass. You can add accessors to those classes. In this case, it's creating a new instance of Logger and then using the setter (writable accessor) to store the value off.
<adam12> osc4rpt: Similar to any method in Ruby, `.logger=(value)` can be doing anything, as the implementation details are hidden away. It could be assigning `logger` to an Array of existing loggers (tho that would be weird UX).
<Neowise> The only version of ruby that it works for me to install gems from github is 2.6.4.
<Neowise> I don't know if it's a ruby issue, bundler issue or what
<Neowise> I'm deleting the Gemfile.lock every time, before running 'bundle install'. Then this file is not even generated, so I generate it using the gems in local and then I change PATH to GIT (manually), getting new errors about locked version
<Neowise> It's a fucking shit I have to stuck in older versions, tbh
Guest57 has joined #ruby
johnjaye has quit [Ping timeout: 256 seconds]
Guest57 has quit [Client Quit]
<osc4rpt> adam12: thank you, that makes sense
jenrzzz has joined #ruby
johnjaye has joined #ruby
<adam12> Neowise: What happens when you run this command inside a temporary folder? git clone https://github.com/jekyll/minima.git
<Neowise> "cloning into minima..."
<adam12> Does it finish?
<Neowise> It clones the repository. Yes.
<adam12> Neowise: If you make a new temporary folder and do this, what happens? `bundle init; bundle add minima --git https://github.com/jekyll/minima.git`
<Neowise> Ouch, the same error like before
<adam12> Git error or something?
<Neowise> This one: Git error: command `git clone --bare --no-hardlinks --quiet --depth 1 --single-branch -- git
<Neowise> /home/gerard/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/cache/bundler/git/git-46f1a0bd5592a2f9244ca321b129902a06b53e03` in
<Neowise> directory
<Neowise> /home/gerard/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/cache/bundler/git/git-46f1a0bd5592a2f9244ca321b129902a06b53e03 has
<Neowise> failed.
<adam12> What's the output of this? `git --version`
<Neowise> 2.11.0
<adam12> And the output of this? `ls -fl /home/gerard/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/bundler/ | grep gems`
<Neowise> drwxr-xr-x 8 gerard gerard 4096 Feb 11 20:25 gems
<adam12> Inside the same folder I said to `bundle add`, run this: `bundle config set path .bundle` and then re-run the `bundle add` command
<Neowise> Git error: command `git clone --bare --no-hardlinks --quiet --depth 1 --single-branch -- git
<Neowise> /home/gerard/newtemp/.bundle/ruby/3.3.0/cache/bundler/git/git-46f1a0bd5592a2f9244ca321b129902a06b53e03` in directory
<Neowise> /home/gerard/newtemp/.bundle/ruby/3.3.0/cache/bundler/git/git-46f1a0bd5592a2f9244ca321b129902a06b53e03 has failed.
<Neowise> fatal: repository 'git' does not exist
<adam12> That looks wrong.
ultralan has joined #ruby
<adam12> bundle add minima --git https://github.com/jekyll/minima.git
<adam12> That's the command you ran?
ultralan has quit [Remote host closed the connection]
<Neowise> Git error: command `git fetch --force --quiet
<Neowise> /home/gerard/newtemp/.bundle/ruby/3.3.0/cache/bundler/git/minima-d8055fb07e4e4545ea165517d74efcc422a31353 --depth 1
<Neowise> 10124515953527c8990a2de99ae4ddb2a81ffee3` in directory
<Neowise> /home/gerard/newtemp/.bundle/ruby/3.3.0/bundler/gems/minima-101245159535 has failed.
<adam12> What platform is this? Linux?
<Neowise> Yes, Debian 9
<Neowise> 4.9.0-15-amd64 #1 SMP Debian 4.9.258-1 (2021-03-08) x86_64 GNU/Linux
<adam12> `gem list bundler`
<Neowise> Local gems: bundler (2.5.6, default: 2.5.3, 2.1.2, 1.17.2)
<adam12> In that same temporary folder
<Neowise> Yes
<adam12> bundle _2.1.2 add minima --git https://github.com/jekyll/minima.git
<adam12> err
<adam12> bundle _2.1.2_ add minima --git https://github.com/jekyll/minima.git
<Neowise> Oh that changed!
<adam12> Did it finish?
<Neowise> The first error: Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead.
<adam12> That's OK
<Neowise> Then some deprecated messages
<Neowise> Then at the end: google-protobuf-3.25.2-x86_64-linux requires ruby version < 3.3.dev, >= 2.7, which is incompatible with the current version,
<Neowise> ruby 3.3.0p0
<adam12> So you have a few issues
<Neowise> Most of deprecated messages are like that: NOTE: Gem::Platform.match is deprecated; use Gem::Platform.match_spec? or match_gem? instead. It will be removed in Rubygems 4
<Neowise> Gem::Platform.match called from /home/gerard/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/bundler-2.1.2/lib/bundler/index.rb:198.
<adam12> My guess is the main issue is your `git` version is super old. I think bundler might be passing arguments to it that are not recognized, hence the error.
<adam12> Since you're on Debian 9, that makes some sense to me.
<adam12> The second issue is that the dependency you're installing hasn't been updated to Ruby 3.3 support yet.
<Neowise> Yes, probably is about that
<adam12> So my suggestions are to use an older bundler (like we did by passing the _2.1.2_ version) and to try installing Ruby 3.2.
<adam12> That might get you to where you need to be.
<Neowise> Oh, I will try with Ruby 3.2
<Neowise> If not, some day I will have to upgrade the system
<adam12> Yeah. I'm amazed you're still running 9.
<adam12> I have some 11 machines but mostly on 12. I don't think I even have anything left on 10
<adam12> Try that and report back.
<Neowise> Yes XD, since 2017 I think
<adam12> I gotta bounce. Making dinner tonight.
<adam12> Good luck :)
<Neowise> Just one more question
<adam12> Shoot
<Neowise> Before I found that issue: https://github.com/rubygems/rubygems/pull/4469
<Neowise> Do you think this could be related?
<adam12> Yes, could be! By forcing an older version, I wanted to find something that more closely matched the release date of your `git` version, but it could be that too.
<adam12> That's a fix for a super ancient issue. Maybe you could see what version it was caused by. But you have a working bundler version (2.1.2) so you could play with different versions if you wanted to.
<adam12> Just slowly add newer versions and see when it breaks.
<Neowise> Yes, I think it's the way
<Neowise> Thanks a lot for the help!
<adam12> I thought it was a permission issue originally, hence asking for the `ls` output, but there's a lot of moving pieces here so it makes it hard to debug.
<adam12> Your welcome!
<Neowise> Yep, it's a issue to spend the afternoon
<adam12> I hear ya :(
Vonter has quit [Ping timeout: 256 seconds]
osc4rpt has quit [Ping timeout: 246 seconds]
Vonter has joined #ruby
osc4rpt has joined #ruby
finsternis has joined #ruby
heinrich5991 has quit [Quit: quit.]
heinrich5991 has joined #ruby
user71 has quit [Quit: Leaving]
jenrzzz has quit [Ping timeout: 276 seconds]
jenrzzz has joined #ruby
Neowise has quit [Quit: leaving]
jenrzzz has quit [Ping timeout: 255 seconds]
reset has joined #ruby
jenrzzz has joined #ruby
desnudopenguino has quit [Remote host closed the connection]
desnudopenguino has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
hololeap has quit [Quit: Bye]
hololeap has joined #ruby
jenrzzz has joined #ruby
r3m has quit [Quit: WeeChat 4.3.0-dev]
r3m has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
_ht has quit [Quit: _ht]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
johnjaye has quit [Ping timeout: 246 seconds]
johnjaye has joined #ruby
jenrzzz has joined #ruby
dostoyevsky2 has quit [Quit: leaving]
dostoyevsky2 has joined #ruby
johnjaye has quit [Ping timeout: 268 seconds]
johnjaye has joined #ruby
BSaboia_ has quit [Quit: ZNC - https://znc.in]
BSaboia has joined #ruby
johnjaye has quit [Ping timeout: 268 seconds]
dostoyevsky2 has quit [Quit: leaving]
dostoyevsky2 has joined #ruby
osc4rpt has quit [Ping timeout: 260 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
osc4rpt has joined #ruby
johnjaye has joined #ruby
mange has joined #ruby
jenrzzz has joined #ruby
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
jenrzzz has quit [Ping timeout: 276 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
johnjaye has quit [Ping timeout: 268 seconds]
johnjaye has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]