havenwood changed the topic of #ruby to: Ruby 3.3.6 (3.4.0-preview2) https://www.ruby-lang.org | Log https://libera.irclog.whitequark.org/ruby
eddof13 has joined #ruby
eddof13 has quit [Client Quit]
kludger_ has joined #ruby
kludger has quit [Ping timeout: 252 seconds]
Sampersand has quit [Quit: Client closed]
cappy has quit [Quit: Leaving]
kludger has joined #ruby
kludger_ has quit [Ping timeout: 272 seconds]
tuxcrafter78 has quit [Quit: Client closed]
tuxcrafter78 has joined #ruby
ua_ has joined #ruby
kludger has quit [Ping timeout: 272 seconds]
kludger has joined #ruby
Rounin has quit [Ping timeout: 264 seconds]
kludger has quit [Quit: kludger]
Rounin has joined #ruby
Rounin has quit [Changing host]
Rounin has joined #ruby
Sampersand has joined #ruby
<ih8u> what's the best way to achieve image uploads?
<ih8u> a la dropbox or, i guess any web app ever
jhass has quit [Remote host closed the connection]
jhass has joined #ruby
Vonter has joined #ruby
<o0x1eef> CDN + object storage. I like bunny.net for that
<johnjaye> anybody here use a mac?
<johnjaye> i installed ruby with homebrew but i'm not sure how to run gems or exactly how it should be
<johnjaye> i don't want to just go to the directory with the gem every time
<ih8u> johnjaye: use rbenv
<ih8u> o0x1eef: that looks like mega overkill for my use case
Sampersand has quit [Ping timeout: 256 seconds]
<ih8u> i want to be able to drop an image, perform some minor mutations with magick or vips, and then throw the modified image somewhere on my server
gemmaro_ has quit [Quit: ZNC 1.8.2+deb3.1+deb12u1 - https://znc.in]
gemmaro_ has joined #ruby
Linux_Kerio has joined #ruby
powersurge360 has quit [Quit: The Lounge - https://thelounge.chat]
<johnjaye> ih8u: i'm trying
powersurge360 has joined #ruby
<johnjaye> my goal is to be able to run a gem from the commandline. is this reasonable? e.g. $ ruco
<mange> ih8u: Where do you want to be able to drop the image?
Vonter has quit [Quit: WeeChat 4.4.3]
Vonter has joined #ruby
<ih8u> mange: into a web page
<ih8u> johnjaye: so you installed rbenv with brew?
<johnjaye> yes
<ih8u> have you installed a ruby yet?
<johnjaye> then gem install ruco as an example gem
<johnjaye> i installed ruby with homebrew. then rbenv and a gem.
<johnjaye> i have to install another ruby?
<ih8u> macs have a system ruby, and rbenv will use that by default unless you install and set a different ruby
<ih8u> it is strongly advised to not use system ruby
<ih8u> `rbenv install -l` to see a list of available rubies
<johnjaye> i see
<ih8u> then `rbenv install <3.3.6 or preferred version>`
<johnjaye> i will do 3.1.6 so as to distinguish it from the other 2
<johnjaye> i didn't see this step mentioned anywhere, thanks
<ih8u> then `rbenv global <version>` to set that as the global version for everything you do
<ih8u> `rbenv local` to set a specific version for just the current directory
<johnjaye> i can't tell if it's using homebrew or compiling it itself or what exactly
<johnjaye> the output is a bit ambiguous
<johnjaye> how do you normally run a gem
<johnjaye> do you just navigate manually to the folder it's in and do ./<nameof gem>
<ih8u> rbenv install will compile a new ruby
<ih8u> it is now completely divorced from brew
<ih8u> if you install a gem that has am executable binary, after you have your global and/or local version set, rbenv will automatically call the appropriate gem on the command line after installation
<ih8u> most gems are meant to be used from inside ruby, but a few of them have executables
<ih8u> mailcatcher comes to mind
<johnjaye> yes this ruco one has a startup script i think to load and run it
<johnjaye> it's just an example
<ih8u> i'd never heard of it before
<johnjaye> i just picked one at random
<ih8u> but yes, all you have to do after the gem is installed is type `ruco` at the command prompt
<johnjaye> ok it works now. i just had to comment out the manual setting of the ruby path in my .zshrc which was calling the ruby 3.3.6 i had installed earlier
<johnjaye> so in other words you install rbenv then the ruby version not the reverse. i got it
<johnjaye> thanks
<ih8u> you installed ruby via brew and rbenv?
<ih8u> yeah i could see how that could get confusing
<johnjaye> yes. i assumed that rbenv would simply manage my existing installation
<ih8u> in the future, rbenv should be your first stop setting up a new system
<ih8u> let it manage your ruby environment(s)
<ih8u> it can, actually
<johnjaye> hmm. so i have to call this rbenv init thing i guess right
<ih8u> if you type `rbenv versions` you'll see all installed rubies
<ih8u> including those that came with the system, those installed by rbenv, and those installed by other means
<johnjaye> otherwise i'll just get the default ruby that came with the mac which is like 2.6
<ih8u> you can use rbenv to select between any of them
<johnjaye> it shows system and 3.1.6
<johnjaye> not the one i installed with brew
<johnjaye> so that's 2/3 at least
<ih8u> hmm, i've never installed ruby itself via homebrew
<johnjaye> i just did brew install ruby
<ih8u> maybe it requires a shell reload to see whatever brew did
<ih8u> anyway, you should discard it
<johnjaye> i restarted my terminal 2 times already
<johnjaye> yeah good idea
<ih8u> and just manage your rubies with rbenv
<johnjaye> weird. it says it's required for the irc program i'm chatting with. lol what
<ih8u> don't forget to set your global ruby with `rbenv global`
<johnjaye> ok thanks
<ih8u> what happens when you type `which ruby`?
<johnjaye> i'm still in the rbenv so it says ~/.rbenv/shims/ruby
<ih8u> good
<ih8u> then it is working as expected
<johnjaye> maybe not
<johnjaye> i think it might only be working because i added a line to my .zprofile to automatically call rbenv
<ih8u> rbenv init would do that kind of thing automatically
<ih8u> that's how it works
<johnjaye> export PATH="$HOME/.rbenv/bin:$PATH"
<johnjaye> eval "$(rbenv init -)"
<johnjaye> well. if that were true it should be repeated.
<ih8u> it "hijacks", for lack of a better word, all ruby-related commands so that it can manage them for you
<ih8u> including `bundle` and `gem`
<johnjaye> well if i open a new terminal window would i type rbenv first?
<johnjaye> or rather is that what you would do
<ih8u> no
<johnjaye> i see
<ih8u> just treat all future shell interactions with ruby as though nothing special is going on
<johnjaye> then i don't have an explanation. i'm sure i added those lines myself
<ih8u> you may have
<ih8u> i don't know what setup guide you're using
<johnjaye> right but then how does rbenv take effect without them
<johnjaye> it has to be in either .zshrc or .zprofile
<johnjaye> i think the github for rbenv
<johnjaye> is where i saw that maybe
<ih8u> those will be loaded every time you open a shell
<johnjaye> oh. when i run rbenv init it says it skips .zprofile because it's already configured
<johnjaye> lol what is this
<ih8u> it's already configured
<ih8u> you're done with setting up rbenv
victori has quit [Read error: Connection reset by peer]
<ih8u> now install a ruby and set one as global
<ih8u> you've already installed one i gather, now use `rbenv global <version number>` to make that your default ruby
<ih8u> and you're finished
victori has joined #ruby
nirvdrum has joined #ruby
<johnjaye> i was right. rbenv is too clever for its own good
<ih8u> how's that?
<johnjaye> the installation script greps my startup file for the phrase 'rbenv init' and reports everything is fine if it is found.
<johnjaye> it's just good fortune the command I pasted is the right rbenv init command
<ih8u> which command would that be?
<johnjaye> i pasted it earlier
<johnjaye> not sure how to scroll up on a mac to get it
<johnjaye> the script in rbenv called libexec/rbenv-init has the logic to do that
<ih8u> i don't see what you're talking about
<ih8u> `brew install rbenv` then `rbenv init` and you should be done
<ih8u> i don't see what special thing you've done
<johnjaye> it's line 92 of rbenv-init
<ih8u> but you said you put that in your zsh yourself?
<johnjaye> yes but accidentally
<ih8u> how?
<o0x1eef> ih8u: You can probably just store the image in the database then. See paperclip and friends: https://github.com/thoughtbot/paperclip
<johnjaye> i must have read a different guide and put those lines in
<johnjaye> and it's putting the script rbenv needs into my startup file in an equivalent way
<johnjaye> as opposed to simply adding ~/.rbenv/shims to the path
<ih8u> that's the only requirement for rbenv anyway
<ih8u> if it bothers you, just rip it out and run `rbenv init` again
<ih8u> but it seems like you're just confusing yourself
<johnjaye> i might yes. i just find it funny i put in the startup code from a different guide and it succeeded
<johnjaye> but it only succeeded because rbenv cheated
<ih8u> `rbenv init` is just an autgomated way to do what you seem to have done manually
<ih8u> either way, your command output showed that rbenv was working, so there's no issue either way
<johnjaye> i think so yes. either way as long as the path is added it says it's fine. so i'm not worrried
<johnjaye> bbl
<ih8u> o0x1eef: thank you. i'm not using rails, and i'm much more concerned with the mechanics of getting the file into ruby than i am about what to do with it once i have
<ih8u> i'm not much of a front-end guy, so i don't really know how to get the file from the web page into ruby logic
Furai has quit [Quit: WeeChat 4.4.3]
Furai has joined #ruby
grenierm has joined #ruby
kludger has joined #ruby
kludger_ has joined #ruby
kludger has quit [Ping timeout: 244 seconds]
dannyAAM has quit [Quit: Will be back soon!]
dannyAAM has joined #ruby
Sampersand has joined #ruby
<Sampersand> johnjaye i have a mac
cappy has joined #ruby
Sampersand has quit [Ping timeout: 256 seconds]
kludger_ has quit [Quit: kludger_]
Sampersand has joined #ruby
kynareth has joined #ruby
Sampersand has quit [Ping timeout: 256 seconds]
<isene> havenwood: Still one file (you may ask why I stopped writing larger books and now mainly write OnePageBooks). But namespace protection should now be good. Over to boosting the performance of rcurses.
grenierm has quit [Ping timeout: 256 seconds]
cappy has quit [Quit: Leaving]
hightower4 has joined #ruby
hightower3 has quit [Ping timeout: 265 seconds]
hightower3 has joined #ruby
hightower4 has quit [Ping timeout: 248 seconds]
kludger has joined #ruby
kynareth has quit [Ping timeout: 246 seconds]
kynareth has joined #ruby
dviola has left #ruby [WeeChat 4.4.3]
dviola has joined #ruby
eoli3n has quit [Ping timeout: 276 seconds]
mange has quit [Quit: Zzz...]
kludger has quit [Ping timeout: 246 seconds]
kludger has joined #ruby
kiwi_36 has joined #ruby
Linux_Kerio has quit [Ping timeout: 260 seconds]
Linux_Kerio has joined #ruby
dviola has quit [Remote host closed the connection]
graywolf has joined #ruby
diego has joined #ruby
diego is now known as Guest8307
Guest8307 has left #ruby [#ruby]
dviola has joined #ruby
graywolf has quit [Quit: WeeChat 4.4.3]
kludger has quit [Read error: Connection reset by peer]
kludger has joined #ruby
kynareth has quit [Quit: WeeChat 4.4.3]
kludger has quit [Max SendQ exceeded]
Munto has joined #ruby
KOTP has quit [Ping timeout: 245 seconds]
KOTP has joined #ruby
kludger has joined #ruby
desnudopenguino has quit [Read error: Connection reset by peer]
kludger has quit [Ping timeout: 252 seconds]
kiwi_36 has quit [Read error: Connection reset by peer]
kiwi_36 has joined #ruby
kludger has joined #ruby
kludger has quit [Ping timeout: 260 seconds]
donofrio has joined #ruby
kludger has joined #ruby
gr33n7007h has quit [Quit: WeeChat 4.4.3]
sarna has quit [Ping timeout: 252 seconds]
gr33n7007h has joined #ruby
sarna has joined #ruby
hwpplayer1 has joined #ruby
kiwi_36 has quit [Ping timeout: 272 seconds]
kiwi_36 has joined #ruby
sarna has quit [Ping timeout: 276 seconds]
sarna has joined #ruby
thefuture_ has joined #ruby
kiwi_36 has quit [Ping timeout: 252 seconds]
eoli3n has joined #ruby
thefuture__ has joined #ruby
thefuture_ has quit [Ping timeout: 252 seconds]
eoli3n has quit [Read error: Connection reset by peer]
eoli3n has joined #ruby
hightower3 has quit [Remote host closed the connection]
rvalue has quit [Ping timeout: 265 seconds]
rvalue has joined #ruby
thefuture__ has quit [Remote host closed the connection]
eddof13 has joined #ruby
c10l has quit [Remote host closed the connection]
c10l has joined #ruby
eddof13 has quit [Client Quit]
kludger has quit [Quit: kludger]
kludger has joined #ruby
ih8u has quit [Ping timeout: 252 seconds]
user71 has joined #ruby
ih8u has joined #ruby
c10l has quit [Ping timeout: 260 seconds]
ih8u has quit [Ping timeout: 260 seconds]
eddof13 has joined #ruby
kludger has quit [Quit: kludger]
c10l has joined #ruby
kludger has joined #ruby
donofrio has quit [Ping timeout: 248 seconds]
desnudopenguino has joined #ruby
donofrio has joined #ruby
hwpplayer1 has quit [Quit: I'll be back later]
kludger has quit [Ping timeout: 244 seconds]
donofrio has quit [Ping timeout: 265 seconds]
kludger has joined #ruby
GvJordan has quit [Remote host closed the connection]
Jordan has joined #ruby
kludger has quit [Quit: kludger]
donofrio has joined #ruby
donofrio_ has joined #ruby
kludger has joined #ruby
donofrio has quit [Ping timeout: 252 seconds]
tardybaker has quit [Quit: See ya!]
tardybaker has joined #ruby
donofrio_ has quit [Ping timeout: 255 seconds]
donofrio_ has joined #ruby
<johnjaye> well. you may have a mac. but you also left the channel!
eddof13 has quit [Quit: eddof13]
eddof13 has joined #ruby
tuxcrafter78 has quit [Quit: Client closed]
tuxcrafter78 has joined #ruby
kludger has quit [Quit: kludger]
kludger has joined #ruby
kludger has quit [Quit: kludger]
kludger has joined #ruby
kludger has quit [Ping timeout: 248 seconds]
mms has joined #ruby
<mms> hey. Does anyone here use Ctags to navigate Ruby codebase? If so, what do you use to generate them? ;-)
eddof13 has quit [Quit: eddof13]
kludger has joined #ruby
donofrio_ has quit [Ping timeout: 252 seconds]
<adam12> mms: I do sometimes. I use universal-ctags.
donofrio_ has joined #ruby
<mms> Thanks adam12. I'll try it.
Sampersand has joined #ruby
user71 has quit [Quit: Leaving]
jmjl has quit [Remote host closed the connection]
jmjl has joined #ruby
donofrio_ has quit [Ping timeout: 260 seconds]
Linux_Kerio has quit [Quit: Konversation terminated!]
Linux_Kerio has joined #ruby
hayaliali has joined #ruby
pavelz has quit [Ping timeout: 252 seconds]
alip has quit [Ping timeout: 276 seconds]
pavelz has joined #ruby
hayaliali is now known as alip
eddof13 has joined #ruby
donofrio_ has joined #ruby
eddof13 has quit [Quit: eddof13]
smp has quit [Quit: ZNC 1.8.2 - https://znc.in]
Linux_Kerio has quit [Ping timeout: 248 seconds]
smp has joined #ruby
rvmtz has joined #ruby
rvmtz has quit [Remote host closed the connection]
rvmtz has joined #ruby
rvmtz has quit [Remote host closed the connection]
kludger has quit [Quit: kludger]
donofrio_ has quit [Ping timeout: 276 seconds]
kludger has joined #ruby
ftajhii has joined #ruby
mange has joined #ruby
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
eddof13 has joined #ruby
eddof13 has quit [Quit: eddof13]
mange has quit [Remote host closed the connection]
Thanzex02 has joined #ruby