hwpplayer1 has quit [Remote host closed the connection]
hwpplayer1 has joined #ruby
hwpplayer1 has quit [Read error: Connection reset by peer]
rvalue has joined #ruby
rvalue- has joined #ruby
rvalue has quit [Ping timeout: 260 seconds]
rvalue- is now known as rvalue
konsolebox has quit [Quit: .]
konsolebox has joined #ruby
Furai has quit [Quit: WeeChat 4.5.0]
Furai has joined #ruby
<nakilon>
do you guys draw codebase diagrams like this? https://i.imgur.com/0SFw0Z9.png -- for example, to remember and teach newcomers what goes where
<nakilon>
also while drawing you get refactoring ideas
smp has quit [Read error: Connection reset by peer]
smp has joined #ruby
Guest2 has joined #ruby
<Guest2>
hi
<Guest2>
how are you
Guest2 has quit [Client Quit]
brokkoli_origin has quit [Remote host closed the connection]
Pixi has quit [Ping timeout: 244 seconds]
Pixi has joined #ruby
brokkoli_origin has joined #ruby
donofrio has joined #ruby
konsolebox has quit [Ping timeout: 252 seconds]
donofrio has quit [Ping timeout: 276 seconds]
Rounin has joined #ruby
smp has quit [Ping timeout: 245 seconds]
smp has joined #ruby
smp has quit [Read error: Connection reset by peer]
smp has joined #ruby
hwpplayer1 has joined #ruby
advorak has quit [Quit: leaving]
blacknova has joined #ruby
Linux_Kerio has joined #ruby
Linux_Kerio has quit [Read error: Connection reset by peer]
<blacknova>
hi :wave: , is there a RoR specific channel? or is this it? If the latter, trying to install Rails gem on MacOS Monterey (yeah, will upgrade soon) via `sudo gem install rails` but got an error (after 10 mins! or so). Checked the log and it says `'ruby/config.h' file not found` Anyone know how to fix this? : https://www.irccloud.com/pastebin/CzRnijUq/sudo_gem_install_rails.log
<ruby[bot]>
blacknova: we in #ruby do not like irccloud.com, it has no syntax highlighting, distracting formatting and loads slowly for most. Please use https://gist.github.com or https://dpaste.org/
<blacknova>
huh? it has syntax highlighting
<havenwood>
blacknova: Since Freenode imploded, the Rails channel has been quite quiet and there's plenty or room here for Rails questions.
<havenwood>
blacknova: The bot may have historical qualms that have been resolved.
<havenwood>
blacknova: Rails is quite particular about the version of Ruby it must be run with. Check your version of Rails and the Rubies it supports.
<havenwood>
> Rails 8.0 requires Ruby 3.2.0 or newer.
<havenwood>
If you wanted to be on Ruby 2.6 (which is highly discouraged) you'd need to use Rails 6 (which is highly discouraged).
<blacknova>
havenwood: uh... I can't install Rails, that's the issue? 🙂
<blacknova>
oh, you're saying the version it's attempting to install?
<havenwood>
blacknova: Rails is a library that requires a specific version of Ruby or higher. Rails 8, the current stable version of Rails, requires Ruby 3.2 or newer. You're using Ruby 2.6, which is years past end of life.
<blacknova>
How would I find out? it's not clear which version it's attempting to install?
<havenwood>
blacknova: Type `ruby -v` to see your Ruby version then `gem install rails` will install latest stable, unless you specify otherwise.
<havenwood>
A `gem install rails` will install Rails 8.0.1, which requires Ruby 3.2 or better.
<havenwood>
blacknova: Did you follow its instructions for fixing permissions? Maybe run a `brew doctor` too and resolve whatever is wrong.
aesthetikx has joined #ruby
<havenwood>
blacknova: I suspect you're just typing `sudo gem install rails` when you should be typing `gem install rails` instead.
<havenwood>
blacknova: Compare the output of `sudo ruby -v` and `ruby -v`.
<havenwood>
Is one system and the other rbenv? (That's what I'd expect, if you've set an rbenv default.)
<havenwood>
nakilon: I don't usually draw for refactoring ideas. I just squint.
<havenwood>
I like the idea of being better at drawing.
<blacknova>
havenwood: well, there are multiple user accounts on this box, so I made the group have write access, does brew REQUIRE the user directly have write access?
<havenwood>
Homebrew is made for a single user account. They won't support sudo.
<blacknova>
I didn't use `sudo`?
<havenwood>
Postmodern and I had some back and forth with them almost a decade ago and they were unwilling to support sudo for multiple users.
<havenwood>
blacknova: You said about you wrote `sudo gem install` which is using sudo.
<havenwood>
Without sudo it's be `gem install rails` instead.
<havenwood>
it'd*
<blacknova>
I was talking about `brew`, but I'll try it w/o `sudo` as well
<havenwood>
If that works, you should be fine to: gem install rails
<blacknova>
that's strange the message suggests the use of `sudo`...
<havenwood>
If you really need multiple users using the same Ruby, I'd suggest switching to chruby as your switcher since system installs of RVM and rbenv are sketch in my experience.
<havenwood>
What message?
<havenwood>
Is it a friend or foe giving the message? ;)
<blacknova>
`Rails is not currently installed on this system. To get the latest version, simply type:` `$ sudo gem install rails`
<havenwood>
Ignore that message.
<havenwood>
Switch to Ruby 3.2.6 _first_ before installing Rails.
<havenwood>
Rails 8 only works with Ruby 3.2 or higher. You need to be using Ruby 3.2 or higher _before_ you install Rails.
<havenwood>
1) Install Ruby 3.2.6, 2) switch to Ruby 3.2.6 as your current Ruby, 3) install Rails.
<havenwood>
blacknova: You can leave Homebrew in an odd state if you'd like. If you want to use a user install of rbenv to switch Rubies, install the Ruby you want to use, set it as global, then install Rails.
<havenwood>
I'd recommend chruby instead if you really want to share Rubies between macOS users, but that's atypical.
<blacknova>
ok, `gem install rails` finally returned with RC=1 `ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.` That's probably why I ran it with `sudo`
<havenwood>
Stop it!
<havenwood>
No more Ruby 2.6.
<havenwood>
It's a dead end.
<havenwood>
rbenv install 3.2.6
<havenwood>
no sudo
<blacknova>
It was in the middle so I didn't want to ^C worrying it might break?
<blacknova>
there was no `sudo`
<blacknova>
but I will try `rbenv install 3.2.6 && rbenv global 3.2.6 && rbenv rehash && ruby -v`
<havenwood>
First sanity check you are using Ruby 3.2.3 before proceeding.
<havenwood>
Yeah, if that reports Ruby 3.2.3 you're well on your way!
<blacknova>
it's not, yet
<havenwood>
3.2.6* I mean.
<havenwood>
Latest 3.2.
<havenwood>
Or I'd assume 3.3.6 works well, but haven't been using Rails 8 so can't vouch for that.
<havenwood>
3.4.1 is a tad bleeding edge, having come out today. :D
<blacknova>
`-bash: rbenv: command not found`
<havenwood>
Did you `brew install rbenv`?
<havenwood>
If so, your Homebrew seems borked.
<havenwood>
Check a: brew doctor
<havenwood>
I think above you said you did install rbenv with Homebrew, so I'd try to get Homebrew working.
<havenwood>
We can probably help you debug it or a clean install tends to work.
<havenwood>
I usually start by saving a list of the explicitly installed packages, so I feel free to nuke it all from orbit at any point.
<havenwood>
brew leaves | tr "\n" " "
<havenwood>
Then either resolve the `brew doctor` issues or uninstall and reinstall then restore your leaves.
<havenwood>
Install `leaves` instead of `list` since the former is explicitly installed packages and the latter includes dependencies that will be properly resolved.
<havenwood>
Or if the `brew doctor` steps aren't sprawling and hard, that might do the trick.
<havenwood>
I most often see overly messed up Homebrew when someone has carried it forward from Intel to Apple Silicon.
<havenwood>
Homebrew's official recommendation in that case is to uninstall and reinstall Homebrew.
<blacknova>
Hmm, I don't recall if this was migrated from Intel or not... this is an M1 arch though..
<blacknova>
I think the issue is `opendirectoryd` is not correctly reflecting that this user is now part of `wheel` (despite it being updated in DirectoryUtility
<blacknova>
ie: when I run `id $whoami` I don't see `wheel` in the list of `groups=`
<blacknova>
how do I fix that? relaunch `Terminal.app`? already trying a new shell session to no avail :/
<blacknova>
s/trying/tried/
<blacknova>
already tried relaunching `opendirectoryd` to no avail earlier 😞
<blacknova>
grr, even `newgrp` isn't seeing the new membership... bizarre 🤯
hwpplayer1 has quit [Read error: Connection reset by peer]
<blacknova>
I'm just going to temporarily login with the other user and see if I can work around the permission issues that way for now, brb
<blacknova>
havenwood: ok, `rbenv` installed successfully via other user ✅. Q: will running `rbenv global 3.2.6` mess up the system ruby? or is this only setting the rbenv’s ruby?
<havenwood>
blacknova: It will not impact system Ruby.
<havenwood>
It's quite normal to ignore system Ruby and install various Rubies to use to install gems like Rails.
<havenwood>
Setting `rbenv global 3.2.6` puts rbenv shims for Ruby 3.2.6 in front of your PATH.
<havenwood>
They're as easily removed from path by setting rbenv back to system.
<havenwood>
It won't interrupt direct usage of system Ruby, which isn't a problem.
<havenwood>
Don't worry about system Ruby whatsoever.
<havenwood>
You can just avoid typing `sudo` in front of the `gem` or `ruby` command and pretend it doesn't exist.
<blacknova>
Woah, installing `openssl-3.1.0`? I thought MacOS switched to LibreSSL?
<blacknova>
I guess not for ruby?
<o0x1eef>
nakilon: I don't but I still think those diagrams can be helpful, especially at the model level. In the modern era, I think you can have a chatbot who has indexed a given repository. GitHub offer something like that with copilot.
<weaksauce>
seems that ruby-build doesn't check prereqs which seems like it should
<blacknova>
o0x1eef: not the other way around?
<weaksauce>
blacknova if you are just trying to install ruby for rails 8 i'd install something from 3.3+ or even the 3.4 that was just released but that might be folly
chen has quit [Quit: No Ping reply in 180 seconds.]
chen has joined #ruby
<blacknova>
weaksauce: would that automatically install vLatest of CLI Tools? or just the version from my version of MacOS?
<havenwood>
blacknova: The 3.2.2 was a typo. I meant 3.2.6 and said it consistently but am dyslexic and once wrote 3.2.2 by accident. I tried to clarify I meant 3.2.6.
<havenwood>
blacknova: Your Homebrew is broken if it's installing OpenSSL 1.1.
<havenwood>
Modern Homebrew uses OpenSSL 3 by default when you `brew install openssl`. Also, `rbenv`'s `ruby-build` ships its own version of OpenSSL, disregarding your package manager.
<havenwood>
Install Ruby 3.2.6 or Ruby 3.3.6. I'd think either would be fine. The point is the latest stable release of 3.2 or 3.3.
<havenwood>
blacknova: If your Homebrew is installing OpenSSL 1.1 and seems otherwise borked, you'll probably save a lot of time with an uninstall and reinstall.
<havenwood>
A `ruby-build` of Ruby 3.3.6 should _just work_ with a clean `brew doctor` so I suspect your Homebrew and Command Line Tool combo is borked, like weaksauce suggests.
<havenwood>
> <blacknova> Should I switch to GCC?
<havenwood>
No. Reinstall Homebrew.
<blacknova>
havenwood: I don’t have 3.2.6 so I had to fallback to 3.2.2 (even after `brew update` -ing). Brew seem operational otherwise. I noticed a `portable-ruby-3.3.6` got “poured”, can I use that?
<blacknova>
Also, that was `rbenv` installing OpenSSL, not `brew`, just threw me off as I knew MacOS switched to LibreSSL 1-2 (?) releases ago
<blacknova>
I think I will just upgrade MacOS at this point as it will just update ruby too (it’s been on my ToDo anyway since I haven’t been able to run MySQLWorkbench)
<blacknova>
I sure will miss the nice icons in System Preferences :(
<blacknova>
Oh wait, there are updates to Xcode CLI Tools in “Software Update”
<havenwood>
blacknova: Update to latest macOS and reinstall Homebrew and you should be sailing.
<havenwood>
Old macOS with old Homebrew with old Ruby don't work with new Rails.
<blacknova>
Heh, probably not brave enough to jump all the way to Sequoia yet
cappy has joined #ruby
konsolebox has joined #ruby
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
<blacknova>
havenwood / weaksauce: ok, upgrading CLI Tools did the trick!
<weaksauce>
sweet
<blacknova>
Although oddly, when I run `ruby -v` I still get the old (system) ruby version? ie: 2.6.10p210
<blacknova>
This us after running `rbenv global 3.2.2`
<blacknova>
us=is
<blacknova>
Ah, it’s under `~/.rbenv/versions/3.2.2/bin/ruby` That returns the 3.2.2!
<blacknova>
version
<weaksauce>
what does ~/.ruby-version say?
<weaksauce>
you might want to do a rbenv rehash
<blacknova>
I don’t have that file…
<weaksauce>
either that or rbenv isn't installed correctly
<blacknova>
I have a `versions` under `~/rbenv` & that says `3.2.2`
<weaksauce>
yeah that's the file that it looks for
<weaksauce>
did you add the line rbenv asks you to append into your config?
<weaksauce>
type rbenv init
<blacknova>
It didn’t say to..?
<weaksauce>
and follow those instructions if you want it always active
<weaksauce>
zsh will be different than bash will be different than fish etc