phenom has quit [Quit: See ya! Wouldn't want to blah blah..]
skryking_ has joined #ruby
skryking has quit [Ping timeout: 268 seconds]
k0mpa has joined #ruby
phenom has joined #ruby
k0mpa has quit [Client Quit]
h3ll0w0rld has joined #ruby
k0mpa has joined #ruby
gix has quit [Ping timeout: 245 seconds]
morenoh149 has quit [Ping timeout: 268 seconds]
ukd1 has quit [Quit: Lost terminal]
brool has joined #ruby
leitz has quit [Quit: Leaving]
ramfjord has quit [Ping timeout: 245 seconds]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
AJA4351 has joined #ruby
Swyper has joined #ruby
AJA4350 has quit [Ping timeout: 245 seconds]
AJA4351 is now known as AJA4350
bruce_lee has quit [Remote host closed the connection]
wildtrees has quit [Quit: Leaving]
s2013 has joined #ruby
poontangmessiah_ has quit [Remote host closed the connection]
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
<Retr0Punk>
leftylink: are you around?
jenrzzz_ has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
Swyper has quit [Remote host closed the connection]
Fusl has quit [Max SendQ exceeded]
Swyper has joined #ruby
jenrzzz_ has quit [Ping timeout: 268 seconds]
Fusl has joined #ruby
Swyper has quit [Remote host closed the connection]
h3ll0w0rld has quit [Quit: Konversation terminated!]
poontangmessiah has joined #ruby
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 245 seconds]
AJA4351 is now known as AJA4350
Swyper has joined #ruby
bambanx has joined #ruby
morenoh149 has joined #ruby
_whitelogger has joined #ruby
cyclonis has quit [Read error: Connection reset by peer]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s2013 has joined #ruby
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s2013 has joined #ruby
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ffl^ has joined #ruby
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
AJA4351 has joined #ruby
drincruz has joined #ruby
AJA4350 has quit [Ping timeout: 248 seconds]
AJA4351 is now known as AJA4350
ramfjord has joined #ruby
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
ramfjord has quit [Ping timeout: 245 seconds]
drincruz has quit [Ping timeout: 272 seconds]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
cyclonis_ has joined #ruby
AJA4350 has quit [Quit: AJA4350]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dviola has joined #ruby
cyclonis_ has quit [Read error: Connection reset by peer]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
s2013 has joined #ruby
Swyper has quit [Remote host closed the connection]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
stryek has quit [Quit: Connection closed for inactivity]
brool has quit [Ping timeout: 264 seconds]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
englishm has joined #ruby
englishm has quit [Excess Flood]
englishm has joined #ruby
poontangmessiah_ has joined #ruby
poontangmessiah has quit [Ping timeout: 248 seconds]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
s3nd1v0g1us has joined #ruby
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
jenrzzz has joined #ruby
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
orbyt_ has joined #ruby
kyrylo has joined #ruby
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
bambanx has quit [Quit: Leaving]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
kyrylo has quit [Read error: Connection reset by peer]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hutch has quit [Ping timeout: 246 seconds]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
morenoh149 has quit [Ping timeout: 248 seconds]
s3nd1v0g1us has quit [Ping timeout: 246 seconds]
hutch has joined #ruby
kyrylo has joined #ruby
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
poontangmessiah_ has quit [Ping timeout: 272 seconds]
morenoh149 has joined #ruby
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
morenoh149 has quit [Ping timeout: 248 seconds]
orbyt_ has joined #ruby
orbyt_ has quit [Client Quit]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
kyrylo has quit [Client Quit]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
krt^^ has joined #ruby
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
dviola has quit [Quit: WeeChat 2.5]
Nicmavr has quit [Read error: Connection reset by peer]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
Nicmavr has joined #ruby
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
Tempesta has quit [Read error: Connection reset by peer]
Tempesta has joined #ruby
Tempesta has joined #ruby
Tempesta has quit [Changing host]
poontangmessiah has joined #ruby
cyclonis_ has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
ur5us has quit [Ping timeout: 268 seconds]
Fr4n has joined #ruby
lalitmee has joined #ruby
DTZUZU has joined #ruby
dellavg has joined #ruby
duderonomy has joined #ruby
cd has quit [Quit: cd]
sagax has quit [Write error: Connection reset by peer]
hutch has quit [Ping timeout: 268 seconds]
Fr4n has quit [Remote host closed the connection]
sagax has joined #ruby
code_zombie has quit [Quit: Leaving]
aupadhye has joined #ruby
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
lxsameer has joined #ruby
ramfjord has joined #ruby
ua has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ramfjord has quit [Ping timeout: 268 seconds]
TomyWork has joined #ruby
s3nd1v0g1us has joined #ruby
prestorium has joined #ruby
s3nd1v0g1us has quit [Quit: WeeChat 2.4]
lalitmee has quit [Ping timeout: 245 seconds]
planigan has quit [Ping timeout: 244 seconds]
mat_bug has joined #ruby
duderonomy has joined #ruby
planigan has joined #ruby
suukim has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tdy1 has quit [Ping timeout: 246 seconds]
drnerdius has joined #ruby
deepredsky has joined #ruby
fphilipe_ has quit [Ping timeout: 252 seconds]
ellcs has joined #ruby
Sauvin has quit [Ping timeout: 272 seconds]
Sauvin has joined #ruby
nehth^ has quit []
ellcs has quit [Ping timeout: 245 seconds]
eddof13 has joined #ruby
dsrt^ has joined #ruby
eddof13 has quit [Client Quit]
mikecmpbll has joined #ruby
involans has joined #ruby
conta has joined #ruby
al2o3-cr has quit [Quit: If the universe is a machine where the future is uniquely determined by its present state, it would not be possible to calculate what the future will be.]
lalitmee has joined #ruby
involans has quit [Quit: involans]
involans has joined #ruby
lord4163 has quit [Excess Flood]
lord4163 has joined #ruby
involans has quit [Client Quit]
involans has joined #ruby
CrazyEddy has quit [Remote host closed the connection]
fphilipe_ has joined #ruby
involans has quit [Quit: involans]
salerace has joined #ruby
ellcs has joined #ruby
mat_bug has quit [Remote host closed the connection]
mat_bug has joined #ruby
mat_bug has quit [Remote host closed the connection]
mat_bug has joined #ruby
conta has quit [Quit: conta]
involans has joined #ruby
involans has quit [Client Quit]
poontangmessiah_ has joined #ruby
involans has joined #ruby
poontangmessiah_ has quit [Max SendQ exceeded]
poontangmessiah_ has joined #ruby
noob_coder has joined #ruby
noob_coder has left #ruby [#ruby]
noob_coder has joined #ruby
noob_coder has left #ruby [#ruby]
poontangmessiah has quit [Ping timeout: 272 seconds]
poontangmessiah has joined #ruby
drnerdius has quit [Read error: Connection reset by peer]
drnerdius has joined #ruby
poontangmessiah_ has quit [Ping timeout: 248 seconds]
CrazyEddy has joined #ruby
poontangmessiah has quit [Ping timeout: 245 seconds]
jefffrails35 has joined #ruby
jefffrails35 has quit [Remote host closed the connection]
tdy1 has joined #ruby
sylario has joined #ruby
salerace has quit [Quit: salerace]
deathwishdave has joined #ruby
mat_bug has quit [Remote host closed the connection]
keden has quit [Quit: WeeChat 2.5]
keden has joined #ruby
mat_bug has joined #ruby
keden has quit [Client Quit]
keden has joined #ruby
keden has quit [Client Quit]
keden has joined #ruby
tdy1 has quit [Ping timeout: 246 seconds]
yottanami has joined #ruby
<yottanami>
I want to create a new game that the name contains dash character and it creates a directory in another. is anyway to disable this feature?
drincruz has joined #ruby
drnerdius has quit [Read error: Connection reset by peer]
<tobiasvl>
yottanami: what feature are you talking about here? what kind of game?
drnerdius has quit [Read error: Connection reset by peer]
drnerdius has joined #ruby
poontangmessiah has joined #ruby
teardown has quit [Ping timeout: 248 seconds]
<yottanami>
tobiasvl, I just need initialize a simple CLI ruby application but the problem is the name of the project contains dash `-` and using `bundle gem` it converts each dash to a subdirectory
<yottanami>
tobiasvl, for example `bundle gem test-project` will crate lib/test/project
AJA4350 has joined #ruby
teardown has joined #ruby
drnerdius has quit [Quit: Konversation terminated!]
drnerdius has joined #ruby
beanie__ has joined #ruby
tpanarch1st_ has quit [Ping timeout: 272 seconds]
yottanami has quit [Ping timeout: 248 seconds]
mat_bug has quit [Remote host closed the connection]
yottanami has joined #ruby
nowhereman has joined #ruby
<barg>
i did brew upgrade a while back, and now when I type rails<ENTER> it gives an error about railties
<barg>
if i do gem uninstall rails, it doesn't seem to do anything
mat_bug has joined #ruby
<barg>
i guess i could try asking that in #rubyonrails
hays has quit [Quit: No Ping reply in 180 seconds.]
hays has joined #ruby
involans has quit [Quit: involans]
mat_bug has quit [Remote host closed the connection]
involans has joined #ruby
mat_bug has joined #ruby
prestorium has quit [Quit: prestorium]
kentnl has quit [Quit: rebooting.... wish me luck]
drincruz has quit [Ping timeout: 245 seconds]
sh7d has quit [Quit: meh]
sh7d has joined #ruby
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 248 seconds]
AJA4351 is now known as AJA4350
mochiyoda has quit [Ping timeout: 276 seconds]
involans has quit [Quit: involans]
involans has joined #ruby
involans has quit [Remote host closed the connection]
involans has joined #ruby
involans has quit [Remote host closed the connection]
mochiyoda has joined #ruby
drincruz has joined #ruby
yottanami has quit [Remote host closed the connection]
mat_bug has quit [Remote host closed the connection]
lucasb has joined #ruby
mochiyoda has quit [Quit: Konversation terminated!]
mochiyoda has joined #ruby
mat_bug has joined #ruby
flok has joined #ruby
<flok>
Gemfile says: gem "mysql2", "~> 0.5.0", ruby-mysql2 package installed is 0.5.2-1ubuntu1, yet still I get Error loading the 'mysql2' Active Record adapter. Missing a gem it depends on? mysql2 is not part of the bundle. Add it to your Gemfile
<flok>
any ideas?
drincruz has quit [Ping timeout: 246 seconds]
lalitmee has quit [Quit: Leaving]
deepredsky has quit [Ping timeout: 245 seconds]
jcalla has joined #ruby
AJA4351 has joined #ruby
flok has left #ruby [#ruby]
AJA4350 has quit [Ping timeout: 268 seconds]
AJA4351 is now known as AJA4350
Bish has joined #ruby
<Bish>
does ruby have pattern matching for hashes?
<Bish>
? = {a:2,b:2,c:2}
<Bish>
so i can assign them to variables, kinda like with arrays?
bmurt has joined #ruby
<phaul>
&>> a, b, c = * {a: 1, b: 2, c: 3}; [a, b, c]
drnerdius has quit [Quit: Konversation terminated!]
nerdius has joined #ruby
<Bish>
uhm, and that will work just by order or by name?
<phaul>
by order
<Bish>
stoopid
<Bish>
that's not really pattern matching, right
<Bish>
rather.. .to_a
<phaul>
ruby doesnt really have pattern matching imho. As it doesnt have algebraic data types either
<Bish>
yeah but it does a,b,c = [a,b,c]
involans has joined #ruby
<Bish>
javascript has it too, while not having adts either
deepredsky has joined #ruby
<phaul>
yeah I guess it depends on the definition of pattern matching. Probably you are right and that#s also considered pattern matching, it's just very different from pattern matching where that's not just a neat syntactic shortcut but a fundamental feature of the language
<Bish>
well okay, i want syntactic sugar that looks like pattern matching
Fernando-Basso has joined #ruby
<phaul>
for hashes you can assign them as arrays like that, or you can pass a hash to a method with matching keyword arguments.
involans has quit [Quit: involans]
<phaul>
afaik that's all the tricks you can do with a hash in ruby
involans has joined #ruby
<Bish>
well, i could also do a loop and extract them, i am aware about that...
<phaul>
that just gave me an idea of looping and defining local vars from the keys.. which would do it by name as opposed to order
<Bish>
yeah but that is like the most conventional way to do it there is
Frobozz_ has joined #ruby
deepredsky has quit [Ping timeout: 245 seconds]
Frobozz has quit [Ping timeout: 245 seconds]
involans has quit [Quit: involans]
ellcs has quit [Quit: Leaving.]
<phaul>
though it doesn't even seem to work in my pry (or irb)
<phaul>
&>> bin = binding; {a: 1, b: 2}.each { |k, v| bin.local_variable_set(k, v) } ; a
<rubydoc>
stderr: -e:2:in `<main>': undefined local variable or method `a' for main:Object (NameError) (https://carc.in/#/r/7dnm)
ellcs has joined #ruby
involans has joined #ruby
Inline has joined #ruby
<phaul>
Im guessing bin.local_variable_set does not constitute as the variable being declared in the local lexical scope, which would mean that you can't metaprogram this. I don't know...
<Bish>
i did something like this, but from the perspective that i want to make my code prettier not uglier, that odesn't help
<phaul>
sure :) I only said this because the fact it doesn't even work confused me
<Bish>
it's not obvious to me either, but binding stuff is weird
mat_bug has quit [Remote host closed the connection]
<Bish>
guess you can always eval *duck*
mat_bug has joined #ruby
mat_bug has quit [Remote host closed the connection]
mat_bug has joined #ruby
mat_bug has quit [Remote host closed the connection]
involans has quit [Quit: involans]
involans has joined #ruby
<phaul>
&>> binding.local_variable_set :a, 1; a
<rubydoc>
stderr: -e:2:in `<main>': undefined local variable or method `a' for main:Object (NameError) (https://carc.in/#/r/7dnn)
<phaul>
&>> a = 2; binding.local_variable_set :a, 1; a
TomyWork has quit [Remote host closed the connection]
drincruz has joined #ruby
involans has quit [Quit: involans]
involans has joined #ruby
lalitmee has joined #ruby
Frobozz_ is now known as Frobozz
nerdius has quit [Read error: No route to host]
nerdius has joined #ruby
k0mpa has quit [Remote host closed the connection]
drincruz_ has joined #ruby
codefriar has joined #ruby
bmurt has quit [Ping timeout: 244 seconds]
drincruz has quit [Ping timeout: 244 seconds]
<Bish>
wtf, range.count does fukin really count?
Swyper has joined #ruby
chunkypuffs has joined #ruby
involans has quit [Quit: involans]
nerdius has quit [Read error: Connection reset by peer]
nerdius has joined #ruby
involans has joined #ruby
frem has joined #ruby
kyrylo has joined #ruby
nerdius has quit [Ping timeout: 258 seconds]
Bish has quit [Ping timeout: 268 seconds]
dellavg has quit [Ping timeout: 244 seconds]
<havenwood>
(1..).size #=> Infinity
<havenwood>
(1..).count # hangs
bmurt has joined #ruby
involans has quit [Quit: involans]
AJA4351 has joined #ruby
involans has joined #ruby
AJA4350 has quit [Ping timeout: 244 seconds]
AJA4351 is now known as AJA4350
k0mpa has joined #ruby
argoneus has quit [Remote host closed the connection]
beanie__ has quit [Quit: Thanks for your help, nice to see you, take care.]
duderonomy has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<barg>
I just did gem install rails, and it said 'bundler's executable "bundle" conflicts with /usr/local/lib/ruby/gems/2.6.0/bin/bundle'
<barg>
overwrite the executable [yn]
lalitmee has quit [Remote host closed the connection]
jottr_ has joined #ruby
<havenwood>
barg: In Ruby 2.6, bundler is now a default gem. I saw an old issue where this was happening with other default gem binstubs, but it was fixed in RubyGems.
<havenwood>
barg: Does it still happen with the latest RubyGems update?
<havenwood>
barg: gem update --system
jottr has quit [Ping timeout: 248 seconds]
<havenwood>
Ah, I'm thinking of a really old issue. Probably irrelevant.
<ruby[bot]>
barg: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
<barg>
havenwood: what do you suggest as a next step?
<barg>
i think i should somehow remove any old ruby version and leave just the latest one
<barg>
i'm not sure what directory ruby is meant to be in.. as i have two different ones
wildtrees has joined #ruby
code_zombie has joined #ruby
eddof13 has joined #ruby
wildtrees has quit [Remote host closed the connection]
wildtrees has joined #ruby
ellcs has quit [Remote host closed the connection]
wildtrees has quit [Remote host closed the connection]
AJA4351 has joined #ruby
wildtrees has joined #ruby
AJA4350 has quit [Ping timeout: 246 seconds]
AJA4351 is now known as AJA4350
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<barg>
any idea why i have two versions of ruby in two different locations?
RiPuk has quit [Ping timeout: 272 seconds]
morenoh149 has joined #ruby
<barg>
any idea why i have two versions of ruby in two different locations /usr/local/opt/ruby/bin/ruby has 2.6 and /usr/bin/ruby has 2.3
<barg>
sorry didn't mean to repeat, but have included the locations now
mikecmpbll has quit [Quit: inabit. zz.]
morenoh149 has quit [Ping timeout: 245 seconds]
skryking_ has quit [Remote host closed the connection]
gix has joined #ruby
skryking has joined #ruby
RiPuk has joined #ruby
impermanence has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
<mozzarella>
barg: which OS?
<barg>
osx
cd has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
linuus[m] has quit [Remote host closed the connection]
aecepoglu[m] has quit [Read error: Connection reset by peer]
qbrd[m] has quit [Remote host closed the connection]
sepp2k has quit [Write error: Connection reset by peer]
_whitelogger has joined #ruby
eok^ has joined #ruby
srt^ has joined #ruby
ffl^ has joined #ruby
tsrt^ has joined #ruby
dsrt^ has joined #ruby
aecepoglu[m] has joined #ruby
sgh^^ has joined #ruby
hcs^ has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
mikecmpbll has joined #ruby
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
stormpack has joined #ruby
str has joined #ruby
str has left #ruby [#ruby]
<havenwood>
barg: Hi! I'd be happy to help you sort it out. First, what version of Ruby would you like to use? 2.6?
ramfjord has joined #ruby
<havenwood>
barg: If you'd like to try a new, very simple way to install Rails 5 with Ruby 2.6 on macOS, you can try Tokaido. All you do is download it, right click, open it, click "open terminal" and you're good to go.
<havenwood>
barg: Or we can help you get your brew/asdf/chruby/rvm/rbenv setup working.
<havenwood>
barg: Ah, looks like they've changed how that works.
<havenwood>
barg: (It used to link in /usr/local/bin.)
<havenwood>
barg: In any case, it's fine to delete or ignore the brew Ruby.
<havenwood>
barg: It is a dependency of some other brew packages.
kyrylo has joined #ruby
<havenwood>
barg: The system Ruby is a dependency of Brew itself.
<barg>
ok so how would I upgrade the system ruby?
<havenwood>
barg: You don't.
<havenwood>
barg: Don't upgrade it. Don't use it. Ignore it.
<havenwood>
barg: It's meant to be there, it's used by your system and brew.
<barg>
ok, should the brew ruby be before the system ruby in the path?
<havenwood>
barg: No, it shouldn't be unless you're trying to use it.
<barg>
i am trying to use it as i want to use a later version of ruby
<barg>
why else would somebody install ruby with brew?
<havenwood>
barg: If you're trying to use it as your current Ruby, it should be in the path and its gem directory should be in your path - ahead of other Ruby's.
<havenwood>
barg: it is a dependency of other brew packages
<havenwood>
barg: people install something else, and it gets installed
<barg>
ok
<barg>
i guess rubyists would tend to have the brew one before the system one?
<havenwood>
barg: you can see *all* brew packages, even deps that were installed with: brew list
<havenwood>
barg: on the other hand, to see packages you installed directly: brew leaves
<havenwood>
you'll usually see far fewer `brew leaves` than `brew list`.
<barg>
so how do i get ruby linked again, should i do brew reinstall ruby?
<havenwood>
barg: They apparently stopped linking brew in /usr/local/bin, so you'll need to add it to your path. That gist ^ will use chruby to setup PATH, GEM_HOME, GEM_PATH, etc.
<havenwood>
barg: If you'd like to do it manually, instead of using chruby, I can show you but it's more steps.
<havenwood>
barg: chruby is just a few lines of code, but it helps you switch Rubies easily.
<havenwood>
barg: It can also automatically switch Ruby versions based on the .ruby-version in a project's folder.
<barg>
i'm interested in doing it manually
<havenwood>
barg: If you wanted to, you could do it with chruby, then copy those env vars into a dotfile and uninstall chruby.
<barg>
would brew reinstall ruby relink it?
duderonomy has joined #ruby
<havenwood>
barg: no
<havenwood>
barg: they stopped linking ruby in /usr/local/bin
<havenwood>
barg: they used to, they don't anymore
<havenwood>
barg: you can see where brew Ruby is installed: brew --prefix ruby
jottr__ has joined #ruby
<havenwood>
barg: that bin/ dir is the Ruby binaries
<havenwood>
so, add that to your path
<havenwood>
then add the gem directory to your path
<havenwood>
and you're done
<barg>
so doing brew unlinke ruby doesn't matter?
<havenwood>
prepend them to your path
<havenwood>
barg: no, it's unlinked from the start
<havenwood>
barg: it used to be linked by default. they changed it. it doesn't matter. you just add it to your path now.
<havenwood>
barg: As the install and link message shows: export PATH="/usr/local/opt/ruby/bin:$PATH"
<barg>
ok, i had started a brew reinstall ruby , hopefully that will finish soon
eddof13 has quit [Quit: eddof13]
<barg>
yeah it's prepended.. now it's rails that gives an error, i'll try gem uninstall rails and gem install rails
<havenwood>
barg: rails is a gem, so that's a different bin dir to add to path
<havenwood>
barg: check if the ruby executables work?
<havenwood>
barg: ruby -v
<havenwood>
barg: which ruy
<havenwood>
barg: gem -v
<havenwood>
barg: which gem
<barg>
actually rails new sdfsdf says No such file or directory -- /usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.0.2/exe/bundle (LoadError)
<barg>
so should i do gem install bundler?
<havenwood>
You should sanity check that your ruby and gem executables are as expected, then check: gem env gemdir
<havenwood>
barg: which ruby
<havenwood>
barg: which gem
<havenwood>
barg: (Those ship with Ruby, and are a precursor to getting gems working.)
jottr__ has quit [Ping timeout: 245 seconds]
<havenwood>
barg: If those are both brew, then: gem env gemdir
<havenwood>
barg: What do you see from those commands?
<barg>
-/usr/local/opt/ruby/bin/ruby and /usr/local/opt/ruby/bin/gem
<barg>
so that's correct
<havenwood>
good and good
<havenwood>
gem env gemdir
<barg>
i have my path set right in ¬/.bash_profile
<havenwood>
it's not an environment variable if unexported
<havenwood>
and should be lowercase by convention
mikecmpbll has quit [Ping timeout: 252 seconds]
<havenwood>
and can't be seen by child processes
mikecmpb_ has joined #ruby
<barg>
so in the path, should /usr/local/lib/ruby/gems/2.6.0/bin be first and /usr/local/opt/ruby/bin second?
<havenwood>
Brew instructions should not just suggest adding "$(brew --prefix)/bin" to path but also show "$(gem env gemdir)/bin" since I see people run into this all the time.
<havenwood>
barg: It doesn't matter.
<havenwood>
barg: I'd do the other order, personally.
<havenwood>
barg: No, actually that order.
<havenwood>
barg: Important thing is Ruby AND Gem bin/ dirs prepended to you PATH.
<barg>
and that gems/2.6.0/bin line is for the sake of bundle running from there?
<havenwood>
barg: For the sake of all installed Gem executables.
<barg>
i notice which bundle shows /usr/local/opt/ruby/bin/bundle
<havenwood>
barg: Look in that directory, then install a gem with an executable and look again.
<barg>
when i do bundle install.. where do i want bundle to run from?
jottr__ has quit [Ping timeout: 245 seconds]
<havenwood>
I have a meeting. Good luck!
orbyt_ has joined #ruby
<barg>
ok, thanks
mynameisdebian has joined #ruby
bmurt has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kyrylo has quit [Read error: Connection reset by peer]
eok^ has quit [Ping timeout: 252 seconds]
<adam12>
barg: Run bundle install from the same folder that your Gemfile exists.
tsrt^ has quit [Ping timeout: 250 seconds]
srt^ has quit [Ping timeout: 264 seconds]
sgh^^ has quit [Ping timeout: 248 seconds]
ffl^ has quit [Ping timeout: 264 seconds]
dsrt^ has quit [Ping timeout: 264 seconds]
hcs^ has quit [Ping timeout: 250 seconds]
krt^^ has quit [Ping timeout: 252 seconds]
orbyt_ has joined #ruby
erk^ has quit [Ping timeout: 276 seconds]
nerdius has joined #ruby
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
stormpack has quit [Quit: Leaving]
kyrylo has quit [Read error: Connection reset by peer]
sameerynho has joined #ruby
AndroidKitKat has quit [Ping timeout: 268 seconds]
FastJack has quit [Ping timeout: 264 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
poontangmessiah has quit [Remote host closed the connection]
FastJack has joined #ruby
nowhereman has joined #ruby
k0mpa has quit [Quit: k0mpa]
FastJack has quit [Ping timeout: 264 seconds]
suukim has quit [Quit: Konversation terminated!]
k0mpa has joined #ruby
jenrzzz has quit [Ping timeout: 248 seconds]
FastJack has joined #ruby
salerace has joined #ruby
eddof13 has joined #ruby
k0mpa has quit [Remote host closed the connection]
AndroidKitKat has joined #ruby
doshirae has joined #ruby
nowhereman has quit [Ping timeout: 250 seconds]
kyrylo has joined #ruby
nowhere_man has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
AndroidKitKat has quit [Client Quit]
AndroidKitKat has joined #ruby
mat_bug has joined #ruby
bga57 has quit [Quit: Leaving.]
salerace has quit [Quit: salerace]
matju has joined #ruby
orbyt_ has joined #ruby
ElFerna has joined #ruby
<sagax>
hi all!
<sagax>
how to .map but not return if value not valid?
<sagax>
[0, 1, nil] after .map [0, 1]
<sagax>
this example
<phaul>
what are you mapping? always itself?
<leftylink>
but I thought that `a.map { ... }` always MUST have same number of elements as `a`. so wouldn't it have to be done after the map? for example, perhaps it can `compact`.
<sagax>
phaul: just array
<baweaver>
`compact` probably then,
<leftylink>
when `filter_map` comes out, then maybe that will be better.
tpanarch1st has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<leftylink>
but for now.
<baweaver>
Was trying to remember if that was 2.7
<sagax>
thank, i have old ruby and `compact` done
<baweaver>
There's a lot in that one
<baweaver>
To be fair, 2.7 isn't out yet
jenrzzz has joined #ruby
jottr__ has joined #ruby
jottr__ has quit [Ping timeout: 245 seconds]
cyclonis_ has quit [Read error: Connection reset by peer]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
tdy1 has quit [Ping timeout: 264 seconds]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
D9 has joined #ruby
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
orbyt_ has joined #ruby
za1b1tsu has joined #ruby
za1b1tsu has quit [Remote host closed the connection]
dbugger has joined #ruby
cyclonis_ has joined #ruby
ElFerna has quit [Read error: Connection reset by peer]
fphilipe_ has quit [Ping timeout: 248 seconds]
cyclonis_ has quit [Read error: Connection reset by peer]
k0mpa has joined #ruby
bitwinery has joined #ruby
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
davor has quit [Ping timeout: 272 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<sagax>
`&&` better then `and` ?
davor has joined #ruby
<sagax>
in `if` context
bhaak has quit [Ping timeout: 246 seconds]
ur5us has joined #ruby
orbyt_ has joined #ruby
nerdius has quit [Read error: Connection reset by peer]
kyrylo has quit [Read error: Connection reset by peer]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
nahra has quit [Remote host closed the connection]
nahra has joined #ruby
matju has quit [Quit: Leaving]
orbyt_ has joined #ruby
chunkypuffs has joined #ruby
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
henninb has joined #ruby
eddof13 has quit [Quit: eddof13]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
lxsameer has quit [Ping timeout: 268 seconds]
wallace_mu has quit [Remote host closed the connection]
<mynameisdebian>
I have a Ruby CGI script (A) that receives a JSON message from Slack that is retrieved as a Hash via cgi.params. That script then makes an HTTP request to a script (B) that needs to be able to receive either the exact Hash or the Hash parameters. When I try converting it to JSON in script A, then POST the JSON to script B, the message ends up with a bunch of extra commas and script B cannot decipher it. How can I correctly pass the CGI parameters
<mynameisdebian>
from script A to script B?
tdy1 has joined #ruby
<mynameisdebian>
Should have said, "the message ends up with a bunch of extra backslashes"
eddof13 has joined #ruby
jenrzzz has joined #ruby
ElFerna has joined #ruby
ramfjord has quit [Ping timeout: 248 seconds]
ElFerna has quit [Ping timeout: 272 seconds]
bmurt has quit [Ping timeout: 248 seconds]
bmurt has joined #ruby
<jordanm>
mynameisdebian: sounds like you are json encoding something that is already a json string and not a hash
<jordanm>
since you are making CGI services anyways, you might as well just json.decode the request twice in script B :P
ramfjord has joined #ruby
henninb has quit [Quit: leaving]
<mynameisdebian>
json.decode or json.parse?
<jordanm>
parse, sorry, but I was joking
<barg>
should bundle run from /usr/local/lib/ruby/gems/2.6.0 which is what i get from gem env gemdir, or I keep it to running from /usr/local/opt/ruby/bin/bundle which is what I get from which bundle ?
jenrzzz has quit [Ping timeout: 246 seconds]
za1b1tsu has joined #ruby
ElFerna has joined #ruby
eok^ has joined #ruby
sgh^^ has joined #ruby
krt^^ has joined #ruby
srt^ has joined #ruby
hcs^ has joined #ruby
ffl^ has joined #ruby
tsrt^ has joined #ruby
erk^ has joined #ruby
dsrt^ has joined #ruby
sgh^^ has quit [Read error: Connection reset by peer]
hcs^ has quit [Read error: Connection reset by peer]
erk^ has quit [Ping timeout: 246 seconds]
krt^^ has quit [Read error: Connection reset by peer]
erk^ has joined #ruby
jottr__ has joined #ruby
tsrt^ has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
jottr__ has quit [Ping timeout: 245 seconds]
ChrisBr has quit [Ping timeout: 258 seconds]
jakeb3 has joined #ruby
<jakeb3>
Hello
<jakeb3>
Anyone know how to iterate over the members if a Fiddle::struct?
<jakeb3>
of I mean
mjacob has quit [Ping timeout: 252 seconds]
mikecmpb_ has quit [Ping timeout: 258 seconds]
dsrt^ has quit []
kyrylo has joined #ruby
eok^ has quit []
erk^ has quit []
ffl^ has quit []
srt^ has quit []
kyrylo has quit [Read error: Connection reset by peer]
tpanarch1st has quit [Quit: Thanks for your help, nice to see you, take care.]
ffl^ has joined #ruby
mikecmpbll has joined #ruby
kyrylo has joined #ruby
tipyn has joined #ruby
<mynameisdebian>
Is there a way to make a "detached" HTTP request with Ruby, so that the script makes the call and does not wait for it to return?
kyrylo has quit [Read error: Connection reset by peer]
<havenwood>
mynameisdebian: Are you familiar with Kernel#exec?
<mynameisdebian>
havenwood, no :(
<mynameisdebian>
havenwood, can you fill me in briefly?
ChrisBr has joined #ruby
<havenwood>
mynameisdebian: or I guess in your case, fork. that's what we were suggesting the other day if you want it to work with CGI.
<havenwood>
mynameisdebian: You can "fork" another process off your Ruby process, then detach it so when you quit your Ruby process it keeps running and isn't zombied.
<havenwood>
mynameisdebian: Jesse Storimer's book explains concepts around Processes clearly and in detail.
<havenwood>
mynameisdebian: General reading about processes should suffice. We're just suggesting to fork so your CGI process can exit and let Apache return.
drincruz_ has quit [Ping timeout: 272 seconds]
<havenwood>
mynameisdebian: Or use Rack so you're not spinning up a Ruby process that needs to die before your request can return.
mikecmpbll has quit [Max SendQ exceeded]
<havenwood>
mynameisdebian: It's not hard to fork though. Give it a shot. If you have trouble using it, show your code.
* havenwood
mutters something about zombie orphans when the last unicorn is killed
ur5us has quit [Remote host closed the connection]
<jakeb3>
Any suggestions for help with fiddle or ffi? Seems like ffi have a google group
za1b1tsu has quit [Remote host closed the connection]
ur5us has joined #ruby
mikecmpbll has joined #ruby
Mortir_ has joined #ruby
<Mortir_>
Hi
<Mortir_>
Is this place also for noob questions?
ur5us has quit [Ping timeout: 245 seconds]
<phaul>
Mortir_: sure, you can ask anything if it's Ruby related
<mynameisdebian>
havenwood, thank you. I will try to work on that, but I'm under a deadline that I may very quickly be fired over, and I may not get the chance. So, please forgive me if I don't make it back to discuss my results
<havenwood>
Mortir_: Please ask away!
mikecmpbll has quit [Ping timeout: 268 seconds]
<mynameisdebian>
havenwood, there's no good way over IRC to properly convey one's appreciate for another's time
ElFerna has quit [Ping timeout: 272 seconds]
<havenwood>
mynameisdebian: For example, try this code from your command line:
reber has quit [Remote host closed the connection]
<mynameisdebian>
havenwood, it did what I think you were expecting, but it will take me some time to wrap my head around the correct way to use that for my situation
<havenwood>
mynameisdebian: Then try in your CGI script: Process.detach fork { sleep 10; puts 'work goes here ...' }
frem has quit [Quit: Connection closed for inactivity]
<havenwood>
mynameisdebian: Remember, CGI spins up a Ruby process and will return when that process exits.
<havenwood>
mynameisdebian: Does that make sense? If not, read up on processes.
<havenwood>
mynameisdebian: I highly recommend that Jesse Storimer book.
<havenwood>
If you want a solid grounding regarding processes and only have a couple hours to dig in.
mat_bug has quit [Ping timeout: 252 seconds]
<mynameisdebian>
the last command didn't quite do what was intended because the script is responding to a Slack message, not a browser
<mynameisdebian>
but I will try to read up on that
involans has joined #ruby
involans has quit [Remote host closed the connection]
<mynameisdebian>
got about 20 minutes to compile my work from last month to prove I'm worth a paycheck, wish me luck
<havenwood>
mynameisdebian: Fork for the part that responds to Slack.
<havenwood>
mynameisdebian: Just share the code and we'll show you where to fork.