havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.7.0, 2.6.5, 2.5.7: 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!
phaul has quit [Ping timeout: 265 seconds]
ur5us has joined #ruby
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
d3bug has joined #ruby
cnsvc_ has quit [Ping timeout: 240 seconds]
brool has quit [Ping timeout: 256 seconds]
fluxAeon has joined #ruby
drincruz_ has quit [Ping timeout: 265 seconds]
chalkmonster has quit [Quit: WeeChat 2.7.1]
leitz has quit [Quit: Leaving]
brool has joined #ruby
ianbrown78 has quit [Ping timeout: 256 seconds]
ianbrown78 has joined #ruby
ianbrown78 has quit [Ping timeout: 240 seconds]
mre- has quit [Ping timeout: 260 seconds]
emptyflask has quit [Quit: WeeChat 2.6]
Ai9zO5AP has joined #ruby
i9zO5AP has quit [Ping timeout: 265 seconds]
brool has quit [Ping timeout: 256 seconds]
orbyt_ has joined #ruby
ianbrown78 has joined #ruby
cnsvc_ has joined #ruby
cd has joined #ruby
ChmEarl has quit [Ping timeout: 255 seconds]
ChmEarl has joined #ruby
mre- has joined #ruby
znz_jp has quit [Ping timeout: 256 seconds]
wildtrees has quit [Quit: Leaving]
cliluw has joined #ruby
zenspider has quit [Ping timeout: 258 seconds]
sergioro has joined #ruby
zenspider has joined #ruby
markong has quit [Ping timeout: 268 seconds]
drincruz_ has joined #ruby
cadeskywalker has quit [Ping timeout: 256 seconds]
zenspider has quit [Ping timeout: 255 seconds]
RiPuk has quit [Ping timeout: 245 seconds]
chalkmonster has joined #ruby
RiPuk has joined #ruby
mre- has quit [Ping timeout: 256 seconds]
cadeskywalker has joined #ruby
zenspider has joined #ruby
drincruz_ has quit [Ping timeout: 256 seconds]
mre- has joined #ruby
davor has quit [Ping timeout: 240 seconds]
drincruz_ has joined #ruby
fluxAeon has quit [Ping timeout: 265 seconds]
davor has joined #ruby
fluxAeon has joined #ruby
cnsvc_ has quit [Ping timeout: 240 seconds]
ur5us has quit [Ping timeout: 240 seconds]
cnsvc_ has joined #ruby
ur5us has joined #ruby
jmcgnh has quit [Read error: Connection reset by peer]
mre- has quit [Quit: mre-]
jmcgnh has joined #ruby
ianbrown78 has quit [Ping timeout: 255 seconds]
ianbrown78 has joined #ruby
gavlee has quit [Ping timeout: 260 seconds]
ianbrown78 has quit [Ping timeout: 268 seconds]
gavlee has joined #ruby
znz_jp has joined #ruby
ianbrown78 has joined #ruby
ChmEarl has quit [Quit: Leaving]
gix has quit [Ping timeout: 258 seconds]
braincrash has quit [Quit: bye bye]
braincrash has joined #ruby
schne1der has joined #ruby
brool has joined #ruby
schne1der has quit [Ping timeout: 256 seconds]
meinside has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
cnsvc_ has quit [Ping timeout: 240 seconds]
ianbrown78 has quit [Ping timeout: 255 seconds]
ianbrown78 has joined #ruby
ianbrown78 has quit [Ping timeout: 260 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cnsvc_ has joined #ruby
lightstalker has quit [Ping timeout: 255 seconds]
brool has quit [Quit: WeeChat 2.7.1]
ttoocs has joined #ruby
schne1der has joined #ruby
ianbrown78 has joined #ruby
LinuxKnight has joined #ruby
ianbrown78 has quit [Ping timeout: 265 seconds]
kinduff has quit [Read error: Connection reset by peer]
kinduff has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.7.1]
schne1der has quit [Ping timeout: 260 seconds]
chalkmonster has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.7.1]
chalkmonster has joined #ruby
chalkmonster has quit [Client Quit]
chalkmonster has joined #ruby
jmcgnh has quit [Read error: Connection reset by peer]
chalkmonster has quit [Client Quit]
chalkmonster has joined #ruby
chalkmonster has quit [Client Quit]
chalkmonster has joined #ruby
jmcgnh has joined #ruby
chalkmonster has quit [Client Quit]
chalkmonster has joined #ruby
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
chalkmonster has quit [Client Quit]
chalkmonster has joined #ruby
schne1der has joined #ruby
chalkmon1 has joined #ruby
chalkmonster has quit [Ping timeout: 260 seconds]
jokester has quit [Ping timeout: 252 seconds]
chalkmon1 has quit [Client Quit]
roadie has joined #ruby
sauvin has joined #ruby
chalkmonster has joined #ruby
chalkmonster has quit [Client Quit]
chalkmonster has joined #ruby
chalkmonster has quit [Client Quit]
<roadie> Hello - I want to learn ruby. I am on macos catalina and I installed another ruby via homebrew. I am using bash and I put the PATH and GEM_HOME Path into bashrc which gets read via bash_profile and the 2.7.0 ruby is the one being used first now instead of the default one that came with catalina. How do I install rvm now?
<roadie> from an earlier installation I have many local gems (installed via sudo I think) and which rails gives me /usr/bin/rails - but rails -v gives me: Rails is not currently installed on this system. To get the latest version, simply type: sudo gem install rails
<roadie> so do I have to clean that up somehow? ... Is there a complete guide on installing a ruby and rails dev environment on macos catalina somewhere?
<roadie> thank you
ianbrown78 has joined #ruby
cnsvc has joined #ruby
cnsvc_ has quit [Ping timeout: 240 seconds]
<kinduff> Try to follow that instead of using ruby f
<kinduff> From your system directly*
tsujp has joined #ruby
ianbrown78 has quit [Ping timeout: 256 seconds]
cd has quit [Quit: cd]
cthulchu_ has quit [Ping timeout: 256 seconds]
<roadie> thank you kinduff - so rbenv instead of rvm?
<kinduff> Sure, it's a matter of personal choice. I prefer rvm but sometimes I set up rbenv on remote machines
schne1der has quit [Ping timeout: 265 seconds]
<ytti> catalina ships with ruby2.6
<roadie> I am going with rvm too then :) I uninstalled the homebrew ruby, deleted the GEM dirs and PATH lines from bashrc, got the gpg keys and installed rvm it seems - its now installing ruby 2.5.7 - I hope it will work this time
<ytti> so it may not be necessary to tinker with rbenv or rvm, of course you're welcome to
tsujp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<roadie> I think the security / write permissions on catalina make it a pain to work with the default ruby? ... not sure though
<roadie> looking good - generating the documentation now ...
chalkmonster has joined #ruby
<roadie> installing rails 5.2.0 ...
<roadie> YAY - its installed - thank you - ruby 2.5.7p206 (2019-10-01 revision 67816) [x86_64-darwin19] - Rails 5.2.0
chalkmonster has quit [Quit: WeeChat 2.7.1]
markopasha has joined #ruby
<kinduff> Nice! And you're correct. It's a pain to work and manage default Ruby. Specially if you'll be working with different versions, which happens often.
<kinduff> Glad you got that going roadie ping me if you need anything else
<roadie> I made an account on gorails but I can't post an answer in the forum because the reCAPTCHA is hosted elsewhere it seems and does not show for me ... oh, do I have to pay to take part in the forum there?
<roadie> thank you kinduff - will do
iNs has quit [Remote host closed the connection]
iNs has joined #ruby
kristofferR has joined #ruby
prestorium has joined #ruby
kent\n has quit [Ping timeout: 258 seconds]
kent\n has joined #ruby
axsuul has quit [Ping timeout: 265 seconds]
infinityfye has joined #ruby
<roadie> Path is not properly setup, /Users/roadie/.rvm/gems/ruby-2.5.7/bin is not at first place.
sdu has joined #ruby
<roadie> but echo $PATH gives me: /Users/roadie/.rvm/gems/ruby-2.5.7/bin:/Users/roadie/.rvm/gems/ruby-2.5.7@global/bin:/Users/roadie/.rvm/rubies/ruby-2.5.7/bin:/Users/roadie/.rvm/bin: ... etc
<roadie> where do I check that rvm things are first in path?
<roadie> which ruby and which rails give me the .rvm version first ...
nowhere_man has quit [Ping timeout: 272 seconds]
lxsameer has joined #ruby
<roadie> everything seems to be correct - I will restart the OS
alexherbo2 has joined #ruby
roadie has quit [Quit: ERC (IRC client for Emacs 25.3.50.1)]
ianbrown78 has joined #ruby
kristofferR has quit [Read error: Connection reset by peer]
code_zombie_ has joined #ruby
kristofferR has joined #ruby
code_zombie has quit [Ping timeout: 256 seconds]
tsujp has joined #ruby
ianbrown78 has quit [Ping timeout: 260 seconds]
jinie has quit [Quit: ZNC 1.6.1 - http://znc.in]
infinityfye has quit [Ping timeout: 260 seconds]
gordie has joined #ruby
<gordie> Hi! i've got problems validating the parameters sent to my API route. could someone have a look ? thanks : https://gist.github.com/gordielachance/1238ebdb452e5f6fbd8cb2600bb7a851
jinie has joined #ruby
lineus has quit [Remote host closed the connection]
kinduff has quit [Quit: The Lounge - https://thelounge.chat]
lineus has joined #ruby
chalkmonster has joined #ruby
kinduff has joined #ruby
chalkmonster has quit [Client Quit]
chalkmonster has joined #ruby
chalkmonster has quit [Client Quit]
code_zombie_ has quit [Quit: Leaving]
camilasan has quit [Ping timeout: 240 seconds]
NODE has quit [*.net *.split]
cnsvc has quit [*.net *.split]
lineus has quit [*.net *.split]
iNs has quit [*.net *.split]
Fridtjof has quit [*.net *.split]
galaxie has quit [*.net *.split]
sphex_ has quit [*.net *.split]
pyrmont-alt has quit [*.net *.split]
claw has quit [*.net *.split]
Seich has quit [*.net *.split]
jtperreault has quit [*.net *.split]
tweaks has quit [*.net *.split]
TheBrayn has quit [*.net *.split]
null__ has quit [*.net *.split]
ljarvis has quit [*.net *.split]
aspiers has quit [*.net *.split]
cpallares has quit [*.net *.split]
brer has quit [*.net *.split]
booboy has quit [*.net *.split]
volix has quit [*.net *.split]
marcellus has quit [*.net *.split]
ChrisBr has quit [*.net *.split]
Hobbyboy has quit [*.net *.split]
leftylink has quit [*.net *.split]
chamunks has quit [*.net *.split]
nuck has quit [*.net *.split]
solars has quit [*.net *.split]
graphicsv has quit [*.net *.split]
hsiktas has quit [*.net *.split]
Pillus has quit [*.net *.split]
rann has quit [*.net *.split]
afisher has quit [*.net *.split]
mistym has quit [*.net *.split]
liKe2k1 has quit [*.net *.split]
arthurnn has quit [*.net *.split]
coffeejunk has quit [*.net *.split]
WA9ACE has quit [*.net *.split]
mattwc has quit [*.net *.split]
nemesit|znc has quit [*.net *.split]
daemonwrangler has quit [*.net *.split]
DEac- has quit [*.net *.split]
xtsee has quit [*.net *.split]
shenghi has quit [*.net *.split]
Guest21040 has quit [*.net *.split]
justinmcp_ has quit [*.net *.split]
marahin has quit [*.net *.split]
twe4ked has quit [*.net *.split]
jinie has quit [*.net *.split]
bvdw has quit [*.net *.split]
drincruz_ has quit [*.net *.split]
Ai9zO5AP has quit [*.net *.split]
pyrmont has quit [*.net *.split]
mozzarella has quit [*.net *.split]
jidar has quit [*.net *.split]
sevvie has quit [*.net *.split]
m27frogy has quit [*.net *.split]
z4phod has quit [*.net *.split]
mkaito_ has quit [*.net *.split]
hramrach has quit [*.net *.split]
Fraeon has quit [*.net *.split]
fmccann_ has quit [*.net *.split]
Xeago has quit [*.net *.split]
lypsis has quit [*.net *.split]
rprimus has quit [*.net *.split]
PaulePanter has quit [*.net *.split]
llua has quit [*.net *.split]
antholog has quit [*.net *.split]
shaman42 has quit [*.net *.split]
IsoLinCHiP has quit [*.net *.split]
go|dfish has quit [*.net *.split]
hagabaka has quit [*.net *.split]
IcyDragon has quit [*.net *.split]
kke has quit [*.net *.split]
Koshian has quit [*.net *.split]
lnx has quit [*.net *.split]
GodFather has quit [*.net *.split]
dinfuehr has quit [*.net *.split]
stdedos has quit [*.net *.split]
MasterNayru has quit [*.net *.split]
pelegreno___ has quit [*.net *.split]
Milos has quit [*.net *.split]
tris has quit [*.net *.split]
reaVer has quit [*.net *.split]
timmow has quit [*.net *.split]
towo has quit [*.net *.split]
rcvu has quit [*.net *.split]
Kilo`byte has quit [*.net *.split]
ltp has quit [*.net *.split]
woodruffw has quit [*.net *.split]
olspookishmagus has quit [*.net *.split]
genpaku has quit [*.net *.split]
kempo has quit [*.net *.split]
c0san0stra has quit [*.net *.split]
xpitr has quit [*.net *.split]
pizzaiolo has quit [*.net *.split]
pavelz has quit [*.net *.split]
edwardly has quit [*.net *.split]
umjisus has quit [*.net *.split]
dorian has quit [*.net *.split]
thebetra1 has quit [*.net *.split]
electrostat has quit [*.net *.split]
aef has quit [*.net *.split]
bier has quit [*.net *.split]
nirix has quit [*.net *.split]
sirecote has quit [*.net *.split]
kenichi has quit [*.net *.split]
trif_ has quit [*.net *.split]
Caerus has quit [*.net *.split]
swistak35 has quit [*.net *.split]
chihhsin has quit [*.net *.split]
devney has quit [*.net *.split]
adam12 has quit [*.net *.split]
Scriptonaut has quit [*.net *.split]
tekk has quit [*.net *.split]
fimbaz has quit [*.net *.split]
ByronJohnson has quit [*.net *.split]
zapata has quit [*.net *.split]
haylon has quit [*.net *.split]
stan has quit [*.net *.split]
kashike has quit [*.net *.split]
iamdevnul has quit [*.net *.split]
englishm has quit [*.net *.split]
peteretep has quit [*.net *.split]
n1v has quit [*.net *.split]
ec has quit [*.net *.split]
pilcrow has quit [*.net *.split]
shalok has quit [*.net *.split]
ozzloy has quit [*.net *.split]
miah has quit [*.net *.split]
matthewd has quit [*.net *.split]
podman has quit [*.net *.split]
jimeh has quit [*.net *.split]
Caius has quit [*.net *.split]
mjsir911 has quit [*.net *.split]
IGnorAND has quit [*.net *.split]
oz has quit [*.net *.split]
CommanderViral1 has quit [*.net *.split]
dumptruckman has quit [*.net *.split]
larissa has quit [*.net *.split]
tobiasvl has quit [*.net *.split]
bougyman has quit [*.net *.split]
universa1 has quit [*.net *.split]
snapcase has quit [*.net *.split]
Nightmare has quit [*.net *.split]
_whitelogger has joined #ruby
CommunistWolf has joined #ruby
_ikke_ has joined #ruby
kristofferR has quit [Quit: Textual IRC Client: www.textualapp.com]
d3bug has quit [Quit: Connection closed for inactivity]
pinpox has joined #ruby
stdedos has joined #ruby
deathwishdave has joined #ruby
markong has joined #ruby
cnsvc has quit [Ping timeout: 240 seconds]
roadie has joined #ruby
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
meinside has joined #ruby
jhill has joined #ruby
Eiam has joined #ruby
thecoffemaker has joined #ruby
gorsuch has joined #ruby
yxhuvud has joined #ruby
hays has joined #ruby
jcalla has joined #ruby
sh7d has joined #ruby
gmcintire has joined #ruby
spk has joined #ruby
TMaidChan has joined #ruby
lmns has joined #ruby
d10n-work has joined #ruby
jtdowney has joined #ruby
kapil_ has joined #ruby
nfsnobody has joined #ruby
helpa has joined #ruby
russt has joined #ruby
Fusl has joined #ruby
NODE has quit [Excess Flood]
d10n-work has quit [Max SendQ exceeded]
kapil_ has quit [Max SendQ exceeded]
jhill has quit [Max SendQ exceeded]
NODE has joined #ruby
jhill has joined #ruby
prestorium has quit [Quit: prestorium]
d10n-work has joined #ruby
kapil_ has joined #ruby
margeas has joined #ruby
markong has quit [Ping timeout: 240 seconds]
<Cork> if one has a class member of the same name as a standard method (ex pp, p, puts, raise or so on) how can one call the standard name instaed of the class method from inside the class?
postmodern has quit [Quit: Leaving]
gordie has quit [Remote host closed the connection]
<al2o3-cr> Cork: Kernel.whatevermethod
<Cork> al2o3-cr: but doesn't that only go through for global methods that comes from Kernel?
<al2o3-cr> Cork: yes. i thought that's what you meant.
<Cork> al2o3-cr: no, my question was if you have a method in a class that also exists globally
cnsvc has joined #ruby
<Cork> if you from inside the class can target the method that isn't the one in the class
<al2o3-cr> oh
<al2o3-cr> &>> def foo; 42; end; class Foo; def self.foo; 99; end; method(:foo).super_method.(); end
<rubydoc> # => 42 (https://carc.in/#/r/8oh0)
<al2o3-cr> ^ Cork if that is what you mean.
<Cork> ya, but i don't understand it XD
<Cork> oh, wait does it
<al2o3-cr> bk in 10 min got to do something.
cnsvc has quit [Ping timeout: 240 seconds]
<Cork> yup it does exactly what i meant
<Cork> but not sure what super_method.() does; never seen anything like it before
ianbrown78 has joined #ruby
ianbrown78 has quit [Ping timeout: 240 seconds]
<al2o3-cr> Cork: Foo's superclass is Object where foo is defined.
<Cork> and .() ?
<al2o3-cr> Cork: it's syntactic sugar for .call
<Cork> aaah, didn't know that
<Cork> thx!
<al2o3-cr> you can just do Object.foo aswell
* Cork nods
<Cork> thx for the help!
<al2o3-cr> Cork: np ;)
deathwishdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<al2o3-cr> Object.foo won't work as it's a private method on Object.
<al2o3-cr> you'd still have to create a method obj or use send.
<Cork> yup, get it thx!
<al2o3-cr> 👍
<al2o3-cr> oh, just to makes things clear, it works in irb/pry because you're not in the TOPLEVEL_BINDING. go into that and you'll see it works the same as the ruby interpreter.
deathwishdave has joined #ruby
TCZ has joined #ruby
cnsvc has joined #ruby
kapil_ has quit [Quit: Connection closed for inactivity]
NODE has quit [Quit: changing servers]
NODE has joined #ruby
cnsvc has quit [Ping timeout: 240 seconds]
roadie has quit [Quit: ERC (IRC client for Emacs 25.3.50.1)]
alexherbo25 has joined #ruby
alexherbo2 has quit [Ping timeout: 260 seconds]
alexherbo25 is now known as alexherbo2
sergioro has quit [Quit: leaving]
cnsvc has joined #ruby
cnsvc has quit [Ping timeout: 240 seconds]
deathwishdave has quit [Read error: Connection reset by peer]
alexherbo21 has joined #ruby
alexherbo2 has quit [Ping timeout: 258 seconds]
alexherbo21 is now known as alexherbo2
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
NODE has quit [Quit: changing servers]
NODE has joined #ruby
kapil_ has joined #ruby
cnsvc has joined #ruby
cnsvc has quit [Ping timeout: 240 seconds]
akem has quit [Ping timeout: 255 seconds]
akem has joined #ruby
sdu has quit [Remote host closed the connection]
cnsvc has joined #ruby
ianbrown78 has joined #ruby
sdu has joined #ruby
cnsvc has quit [Ping timeout: 240 seconds]
ianbrown78 has quit [Ping timeout: 260 seconds]
gbristol has quit [Ping timeout: 272 seconds]
drincruz_ has quit [Ping timeout: 240 seconds]
dionysus69 has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 256 seconds]
TzilTzal has joined #ruby
sdu has quit [Remote host closed the connection]
burningserenity has joined #ruby
TCZ has quit [Quit: Leaving]
kristian_on_linu has joined #ruby
<TzilTzal> Hi
royal_screwup21 has joined #ruby
clemens3 has quit [Quit: rebooting]
clemens3 has joined #ruby
kristian_on_linu has quit [Ping timeout: 256 seconds]
kristian_on_linu has joined #ruby
margeas has quit [Ping timeout: 240 seconds]
sdu has joined #ruby
lineus has quit [Remote host closed the connection]
lineus has joined #ruby
royal_screwup21 has quit [Remote host closed the connection]
burningserenity has quit [Ping timeout: 268 seconds]
NODE has quit [Quit: changing servers]
NODE has joined #ruby
stdedos has quit [Remote host closed the connection]
cnsvc has joined #ruby
burningserenity has joined #ruby
kristian_on_linu has quit [Ping timeout: 255 seconds]
cnsvc has quit [Ping timeout: 240 seconds]
stdedos has joined #ruby
lucasb has joined #ruby
cnsvc has joined #ruby
burningserenity has quit [Remote host closed the connection]
hutch has joined #ruby
drincruz_ has joined #ruby
Esa_ has joined #ruby
drincruz has joined #ruby
drincruz_ has quit [Ping timeout: 258 seconds]
Emmanuel_Chanel has joined #ruby
<ewanchic> Are there any neat ruby gems for making nice debug output? I found the 'awesome_print' gem a few weeks ago for nice output of hashes/arrays. I'm looking for boxes around my content, and perhaps colorized. Currently making a pesudo box around my debug out at the moment.
<adam12> ewanchic: Maybe look at the tty-rb group of gems?
reyfi9e has quit [Ping timeout: 256 seconds]
markopasha has quit [Remote host closed the connection]
<adam12> ewanchic: https://ttytoolkit.org/
<adam12> ewanchic: Nothing for built-in debug output but maybe you can pipe awesome_print or Kernel#pp into tty-box and pastel.
<ewanchic> adam12: Thanks! I think someone mentioned this before and I forgot. Yes, this should help.
SeepingN has joined #ruby
reyfi9e has joined #ruby
bhaak has quit [Ping timeout: 268 seconds]
cnsvc has quit [Ping timeout: 240 seconds]
meinside has quit [Quit: Connection closed for inactivity]
sdu has quit [Remote host closed the connection]
DTZUZU has quit [Quit: WeeChat 2.7]
DTZUZU has joined #ruby
fluxAeon has quit [Ping timeout: 255 seconds]
zacts has joined #ruby
Esa_ has quit []
NODE has quit [Quit: changing servers]
Esa_ has joined #ruby
NODE has joined #ruby
<kinduff> How can I generate a fixnum similar to {}.hash that does not change per object?
donofrio__ has joined #ruby
<kinduff> meaning if I do: irb > {}.hash #=> -123; exit; irb > {}.hash #=> -456
Esa_ has quit []
<kinduff> why does it change when I enter a new console
fluxAeon has joined #ruby
donofrio_ has quit [Ping timeout: 256 seconds]
Esa_ has joined #ruby
hutch has quit [Ping timeout: 258 seconds]
schne1der has joined #ruby
jmcgnh has quit [Ping timeout: 260 seconds]
<adam12> kinduff: The hash used to be based off of the memory address but that changed recently and it's now it's an atomically incrementing integer. I'm not sure you can generate one ahead of time.
<adam12> kinduff: What's your use case?
royal_screwup21 has joined #ruby
jmcgnh_ has joined #ruby
jmcgnh_ is now known as jmcgnh
markopasha has joined #ruby
Tempesta has quit [Ping timeout: 268 seconds]
royal_screwup21 has quit [Remote host closed the connection]
duckpuppy has quit [Quit: ZNC 1.7.5-rc1 - https://znc.in]
drincruz has quit [Ping timeout: 268 seconds]
dionysus69 has quit [Ping timeout: 240 seconds]
<kinduff> trying to generate a random color based on a fixed integer
<kinduff> but needs to be consistent, not really random
duckpuppy has joined #ruby
hutch has joined #ruby
<kinduff> I'm trying to figure out how to replace that .hash method
dretnx has joined #ruby
drincruz has joined #ruby
schne1der has quit [Ping timeout: 265 seconds]
<TzilTzal> Hi
<TzilTzal> How can I run rspec on a Padrino or Rails app without having to hit the database?
DTZUZU2 has joined #ruby
DTZUZU has quit [Ping timeout: 258 seconds]
markopasha has quit [Remote host closed the connection]
cnsvc has joined #ruby
markopasha has joined #ruby
cnsvc has quit [Ping timeout: 240 seconds]
bhaak has joined #ruby
cthulchu_ has joined #ruby
<kinduff> nevermind, I ended up using Digest::SHA1.hexdigest("mystring").to_i(36)
<kinduff> thanks tho adam12, and thanks for the memory clarification
lxsameer has quit [Quit: WeeChat 2.6]
<ewanchic> Ok, this is so bizarre. Here is a code snippet: https://carc.in/#/r/8oii
<ewanchic> The code example outputs correct, however, in my code for some reason, view_file['name'] now outputs 'name'....the key. and the value is blank. Yet, if I ask what the value of view_file is, it still shows a hash, like in the code example. I tried changing view_file to @view_file thinking it was some weird scope thing, but it's not. any ideas?
dretnx has quit [Ping timeout: 256 seconds]
kinduff has quit [Read error: Connection reset by peer]
kinduff has joined #ruby
hutch has quit [Ping timeout: 255 seconds]
galaxie has quit [Ping timeout: 240 seconds]
drincruz has quit [Ping timeout: 268 seconds]
howdoi has joined #ruby
cnsvc has joined #ruby
<havenwood> ewanchic: Just a general suggestion, but use #p rather than #puts for debugging printing.
<havenwood> ewanchic: The code you show works as I'd expect. Can you show the broken code?
cnsvc has quit [Ping timeout: 240 seconds]
roadie has joined #ruby
zacts has quit [Quit: WeeChat 2.6]
<ewanchic> havenwood: I had a long delay before I could print this out. .... hmm, I mimic exactly what I'm doing in my code. instead of view_file['name'] I went to value['name'] and that worked. But view_file['name'] still outputs 'name' https://carc.in/#/r/8oiq
<havenwood> ewanchic: Can you change the `puts` to `p` and show output?
<ewanchic> havenwood: sure...http://source.wanchic.com/ewanchic/gem-freight/blob/master/lib/freight/train/generators/views.rb , line 42 & 44. 44 would be the problem. Line 42 was using @view_file but I just changed it to value and that works. Still curious....
<ewanchic> havenwood: ...I think I starting using #puts over #p is when I would use "" over '', switches wouldn't work anymore.
<ewanchic> havenwood: here is with #p https://dpaste.org/LujX
<ewanchic> havenwood: I put #puts back in, https://dpaste.org/e7ee
<havenwood> ewanchic: #p shouldn't matter for String quotes
<havenwood> ewanchic: that code doesn't run for me
<havenwood> ewanchic: SyntaxError: unexpected ':', expecting end-of-input
<ewanchic> havenwood: :) I don't know why..? that's what #p does. I'm using ruby 2.5.5
<havenwood> ewanchic: I'm at a complete loss what the issue is. Maybe someone else can see from what you've shown.
<havenwood> ewanchic: I don't get the example.
<ewanchic> havenwood: I'm sorry...It'll probably take +10 mins to setup before it will run on your system.
<havenwood> ewanchic: Is there any way to show a runnable example that highlights the issue?
SeepingN has quit [Ping timeout: 260 seconds]
<havenwood> Or that takes too long here?
<havenwood> I don't understand the question.
<havenwood> It seems you're saying you expect a key to exist but it doesn't?
<havenwood> ewanchic: If you know the value exists, consider switching from #[] to #fetch.
<ewanchic> havenwood: this was an example that mimiced this issue: https://carc.in/#/r/8oiq ...except it works here in the example, just not my code.
<havenwood> ewanchic: Yeah, this ^ example there's nothing wrong, so I have no comment.
<ewanchic> havenwood: .....uuhhh! I think I found it! Boot to my head!
<havenwood> ewanchic: What was it?
<ewanchic> havenwood: line 35: view_file = "#{value.blank? ? key : value}"
<ewanchic> havenwood: ..oohhh
<ewanchic> havenwood: I turned my hash is to string, I turned value into a string, which I guess is just blank?
<havenwood> ewanchic: #blank? isn't a Ruby thing, so it depends on where that method came from. In Rails, and empty String is blank.
<ewanchic> havenwood: Yup :) I'm using rails... spec.add_dependency "rails", '6.0.2.1'
<ewanchic> havenwood: Ok, I really reproduced it.
<ewanchic> havenwood: It's interesting becuase the values for value and view_file are identical. It's just that value IS a true hash, and view_file is actually a string.
<havenwood> ewanchic: Just a debugging tip, but when you interpolate, it's sometimes nice to use #inspect, like: "key: #{key.inspect}"
<havenwood> ewanchic: #p and #inspect show you what you actually have for debugging purposes
<havenwood> ewanchic: If you believe the key will always exists, switch from `value['name']` to `value.fetch('name')`.
<havenwood> ewanchic: And from `view_file['name']` to `view_file.fetch('name')`.
<havenwood> ewanchic: Can you say a bit more about what's unexpected in that ^ example? I'm multitasking and can't look closely for a few minutes. Maybe someone else can beat me to it.
<adam12> kinduff: Possibly related (possibly not?) but I use this to calculate a hue value for determining colour of a user's avatar. I can't remember if I stole it from somewhere but maybe it's similar to what you're doing and would be of use. https://gist.github.com/e50252be3be2b70a509d5d62280e3ca4
<kinduff> oh I really like that solution adam12, thanks for sharing
<ewanchic> havenwood: https://carc.in/#/r/8ojm I put the #puts back, and added inspect. Yeah, that helps, Thanks! I actually don't know if the key always exists. I'm wrapping them up in if hash.key? 'key_name' ...exists. Not sure if there is an easier way. Been coding for 6 hours straight, but glad you could help me find my bug and add some debugging pointers. Thanks!
<ewanchic> brb
<ewanchic> /ewanchic Grabbing food
drincruz has joined #ruby
tsujp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bvdw has quit [Write error: Connection reset by peer]
bvdw has joined #ruby
code_zombie has joined #ruby
gix has joined #ruby
pupsikov has joined #ruby
<TzilTzal> Is it recommended to use auto load of Padrino? (or other frameworks)? It seems like it will just prolong the load time of an app and read files that might not be used at all.
roadie has quit [Remote host closed the connection]
d3bug has joined #ruby
<adam12> TzilTzal: Definitely pros and cons for autoloading. For Padrino, if you're using Sequel as the ORM, Sequel will query the database when it encounters a model, vs ActiveRecord which only queries the database on first use of the model. So with many Sequel models, autoloading can be of benefit (there are Sequel plugins to counter this tho).
rippa has joined #ruby
<TzilTzal> adam12: I'm using ActiveRecord... still there are a lot of models and the web app takes around 20 seconds I'd say to start...
pupsikov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<TzilTzal> Not to mention that I think a lot of require statement are skipped because things are autoloaded...
<adam12> TzilTzal: Sometimes it could be dependencies. When I use any of the azure_* gems, boot time goes crazy. There's a gem that can help debug if it's a gem being required that might be slowing things down called bumbler.
<TzilTzal> So if I want to deprecate this, quite a few things break .
<adam12> Maybe we'll finally get something like bootsnap shipped with Ruby. That would be nice.
pupsikov has joined #ruby
titanbiscuit has quit [Ping timeout: 258 seconds]
titanbiscuit has joined #ruby
<TzilTzal> I think it also autoloads everything in lib ...
<adam12> Maybe there's some confusion; autoload sets up a constant and an autoload stub. It doesn't require any files by default until the constant is references.
<TzilTzal> hmmm.. then what does Padrino.load! do exactly?
<TzilTzal> where does it go to start the webapp?
<adam12> TzilTzal: I don't recall. Maybe someone else knows; I stopped using Padrino a while ago.
tbisker8 has joined #ruby
titanbiscuit has quit [Read error: Connection reset by peer]
alexherbo23 has joined #ruby
alexherbo2 has quit [Ping timeout: 240 seconds]
alexherbo23 is now known as alexherbo2
postmodern has joined #ruby
tbisker8 has quit [Ping timeout: 260 seconds]
alexherbo2 has quit [Remote host closed the connection]
titanbiscuit has joined #ruby
ta has quit [Ping timeout: 258 seconds]
drincruz_ has joined #ruby
drincruz has quit [Ping timeout: 256 seconds]
ta has joined #ruby
burningserenity has joined #ruby
wildtrees has joined #ruby
stdedos has quit [Remote host closed the connection]
johnny56 has joined #ruby
cnsvc has joined #ruby
jmcgnh has quit [Read error: Connection reset by peer]
TzilTzal has quit [Quit: Leaving.]
fluxAeon has quit [Ping timeout: 265 seconds]
sauvin has quit [Read error: Connection reset by peer]
jmcgnh has joined #ruby
fluxAeon has joined #ruby
cnsvc has quit [Ping timeout: 240 seconds]
ltp has quit [Ping timeout: 265 seconds]
cnsvc has joined #ruby
TCZ has joined #ruby
schne1der has joined #ruby
hiroaki_ has joined #ruby
caterfxo has quit [Quit: leaving]
caterfxo has joined #ruby
sergioro has joined #ruby
schne1der has quit [Ping timeout: 258 seconds]
donofrio__ has quit [Remote host closed the connection]
roadie has joined #ruby
SeepingN has joined #ruby
burningserenity has quit [Ping timeout: 255 seconds]
caterfxo has quit [Ping timeout: 255 seconds]
Tempesta has joined #ruby
s2013 has joined #ruby
caterfxo has joined #ruby
ur5us has joined #ruby
teardown has joined #ruby
donofrio has joined #ruby
burningserenity has joined #ruby
sergioro has quit [Quit: leaving]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
roadie has quit [Remote host closed the connection]
Esa_ has quit [Ping timeout: 256 seconds]
hiroaki_ has quit [Ping timeout: 272 seconds]
roadie has joined #ruby
roadie has quit [Client Quit]
cd has joined #ruby
TCZ has quit [Quit: Leaving]
<Eiam> wow PAdrino there is a name I've not heard in years!
<Eiam> I used to use Padrino too but no longer
<Eiam> It starts the loader, calls a lock, loads libraries, calls before and after blocks if any are defined by the app, starts logging ..
<Eiam> oh they left. bummer.
kapil_ has quit [Quit: Connection closed for inactivity]
wildtrees has quit [Ping timeout: 265 seconds]
TCZ has joined #ruby
code_zombie has quit [Read error: Connection reset by peer]
code_zombie has joined #ruby
sagax has quit [Read error: Connection reset by peer]
jcalla has quit [Quit: Leaving]
pupsikov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Bounga has joined #ruby
pupsikov has joined #ruby
markopasha has quit [Read error: Connection reset by peer]
Ai9zO5AP has quit [Ping timeout: 240 seconds]
titanbiscuit has quit [Ping timeout: 268 seconds]
titanbiscuit has joined #ruby
margeas has joined #ruby
titanbiscuit has quit [Ping timeout: 255 seconds]
titanbiscuit has joined #ruby
burningserenity has quit [Ping timeout: 265 seconds]
Bounga has quit [Ping timeout: 272 seconds]
galaxie has joined #ruby
galaxie has quit [Remote host closed the connection]
galaxie has joined #ruby
titanbiscuit has quit [Ping timeout: 256 seconds]
titanbiscuit has joined #ruby
drincruz_ has quit [Ping timeout: 256 seconds]
Ai9zO5AP has joined #ruby
<cthulchu_> what confuses me is why would you target a regex chan? it's one of the least emotional channels out there. people do logic here.
<cthulchu_> it's a lot more fun to troll some marxist/feminist channel
<cthulchu_> they react like crazy to slightest criticism, not even offence
chalkmonster has joined #ruby
<cthulchu_> oops. wrong chan. lol
markoong has joined #ruby
titanbiscuit has quit [Ping timeout: 258 seconds]
titanbiscuit has joined #ruby
margeas has quit [Ping timeout: 258 seconds]
priodev has quit [Quit: out.]
d3bug has quit [Quit: Connection closed for inactivity]
tbisker8 has joined #ruby
titanbiscuit has quit [Read error: Connection reset by peer]
cnsvc has quit [Ping timeout: 240 seconds]
tbisker8 has quit [Read error: Connection reset by peer]
titanbiscuit has joined #ruby
lucasb has quit [Quit: Connection closed for inactivity]
code_zombie has quit [Quit: Leaving]
GodFather has quit [Read error: Connection reset by peer]
priodev has joined #ruby
titanbiscuit has quit [Ping timeout: 260 seconds]
cnsvc has joined #ruby
titanbiscuit has joined #ruby
wildtrees has joined #ruby
wildtrees has quit [Max SendQ exceeded]
wildtrees has joined #ruby
d3bug has joined #ruby
titanbiscuit has quit [Ping timeout: 260 seconds]
titanbiscuit has joined #ruby
jmcgnh has quit [Read error: Connection reset by peer]
titanbiscuit has quit [Ping timeout: 255 seconds]
jmcgnh has joined #ruby
titanbiscuit has joined #ruby
pupsikov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<baweaver> cthulchu_: Not a great way to make friends.
<baweaver> Trolling in general is distasteful.
TCZ has quit [Quit: Leaving]
titanbiscuit has quit [Ping timeout: 260 seconds]
titanbiscuit has joined #ruby
<SeepingN> tastes like hatorade
johnny56 has quit [Ping timeout: 240 seconds]
<CommunistWolf> maybe he can recommend me some marxist channels though
schne1der has joined #ruby
caterfxo has quit [Quit: leaving]
<cthulchu_> lol, you don't want to be there
<cthulchu_> highly irrational and incoherent
<CommunistWolf> sounds like you don't know any
<cthulchu_> ahahahah, exactly :)
<CommunistWolf> b u s t e d
johnny56 has joined #ruby
markong has joined #ruby
titanbiscuit has quit [Ping timeout: 260 seconds]
titanbiscuit has joined #ruby
markoong has quit [Ping timeout: 265 seconds]
LinuxKnight has quit [Ping timeout: 256 seconds]