<adam12>
Interesting that it's not normally equal tho 63.chr is ??
<havenwood>
adam12: Yup, in 1.9 the character literal switched from returning the ord to returning the chr.
<adam12>
havenwood: I completely forgot about it. Intentionally blanked from memory.
<adam12>
Back when `id` conflicted.
<havenwood>
Hah, yeah, forgetting that one is a win for the brain. :)
jaequery has quit [Remote host closed the connection]
Swyper has quit [Remote host closed the connection]
jaequery has joined #ruby
jaequery has quit [Ping timeout: 265 seconds]
buckworst has joined #ruby
buckworst has quit [Client Quit]
buckworst has joined #ruby
buckworst has quit [Client Quit]
xco has joined #ruby
SuperLag has quit [Ping timeout: 265 seconds]
gix- has joined #ruby
gix has quit [Disconnected by services]
SuperLag has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
GodFather has quit [Ping timeout: 265 seconds]
skryking has joined #ruby
nowhere_man has joined #ruby
GodFather has joined #ruby
nowhereman has quit [Ping timeout: 260 seconds]
hays has joined #ruby
hays has quit [Changing host]
hays has joined #ruby
xall has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
guardian has joined #ruby
guardian has quit [Ping timeout: 268 seconds]
NODE has quit [Remote host closed the connection]
NODE has joined #ruby
hays has quit [Ping timeout: 260 seconds]
NODE has quit [Remote host closed the connection]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
skryking has quit [Quit: WeeChat 1.9.1]
NODE has joined #ruby
NODE has quit [Remote host closed the connection]
NODE has joined #ruby
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
NODE has quit [Quit: changing servers]
guardian has joined #ruby
NODE has joined #ruby
tris has quit [Ping timeout: 268 seconds]
NODE has quit [Remote host closed the connection]
guardian has quit [Ping timeout: 268 seconds]
NODE has joined #ruby
NODE has quit [Client Quit]
tris has joined #ruby
NODE has joined #ruby
NODE has quit [Remote host closed the connection]
NODE has joined #ruby
lineus has quit [Ping timeout: 240 seconds]
lineus has joined #ruby
jenrzzz has joined #ruby
tris has quit [Excess Flood]
tris has joined #ruby
guardian has joined #ruby
akemhp has quit [Quit: Leaving]
guardian has quit [Ping timeout: 240 seconds]
donofrio has quit [Remote host closed the connection]
xall has quit [Quit: xall]
andikr has joined #ruby
andikr has quit [Remote host closed the connection]
andikr has joined #ruby
CrazyEddy has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
jenrzzz has joined #ruby
gix- has quit [Ping timeout: 258 seconds]
vondruch has joined #ruby
TomyWork has joined #ruby
nowhere_man has quit [Read error: Connection reset by peer]
suukim has joined #ruby
fphilipe has joined #ruby
conta has joined #ruby
ur5us has joined #ruby
NL3limin4t0r_afk has quit [Ping timeout: 258 seconds]
NL3limin4t0r_afk has joined #ruby
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
craz has quit [Quit: WeeChat 2.7]
Jonopoly has joined #ruby
conta has quit [Quit: conta]
william1 has joined #ruby
william1 has quit [Quit: WeeChat 1.9.1]
NL3limin4t0r_afk has quit [Ping timeout: 258 seconds]
NL3limin4t0r_afk has joined #ruby
chihhsin_ has quit [Ping timeout: 248 seconds]
emilych has joined #ruby
chihhsin has joined #ruby
<emilych>
Hi
<emilych>
How can I add elements from one array to a nested array? I have tweo arrays:
<emilych>
How can I add elements from one array to a nested array? I have tweo arrays: ```months = ["2019-01-01", "2019-02-01", "2019-03-01", "2019-04-01"] baz = [ ["foo","2019-02-01: 186904","2019-03-01: 196961"], ["bar","2019-01-01: 8876","2019-04-01: 8694"] ]```
<emilych>
How can I add elements from one array to a nested array? I have tweo arrays: ```months = ["2019-01-01", "2019-02-01", "2019-03-01", "2019-04-01"] baz = [ ["foo","2019-02-01: 186904","2019-03-01: 196961"], ["bar","2019-01-01: 8876","2019-04-01: 8694"] ]```
<emilych>
How can I add elements from one array to a nested array? I have two arrays: ```months = ["2019-01-01", "2019-02-01", "2019-03-01", "2019-04-01"] baz = [ ["foo","2019-02-01: 186904","2019-03-01: 196961"], ["bar","2019-01-01: 8876","2019-04-01: 8694"] ]```
guardian has joined #ruby
NL3limin4t0r_afk is now known as NL3limin4t0r
<emilych>
ah, sorry for multiple postings, I was trying to edit my prior post
<NL3limin4t0r>
Where should the elements from `months` go? Is each element added to every nested array, or are the elements added to the nested array based on their index?
<emilych>
the first: each element is added to every nested array.
<NL3limin4t0r>
You can't edit something that is already send. If you want to provide a multiline example use https://dpaste.de
<emilych>
thanks for the links, I'll check them out!
mossplix has joined #ruby
<NL3limin4t0r>
emilych: I've updated my gist. Your solution did already work, but mutates every array inside `monthly_doc_count_for_topic`. So you shouldn't use #map there, simply use #each.
<emilych>
ah, I see! thanks for the update!
<NL3limin4t0r>
But it works just fine with #map as well, however you shouldn't use the output of it since you're using Array#<< which is a mutating method.
<NL3limin4t0r>
Since you've updated `monthly_doc_count_for_topic` you don't have to reasign to a variable.
<NL3limin4t0r>
hope I don't make it too confusing
william1_ has joined #ruby
phaul has joined #ruby
<emilych>
your explanations are great! thanks again :)
bsdbandit-01 has joined #ruby
renich has quit [Ping timeout: 268 seconds]
bsdbandit-01 has quit [Remote host closed the connection]
mossplix has quit [Remote host closed the connection]
mossplix has joined #ruby
ellcs has joined #ruby
bsdbandit-01 has quit [Remote host closed the connection]
bsdbandit-01 has joined #ruby
phaul has joined #ruby
phaul has quit [Client Quit]
Jonopoly has quit [Ping timeout: 240 seconds]
chalkmonster has joined #ruby
mossplix has quit [Remote host closed the connection]
DTZUZO has joined #ruby
mossplix has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.7]
chalkmonster has joined #ruby
chalkmonster has quit [Remote host closed the connection]
chalkmonster has joined #ruby
conta has joined #ruby
turbo_choo has quit [Ping timeout: 240 seconds]
mossplix has quit [Remote host closed the connection]
TCZ has joined #ruby
turbo_choo has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.7]
troulouliou_div2 has joined #ruby
greengriminal has joined #ruby
turbo_choo has quit [Ping timeout: 258 seconds]
turbo_choo has joined #ruby
donofrio has joined #ruby
mkaito_ is now known as mkaito
mkaito has joined #ruby
mkaito has quit [Changing host]
donofrio has quit [Remote host closed the connection]
Jonopoly has joined #ruby
donofrio has joined #ruby
akemhp has joined #ruby
<emilych>
Hi, I'd like to extract the date from a string using gsub: "2019-01-01: foobar".gsub(/\d{4}-\d{2}-\d{2}/) but it returns: => #<Enumerator: "2019-01-01: 0":gsub(/\d{4}-\d{2}-\d{2}/)>I was expecting "2019-01-01". Why is it so?
<guzzlefry>
emilych: It returns an enumerator unless you pass it a second argument or a code block. Don't ask me why. :)
<emilych>
ah, ok! When I puts "2019-01-01: 0".gsub(/\d{4}-\d{2}-\d{2}/, '') it returns : 0
<emilych>
what can i do to get "2019-01-01" as return value?
<guzzlefry>
emilych: This seems to work, although you might want to do the usual safety checks: "2019-01-01: foobar".match(/\d{4}-\d{2}-\d{2}/)[0]
mossplix has quit [Read error: Connection reset by peer]
mossplix has joined #ruby
<emilych>
great, thanks for the link!
cd has quit [Quit: cd]
<emilych>
oh, @ytti DateTime.parse is more elegant, thanks!
greengriminal has quit [Quit: Leaving]
DaRock has quit [Ping timeout: 260 seconds]
emilych has quit [Remote host closed the connection]
alex`` has joined #ruby
emilych has joined #ruby
<emilych>
Is it possible to remove an element in array by its value? for example %w[ foo bar baz].shift("bar") #shift expects an index in integer format but is there an alternative?
<emilych>
ah, found #delete
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
AJA4350 has joined #ruby
mossplix has quit [Remote host closed the connection]
chalkmonster has joined #ruby
mossplix has joined #ruby
bsdband46 has joined #ruby
<guzzlefry>
Anyone here using RubyMine? Completion seems lacking and I'm wondering if it's just a misconfiguration issue.
bsdbandit-01 has quit [Ping timeout: 268 seconds]
bsdbandit-01 has joined #ruby
bsdband5 has joined #ruby
phaul has joined #ruby
bsdband46 has quit [Ping timeout: 248 seconds]
bsdbandit-01 has quit [Ping timeout: 265 seconds]
<NL3limin4t0r>
guzzlefry: What do you mean with "completion seems lacking"? Doesn't it work at all? Don't you see all all posible options?
<guzzlefry>
NL3limin4t0r: It doesn't seem to realize that match returns MatchSet or `nil` given this: foobar".match(/\d{4}-\d{2}-\d{2}/)
<guzzlefry>
oof, Programming Ruby seems to be leaving out details. :P
<guzzlefry>
I'm guessing Ruby is doing some sort of pattern matching for the variables passed to the block? [["for", 2], ["word", 2], ["use", 2], ["the", 3], ["a", 6]].each { |word, count| puts "#{word}: #{count}"}
suukim has quit [Quit: Konversation terminated!]
voker57_ has quit [Quit: voker57_]
voker57 has joined #ruby
bsdband95 has joined #ruby
alexherbo2 has joined #ruby
mossplix has quit [Remote host closed the connection]
<NL3limin4t0r>
guzzlefry: for that last part of your code, there is no pattern matching involved. as soon as you put a comma in the block parameters and the only thing passed to the block is an array it applies implicit array decomposition
<emilych>
I want to transform given = [ "2019-01-01", "2019-02-01", "2019-02-01: 186904", "2019-03-01", "2019-03-01: 196961", "2019-04-01", "foo"]# remove date-string-element without a colon if a "twin" date-string-element with colong exists:goal = [ "2019-01-01", "2019-02-01: 186904", "2019-03-01: 196961", "2019-04-01", "foo"]
<rubydoc>
stderr: -e:4:in `<main>': undefined local variable or method `given' for main:Object (NameError)... check link for more (https://carc.in/#/r/8d48)
<havenwood>
oh, right - I need coffee.
<havenwood>
emilych: It satisfies the goal for the case you laid out, but not sure if the lack of checking colons is problematic.
<emilych>
awesome, thank you very much!!!
<havenwood>
emilych: you're welcome!
<havenwood>
NEETzsche: I'm curious to see the code triggering the deprecation warning.
<emilych>
havenwood do I understand it correct, that you filtering by size of the string?
<emilych>
that's totally fine
<havenwood>
emilych: Yup. I'm grouping by the first 10 characters, so dates stay together. Then from the ones that match the date regexp, taking the longest one, presuming it's the date with the colon and stuff.
cow[moo] has quit [Ping timeout: 268 seconds]
anveo has joined #ruby
bsdband95 has quit [Remote host closed the connection]
<emilych>
cool, that's exactly what I needed! thanks again!
andikr has quit [Remote host closed the connection]
Swyper has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alex`` has quit [Quit: WeeChat 2.7]
alexherbo2 has quit [Remote host closed the connection]
<NEETzsche>
havenwood: I can't post the exact code because it's proprietary but I can share something that functions similarly
<anatolik>
It says 'ArgumentError (wrong number of arguments (given 3, expected 1..2))' but the callee has exactly 3 arguments. What is wrong with the code?
ellcs has quit [Ping timeout: 260 seconds]
chalkmonster has joined #ruby
Mawhrin-Skel has joined #ruby
RiPuk_ has quit [Ping timeout: 240 seconds]
RiPuk has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.7]
phaul has quit [Ping timeout: 265 seconds]
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
fphilipe has quit [Ping timeout: 265 seconds]
RiPuk has quit [Ping timeout: 240 seconds]
RiPuk has joined #ruby
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
<adam12>
anatolik: Did it ever work? The issue is that the splat (*args) is more than 1 argument if the array contains more than 1 element.
<adam12>
anatolik: Nothing changed in that regard from 2.6 to 2.7, at least that I can tell.
<havenwood>
anatolik: A single arg in `*arg` would happen to work.
<rubydoc>
stderr: -e:4:in `foo': wrong number of arguments (given 3, expected 0..1) (ArgumentError)... check link for more (https://carc.in/#/r/8d6e)
<havenwood>
anatolik: Like adam12 says, I'd have expected: *realms
<havenwood>
anatolik: Or `arg` instead of `args`.
<havenwood>
*args
<adam12>
anatolik: I'd probably go up the tree a bit to find out where the Rack::OAuth2 middleware is being used, and see what it looks like. Something like `use Rack2::OAuth2, someargs`.
<adam12>
s/tree/stack. I'm in tree mode over here apparently.
<havenwood>
Climb the tree!
chalkmonster has joined #ruby
<adam12>
O_O
greenhat has joined #ruby
jaequery has joined #ruby
drincruz_ has joined #ruby
drincruz has quit [Read error: Connection reset by peer]
drincruz has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
drincruz_ has quit [Ping timeout: 268 seconds]
<adam12>
use Rack::OAuth2::Server::Resource::Bearer, 'The API' do |request|
<adam12>
Single arg :\ Must be something else somewhere else that's mutating args.
burningserenity has joined #ruby
davispuh has joined #ruby
akemhp has joined #ruby
phaul has joined #ruby
<anatolik>
Is there any way to get a more descriptive stack pointing where exactly the problem occures? I can modify the rails app if needed.
drincruz_ has joined #ruby
duderonomy has quit [Ping timeout: 258 seconds]
drincruz has quit [Ping timeout: 258 seconds]
phaul has quit [Ping timeout: 260 seconds]
davidw has joined #ruby
duderonomy has joined #ruby
Ven`` has joined #ruby
<adam12>
anatolik: A few different methods. Are you familiar with byebug or pry at all? And are either of them dependencies in Gitlab (check Gemfile)
<havenwood>
+1 pry-byebug
<havenwood>
?pry
<adam12>
anatolik: You'd probably have to modify the rack-oauth2 dependency, find the `initialize` method, change it to accept multiple args. Then see what you're being passed. I'd probably start there, to get an idea if it's something stupid.
<adam12>
havenwood: No ruby bot :O
nowhere_man has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.7]
anveo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gix has joined #ruby
Synthead has joined #ruby
<Synthead>
Hey all, I'm looking to upgrade a gem because it doesn't build (grpc 1.19.0 on glib 2.30). It's a dependency to some other gems, and I'm trying to find what's pinning it at 1.19.0. Is there a way to check the gem dependency versions of other gems to figure this out?
<havenwood>
Synthead: Can you tell from the Gemfile.lock?
vampirehunter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood>
Synthead: I guess I should back up. Are you using Bundler with a Gemfile?
<havenwood>
Synthead: Show the command you're running and error output?
<Synthead>
there are two issues mentioned in the PR body that describes the issue
<Synthead>
Basically, glibc provides its own gettid, which causes issues with grpc 1.19.0's own gettid
alex`` has joined #ruby
alexherbo2 has joined #ruby
<erikh>
is grpc a pain in ruby?
<erikh>
I'm doing some stuff around it in golang, but with the intention of helping others use it in other languages; wondering how it plays out
<erikh>
(an API gateway you could use ruby to talk to)
sauvin has quit [Ping timeout: 265 seconds]
<erikh>
is writing/generating a grpc client for a given set of protos a big pain in the rear?
<havenwood>
erikh: It certainly works in Ruby. With large organization, GRPC protos sprawl, get weird, and then nobody maintains the C-extensions. :P
<erikh>
ha
<erikh>
strange that it doesn't build against a specific glibc though
<erikh>
that locks it out of a lot of OSes and there usually isn't a good reason for it
<erikh>
maybe the author needed strfry()
TCZ has joined #ruby
<erikh>
Synthead: to answer your question -- unless rubygems has changed dramatically in the last few years -- you will have to run the mkmf.rb extensions for all the gems you bundle
<erikh>
to test this linking
<Synthead>
it was just a coincidence that glibc provided its own gettid, which broke stuff with grpc
<erikh>
ohhhhh
<erikh>
wait waht
<Synthead>
erikh: that's no problem
<erikh>
ok I'm going to just look past the fact there's a function called gettid in grpc at all
<erikh>
oy
<erikh>
I really doubt you will see this problem in other libs
<erikh>
The gettid() system call first appeared on Linux in kernel 2.4.11. Library support was added in glibc 2.30.
<erikh>
what version of linux are you on? are you comfortable answering that? gotta be at least RHEL5
<erikh>
you may have other issues coming.
<erikh>
ok I can't spend too much time on this, but good luck with your upgrade
SeepingN has joined #ruby
<Synthead>
I'm on glibc 2.30 :)
<Synthead>
arch linux
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jaequery has quit [Remote host closed the connection]
<adam12>
erikh: My issue with grpc is probably because I run on FreeBSD and it often has a lot of Linux'isms in it. That said, I find Twirp from the Twitch folks very nice to work with if Ruby+Go is your stack.
<adam12>
(grpc has the linuxisms, not Fbsd :)
<erikh>
yeah, grpc probably has a ton of linux-isms in the server
fphilipe has joined #ruby
skryking has joined #ruby
<erikh>
wait what
<erikh>
sigh
cthu| has quit [Ping timeout: 258 seconds]
fphilipe has quit [Ping timeout: 240 seconds]
ellcs has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
suukim has quit [Quit: Konversation terminated!]
troulouliou_div2 has joined #ruby
chalkmonster has joined #ruby
vampirehunter has joined #ruby
dionysus69 has quit [Ping timeout: 268 seconds]
bruce_lee has quit [Ping timeout: 265 seconds]
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
bruce_lee has joined #ruby
jaequery has joined #ruby
vampirehunter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<anatolik>
wrt my previous message. I see somewhat suspicious warning:
<anatolik>
/usr/share/webapps/gitlab/vendor/bundle/ruby/2.7.0/gems/rack-2.0.7/lib/rack/builder.rb:89: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
<anatolik>
/usr/share/webapps/gitlab/vendor/bundle/ruby/2.7.0/gems/grape-1.1.0/lib/grape/middleware/base.rb:13: warning: The called method `initialize' is defined here
<adam12>
anatolik: It's possible. Maybe try changing **options to `options = {}`? Not sure if that will work but changes it back to single argument.
turbo_choo has quit [Ping timeout: 258 seconds]
turbo_choo has joined #ruby
vampirehunter has joined #ruby
<jidar>
Does anybody know about `Content-Type: application/octet-stream` when using File.open in Net::HTTP::Post? I think that may be causing my http post to fail against a jenkins server. I'm attempting to write a POST method to validate jenkinsfile and I can get it to work with curl, but the http 200 response I get back when using ruby is `No Jenkinsfile specified`
<adam12>
anatolik: Interesting :) out of curiosity, what happens if you use parens when calling use? use(Rack::OAuth2::Server::Resource::Bearer, "The API") do |request|
donofrio has quit [Remote host closed the connection]
Synthead has quit [Client Quit]
<anatolik>
restarting service right now.... it takes ages
<anatolik>
interesting enouth all other caller's args is just a single hash like
<adam12>
anatolik: if you can get a debugger to fire in the initialize method (binding.irb, binding.pry, byebug), maybe you can get a copy of the stack and determine what's calling it with that argument? Something has to be globbing the proc into that array.
jaequery has quit [Ping timeout: 240 seconds]
duderonomy has joined #ruby
<anatolik>
I honestly total noob in this stuff. I'll check with gitlab folks, maybe they can debug the issue
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
NODE has quit [Remote host closed the connection]
<jack6>
Is it possible to mix ruby code into HTML, juste like PHP ??
<jack6>
By using a apache module, such as mod_ruby
yokel has quit [Ping timeout: 240 seconds]
NODE has joined #ruby
Fusl has quit [Max SendQ exceeded]
yokel has joined #ruby
Fusl has joined #ruby
alexherbo20 has joined #ruby
<adam12>
jack6: mod_ruby hasn't been recommended for a long time. It had thread safety issues last time I looked.
alex`` has quit [Ping timeout: 240 seconds]
<adam12>
jack6: That's not to say you can't use Ruby with Apache, but you have to go further back in time than mod_php started, and get back to mod_cgi (the glorious 1990's)
sameerynho has joined #ruby
alexherbo2 has quit [Ping timeout: 268 seconds]
alexherbo20 is now known as alexherbo2
<adam12>
jack6: Ruby ships with a reasonably nice cgi library in stdlib, so you could get going immediately without any dependencies by just making a cgi-bin/your-ruby-script.rb and requiring "cgi".
Mia has quit [Read error: Connection reset by peer]
<adam12>
jack6: The Rack library also includes a CGI handler, but CGI can be sometimes a bit quirky. Sometimes you need to do creative work-arounds which can be kind of a drag.
alex`` has joined #ruby
<adam12>
jack6: I created a simple URL shortener with only a Rack dependency which runs as a CGI script. It's here: https://github.com/adam12/shorturl
<leftylink>
you cannot achieve the same effect with tranfsorm_values! so please do not try that.
<leftylink>
&>> a = []; h = {a => 5}; a << 1; h.transform_values!(&:itself); [h[a], h[[]], h[[1]], h[h.keys[0]]]
<rubydoc>
stderr: -e:4:in `transform_values!': can't add a new key into hash during iteration (RuntimeError)... check link for more (https://carc.in/#/r/8d7h)
<leftylink>
merge!({}) will also not save you, but {}.merge(h) will.
<leftylink>
assuming you assign that result back to h
<leftylink>
and se wee that a set also has the same
<leftylink>
it is sort of punny
<erikh>
because sets are hashes
<leftylink>
they're both re- plus the class name, and both are valid english words even after that prefix has been added
<leftylink>
whereas obviously there is no such thing as, you know, reinteger or reobject
<leftylink>
&ri Integer#reinteger
<rubydoc>
Found no entry that matches class Integer instance method reinteger
<leftylink>
of course not
<erikh>
*facepalm*
erikh has left #ruby ["WeeChat 2.7"]
<leftylink>
I am very glad to have discovered this great news today
bambanx has joined #ruby
jnoon has joined #ruby
<leftylink>
in general I would expect anything creating a new hash to rehash the keys. so h = h.dup would also do so
vampirehunter has joined #ruby
craz has joined #ruby
Ai9zO5AP has quit [Quit: WeeChat 2.5]
<craz>
Hi beginner question here again: I have these two files: https://pastebin.com/GwZCsgQP everything is working fine, and my /api/v1/.. endpoints are working. My question is how I can put all code in base.rb instead of including defaults.rb. If I just yank the code and put it in base.rb instead of the include, my endpoints stop working
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood>
craz: Do a `require_relative 'base'` in defaults.rb.
<havenwood>
craz: By convention, the path structure should match the class namespace.
<havenwood>
craz: API::Base should be in lib/api/base.rb
<havenwood>
craz: Which is in the same directory as API::Defaults, which is: lib/api/defaults.rb
<havenwood>
craz: If you setup $LOAD_PATH, like you would for a gem, you can just: require 'api/base'
<havenwood>
craz: Alternatively, you can require it locally, and it's in the same directory so no path change: require_relative 'base'
bvdw has quit [Read error: Connection reset by peer]
hays has joined #ruby
hays has quit [Changing host]
hays has joined #ruby
<Scriptonaut>
hey all, I have ruby 2.3.0 installed and managed by rbenv. When I try to install bundler I get: bundler requires RubyGems version >= 2.5.2. Try 'gem update --system' to update RubyGems itself.
<Scriptonaut>
I have another machine with the same environment and don't have this issue
<Scriptonaut>
I can get passed it if I pass a --force flag, but then things break down later
bvdw has joined #ruby
<Scriptonaut>
this is how that ruby version shipped, any idea what's going on?
<havenwood>
Scriptonaut: First, Ruby 2.3 is past EoL and receives no security patches.
<Scriptonaut>
I'm using a ruby gem that doesn't support anything past that