havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.6.0, 2.5.3, 2.4.5: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.de/ and select Ruby as the language | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
laaron has quit [Remote host closed the connection]
idiocrash has joined #ruby
idiocrash has quit [Client Quit]
chouhoulis has quit [Remote host closed the connection]
hutch has quit [Ping timeout: 246 seconds]
Swyper has joined #ruby
cd has joined #ruby
phaul has quit [Quit: bye]
tdy has quit [Ping timeout: 268 seconds]
jthomas3 has quit [Ping timeout: 240 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mksybr has quit [Remote host closed the connection]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mzo has joined #ruby
d10n-work has quit [Quit: Connection closed for inactivity]
SeepingN has quit [Remote host closed the connection]
\void has quit [Quit: So long, and thanks for all the fish.]
nowhere_man has joined #ruby
jcalla has quit [Ping timeout: 246 seconds]
d10n-work has joined #ruby
davidw_ has quit [Ping timeout: 250 seconds]
AJA4350 has quit [Remote host closed the connection]
orbyt_ has joined #ruby
jottr has quit [Ping timeout: 272 seconds]
tdy has joined #ruby
r29v has quit [Quit: r29v]
bmurt has joined #ruby
r29v has joined #ruby
r29v has quit [Client Quit]
troulouliou_div2 has joined #ruby
orbyt_ has quit [Read error: Connection reset by peer]
orbyt_ has joined #ruby
tdy has quit [Ping timeout: 244 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jottr has joined #ruby
jottr has quit [Ping timeout: 246 seconds]
donofrio has joined #ruby
comet23 has joined #ruby
<comet23> i am having trouble writing ruby code... i converted my ruby logic to javascript and it works in javascript :/
troulouliou_div2 has quit [Remote host closed the connection]
<comet23> okay i got it nvm sorry for false alarm
jottr has joined #ruby
tdy has joined #ruby
sanscoeu_ has joined #ruby
sanscoeur has quit [Ping timeout: 245 seconds]
sanscoeu_ has quit [Ping timeout: 240 seconds]
jottr has quit [Ping timeout: 268 seconds]
houhoulis has joined #ruby
crankharder has joined #ruby
masterasia has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
donofrio has quit [Ping timeout: 246 seconds]
hutch has joined #ruby
jottr has joined #ruby
jottr has quit [Ping timeout: 246 seconds]
jcalla has joined #ruby
Swyper has quit [Remote host closed the connection]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duderonomy has joined #ruby
esrse has joined #ruby
orbyt_ has joined #ruby
sanscoeur has joined #ruby
sanscoeu_ has joined #ruby
sanscoeur has quit [Ping timeout: 250 seconds]
mzo has quit [Ping timeout: 250 seconds]
sanscoeu_ has quit [Remote host closed the connection]
hutch has quit [Ping timeout: 246 seconds]
hutch has joined #ruby
Ring0` has quit [Quit: bb 0_o]
jottr has joined #ruby
crankhar1er has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Swyper has joined #ruby
orbyt_ has joined #ruby
jottr has quit [Ping timeout: 246 seconds]
crankhar1er has quit [Ping timeout: 246 seconds]
garyserj has joined #ruby
braincrash has quit [Quit: bye bye]
houhoulis has quit [Remote host closed the connection]
braincrash has joined #ruby
tiff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
garyserj has quit [Quit: garyserj]
hutch has quit [Ping timeout: 250 seconds]
roshanavand has quit [Remote host closed the connection]
roshanavand has joined #ruby
cnsvc has quit [Ping timeout: 256 seconds]
cnsvc has joined #ruby
Swyper has quit [Remote host closed the connection]
Nicmavr has quit [Read error: Connection reset by peer]
Nicmavr has joined #ruby
spacesuitdiver has joined #ruby
jthomas3 has joined #ruby
jthomas3 has quit [Ping timeout: 245 seconds]
rkazak has quit [Quit: Sleep.....ing....]
sauvin has joined #ruby
kapil____ has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
r3m has quit [Quit: WeeChat 2.4-dev]
r3m has joined #ruby
r3m has quit [Client Quit]
r3m has joined #ruby
hutch has joined #ruby
sanscoeur has joined #ruby
r3m has quit [Quit: WeeChat 2.4-dev]
r3m has joined #ruby
hutch has quit [Ping timeout: 250 seconds]
crankhar1er has joined #ruby
crankhar1er has quit [Ping timeout: 246 seconds]
spacesuitdiver has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hutch has joined #ruby
jottr has joined #ruby
hutch has quit [Ping timeout: 268 seconds]
jottr has quit [Ping timeout: 268 seconds]
hutch has joined #ruby
ur5us has joined #ruby
conta has joined #ruby
ur5us has quit [Ping timeout: 272 seconds]
rippa has joined #ruby
hiroaki has quit [Ping timeout: 250 seconds]
conta has quit [Ping timeout: 250 seconds]
conta has joined #ruby
hutch has quit [Ping timeout: 245 seconds]
dinfuehr has quit [Ping timeout: 272 seconds]
aupadhye has joined #ruby
dinfuehr has joined #ruby
_whitelogger has quit [Ping timeout: 250 seconds]
kapil____ has quit [Quit: Connection closed for inactivity]
uplime has quit [Quit: WeeChat 2.2]
_whitelogger has joined #ruby
nowhere_man has quit [Remote host closed the connection]
bmurt has joined #ruby
y0u has quit [Quit: Connection closed for inactivity]
<orbyt_> In a case/switch statements, can only a single "when" block be executed?
<orbyt_> or will any and all matching when clauses be run?
<havenwood> orbyt_: Just one - no fall through.
<orbyt_> So it runs the first match and then exists the switch?
<orbyt_> exits*
<orbyt_> Confirmed with irb, thanks.
RougeR has joined #ruby
tdy has joined #ruby
stryek has joined #ruby
gix has joined #ruby
tdy has quit [Remote host closed the connection]
djdduty has joined #ruby
<djdduty> Hey guys, my Ruby.framework on macOS is missing the universal-darwin18/ruby/config.h and only has universal-darwin17/ruby/config.h, I have made sure I have the most recent version of everything. Anyone else run in to this and know the solution or if I'm asking in the wrong place?
<djdduty> Seems more like a package management issue than ruby, but figured I'd ask here.
tdy has joined #ruby
<havenwood> djdduty: How are you running into the issue?
<djdduty> havenwood Attempting to install a gem via a bundle install that is throwing an error about it missing.
AJA4350 has quit [Ping timeout: 246 seconds]
AJA4350 has joined #ruby
<havenwood> djdduty: Most folk on macOS opt to install a newer Ruby alongside the system Ruby to use for their own projects.
<djdduty> havenwood I used rbenv to set 2.5.3 as my global version
<djdduty> But for whatever reason it's still trying to use 2.3 from the System when installing the bundle
<djdduty> ruby -v confirms that 2.5.3 is selected.
nowhere_man has joined #ruby
<djdduty> looks like it may be related to macOS sdk headers or something, IIRC when I upgraded to mojave I did it before the full release (it was beta), I wonder if that's it.
<havenwood> djdduty: Is bundler installed on Ruby 2.5?
<havenwood> djdduty: What do you get for?: which bundler
<havenwood> djdduty: gem which bundler
<djdduty> which bundler does show the 2.3.0 bin
<djdduty> Didn't think of that.
<havenwood> djdduty: A `gem install bundler` should do the trick.
<djdduty> I'll try that, thanks.
<djdduty> havenwood I did a `gem update --system` and `gem install bundler` which prompted an overwrite of the bundler in the 2.5.3 directory, went ahead
<djdduty> which bundle/which bundler still shows the 2.3.0 path
<havenwood> ?rbenv djdduty
<ruby[bot]> djdduty: Missing command under rbenv? Did you try `rbenv rehash`?
<djdduty> Hold on
<djdduty> Looks like my .zshrc has something explicitly adding the ~/.gem/ruby/2.3.0 to my path
<djdduty> I removed that and now which bundler points to ~/.rbenv/shims/bundler
<djdduty> Hey, that did it.
discopatrick has quit [Quit: Connection closed for inactivity]
<djdduty> havenwood Thanks a million.
krawchyk_ has quit [Quit: krawchyk_]
<havenwood> djdduty: 👍🏽 np
uplime has quit [Quit: WeeChat 2.2]
conta has quit [Quit: conta]
h0h0h0 has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
KeyJoo has quit [Quit: KeyJoo]
tdy has quit [Ping timeout: 268 seconds]
conta has joined #ruby
cow[moo] has quit [Read error: Connection reset by peer]
GodFather has quit [Ping timeout: 246 seconds]
nowhere_man has quit [Ping timeout: 252 seconds]
sandelius has joined #ruby
conta has quit [Ping timeout: 246 seconds]
<sandelius> Evening Rubyists
comet23 has joined #ruby
<comet23> how do you define a shift operator?
<comet23> i mean unshift
<comet23> the >> operator
<comet23> so it will work like the << operator
<sandelius> comet23 ruby doesn't have a "shorthand" syntax for that, you need to call arr.unshift
<comet23> how would you define it though
<sandelius> or you want to make one?
<comet23> yeah i want to make one
<comet23> it's long overdue
<sandelius> ahh just define a def<<(value) method on array that uses unshift, or alias it
<comet23> that's what i've done
<comet23> my logic is way off
segy has quit [Quit: ZNC - http://znc.in]
<comet23> oh
<comet23> well that's differnet
<sandelius> comet23 can you see my repl btw?
<comet23> i can
<comet23> so for me to change array methods i would have to go into the array class
<comet23> interesting
<sandelius> live?
<comet23> thank you :D
<comet23> live no
<sandelius> ok, I do not like to "monkey-patch" core classes. I would do something like this: (one sec)
<sandelius> can you see my changes?
h0h0h0 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tdy has joined #ruby
tdy has quit [Read error: error:1408F119:SSL routines:ssl3_get_record:decryption failed or bad record mac]
segy has joined #ruby
<comet23> i can
<comet23> but why not just change the core class?
<sandelius> Cause that will change it for all array in your entire program. This used på be popular but then people realized bug-hunting is just not worth it. It's pretty cool tho that we can create "operators" on the fly :)
<sandelius> It's about "Element of surprise" when the next person is going threw the code
<sandelius> IMO this is one of RoR biggest flaws
<leftylink> well that sounds like a time for refinements doesn't it
sanscoeur has quit [Remote host closed the connection]
<comet23> what i fail to understand is how could it introduce bugs if the code is bug free to begin with?
despai has joined #ruby
Dbugger has quit [Remote host closed the connection]
<phaul> comet23: imagine the chaos if everybody is randomly adding functionality to classes that everybody uses. If two gems are adding the same methods to array differently, and you depend on both, then you are in screwed
<comet23> i can't imagine what you're saying :/
<comet23> like to me having the >> operator is intuitive
<phaul> yeah. and I define it so that my array shifts all of its contents (numbers) by given number of bits. Because in my domain that feels intuitive
<phaul> point is unless there is an authority to it , it just end up in chaos
<sandelius> comet23 When the project gets bigger, or many people are working on it, that's when the issues occur. Not not so much about a bug in that method, more about playing detective
orbyt_ has joined #ruby
dmgk_ has joined #ruby
dmgk_ has quit [Remote host closed the connection]
Haris has joined #ruby
<Haris> hello all
sandelius has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Haris> is there a way to uninstall all rubies/gems that got installed for some app?
<Haris> for .e.g, I'm installing redmine
GodFather has joined #ruby
krawchyk has joined #ruby
sandelius has joined #ruby
memofun has joined #ruby
dmgk has quit [Ping timeout: 246 seconds]
<woodruffw> Haris: if you user bundler, you can remove the whole vendor/ subdirectory
<woodruffw> i don't think there's a clean way to do it if you used `gem` directly
<Haris> its empty
<woodruffw> hmm
<Haris> I did run bundle install for redmine
<Haris> I don't have mod_passenger for centos 7 that supports ruby 2.2.2 or above
<havenwood> Haris: Rubies don't usually get installed with an app. How to best uninstall a Ruby depends on how you installed it.
<Haris> bundle install
<Haris> simple
<Haris> I have to remove bundle installed rubies/gems for redmine 4.x to then be able to install rubies/gems for redmine 3.4.7
<havenwood> Haris: By default, Bundler installs to $BUNDLE_PATH or $GEM_HOME. Gem you install there are intermingled with your other gems in that location. You can use --path to specify a different directory.
<Haris> hmm
<havenwood> Haris: You can uninstall all gems with: gem uninstall --all
<Haris> do ruby apps run in venv?
<havenwood> Haris: We prefix commands with `bundle exec` to limit the gems to those specified in the Gemfile.lock.
hiroaki has joined #ruby
<havenwood> Haris: For deployment, we typically install gems to a /vendor directory locally in the app.
<Haris> that's the objective. uninstall gems that were installed from gemfile
<Haris> ./vendor is there. but its empty
tdy has joined #ruby
<Haris> looks like its going in system wide, since I'm = root
<havenwood> Haris: The Bundler default is &GEM_HOME. Folk often use the --deployment flag in prod for a path of ./vendor.
<havenwood> Haris: If you'd set a --deployment flag (which you haven't) you could run: bundle clean
<havenwood> Haris: I'd not worry about gems you've installed. The way Bundler works it doesn't matter what system gems are installed.
Fernando-Basso has joined #ruby
<havenwood> Haris: What's your goal? Deploying to prod?
<Haris> with an older version of redmine, I have a conflict for public_suffix
<Haris> and nokigori
<Haris> and a few others
<havenwood> Haris: How are you running your command? What's the command you run that results in the errors?
<Haris> goal is to install redmine to expose to public
<Haris> start w/ bundle install --without development test rmagick
<Haris> it installs nokogiri 1.8.5. where-as redmine 3.4.7 uses 1.6.x
<Haris> installs public_suffix 3.0.3. where-as redmine 3.4.7 uses 2.0.5
<havenwood> Haris: Those are errors from your `bundle install` command?
<Haris> I actually ran bundle upgrade once or twice, during install. that started it
<havenwood> Haris: Show the command that you run that produces and error, and what that error is?
uplime has joined #ruby
ogres has quit [Quit: Connection closed for inactivity]
<Haris> GEM_HOME = /usr/local/rvm/gems/ruby-2.2.2
<Haris> MY_RUBY_HOME = /usr/local/rvm/rubies/ruby-2.2.2
krawchyk has quit [Quit: krawchyk]
krawchyk has joined #ruby
krawchyk has quit [Quit: krawchyk]
sanscoeur has joined #ruby
sanscoeu_ has joined #ruby
akaiiro has joined #ruby
sanscoeur has quit [Ping timeout: 258 seconds]
tiff has joined #ruby
masterasia has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Mike11 has joined #ruby
sandelius has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SeepingN has joined #ruby
krawchyk has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
masterasia has joined #ruby
conta has joined #ruby
krawchyk has quit [Quit: krawchyk]
conta has quit [Ping timeout: 258 seconds]
krawchyk has joined #ruby
postmodern has joined #ruby
Haris has quit [Quit: Leaving]
<memofun> hi, i good tutorial to start coding with Ruby
<memofun> hi a good tutorial to start coding with Ruby please
despai has quit [Quit: ...]
lucasb has joined #ruby
m0w has quit [Ping timeout: 258 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
reber has joined #ruby
reber has quit [Remote host closed the connection]
krawchyk has quit [Quit: krawchyk]
m0w has joined #ruby
memofun has quit [Ping timeout: 246 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hiroaki has quit [Ping timeout: 250 seconds]
masterasia has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood> meinside: We list some resources here: https://ruby-community.com/pages/links
<havenwood> meinside: And here: https://www.ruby-lang.org/en/documentation/
<havenwood> meinside: This is a nice site to get started: https://ruby.github.io/TryRuby/
orbyt_ has joined #ruby
code_zombie has joined #ruby
orbyt_ has quit [Read error: Connection reset by peer]
cd has quit [Remote host closed the connection]
hiroaki has joined #ruby
cd has joined #ruby
sanscoeu_ has quit [Remote host closed the connection]
sanscoeur has joined #ruby
Fernando-Basso has quit [Remote host closed the connection]
m0w has quit [Ping timeout: 240 seconds]
roshanavand has quit [Quit: Gone planting!]
crankharder has quit [Ping timeout: 245 seconds]
conta has joined #ruby
conta has quit [Ping timeout: 244 seconds]
uplime has quit [Remote host closed the connection]
hiroaki has quit [Ping timeout: 240 seconds]
jokke has quit [Read error: Connection reset by peer]
Azure has quit [Ping timeout: 268 seconds]
jottr has quit [Ping timeout: 268 seconds]
h0h0h0 has joined #ruby
Azure has joined #ruby
phaul has quit [Ping timeout: 250 seconds]
rubydoc has quit [Ping timeout: 268 seconds]
jottr has joined #ruby
jottr has quit [Ping timeout: 258 seconds]
tdy has quit [Ping timeout: 246 seconds]
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
connermcd has joined #ruby
connermcd has quit [Client Quit]