mossplix has quit [Remote host closed the connection]
Tempesta has quit [Ping timeout: 268 seconds]
NODE has quit [Quit: changing servers]
wildtrees has quit [Ping timeout: 268 seconds]
davispuh has quit [Ping timeout: 260 seconds]
NODE has joined #ruby
_phaul has joined #ruby
lucasb has quit [Quit: Connection closed for inactivity]
camilasan has quit [Ping timeout: 258 seconds]
phaul has quit [Ping timeout: 265 seconds]
lxsameer has quit [Ping timeout: 260 seconds]
davispuh has joined #ruby
davispuh has quit [Client Quit]
akemhp has joined #ruby
alex`` has joined #ruby
Helenah has quit [Read error: Connection reset by peer]
drincruz has quit [Ping timeout: 240 seconds]
Helenah has joined #ruby
davispuh has joined #ruby
alex`` has quit [Ping timeout: 272 seconds]
wallace_mu has joined #ruby
dionysus69 has quit [Ping timeout: 260 seconds]
hiroaki has joined #ruby
TCZ has joined #ruby
terenas has quit [Remote host closed the connection]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
SeepingN has joined #ruby
RiPuk has quit [Ping timeout: 272 seconds]
RiPuk_ has joined #ruby
markopasha has quit [Remote host closed the connection]
orbyt_ has joined #ruby
mossplix has joined #ruby
mossplix has quit [Ping timeout: 268 seconds]
AJA4350 has quit [Quit: AJA4350]
jenrzzz has joined #ruby
wildtrees_ has quit [Quit: Leaving]
smccarthy has joined #ruby
zlogan has quit [Ping timeout: 252 seconds]
davidw has quit [Ping timeout: 268 seconds]
<smccarthy>
My ruby program (to run rspec tests) seems to be looking in other directories for modules. I do an require_relative './lib/s3_util' (from /var/task/ directory), and it finds a /tmp/lib/s3_util and uses that. I tried full paths in the require and require_relative, and no luck . Any ideas ?
<akemhp>
smccarthy, That's weird, but that /tmp/lib/... is maybe a cached copy of the lib you required?
<akemhp>
Cause there is no other reason to have this in /tmp/, and it being loaded by "require".
<smccarthy>
akemhp: have another project in /tmp/ which has a /spec/utils/s3_util module. But its odd to me because I figured require relative would find the right module (relative to where its called from)
<smccarthy>
akemhp: it looks like I can get around it by using `load './lib/s3_util.rb'` right before I call my s3_util method
<akemhp>
Strange, regular "require" should actually load the file you point it. I just tried it, and straced just to see.
<smccarthy>
require with a full path?
<akemhp>
Maybe you have prior code or environment specifics things that change that behavior.
<akemhp>
smccarthy, Yes.
<akemhp>
require "./myfile.rb"
<smccarthy>
ok maybe ! I'll try it out again later. thank you !
<akemhp>
I just noticed the next call, is the same but with full path: openat(AT_FDCWD, "/home/akem/ruby_test/load_me.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = 9
<akemhp>
Anyway regular "require" works here.
bruce_lee has quit [Ping timeout: 268 seconds]
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
bruce_lee has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
DaRock has joined #ruby
TCZ has quit [Quit: Bye Bye]
duderonomy has joined #ruby
drincruz has joined #ruby
thebananaking has joined #ruby
factormystic has quit [Ping timeout: 240 seconds]
factormystic has joined #ruby
alfiemax has joined #ruby
lineus_ has joined #ruby
lineus has quit [Ping timeout: 240 seconds]
cthulchu_ has quit [Ping timeout: 260 seconds]
Tempesta_ has left #ruby ["Closing Channel, bye."]
Tempesta has joined #ruby
gix has quit [Ping timeout: 268 seconds]
tpanarch1st has quit [Ping timeout: 255 seconds]
drincruz has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
smccarthy has quit [Remote host closed the connection]
millerti has quit [Ping timeout: 268 seconds]
houhoulis has joined #ruby
angelds has joined #ruby
jenrzzz has quit [Quit: Lost terminal]
buckworst has joined #ruby
buckworst has quit [Client Quit]
braincrash has quit [Quit: bye bye]
dinfuehr has quit [Ping timeout: 265 seconds]
sagax has joined #ruby
braincrash has joined #ruby
chalkmonster has joined #ruby
wallace_mu has quit [Remote host closed the connection]
dinfuehr has joined #ruby
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
ur5us has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
dStromboli has joined #ruby
wallace_mu has quit [Ping timeout: 260 seconds]
ttoocs has joined #ruby
bruul has quit [Quit: WeeChat 2.7]
chalkmonster has quit [Ping timeout: 265 seconds]
mossplix has joined #ruby
chalkmonster has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
houhoulis has quit [Remote host closed the connection]
mossplix has quit [Remote host closed the connection]
NODE has quit [Quit: changing servers]
NODE has joined #ruby
dinfuehr has quit [Ping timeout: 265 seconds]
donofrio has quit [Remote host closed the connection]
dinfuehr has joined #ruby
NL3limin4t0r has quit [Ping timeout: 268 seconds]
NL3limin4t0r has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
skryking has joined #ruby
_whitelogger has joined #ruby
thenori has joined #ruby
sauvin has joined #ruby
wallace_mu has joined #ruby
wallace_mu has quit [Ping timeout: 265 seconds]
dStromboli has quit [Ping timeout: 272 seconds]
schne1der has joined #ruby
dStromboli has joined #ruby
im0nde has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.7]
zlogan has joined #ruby
alfiemax has quit [Remote host closed the connection]
thenori has quit [Quit: Leaving]
dStromboli has quit [Ping timeout: 260 seconds]
schne1der has quit [Ping timeout: 240 seconds]
dStromboli has joined #ruby
suukim has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
duderonomy has joined #ruby
dionysus69 has joined #ruby
duderonomy has quit [Client Quit]
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
chalkmonster has joined #ruby
fphilipe_ has quit [Ping timeout: 246 seconds]
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
alfiemax has joined #ruby
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
DaRock has quit [Ping timeout: 272 seconds]
infinityfye has joined #ruby
DaRock has joined #ruby
hiroaki has quit [Ping timeout: 260 seconds]
mn3m has quit [Quit: mn3m]
chalkmonster has quit [Quit: WeeChat 2.7]
sdu has joined #ruby
conta has joined #ruby
dStromboli has quit [Ping timeout: 272 seconds]
dStromboli has joined #ruby
conta has quit [Ping timeout: 240 seconds]
mozzarel1 has joined #ruby
mozzarella has quit [Ping timeout: 240 seconds]
mozzarel1 is now known as mozzarella
TomyWork has joined #ruby
schne1der has joined #ruby
mozzarella has quit [Ping timeout: 265 seconds]
mozzarel1 has joined #ruby
mozzarel1 is now known as mozzarella
wallace_mu has joined #ruby
CustosLimen has quit []
CustosLimen has joined #ruby
wallace_mu has quit [Ping timeout: 272 seconds]
mozzarella has quit [Ping timeout: 240 seconds]
mozzarella has joined #ruby
mossplix has joined #ruby
alfiemax has quit [Remote host closed the connection]
chalkmonster has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 268 seconds]
ellcs1 has joined #ruby
william1_ has joined #ruby
lxsameer has joined #ruby
sergioro has quit [Quit: leaving]
mossplix_ has joined #ruby
DaRock has quit [Read error: Connection reset by peer]
DaRock has joined #ruby
mossplix has quit [Ping timeout: 272 seconds]
william1_ has quit [Ping timeout: 265 seconds]
fphilipe_ has joined #ruby
impermanence has quit [Ping timeout: 268 seconds]
chalkmonster has quit [Quit: WeeChat 2.7]
ellcs1 has quit [Ping timeout: 248 seconds]
Emmanuel_Chanel has joined #ruby
pandakekok9 has joined #ruby
lxsameer has quit [Quit: WeeChat 2.6]
lxsameer has joined #ruby
chalkmonster has joined #ruby
chalkmonster has quit [Client Quit]
william1 has joined #ruby
william1 has quit [Client Quit]
william1 has joined #ruby
Jonopoly has joined #ruby
chalkmonster has joined #ruby
chalkmonster has quit [Client Quit]
chalkmonster has joined #ruby
asio_ is now known as asio
chalkmonster has quit [Quit: WeeChat 2.7]
william1 has quit [Quit: WeeChat 2.6]
zlogan has quit [Ping timeout: 272 seconds]
mossplix_ has quit [Remote host closed the connection]
ali has joined #ruby
zlogan has joined #ruby
wallace_mu has joined #ruby
wallace_mu has quit [Ping timeout: 240 seconds]
chalkmonster has joined #ruby
greengriminal has joined #ruby
ali has quit [Ping timeout: 260 seconds]
ua_ has quit [Ping timeout: 265 seconds]
alex`` has joined #ruby
gordo has joined #ruby
dinfuehr has quit [Ping timeout: 260 seconds]
dinfuehr_ has joined #ruby
<gordo>
Hi everyone !
<gordo>
I'm learning Ruby and I've got a newbie question about inheritance. I would like to merge the attribute of my class (child) with the attribute of its parent. Is it possible ? https://pastebin.com/chuSBqEr
ua has joined #ruby
cliffindor[m] has quit [Quit: User has been idle for 30+ days.]
ua has quit [Excess Flood]
BH23 has quit [Remote host closed the connection]
ua has joined #ruby
AJA4350 has joined #ruby
ua has quit [Excess Flood]
ua has joined #ruby
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
Helenah has quit [Read error: Connection reset by peer]
Helenah has joined #ruby
mossplix has joined #ruby
conta has joined #ruby
PikaChokeMe has joined #ruby
<PikaChokeMe>
I'm using nokogiri and I tried to use << to insert text into a node... but I realise this like... doesn't escape it?
<PikaChokeMe>
is there a way to add text and also escape that text?
donofrio has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.7]
alfiemax has joined #ruby
tpanarch1st has joined #ruby
pandakekok9 has quit [Quit: rebooting]
pandakekok9 has joined #ruby
Hanma[m] has quit [Quit: User has been idle for 30+ days.]
mariusz-kowalski has quit [Quit: User has been idle for 30+ days.]
kira_rose[m] has left #ruby ["Kicked by @appservice-irc:matrix.org : User has been idle for 30+ days."]
lakrivite[m] has quit [Quit: User has been idle for 30+ days.]
xipho[m] has quit [Quit: User has been idle for 30+ days.]
chalkmonster has joined #ruby
alfiemax has quit [Remote host closed the connection]
mkroman has quit [Ping timeout: 248 seconds]
mkroman has joined #ruby
fercell has joined #ruby
pandakekok9 has quit [Quit: good night freenoders]
zululee_ has quit [Read error: Connection reset by peer]
TorpedoSkyline has joined #ruby
_phaul has quit [Ping timeout: 260 seconds]
zululee_ has joined #ruby
fphilipe_ has quit [Ping timeout: 260 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
_phaul has joined #ruby
cd has joined #ruby
royal_screwup21 has quit [Remote host closed the connection]
duderonomy has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.7]
zululee_ has quit [Ping timeout: 240 seconds]
clemens3 has quit [Quit: WeeChat 2.1]
bvdw has quit [Read error: Connection reset by peer]
cthulchu_ has joined #ruby
vondruch has quit [Ping timeout: 240 seconds]
bvdw has joined #ruby
zululee_ has joined #ruby
dStrombo1 has joined #ruby
teclator has quit [Ping timeout: 265 seconds]
dan64- has joined #ruby
BTRE has quit [Quit: Leaving]
dan64 has quit [Ping timeout: 268 seconds]
BTRE has joined #ruby
TorpedoSkyline has quit [Ping timeout: 260 seconds]
TorpedoSkyline has joined #ruby
greengriminal has quit [Quit: Leaving]
wildtrees has joined #ruby
CBebop has joined #ruby
dStrombo1 has quit [Ping timeout: 272 seconds]
gix has joined #ruby
cthu| has joined #ruby
teclator has joined #ruby
cthulchu_ has quit [Ping timeout: 240 seconds]
ratah has joined #ruby
<ratah>
Hiya! Trying to convert my old `form_for` into the new `form_with`, but does anybody know why `<%= form_with(model: @post, as: @comment) do |form| %>` won't work for the old `<%= form_for [ @post, @comment ] do |form| %>`?
CBebop has quit [Remote host closed the connection]
shakes has joined #ruby
shakes has quit [Remote host closed the connection]
alex`` has quit [Ping timeout: 268 seconds]
TorpedoSkyline has quit [Ping timeout: 265 seconds]
alex`` has joined #ruby
TorpedoSkyline has joined #ruby
im0nde has quit [Ping timeout: 268 seconds]
TorpedoSkyline has quit [Client Quit]
im0nde has joined #ruby
Ai9zO5AP has joined #ruby
royal_screwup21 has joined #ruby
schne1der has quit [Ping timeout: 265 seconds]
TorpedoSkyline has joined #ruby
cthu| has quit [Ping timeout: 265 seconds]
royal_screwup21 has quit [Remote host closed the connection]
TorpedoSkyline has quit [Ping timeout: 265 seconds]
xco has quit [Client Quit]
xco has joined #ruby
TorpedoSkyline has joined #ruby
gix has quit [Ping timeout: 252 seconds]
<Scriptonaut>
hey all, I'm having an issue with ruby 1.8.7 and iconv. I compile ruby with rbenv/ruby-build, I know iconv is installed on the machine, however when I start a unicorn server I get `require': cannot load such file -- iconv (LoadError)
<Scriptonaut>
so I compiled/installed ruby again, however this time with these flags: CONFIGURE_OPTS="--with-iconv-dir=$(dirname $(dirname $(which iconv)))"
<Scriptonaut>
I've tried manually adding the gem into my gemfile, various version, etc, every solution I've found online. Anyone familiar with this?
<adam12>
Scriptonaut: presumably you need 1.8 for some reason?
<adam12>
Scriptonaut: What about RUBY_CONFIGURE_OPTS instead of CONFIGURE_OPTS?
gix has joined #ruby
<Scriptonaut>
adam12: yes, I am working on an ancient stack, in the process of updating it but so much of the code is dependent on 1.8
<Scriptonaut>
hmm, I'll give that a try thanks
<adam12>
Scriptonaut: If that doesn't work, my suggestion might be to just try building it manually from source. download tarball; ./configure --with-iconv-dir=/whatever --prefix=/path-to-your-rubies; make; make install
sergioro has joined #ruby
fphilipe_ has joined #ruby
klaas has quit [*.net *.split]
Benett has quit [*.net *.split]
x0n has quit [*.net *.split]
pabs has quit [*.net *.split]
TheBrayn has quit [*.net *.split]
towo has quit [*.net *.split]
liKe2k1 has quit [*.net *.split]
timmow has quit [*.net *.split]
towo_ has joined #ruby
klaas has joined #ruby
liKe2k1- has joined #ruby
pabs has joined #ruby
TheBrayn has joined #ruby
timmow has joined #ruby
thenori has joined #ruby
cxl has quit [Ping timeout: 240 seconds]
cxl has joined #ruby
<adam12>
I forgot how quick Ruby 1.8 compiles.
TorpedoSkyline has quit [Ping timeout: 240 seconds]
<Scriptonaut>
ya it took like 2 mins
TorpedoSkyline has joined #ruby
thenori has quit [Remote host closed the connection]
thenori has joined #ruby
_phaul has joined #ruby
phaul has quit [Ping timeout: 240 seconds]
<adam12>
Scriptonaut: When you `require "iconv"`, Ruby looks through $LOAD_PATH for `iconv.so` and `iconv.rb`. If you still end up with a LoadError when requiring. A) make sure the shared object file exists where you installed Ruby. B) check with ldd to make sure the shared object file is linked to libraries that exist.
sagax has quit [Remote host closed the connection]
tpanarch1st has quit [Ping timeout: 255 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
sagax has joined #ruby
<Scriptonaut>
adam12: prepending RUBY_ to my opts env var fixed my issue, thanks a lot
<adam12>
Scriptonaut: cheers!
jenrzzz has joined #ruby
<adam12>
Scriptonaut: And .. good luck :)
<Scriptonaut>
thanks, I'll be happy to ditch 1.8.7 finally and get this thing up to date
akemhp has quit [Quit: Leaving]
<_phaul>
Scriptonaut: what's your target version you are trying to update to?
<adam12>
Scriptonaut: I bet.
<Scriptonaut>
_phaul: whatever is the newest stable
<Scriptonaut>
the biggest hurdle will be 1.8.7 -> 1.9.3
<Scriptonaut>
after that, nothing too bad
<Scriptonaut>
there's a huge encoding issue between 1.8.7 and 1.9.3
<Scriptonaut>
by the time we finish, probably 4-5 months from now, who knows, 2.8 maybe?
<_phaul>
wow. sounds like a lot of work
<baweaver>
2.8 won't exist
<baweaver>
or at least it's very unlikely to.
<baweaver>
3.0 is the next planned target.
<Scriptonaut>
ya, it's hard to put into words how messed up this stack is. Imagine a 20 year old stack built with legacy asp, ruby 1.8.7 with various ancient rails libraries manually pulled out. Some java, php, and C, all used in the same stack
<Scriptonaut>
oh and windows 2000 and sql server 2000 on 15-20 year old bare metal servers
<Scriptonaut>
oh that's right, 3.0
<Scriptonaut>
we'll probably aim for that
<baweaver>
I'd likely hold off for a bit on that one
<baweaver>
Let the dust settle and see what happens.
<Scriptonaut>
we'll just go with the most recent stable when the time comes
drincruz has joined #ruby
Benett has joined #ruby
* baweaver
needs to get back to writing again
TorpedoSkyline has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drincruz_ has quit [Ping timeout: 265 seconds]
reyfi9e has quit [Remote host closed the connection]
reyfi9e has joined #ruby
lucasb has quit [Quit: Connection closed for inactivity]
TorpedoSkyline has joined #ruby
davispuh has quit [Ping timeout: 268 seconds]
jcalla has quit [Quit: Leaving]
thenori has quit [Remote host closed the connection]
thenori has joined #ruby
wildtrees has quit [Remote host closed the connection]
<hahuang65>
if I had a hash with key value pairs that where I wanted to turn the keys into method names that would return the value as a string, what would be the best practice for that?
wildtrees has joined #ruby
<_phaul>
&>> {a: 1}.each { |k, v| define_method(k) { v } }; a
<hahuang65>
havenwood yeah that might work out. Lemme work up a gist liek _phaul requested. I might be entirely approaching the problem from a wrong direction
<havenwood>
+1 gist
jordanm has quit [Remote host closed the connection]
<hahuang65>
havenwood I know that your suggestion will indeed work, but I'm wondering if doing it like so is a dumb idea in the first place lol
jordanm has joined #ruby
<havenwood>
hahuang65: i don't quite follow your example, maybe because i'm multitasking. i'll try to take a look when i'm next free unless someone beats me to it. why do you need the singleton methods. how is this used?
<hahuang65>
the general idea is, I need to export a CSV which has a set of default columns, but can also have extra columns that are user-specified. Currently I'm stuffing the user-specified columns and values into an instance variable, and if that instance variable exists, I need to populate the CSV row with those columns and their values
davispuh has joined #ruby
Helenah has quit [Read error: Connection reset by peer]
<hahuang65>
havenwood derp, I can just do
<hahuang65>
check if `obj.respond_to?(col)` and if not, access `extra_columns[col]`.
Helenah has joined #ruby
<_phaul>
I think you have a typo in the gist line 4 should contain objects
<_phaul>
prly not important observation..
<hahuang65>
_phaul yeah, good catch, but not really important haha
zlogan2003 has joined #ruby
zlogan2003 has quit [Remote host closed the connection]
donofrio has quit [Remote host closed the connection]
zlogan has quit [Quit: Leaving]
zlogan has joined #ruby
<_phaul>
talking about best practises.. prly object should expose extra_columns as attr_reader
fphilipe_ has quit [Ping timeout: 272 seconds]
<_phaul>
instance_variable_get is a smell
<_phaul>
s/object/company/
wallace_mu has quit [Remote host closed the connection]
<hahuang65>
_phaul alright, good tip
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
Mrgoose845701915 has joined #ruby
sagax has quit [Ping timeout: 240 seconds]
wallace_mu has quit [Remote host closed the connection]
meinside has quit [Quit: Connection closed for inactivity]