<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>
`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
<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!]