adam12 changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.0.2, 2.7.4, 2.6.8: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://goo.gl/wpGhoQ
ur5us has quit [Ping timeout: 240 seconds]
lunarkitty has quit [Quit: Connection closed for inactivity]
roadie has joined #ruby
roadie has quit [Ping timeout: 245 seconds]
neshpion has quit [Quit: neshpion]
SuperLag has joined #ruby
ur5us has joined #ruby
MalkbabY has joined #ruby
neshpion has joined #ruby
MalkbabY has quit [Remote host closed the connection]
MalkbabY has joined #ruby
Guest73 has joined #ruby
Guest73 has quit [Client Quit]
roadie has joined #ruby
jmcgnh has quit [Quit: ZNC 1.7.5 - https://znc.in]
jmcgnh has joined #ruby
roadie has quit [Ping timeout: 240 seconds]
neshpion has quit [Quit: neshpion]
lunarkitty has joined #ruby
aeris has quit [Remote host closed the connection]
aeris has joined #ruby
jpw has joined #ruby
roadie has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
roadie has quit [Ping timeout: 245 seconds]
_ht has joined #ruby
reset has quit [Quit: reset]
jpw has quit [Remote host closed the connection]
menace has quit [Quit: menace]
roadie has joined #ruby
roadie has quit [Ping timeout: 240 seconds]
MalkbabY has quit [Remote host closed the connection]
MalkbabY has joined #ruby
roadie has joined #ruby
Guest47 has joined #ruby
roadie has quit [Quit: ERC (IRC client for Emacs 25.3.50.1)]
<Guest47> hello
<Guest47> how i can contribute in ruby gems
flooose has joined #ruby
<nakilon> Guest47 learn programming, then learn ruby
<nakilon> then when you make own gem or improve an existing one, you pull request it to repo (usually Github) where maintainers approve it and push new version to rubygems.org
lad has quit [Ping timeout: 245 seconds]
Rounin has joined #ruby
jmcgnh has quit [Ping timeout: 268 seconds]
<Guest47> in fact I read the "The Well Grounded Rubyist" and I thinking to make a project after finish it. i should to learn C language in parallel ?
<jhass[m]> I can only recommend to learn something when you have a usecase for it, not to find a usecase for something you learned
jmcgnh has joined #ruby
<Guest47> it's make sense, in fact i want to contribute in GsoC in Ruby particularly, so this my purpose for my Question jhass[m]
<jhass[m]> so does that require C?
rubion has joined #ruby
<Guest47> yes, some of projects is requisite :C+ruby, My question about i should to learn C in parallel? or focus in ruby first.
<Guest47> check the idea list If you don't have an idea about it
<leftylink> isn't there the saying that each individual has a different learning style, or has that been debunked?
<leftylink> because if it's true that each individual has a different learning style, whether one should learn two things at once or one thing at a time depends on the individual.
<leftylink> but these sorts of learning styles are different from whether someone can/should learn multiple things at once
<leftylink> my search for "learn two languages at once or one at a time" turns up https://blog.duolingo.com/can-you-learn-two-languages-at-the-same-time/ as first result.
<Guest47> you learned me a new lesson today, I think i should to explore myself more ,thanks leftylink
<nakilon> in my university you was supposed to learn 10 languages in 5 years one by one, not at the same time
<leftylink> there is also the consideration... learning is never complete.
<leftylink> learning is a continuous process
<leftylink> but I suppose the question here will be whether to split time between two languages as a beginner in both, or get some level of proficiency and fluency in one before starting on another
<leftylink> interesting choice
<Guest47> exactly that's what's i mean, i was described it in wrong way
roadie has joined #ruby
rubion has quit [Ping timeout: 248 seconds]
rubion has joined #ruby
flooose has quit [Ping timeout: 240 seconds]
whysthatso has quit [Ping timeout: 248 seconds]
<jhass[m]> yes, only you can answer this the best. Consider if you learn better by reading something upfront or exploring something as you go. In the latter case learning both at once can be viable IMO, if you have drivers for it as well. If you're more into focusing on something soaking in as much as possible, I imagine that to be less effective doing for two things at once. C and Ruby in fact are presenting quite different challenges and approaches and in turn are
<jhass[m]> also better suited for quite distinct problem domains (not saying there's no overlap at all of course). A final consideration I would make is previous background. If there's little experience with programming in general beforehand then I would definitely recommend to focus on Ruby first and then learn how C is different. If there's previous knowledge in something that's quite comparable to one of them, then picking up that other similar thing on the side
<jhass[m]> with the more new concepts might become quite achievable
<Guest47> in fact i appreciate your all words thanks A lot jhass[m]
Guest47 has quit [Ping timeout: 246 seconds]
lunarkitty has quit [Quit: Connection closed for inactivity]
jetchisel has quit [Ping timeout: 245 seconds]
jetchisel has joined #ruby
ur5us has joined #ruby
roadie has quit [Quit: ERC (IRC client for Emacs 25.3.50.1)]
ur5us has quit [Ping timeout: 240 seconds]
ur5us has joined #ruby
flooose has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
MalkbabY has quit [Remote host closed the connection]
MalkbabY has joined #ruby
michigan has joined #ruby
<michigan> behold! https://gist.github.com/basicfeatures/5eabd0bc0d24597c9b8232a268504759 -- rails startup script so beautiful i wanna make her my wife
<michigan> feel sorry for linux users who are stuck with systemd :(
<michigan> couple of fixes: https://gist.github.com/basicfeatures/5eabd0bc0d24597c9b8232a268504759 *NOW* she's perfect
reset has joined #ruby
TomyWork has joined #ruby
cognemo has quit [Quit: ZNC 1.8.2 - https://znc.in]
cognemo has joined #ruby
nmollerup has quit [Quit: Leaving]
xuochi has joined #ruby
xuochi has quit [Client Quit]
xuochi has joined #ruby
TomyWork has quit [Quit: Leaving]
TomyWork has joined #ruby
yxhuvud has quit [Remote host closed the connection]
yxhuvud has joined #ruby
xuochi has quit [Quit: leaving]
rubion has quit [Ping timeout: 240 seconds]
rubion has joined #ruby
TomyWork has quit [Remote host closed the connection]
TomyWork has joined #ruby
bit4bit has joined #ruby
roadie has joined #ruby
<aestheti1> thats pretty nice michigan
jpw has joined #ruby
jetchisel has quit [Quit: Unfortunately time is always against us -- [Morpheus]]
lad has joined #ruby
Oxfuxxx has quit [Ping timeout: 240 seconds]
xuochi has joined #ruby
Oxfuxxx has joined #ruby
mattil has joined #ruby
<kaleido> 3.0.0 :002 > require 'sshkit/dsl'
<kaleido> require 'sshkit' is fine
<kaleido> what am i missing?
<kaleido> => false
<adam12> kaleido: `$LOAD_PATH.grep /sshkit/`
<adam12> kaleido: `false` usually means it's already been required.
<kaleido> thank you, sir
<adam12> Sorry. `$LOAD_PATH` should of been `$LOADED_FEATURES`
<adam12> `$LOADED_FEATURES.grep /sshkit/`
<adam12> If you see `sshkit/dsl` in the return value, it's been required.
MalkbabY has quit [Remote host closed the connection]
MalkbabY has joined #ruby
NightMonkey has quit [Ping timeout: 248 seconds]
bjonnh has joined #ruby
NightMonkey has joined #ruby
cout has quit [Ping timeout: 258 seconds]
cout has joined #ruby
michigan has quit [Quit: Connection closed for inactivity]
fmccann has joined #ruby
fmccann has quit [Quit: Exeunt!]
orbyt has joined #ruby
crankharder has joined #ruby
michigan has joined #ruby
sam113101 has quit [Ping timeout: 248 seconds]
<michigan> aestheti1: many thanks!
<michigan> aestheti1: emanuele6, Soliton, geirha, and a few others from #bash helped me write it
<michigan> aestheti1: if you wanna see the full thing, check out https://github.com/basicfeatures/openbsd-rails
<aestheti1> adam12 saw that today, is that supposed to be an implementation or a dialict, it was somewhat unclear
<aestheti1> also isnt' (and this is not a critique of the project) rubinius a c++ ruby compiler written in ruby
<adam12> aestheti1: I'm not sure,tbh, but they are using the spec from I presume Rubininus, so I'm gathering it's an implementation.
<aestheti1> well I guess not AOT compiling
TomyWork has quit [Quit: Leaving]
roadie has quit [Quit: ERC (IRC client for Emacs 25.3.50.1)]
Milos has quit [Quit: ZNC 1.8.2 - https://znc.in]
Milos has joined #ruby
nesoi has joined #ruby
flooose has quit [Ping timeout: 240 seconds]
<nesoi> I have an old program that is using ruby 2.4.1 and won't run now because it wants to load openssl 1.0.0, what's the easiest way to run it?
<adam12> nesoi: If you need to stick with 2.4.1, probably Docker.
<adam12> nesoi: No chance of upgrading tho? I didn't think there was anything breaking from 2.4 to 2.5 (or even 2.6)
<nesoi> ok so what's the easiest way to upgrade? btw, I'm on macos :/
<nesoi> need to upgrade all the gems too I guess
<adam12> nesoi: You likely want to use a Ruby version manager. There's a few options: frum, chruby, rbenv, and rvm.
<adam12> nesoi: I'm presuming you're using system ruby.
<adam12> nesoi: You'll need to install the gems, but may not need to upgrade them. You can't generally re-use the same gem install across Ruby because of the Ruby ABI isn't guaranteed to be stable.
<nesoi> I think I'm using brew ruby
<nesoi> not sure though
<adam12> nesoi: Ah. Definitely install a Ruby version manager then.
<nesoi> what's the easiest to deal with?
<adam12> nesoi: I'm using Frum lately. It's built in Rust and reasonably nice (but new). My second choice is chruby, but you need to pair it with a Ruby installer like `ruby-install`.
<nesoi> I don't have a lot of time for this though, just want to get this running
wmoxam has quit [*.net *.split]
con3 has quit [*.net *.split]
wmoxam has joined #ruby
con3 has joined #ruby
con3 has quit [Max SendQ exceeded]
con3 has joined #ruby
<nesoi> hm Error: No available formula or cask with the name "frum".
<nesoi> I also have no idea how I'd use this to get the program running
<weaksauce> chruby is easiest to get going
<weaksauce> use that with ruby-install
<nesoi> ok but what am I installing?
<weaksauce> you need to install a newer ruby like 2.6 then install chruby into your shell script and use it like chruby 2.6
<weaksauce> shell script being your bash or zsh startup
<nesoi> hm
<nesoi> and this does what?
<weaksauce> it sets up your path to use the ruby and gem dirs where a user installed ruby is
<weaksauce> ruby-install compiles it
<weaksauce> chruby changes the ruby
<nesoi> ok so why do I want to do that?
<nesoi> instead of just upgrading it?
desnudopenguino has quit [Ping timeout: 240 seconds]
<weaksauce> upgrading system ruby is not advised
<nesoi> if I run ruby-install it says the latest version is 2.4.1
<nesoi> which I have
<nesoi> hm. I already had chruby installed
<nesoi> for chruby 2.6 it says unknown Ruby: 2.6
desnudopenguino has joined #ruby
<weaksauce> yeah you need to install ruby 2.6
roadie has joined #ruby
desnudopenguino has quit [Ping timeout: 268 seconds]
<michigan> isnt all that stuff a complication? whats wrong with system ruby?
desnudopenguino has joined #ruby
rapha has joined #ruby
<rapha> hi all
<rapha> while inside the File.open(..., 'w'){|f| ...} block, right after f.write, is there a way to "take back"/"undo" the last character written?
<rapha> like ... f.write("\bx") ... and then have "x" there instead of whatever would have been there before. which obviously won't work, because you'll get y^Hx instead.
<weaksauce> michigan system ruby is fine if you never update your system
<weaksauce> and don't want to use a newer ruby
<nesoi> hm use ruby-build to add a new version?
<nesoi> install
rubion has quit [Ping timeout: 245 seconds]
<nesoi> or brew?
<weaksauce> ruby install is the co project of chruby so i'd go with that but any should work
<weaksauce> well except brew
<weaksauce> that would be system i think
<rapha> "michigan system"?
<nesoi> tjamls
<nesoi> thanks
<weaksauce> maybe some kind of seek
crankharder has quit [Quit: leaving]
MalkbabY has quit [Remote host closed the connection]
crankharder has joined #ruby
MalkbabY has joined #ruby
rubion has joined #ruby
<michigan> weaksauce: i see i see
<michigan> rapha: you've never heard of michigan system? :)
<weaksauce> michigan also if you're going to ship code you want it to be divorced from whatever os is on the other side
<michigan> weaksauce: never thought of it that way, good point
<weaksauce> but if you're just writing toy scripts on a reasonably new ruby without dependencies it's fine
<michigan> im just writing rails apps on my own openbsd servers so i guess system ruby is ok for me (it comes in many versions as well)
<michigan> (and jeremy evans is the package maintainer <3)
entel_ has quit [Quit: Connection closed for inactivity]
<michigan> is he here now? nope. haven't seen him on irc in a while
_ht has quit [Remote host closed the connection]
ur5us has joined #ruby
nmollerup has joined #ruby
jpw has quit [Remote host closed the connection]
<rapha> oh lol, there was a colon missing
<rapha> weaksauce: thx!
<weaksauce> np
mattil has quit [Quit: Leaving]
lucasb has joined #ruby
shokohsc has quit [Remote host closed the connection]
shokohsc has joined #ruby
roadie has quit [Ping timeout: 240 seconds]
dviola has quit [Ping timeout: 268 seconds]
lunarkitty has joined #ruby
dviola has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
xuochi has quit [Quit: leaving]
ur5us has joined #ruby
roadie has joined #ruby
flooose has joined #ruby
roadie has quit [Ping timeout: 245 seconds]
dviola has quit [Ping timeout: 245 seconds]
dviola has joined #ruby
entel_ has joined #ruby
dviola has quit [Ping timeout: 245 seconds]
dviola has joined #ruby
orbyt has quit [Quit: Textual IRC Client: www.textualapp.com]
orbyt has joined #ruby
crankharder has quit [Ping timeout: 248 seconds]
dviola has quit [Ping timeout: 268 seconds]
roadie has joined #ruby
roadie has quit [Ping timeout: 245 seconds]
<nesoi> hey so I installed 2.6.8 with ruby-build and put it in ~/ruby/ruby-2.6.8 — how do I get chruby to fund it?
<nesoi> find
<weaksauce> section about using ruby-build
<weaksauce> i prefer ~/.rubies
<weaksauce> should probably be able to just move it
ur5us has quit [Ping timeout: 240 seconds]
<nesoi> thanks now it finds it but when I try to switch I get:
<nesoi> chruby ruby-2.6.8
<nesoi> dyld: Library not loaded: /Users/me/ruby/ruby-2.6.8/lib/libruby.2.6.dylib
<nesoi> Referenced from: /Users/me/.rubies/ruby-2.6.8/bin/ruby
<nesoi> Reason: image not found
<nesoi> its actual location is /Users/me/.rubies/lib/libruby.2.6.dynlib
<weaksauce> gotta build it specifically for chruby then
<weaksauce> as per the instructions
aeris has quit [Remote host closed the connection]
aeris has joined #ruby
<nesoi> hmm
<nesoi> so just delete this one?
dviola has joined #ruby
nmollerup has quit [Quit: Leaving]
jetchisel has joined #ruby
ur5us has joined #ruby
<nesoi> weaksauce: ok reinstalled and I see:
<nesoi> chruby
<nesoi> * ruby-2.6.8
<nesoi> ruby-2.4.1
<nesoi> but when I type ruby —version I see:
<nesoi> ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin18]
<nesoi> any suggestion?
<nesoi> hmm and
<nesoi> chruby 2.6.8
<nesoi> ~/.rubies/ruby-2.6.8/bin/ruby not executable
<weaksauce> curious
<weaksauce> chmod +x that
<weaksauce> i use ruby-install as it's meant to be used with chruby but it should work
<weaksauce> try calling it directly
<nesoi> oh it put everything in ~/.rubies/ not in ~/.rubies/version/
<nesoi> so now I have to delete it again???!
<nesoi> wtf
<nesoi> I tried install-ruby but it didn't list any version after 2.4.1
<nesoi> I mean ruby-install
<nesoi> ok just tell it
<nesoi> lots of warnings
<nesoi> In file included from re.c:15:
<nesoi> ./internal.h:127:10: warning: '__msan_unpoison' macro redefined
<nesoi> # define __msan_unpoison(x, y)
<nesoi> [-Wmacro-redefined]
<weaksauce> yeah i think you just do `ruby-install ruby 2.6.8`
<weaksauce> and it should find it fine
<nesoi> right, that's what's generating the warnings
<weaksauce> yeah warnings are usually fine
dviola has quit [Ping timeout: 268 seconds]
dviola has joined #ruby
bit4bit has quit [Remote host closed the connection]
<nesoi> hm ok that works now but I need a gem, how to find and install it?
orbyt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<weaksauce> does your thing have a gemfile?
<nesoi> hm. I think I got it but am not sure how to display the documentation:
<nesoi> Done installing documentation for concurrent-ruby, i18n, money, racc, nokogiri, excon, jeff, multi_xml, peddler, structure, mws-orders after 15 seconds
<nesoi> 11 gems installed
<weaksauce> the docs are fairly worthless imo
<nesoi> ok but how to view?
<nesoi> it still isn't finding it
<nesoi> same error
<weaksauce> bundle exec ruby yourscript.rb
<nesoi> could not locate Gemfile or .bundle/ directory
<weaksauce> does your project have a gemfile?
<weaksauce> bundle install
<weaksauce> then bundle exec ruby script
<nesoi> my project doesn't have a gemfile itself but uses some, if tht's what you mean?
<weaksauce> what kind of project is it?
<weaksauce> a gemfile is basically a must
<nesoi> it's just a short program
<weaksauce> but it uses gems... a bundle setup is a must
<nesoi> it just requires some
<weaksauce> i mean you can install it globally and hope it works out but a gemfile with a lock that specifies versions keeps thing working correctly
<nesoi> it used to work ok
<nesoi> :)
<weaksauce> yeah but the apis of your dependencies change
BSaboia has quit [Ping timeout: 245 seconds]
<nesoi> it seems it doesn't know where to look for the gems I just installed?
<weaksauce> you're going against the grain man
<weaksauce> bundle init
<weaksauce> slap those gems in that file
<weaksauce> and call it a day
<nesoi> no idea how to do any of that tho
<weaksauce> or easier use the command bundle add <gemname>
<nesoi> ugh, I just wanted to run this old code :/
rubion has quit [Ping timeout: 248 seconds]
<newton> does which gem and which ruby show the same paths
<newton> if you just installed all those gems with gem install <pkg> and it's the same chruby environment then it /should/ work
<newton> "gem which <pkg>" is a thing
<nesoi> yeah, they changed the gem require apparently
BSaboia has joined #ruby
vaillancourtmax has joined #ruby
sam113101 has joined #ruby
<weaksauce> anyway bundle simplifies it
<weaksauce> list your dependencies and then bundle install && bundle exec somescript
roadie has joined #ruby
flooose has quit [Ping timeout: 240 seconds]
roadie has quit [Ping timeout: 240 seconds]
MalkbabY has quit [Remote host closed the connection]
MalkbabY has joined #ruby
<nesoi> hm. now I'm trying to run rake because apparently my entire local db disappeared at some point
<nesoi> and I can't find a backup
<nesoi> getting
<nesoi> NoMethodError: undefined method `migrate' for ActiveRecord::Migrator:Class
<nesoi> when I run rake