havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.6.4, 2.5.6, 2.7.0-preview1: 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!
r3m_ has quit [Quit: WeeChat 2.6-dev]
fphilipe has joined #ruby
r3m has joined #ruby
psilly0 has quit [Quit: psilly0]
rsenic_ has quit [Remote host closed the connection]
rsenic_ has joined #ruby
fphilipe has quit [Ping timeout: 258 seconds]
skryking has quit [Ping timeout: 258 seconds]
fredolinhares has joined #ruby
skryking has joined #ruby
absolutejam1 has quit [Ping timeout: 258 seconds]
bmurt has quit [Ping timeout: 244 seconds]
hutch has joined #ruby
davor_ has joined #ruby
davor has quit [Ping timeout: 245 seconds]
davor_ is now known as davor
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AJA4351 has joined #ruby
gell5 has joined #ruby
AJA4350 has quit [Ping timeout: 258 seconds]
AJA4351 is now known as AJA4350
imtravis has quit [Read error: Connection reset by peer]
ur5us has quit []
GodFather has quit [Ping timeout: 258 seconds]
wildtrees has quit [Quit: Leaving]
ur5us has joined #ruby
gell5 has quit [Remote host closed the connection]
evdubs has quit [Quit: Leaving]
akosednar has quit [Ping timeout: 245 seconds]
ur5us has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
evdubs has joined #ruby
brool has joined #ruby
ramfjord has quit [Ping timeout: 245 seconds]
akosednar has joined #ruby
akosednar has quit [Changing host]
akosednar has joined #ruby
bruce_lee has quit [Ping timeout: 258 seconds]
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
bruce_lee has joined #ruby
SeepingN_ has quit [Ping timeout: 245 seconds]
jenrzzz_ has quit [Ping timeout: 245 seconds]
gell5 has joined #ruby
bitwinery has joined #ruby
gix has quit [Ping timeout: 245 seconds]
dasher00 has quit [Ping timeout: 244 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
crankharder has joined #ruby
elphe has joined #ruby
AJA4350 has quit [Quit: AJA4350]
ur5us has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
jenrzzz has joined #ruby
john2496 has quit [Remote host closed the connection]
cd has quit [Quit: cd]
john2496 has joined #ruby
fphilipe has joined #ruby
fphilipe has quit [Ping timeout: 264 seconds]
Swyper has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
Nicmavr has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
ur5us has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
ur5us has quit [Remote host closed the connection]
fredolinhares has quit [Quit: WeeChat 1.9.1]
DTZUZO has quit [Ping timeout: 246 seconds]
bambanx has quit [Ping timeout: 245 seconds]
NightMonkey has quit [Quit: ZNC - http://znc.in]
NightMonkey has joined #ruby
bambanx has joined #ruby
crankharder has quit [Ping timeout: 264 seconds]
gell5 has quit [Remote host closed the connection]
john2496 has quit [Remote host closed the connection]
ur5us has joined #ruby
polishdub has joined #ruby
emptyflask has joined #ruby
brool has quit [Ping timeout: 276 seconds]
duderonomy has joined #ruby
td123 has quit [Ping timeout: 244 seconds]
td123 has joined #ruby
michael_mbp has quit [Ping timeout: 246 seconds]
Swyper has quit [Remote host closed the connection]
michael_mbp has joined #ruby
crankharder has joined #ruby
gell5 has joined #ruby
ap4y has joined #ruby
gell5 has quit [Ping timeout: 245 seconds]
ap4y has quit [Quit: ERC (IRC client for Emacs 27.0.50)]
DTZUZO has joined #ruby
ap4y has joined #ruby
bambanx has quit [Quit: Leaving]
ap4y has quit [Remote host closed the connection]
ap4y has joined #ruby
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
cyclonis has joined #ruby
cyclonis_ has joined #ruby
fphilipe has joined #ruby
cyclonis has quit [Ping timeout: 264 seconds]
mr_rich101 has quit [Quit: ZNC - http://znc.in]
fphilipe has quit [Ping timeout: 264 seconds]
mr_rich101 has joined #ruby
jenrzzz has joined #ruby
crankharder has quit [Ping timeout: 246 seconds]
ap4y has quit [Remote host closed the connection]
tsujp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gell5 has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
gell5 has quit [Ping timeout: 258 seconds]
elphe has quit [Quit: leaving]
ap4y has joined #ruby
dinfuehr has quit [Ping timeout: 258 seconds]
dinfuehr has joined #ruby
greypack has quit [Ping timeout: 264 seconds]
hutch has quit [Ping timeout: 252 seconds]
greypack has joined #ruby
Mr-0dday_ has joined #ruby
polishdub has quit [Quit: leaving]
gell5 has joined #ruby
Mr-0dday_ has quit [Read error: Connection reset by peer]
gell5 has quit [Ping timeout: 244 seconds]
tsujp has joined #ruby
dellavg has joined #ruby
jenrzzz has joined #ruby
ramfjord has joined #ruby
ramfjord has quit [Ping timeout: 258 seconds]
openCircuit__ has joined #ruby
Inline has quit [Quit: Leaving]
schaerli has joined #ruby
ap4y has quit [Ping timeout: 245 seconds]
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
schaerli has quit [Ping timeout: 245 seconds]
ropeney_ has joined #ruby
ropeney has quit [Ping timeout: 245 seconds]
ur5us has quit [Ping timeout: 244 seconds]
dionysus69 has joined #ruby
chalkmonster has joined #ruby
schaerli has joined #ruby
DTZUZO has quit [Ping timeout: 245 seconds]
DTZUZO has joined #ruby
DTZUZO has quit [Ping timeout: 258 seconds]
dbugger has joined #ruby
sauvin has joined #ruby
schne1der has joined #ruby
shtirlic has quit [Read error: Connection reset by peer]
emptyflask has quit [Ping timeout: 246 seconds]
howdoi has joined #ruby
neha has joined #ruby
neha has left #ruby [#ruby]
shtirlic has joined #ruby
absolutejam1 has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
MrCrackPot has quit [Remote host closed the connection]
jenrzzz has joined #ruby
MrCrackPot has joined #ruby
neha has joined #ruby
LtHummus has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 245 seconds]
LtHummus has joined #ruby
schne1der has quit [Ping timeout: 245 seconds]
fphilipe has joined #ruby
lxsameer has joined #ruby
voolik has joined #ruby
Bish has quit [Ping timeout: 268 seconds]
gell5 has joined #ruby
andikr has joined #ruby
TomyWork has joined #ruby
Bish has joined #ruby
gell5 has quit [Ping timeout: 244 seconds]
Mayur16 has joined #ruby
zapata_ has joined #ruby
zapata has quit [Ping timeout: 264 seconds]
SCHAPiE has quit [Quit: ZNC - https://znc.in]
suukim has joined #ruby
ramfjord has joined #ruby
SCHAPiE has joined #ruby
ramfjord has quit [Ping timeout: 258 seconds]
cyclonis_ has quit [Ping timeout: 244 seconds]
dionysus69 has quit [Quit: dionysus69]
voolik has quit [Ping timeout: 258 seconds]
dionysus69 has joined #ruby
_joes_ has joined #ruby
neha has left #ruby [#ruby]
ellcs has joined #ruby
absolutejam1 has quit [Ping timeout: 264 seconds]
gell5 has joined #ruby
CalimeroTeknik has quit [Ping timeout: 268 seconds]
gell5 has quit [Ping timeout: 245 seconds]
CalimeroTeknik has joined #ruby
crankharder has joined #ruby
schne1der has joined #ruby
ellcs has quit [Ping timeout: 245 seconds]
duderonomy has quit [Ping timeout: 258 seconds]
jmcgnh has quit [Ping timeout: 245 seconds]
voolik has joined #ruby
mikecmpbll has joined #ruby
_joes_ has quit [Quit: _joes_]
_joes_ has joined #ruby
gell5 has joined #ruby
crankharder has quit [Ping timeout: 245 seconds]
gell5 has quit [Ping timeout: 258 seconds]
edwardly has quit [Ping timeout: 258 seconds]
edwardly has joined #ruby
edwardly has quit [Changing host]
edwardly has joined #ruby
absolutejam1 has joined #ruby
dasher00 has joined #ruby
deathwishdave has joined #ruby
absolutejam1 has quit [Ping timeout: 258 seconds]
deathwishdave has quit [Ping timeout: 245 seconds]
Mayur16 has quit [Quit: Ping timeout (120 seconds)]
absolutejam1 has joined #ruby
ur5us has joined #ruby
NL3limin4t0r_afk is now known as NL3limin4t0r
Intelo has joined #ruby
andikr has quit [Ping timeout: 246 seconds]
andikr has joined #ruby
Huck777 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mr_rich101 has quit [Quit: ZNC - http://znc.in]
mr_rich101 has joined #ruby
renich_ has joined #ruby
skryking has quit [Ping timeout: 244 seconds]
skryking has joined #ruby
renich has quit [Ping timeout: 264 seconds]
renich_ is now known as renich
absolutejam1 has quit [Ping timeout: 276 seconds]
rsenic_ has quit [Remote host closed the connection]
absolutejam1 has joined #ruby
elphe has joined #ruby
_joes_ has quit [Ping timeout: 244 seconds]
voolik has quit [Ping timeout: 245 seconds]
banisterfiend has joined #ruby
shwouchk has quit [Quit: Connection closed for inactivity]
tsujp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
haivron has joined #ruby
andikr has quit [Remote host closed the connection]
involans has joined #ruby
gell5 has joined #ruby
fphilipe has quit [Ping timeout: 245 seconds]
ur5us has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bitwinery has quit [Quit: Leaving]
banisterfiend has joined #ruby
jenrzzz has joined #ruby
gell5 has quit [Ping timeout: 258 seconds]
jenrzzz has quit [Ping timeout: 245 seconds]
queip has quit [Ping timeout: 245 seconds]
queip has joined #ruby
<Intelo> db migration help: https://paste.ubuntu.com/p/fgv82yG4zF/
<Intelo> havenwood, ^
<chalkmonster> Intelo: looks like you already ran the migration
<chalkmonster> try rollback and re-apply?
<Intelo> not showing table in database
<Intelo> chalkmonster, ArgumentError: No indexes found on cint_users with the options provided.
JasonO has quit [Ping timeout: 268 seconds]
<Intelo> chalkmonster, PG::UndefinedTable: ERROR: table "cint_users" does not exist
<chalkmonster> Intelo: did you change the migration after running it
<chalkmonster> or something like that
<Intelo> no
<chalkmonster> empty the def change ... end method; db:rollback; apply again.
<chalkmonster> most likely you accidentally ran the migration before filling it in
<Intelo> what will db:rollback do?
<chalkmonster> roll the migration back
<chalkmonster> unapply it
JasonO has joined #ruby
JasonO has quit [Changing host]
JasonO has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.5]
absolutejam1 has quit [Ping timeout: 245 seconds]
absolutejam1 has joined #ruby
openCircuit__ has quit [Ping timeout: 245 seconds]
edwardly has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
nius has quit [Quit: Ping timeout (120 seconds)]
d^sh has quit [Ping timeout: 245 seconds]
edwardly has joined #ruby
edwardly has joined #ruby
nius has joined #ruby
crankharder has joined #ruby
d^sh has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
ur5us has quit [Remote host closed the connection]
<Intelo> works
ur5us has joined #ruby
chalkmonster has joined #ruby
ur5us has quit [Ping timeout: 244 seconds]
<Intelo> how to make it unique column values
AJA4350 has joined #ruby
tsujp has joined #ruby
tsujp has quit [Client Quit]
tsujp has joined #ruby
Tobbi_ has quit [Quit: Tobbi_]
queip has quit [Ping timeout: 258 seconds]
queip has joined #ruby
akem-hp has quit [Read error: Connection reset by peer]
tsujp has quit [Read error: Connection reset by peer]
akem-hp_ has joined #ruby
VladGh has quit [Read error: Connection reset by peer]
tsujp has joined #ruby
VladGh has joined #ruby
jenrzzz has joined #ruby
kent\n has quit [Ping timeout: 246 seconds]
fphilipe has joined #ruby
andikr has joined #ruby
bmurt has joined #ruby
bmurt has quit [Client Quit]
<Intelo> is this correct? if(params[:is_some]==true)
banisterfiend has quit [Quit: Textual IRC Client: www.textualapp.com]
banisterfiend has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
<leftylink> what was that saying again
<Intelo> leftylink, I want to check if a param has true value or not
<Intelo> rails
<leftylink> somethng about "if the expected behaviour is not specified, not only can a proposed solution not be correct, it also cannot be incorrect"
<Intelo> leftylink, what?
kent\n has joined #ruby
<leftylink> I want to know whether anyone knows where that saying comes from, I seem to have a hard time finding it... I paraphrased it of course, but hoping the general idea rings a bell for someone...?
<leftylink> it should be noted that even though `-> x { x == true }` is the identity function for booleans (therefore one might as well write `->x{x}` instead), that statement is only true if we think the function will only ever take booleans. if I desired differing behaviour based on whether the value was specifically `true` versus any other truthy value, then we would have to reconsider.
tdy has quit [Ping timeout: 245 seconds]
fphilipe has quit [Read error: Connection reset by peer]
fphilipe has joined #ruby
<leftylink> s/would have to reconsider/wouldn't be able to assume `(== true)` is the identity function/
jenrzzz has quit [Ping timeout: 258 seconds]
bmurt has joined #ruby
absolutejam1 has quit [Read error: Connection reset by peer]
AJA4350 has quit [Ping timeout: 258 seconds]
<chalkmonster> Intelo: how to make what unique? You can specify unique: true, in your migrations. Also specify an index on the same column.
<chalkmonster> Intelo: also, params[:is_some] should be unset if you've done your form right. `do_something () if params[:is_some]`
<chalkmonster> is what you're looking for
gell5 has joined #ruby
absolutejam1 has joined #ruby
gell5 has quit [Ping timeout: 245 seconds]
andikr has quit [Remote host closed the connection]
jcalla has quit [Ping timeout: 258 seconds]
<Intelo> thanks
<ytti> leftylink, sounds remotely like - https://en.wikipedia.org/wiki/Not_even_wrong
<Intelo> chalkmonster, is this correct syntax? t.timestamps -> { 'now()' }
banisterfiend has joined #ruby
AJA4350 has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
<chalkmonster> Intelo: look, you're going to have to provide more context with all your questions
<chalkmonster> Intelo: 1. What are you trying to achieve 2. What have you tried 3. What happened when you tried said thing
<Intelo> hm..
jenrzzz has joined #ruby
suukim has quit [Quit: Konversation terminated!]
chris20237 has joined #ruby
cd has joined #ruby
chris20237 has quit [Client Quit]
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
lucasb has joined #ruby
gell5 has joined #ruby
paddy has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
elphe has quit [Quit: leaving]
<paddy> hello, i installed ruby 2.6.4 into my $HOME and i cant "gem install bundler" -- cannot load such file -- zlib
<paddy> i tried several search results but they are all 5-6 years old and dont fix the problem
Nicmavr has joined #ruby
gell5 has quit [Ping timeout: 244 seconds]
grilix has joined #ruby
d^sh has quit [Ping timeout: 245 seconds]
d^sh has joined #ruby
jmcgnh has joined #ruby
<NL3limin4t0r> paddy: Checkout this SO question: https://stackoverflow.com/q/9727908/3982562
crankharder has quit [Ping timeout: 258 seconds]
<paddy> NL3limin4t0r: this is a good link! i am trying a similar one and rvm is doing something
<NL3limin4t0r> The question might be 7 years old, but have you check if the "zlib1g-dev" or "zlib-devel" package is installed on your system?
<paddy> there is no "zlib" anything on my fedora 30
jenrzzz has quit [Ping timeout: 245 seconds]
<NL3limin4t0r> If you haven't already, first update your package list `[sudo] dnf check-update`. Then run `dnf search zlib` and see what comes back.
pep7 has quit [Remote host closed the connection]
voolik has joined #ruby
fphilipe has quit [Read error: Connection reset by peer]
Huck777 has joined #ruby
GodFather has joined #ruby
schne1der has quit [Ping timeout: 246 seconds]
voolik has quit [Quit: Leaving]
hutch has joined #ruby
td123 has quit [Ping timeout: 252 seconds]
poontangmessiah_ has quit [Remote host closed the connection]
jcalla has joined #ruby
crankharder has joined #ruby
<NL3limin4t0r> paddy: Anything with "zlib" as a result of the above?
jenrzzz has joined #ruby
queip has quit [Ping timeout: 250 seconds]
fphilipe has joined #ruby
schaerli has quit [Ping timeout: 244 seconds]
john2496 has joined #ruby
<paddy> NL3limin4t0r: no, but the tip to install rvm worked and jekyll is ready now :)
<paddy> only problem is now that i did the install as root :(
involans has quit [Quit: involans]
queip has joined #ruby
<NL3limin4t0r> You can remove rvm by running `rvm implode` then reinstall it as normal user.
<paddy> heh, implode. i feel like that
john2496 has quit [Remote host closed the connection]
banisterfiend has joined #ruby
<NL3limin4t0r> yeah, I know the feeling
banister_ has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
jinie has quit [Ping timeout: 245 seconds]
jinie has joined #ruby
DTZUZO has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
crankharder has quit [Ping timeout: 244 seconds]
absolutejam1 has quit [Ping timeout: 276 seconds]
greengriminal has joined #ruby
schaerli has joined #ruby
fphilipe has quit [Read error: Connection reset by peer]
fphilipe has joined #ruby
<Intelo> I have 2 arrays having objects in them. array A and B. I want to insert one object of B into A but after every 2 objects of A. e.g A[a,b,c,d,e,f] B[1,2,3,4,5] C[1,a,b,2,c,d,3,e,f,4,5]. How to do it?
<havenwood> Intelo: B.zip(A).flatten
<Intelo> what.. whats that!
<havenwood> Intelo: zip 'n flatten
absolutejam1 has joined #ruby
<Intelo> really nice
<Intelo> but how to make interval of 2
<havenwood> Intelo: ohhh, i didn't see that
<havenwood> Intelo: each_slice(2)
<Intelo> also, I am getting B from an api call and its in json. Do I need to do anything?
<havenwood> Intelo: JSON.parse it
<Intelo> so B.zip(A).flatten.each_slice(2)?
SeepingN has joined #ruby
<havenwood> Intelo: B.zip(A.each_slice(2)).flatten
<Intelo> havenwood, super! ruby is nice
<havenwood> Intelo: Indeed!
<Intelo> I forgot, do you do python too?
<Intelo> Is python similarly nice like that?
renich has quit [Quit: renich]
john2496 has joined #ruby
<havenwood> Intelo: I did use Python more back in the days I wanted Twistd for WebSockets. There are great WebSockets libraries in Ruby now and I prefer Ruby. I'd most likely use Python these days for something related to math or graphics libraries.
renich has joined #ruby
<Intelo> havenwood, so the taste and ease and syntax and magic is same for python as for ruby? at least similar?
<havenwood> Intelo: Ask #python for a solution to the same problem and see which you prefer. :)
brool has joined #ruby
<SeepingN> python gets mad if you didn't indent your lines properly..
<Intelo> got ro run. brb havenwood I wanted your percpective as I know you
<havenwood> SeepingN: havenwood gets mad if you don't indent your Ruby lines properlu.
<Intelo> will catchup in an hour
Intelo has quit [Remote host closed the connection]
<SeepingN> well sure I do to, but at least it runs if it's "off"
<havenwood> hehe
schaerli has quit [Ping timeout: 245 seconds]
chalkmonster has quit [Quit: WeeChat 2.5]
nixy has joined #ruby
<SeepingN> python seems well suited to command line automation. I have a ruby script that does all sorts of things with an ssh tunneled device, but to make the final interactive shell connection, it calls a small python script
chalkmonster has joined #ruby
sagax has quit [Ping timeout: 245 seconds]
td123 has joined #ruby
jenrzzz has joined #ruby
emptyflask has joined #ruby
gell5 has joined #ruby
fphilipe has quit [Read error: Connection reset by peer]
ellcs1 has quit [Ping timeout: 245 seconds]
gell5 has quit [Ping timeout: 246 seconds]
ogres has joined #ruby
absolutejam1 has quit [Ping timeout: 264 seconds]
cthulchu_ has quit [Ping timeout: 246 seconds]
bmurt has quit [Ping timeout: 276 seconds]
banister_ has quit [Quit: Textual IRC Client: www.textualapp.com]
banisterfiend has joined #ruby
involans has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
Brian-W-Gray has quit [Quit: Give a man a phish, you might get his credentials. Teach a man to phish, he'll get someone elses.]
GodFather has quit [Ping timeout: 245 seconds]
vondruch has quit [Quit: vondruch]
openCircuit__ has joined #ruby
haivron has quit [Quit: haivron]
banisterfiend has quit [Read error: Connection reset by peer]
openCircuit__ has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
MrCrackPot has quit [Ping timeout: 264 seconds]
hutch has quit [Ping timeout: 250 seconds]
leitz has joined #ruby
schaerli has joined #ruby
edwardly has quit [Ping timeout: 258 seconds]
schne1der has joined #ruby
involans has quit [Quit: involans]
vondruch has joined #ruby
edwardly has joined #ruby
edwardly has quit [Changing host]
edwardly has joined #ruby
paddy has left #ruby ["Leaving"]
banisterfiend has joined #ruby
vondruch has quit [Remote host closed the connection]
cthulchu_ has joined #ruby
Inline has joined #ruby
wildtrees has joined #ruby
wildtrees has quit [Max SendQ exceeded]
wildtrees has joined #ruby
vondruch has joined #ruby
tsrt^ has quit []
DaRock has quit [Ping timeout: 264 seconds]
banisterfiend has quit [Read error: Connection reset by peer]
bnh^ has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
uranoss has quit [Quit: Connection closed for inactivity]
hutch has joined #ruby
psilly0 has joined #ruby
crankharder has joined #ruby
phaul has quit [Quit: :wq]
skryking has quit [Read error: Connection reset by peer]
ElFerna has joined #ruby
crankharder has quit [Ping timeout: 245 seconds]
phaul has joined #ruby
schaerli has quit [Ping timeout: 245 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
tdy has joined #ruby
banisterfiend has joined #ruby
john2496 has quit [Remote host closed the connection]
ElFerna has quit [Ping timeout: 258 seconds]
gell5 has joined #ruby
jenrzzz has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
banisterfiend has joined #ruby
gell5 has quit [Ping timeout: 258 seconds]
rippa has joined #ruby
gheegh has joined #ruby
<gheegh> so, i have a question guys.. i'm super confused.. I have a system that uses sidekiq. When I launch it.. i get 100% failure rate with a NoMethodError. The error comes from an old version of a gem. When i Rails console and run the same job with the same arguments, it doesn't have a problem (it uses the right version of the gem). Why would sidekiq not be using the same gems as rails?
dretnx has joined #ruby
<dretnx> join #rubyonrails
<dretnx> sorry
<phaul> ?crosspost
<ruby[bot]> Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
<phaul> I would try launching the system with bundle exec
john2496 has joined #ruby
marz_d`ghostman has joined #ruby
<marz_d`ghostman> How do I setup rvm to use specific ruby version for my project? Do I install it in the same directory?
<gheegh> sorry.. #ruby is my go to normally.. after i posted, i realized it was probably a rails question
ElFerna has joined #ruby
<gheegh> phaul i am using bundle exec
<gheegh> both for rails and for sidekiq
chalkmonster has quit [Ping timeout: 244 seconds]
<gheegh> it's a really strange thing.. i'm thoroughly confused.. i've spent several hours trying to figure out why my fixes weren't working, and realized it's still using an old version
duderonomy has joined #ruby
ElFerna has quit [Ping timeout: 246 seconds]
TomyWork has quit [Ping timeout: 246 seconds]
NL3limin4t0r is now known as NL3limin4t0r_afk
Exuma has joined #ruby
gix has joined #ruby
gell5 has joined #ruby
rsenic has joined #ruby
crankharder has joined #ruby
<gheegh> dang Tmux. I had closed some sessions wiht workers in them.. and it didn't kill the process.. that was why.
jenrzzz has quit [Ping timeout: 245 seconds]
Esa_ has joined #ruby
leitz has quit [Quit: Leaving]
gell5 has quit [Ping timeout: 258 seconds]
Exuma has quit [Quit: Textual IRC Client: www.textualapp.com]
dretnx has quit [Quit: Going offline, see ya! (www.adiirc.com)]
crankharder has quit [Ping timeout: 245 seconds]
jenrzzz has joined #ruby
dionysus69 has quit [Ping timeout: 258 seconds]
td123 has quit [Ping timeout: 244 seconds]
banisterfiend has quit [Read error: Connection reset by peer]
dionysus69 has joined #ruby
mahlon has quit [Quit: WeeChat 2.1]
ged has quit [Quit: WeeChat 2.2]
ramfjord has joined #ruby
greengriminal has quit [Quit: This computer has gone to sleep]
marz_d`ghostman has quit [Remote host closed the connection]
dionysus69 has quit [Read error: Connection reset by peer]
dionysus69 has joined #ruby
dionysus69 has quit [Client Quit]
dionysus69 has joined #ruby
otaznik[m] has joined #ruby
greengriminal has joined #ruby
sauvin has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
crankharder has joined #ruby
banisterfiend has quit [Ping timeout: 245 seconds]
KeyJoo has joined #ruby
crankharder has quit [Ping timeout: 245 seconds]
crankharder has joined #ruby
banisterfiend has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
ElFerna has joined #ruby
spacesuitdiver has joined #ruby
crankharder has quit [Ping timeout: 258 seconds]
john_ has joined #ruby
<john_> your all silly
<john_> silly billies
john_ has quit [Ping timeout: 245 seconds]
edwardly has quit [Ping timeout: 246 seconds]
ravenous_ has joined #ruby
jenrzzz has joined #ruby
crankharder has joined #ruby
peteretep has quit [Ping timeout: 244 seconds]
psilly0 has quit [Quit: psilly0]
mistym has quit [Ping timeout: 244 seconds]
mistym has joined #ruby
mistym has quit [Changing host]
mistym has joined #ruby
peteretep has joined #ruby
edwardly has joined #ruby
edwardly has quit [Changing host]
edwardly has joined #ruby
mikecmpbll has joined #ruby
absolutejam1 has joined #ruby
<leftylink> hmm. just learned of a new possibility in Ruby
<leftylink> &>> [a: 5, b: 3]
<rubydoc> # => [{:a=>5, :b=>3}] (https://carc.in/#/r/7hu8)
<leftylink> I'm not sure when I will ever use this
<leftylink> I'll think about it.
gell5 has joined #ruby
mozzarella has quit [Ping timeout: 246 seconds]
KeyJoo has quit [Ping timeout: 245 seconds]
ramfjord has quit [Ping timeout: 258 seconds]
ged has joined #ruby
gell5 has quit [Ping timeout: 246 seconds]
openCircuit__ has joined #ruby
psilly0 has joined #ruby
ogres has quit [Quit: Connection closed for inactivity]
GodFather has joined #ruby
ged has quit [Client Quit]
jenrzzz has quit [Ping timeout: 264 seconds]
queip has quit [Ping timeout: 245 seconds]
ged has joined #ruby
openCircuit__ has quit [Ping timeout: 258 seconds]
hiroaki has joined #ruby
krillbat has joined #ruby
<havenwood> leftylink: Some folk call that a "naked Hash."
<havenwood> &24>> def foo(bar); bar end; foo aim: true
<rubydoc> # => {:aim=>true} (https://carc.in/#/r/7hug)
crankharder has quit [Ping timeout: 264 seconds]
queip has joined #ruby
Freshnuts has joined #ruby
crankharder has joined #ruby
<leftylink> (regarding when a default arg is evaluated, and if a default arg is a function definition)
SCHAPiE has quit [Ping timeout: 245 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<phaul> &>> "2.6 works again #{RUBY_VERSION}, havenwood"
<rubydoc> # => "2.6 works again 2.6.0, havenwood" (https://carc.in/#/r/7huh)
<havenwood> phaul: Yay!
<phaul> yeah, thanks to jhass
ged has quit [Quit: WeeChat 2.2]
<havenwood> jhass: ty :)
jenrzzz has joined #ruby
dbugger has quit [Quit: Leaving]
<leftylink> oh no what the fuck... https://www.reddit.com/r/ruby/comments/2n987g/the_flip_flop_operator_in_ruby/cmbiwt8/ (fizzbuzz with flip-flops)
<leftylink> fuck my life
SCHAPiE has joined #ruby
spacesuitdiver has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
spacesuitdiver has joined #ruby
<phaul> flip flop was meant to be removed, then it's not then it's depricated again then it's not, then... I'm starting to see a pattern
crankharder has quit [Read error: Connection reset by peer]
<havenwood> My submission:
<havenwood> &>> >> 1.upto(100).each_slice(15).flat_map { |a| srand 6898176339; a.map { |n| [nil, 'Fizz', 'Buzz', 'FizzBuzz'].freeze.sample || n } }
<rubydoc> stderr: -e:2: syntax error, unexpected >> (https://carc.in/#/r/7hui)
<havenwood> &>> 1.upto(100).each_slice(15).flat_map { |a| srand 6898176339; a.map { |n| [nil, 'Fizz', 'Buzz', 'FizzBuzz'].freeze.sample || n } }
<rubydoc> # => [1, 2, "Fizz", 4, "Buzz", "Fizz", 7, 8, "Fizz", "Buzz", 11, "Fizz", 13, 14, "FizzBuzz", 16, 17, "Fizz",... check link for more (https://carc.in/#/r/7huj)
<leftylink> n insead of nil, doesn't need ||n
<havenwood> leftylink: Yaass, true :)
<havenwood> leftylink: But it'll create a bunch of arrays. Hmm.
<havenwood> leftylink: Yeah, I like it. This FizzBuzz isn't sane so why not. ;P
<leftylink> as written, I think it is already creating a bunch of arrays anyway, but I guess if you wanted you could lift the array out of the map so that it is not recreated. in that case I suppose you would have to keep nil there
<havenwood> &>> 1.upto(100).each_slice(15).flat_map { |a| srand 6898176339; a.map { |n| [n, 'Fizz', 'Buzz', 'FizzBuzz'].sample } }
<rubydoc> # => [1, 2, "Fizz", 4, "Buzz", "Fizz", 7, 8, "Fizz", "Buzz", 11, "Fizz", 13, 14, "FizzBuzz", 16, 17, "Fizz",... check link for more (https://carc.in/#/r/7huk)
<havenwood> leftylink: No, the frozen nature means not a bunch.
<havenwood> leftylink: (Assuming you're using frozen string literal.)
hiroaki has quit [Ping timeout: 245 seconds]
lxsameer has quit [Ping timeout: 258 seconds]
<havenwood> &>> def an_array; [].freeze end; an_array.eql? an_array # leftylink
<rubydoc> # => true (https://carc.in/#/r/7hul)
<havenwood> &>> def an_array; [1, 2, 3].freeze end; an_array.eql? an_array
<rubydoc> # => true (https://carc.in/#/r/7hum)
jenrzzz has quit [Ping timeout: 268 seconds]
ravenous_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dinfuehr has quit [Ping timeout: 264 seconds]
dinfuehr_ has joined #ruby
<leftylink> this is unfortunate. I have to call this a heisen-optimisation since every test I can think of to check whether the array gets created multiple times will make it so that the array's creation surely cannot be avoided
kira_rose[m] has joined #ruby
<leftylink> actually, object_id should be good enough
<havenwood> leftylink: Recent optimizations have removed some of the need to extract constants. I agree it makes it trickier to optimize, but also means you'll accidentally optimize. :P
<havenwood> leftylink: Actually not extracting a constant is often faster now.
<havenwood> I've developed a habit of constant extraction...
Ven`` has joined #ruby
ur5us has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
<leftylink> &>> 10.times.map { [nil].freeze.object_id }
<rubydoc> # => [47082718268540, 47082718267700, 47082718267180, 47082718267100, 47082718267020, 47082718266780,... check link for more (https://carc.in/#/r/7hun)
<leftylink> well crap, maybe I heisen-optimised it again
<leftylink> I have no idea
<leftylink> guess there's a lot I don't know
sagax has joined #ruby
<leftylink> or the shy optimisation
<leftylink> "I can't optimise when you're looking!!!"
Freshnuts has quit [Remote host closed the connection]
Freshnuts has joined #ruby
jud has joined #ruby
jud has joined #ruby
ramfjord has joined #ruby
<leftylink> and they could internally still be backed by same memory anyway so this test isn't even indicative
<havenwood> leftylink: It doesn't work in that case.
<havenwood> leftylink: It really is creating new Arrays there.
<havenwood> leftylink: Now I'm confused. :P
<havenwood> &>> def optimized; ''.freeze end; 10.times.map { optimized.object_id } # leftylink
<rubydoc> # => [47452013424500, 47452013424500, 47452013424500, 47452013424500, 47452013424500, 47452013424500,... check link for more (https://carc.in/#/r/7huq)
<havenwood> &>> def optimized; ''.freeze end; Array.new(10) { optimized.object_id }.map(&:object_id).uniq
<rubydoc> # => [94620505857801] (https://carc.in/#/r/7hur)
<havenwood> leftylink: Look how wrong I am...:
<havenwood> &>> def optimized; [].freeze end; Array.new(10) { optimized.object_id }.map(&:object_id).uniq
<rubydoc> # => [94897268763921, 94897268761521, 94897268757241, 94897268756201, 94897268755161, 94897268753841,... check link for more (https://carc.in/#/r/7hus)
Esa_ has quit []
<havenwood> leftylink: So yeah, pay attention to whether a method is optimizing inlining freezes.
<havenwood> leftylink: Jeremy Evans always seems to know. I've been meaning to study up, but currently extract constants aggresively.
<havenwood> leftylink: I saw an (I think Roda) commit where Evans removed constants in favor of inlined freezes for speed. :O
<havenwood> Pretty nifty.
<havenwood> leftylink: The object_id really does correspond to memory location, so your assumption is correct.
jenrzzz has joined #ruby
alexis-[m] has joined #ruby
<leftylink> hmmmmm
Ven`` has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
Jonopoly has quit [Ping timeout: 258 seconds]
leitz has joined #ruby
banisterfiend has quit [Ping timeout: 268 seconds]
<leitz> Anyone done a sinatra app with Docker? I did the short demo, and am now working on my own code. Which works, as a gem and run manually. But when I do "docker run" I get: NameError: uninitialized constant FTLTools
ramfjord has quit [Ping timeout: 268 seconds]
ap4y has joined #ruby
<leitz> Hmm....looks like i need to figure out how to copy in files.
schne1der has quit [Ping timeout: 245 seconds]
ElFerna has quit [Ping timeout: 258 seconds]
alan_w has joined #ruby
ellcs has joined #ruby
involans has joined #ruby
lechner has joined #ruby
<lechner> Hi, I would like to change the stacking order in this chart. https://trends.debian.net/#debhelper-compatibility-level The data is written out via Python. How can I write the data in reverse order in this code, please: https://salsa.debian.org/lucas/dhistory/blob/master/dhistory#L848-853
justache has quit []
jcalla has quit [Ping timeout: 264 seconds]
justache has joined #ruby
<leftylink> note that Arrays in Ruby (emphasis on Ruby) have a #reverse method that may be useful in this situation
<leftylink> &ri Array#reverse
edwardly has quit [Ping timeout: 245 seconds]
dionysus69 has quit [Ping timeout: 245 seconds]
<lechner> leftylink: Does the reverse go just before the .join(' ')?
<leftylink> if you do that and inspect the reulting .csv file in the OUTPUTDIR, you will then be able to see what effect the `reverse` has had.
edwardly has joined #ruby
edwardly has quit [Changing host]
edwardly has joined #ruby
<leftylink> (that is my nice way of saying "I have no way of knowing whether that is where it should go, I leave that determination in the capable hands of the people with knowledge of the problem domain")
<lechner> leftylink: thanks. i'll try that as long as it seems reasonable. it's my first contact with ruby. a little funky but super concise!
ramfjord has joined #ruby
al2o3-cr has quit [Quit: WeeChat 2.5]
john2496 has quit [Ping timeout: 244 seconds]
zapata_ is now known as zapata
<leitz> It...LIVES!!!!
ellcs has quit [Ping timeout: 245 seconds]
involans has quit [Quit: involans]
gell5 has joined #ruby
JasonO has quit [Quit: Well......this is rare. Goodbye!]
JasonO has joined #ruby
gell5 has quit [Ping timeout: 245 seconds]
greengriminal has quit [Quit: This computer has gone to sleep]
greengriminal has joined #ruby
Fernando-Basso has joined #ruby
grilix has quit [Ping timeout: 244 seconds]
pep7 has joined #ruby
pep7 has quit [Changing host]
pep7 has joined #ruby
Fernando-Basso has quit [Max SendQ exceeded]
Fernando-Basso has joined #ruby
<psilly0> how can i put quotes in a system call
<psilly0> system(jq -r “.parameter.value”)
<psilly0> system(“jq -r “.parameter.value””)
<psilly0> how do i escape the quotes around parameter.value?
gell5 has joined #ruby
greengriminal has quit [Quit: This computer has gone to sleep]
<psilly0> any buddy?
gell5 has quit [Ping timeout: 258 seconds]
<leitz> psilly0, would it work to use single quotes?
<psilly0> no doesn’t work
<psilly0> it does work thanks!
<leitz> :P
queip has quit [Ping timeout: 258 seconds]
<psilly0> when i am setting a varable to a system call and outputting the varble i get an quotes and a /n new line in the output
<psilly0> how can i remove this
<leftylink> but is that because A) the string contains quotes, \, and n, B) the `inspect` of the string is being printed, or `C) some other reason?
<leftylink> because the answer obviously depends on which of the above situations is true
<psilly0> there is no quotes when i run the system call in bash
<leftylink> whether that be String#chomp, modifying the contents of the string, or not using `inspect`
queip has joined #ruby
<psilly0> i tried chomp
<psilly0> didn’t work
<psilly0> .chomp('"').reverse.chomp('"').reverse
<psilly0> .rchomp('"').chomp('"')
bruce_lee has quit [Remote host closed the connection]
<leftylink> then that clearly has told you the string does not contain " on either end of it.
<leftylink> so, then?
spacesuitdiver has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<leftylink> what will you do about this fact?
<psilly0> i have no idea, thats why i am asking you
<psilly0> :(
mozzarella has joined #ruby
<leftylink> I have given the suggestions based on the information I have. they remain the same unless more information is given. a reminder to be mindful of the difference between `puts "a\nb"` vs `p "a\nb"`
<psilly0> you were right
<psilly0> i am an idiot
<psilly0> sorry for my stupid idiotic questions
<leftylink> stupid idiotic question implies that it is something that everyone should know, but there is no such thing, therefore not a stupid idiotic question
absolutejam1 has quit [Ping timeout: 264 seconds]
<leftylink> however, there are ways of asking questions that are more conducive or less conducive to getting the right answer quickly. because you saw I was only able to give answers based on what I was told, I could not read minds
<psilly0> thanks
<leftylink> so do not fear asking questions for fear that they will be seen as stupid and idiotic, but do help others help you
renich has quit [Remote host closed the connection]
openCircuit__ has joined #ruby
<leftylink> (like "I tried X Y Z", or uh... I think there's an MCVE quote somewhere??????? Ineed to find it)
<leftylink> ?mcve
<ruby[bot]> Please provide a Minimal, Complete, and Verifiable example: https://stackoverflow.com/help/mcve
<leftylink> oh
<leftylink> right then
renich has joined #ruby
mochiyoda has quit [Remote host closed the connection]
openCircuit__ has quit [Ping timeout: 244 seconds]
mochiyoda has joined #ruby
mochiyoda has quit [Client Quit]
<leftylink> people may have noticed I have a very specific way of answering questions here, it is like a https://i.imgur.com/bf0ZlcD.jpg attitude ("good grief. if you copy the homework, you learn nothing"). so I always try to answer in the way to encourage the other person to learn something
mochiyoda has joined #ruby
edwardly has quit [Ping timeout: 245 seconds]
mozzarel1 has joined #ruby
greengriminal has joined #ruby
mozzarella has quit [Ping timeout: 258 seconds]
mozzarel1 is now known as mozzarella
poontangmessiah has joined #ruby
edwardly has joined #ruby
edwardly has quit [Changing host]
edwardly has joined #ruby
alexis-[m] has left #ruby ["User left"]
leitz has quit [Quit: Leaving]
spacesuitdiver has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ruby[bot]> psilly0: as I told you already, please use https://gist.github.com
<psilly0> where `c =` is
<psilly0> i want to make it populate the file with a system call output
<psilly0> how do i do this
ur5us has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
mikecmpbll has joined #ruby
mikecmpbll has quit [Client Quit]
<leftylink> well, there's not going to be any magic here, if you wish for the results of the command to be written into a file on disk, it will be necessary to use a `File.open(filename, 'w') { |f| f.puts(something) }`, or a `File.write(filename, something)`, or a `command > filename`
<leftylink> if you wanted something else, I apologise for misunderstanding.
<leftylink> it is probably for the best that there is no magic -- wouldn't want files being written to disk without an explicit desire to do so
<psilly0> let me try this
<leftylink> also note (and this has nothing to do with writing a file to disk, but I will mention it anyway) that assigning to `c`, a variable local to the block, cannot possibly affect anything outisde the block. one is of course able to call methods on `c` as usual, but reassigning it just replaces the value of the local variable
<leftylink> just like how reassigning a local variable in a function doesn't change any bindings outside of the function either
<leftylink> &>> def f(a); a = 77777777 end; b = 99999; f(b); p b # did NOT change to 77777777
<rubydoc> # => 99999 (https://carc.in/#/r/7hvl)
chovy has joined #ruby
chovy has quit [Changing host]
chovy has joined #ruby
<chovy> does anyone know why I get this error?
<chovy> gem install nokogiri -v '1.8.4'
<chovy> You have to install development tools first.
<chovy> i'm on ubuntu
<ramfjord> &>> a = 1 ; [1].each { a = 3 } ; p a
<rubydoc> # => 3 (https://carc.in/#/r/7hvm)
<ramfjord> chovy: you're almost certainly missing some package that nokogiri depends on. Did you install all fo the edependencies listed here? https://nokogiri.org/tutorials/installing_nokogiri.html
<ramfjord> but if you want to be really lazy I recommend using docker + the fat ruby images which are based on buildpack-deps, and you won't have to debug which system libraries you're missing when you try to install a random gem
<ramfjord> or at least I haven't yet
<chovy> ramfjord: i am following those instructions, but nothing works
<chovy> i have gcc v6
<chovy> gcc: error: unrecognized command line option ‘-Wimplicit-fallthrough=0’; did you mean ‘-Wno-fallthrough’?
<chovy> i get this in the mk file log
edwardly has quit [Read error: Connection reset by peer]
john__ has joined #ruby
<john__> hi
greengriminal has quit [Quit: This computer has gone to sleep]
john__ has quit [Ping timeout: 245 seconds]
Nahra has joined #ruby
Nahra has joined #ruby
alan_w has quit [Read error: Connection reset by peer]