<Zladivliba>
(i'm trying to import wordpress comments)
<Zladivliba>
into Jekryll
<Zladivliba>
And i'm getting this exception : Liquid Exception: (..._comments/82582-2017-11-29-gdpr.md): did not find expected key while parsing a block mapping at line 2 column 1 in /_layouts/post.html
<apeiros>
hm, I don't know jekyll nor liquid, and it seems to me that without knowing them it's a bit difficult to interpret this error
KeyJoo has quit [Remote host closed the connection]
alfiemax has joined #ruby
<ccooke>
The only places Liquid is called are lines 25 and 30.
tdy has quit [Ping timeout: 248 seconds]
<bhaak>
but isn't that a yaml error? IIRC jekyll uses yaml for setting meta data (e.g. the title of the generated html). in that case 82582-2017-11-29-gdpr.md would have some syntax error in the yaml part
<Zladivliba>
ccooke: good point
<Zladivliba>
bhaak: it's good point - the initial problem i was having was that when the comments are imported some of them contains semi-columns, which breaks Liquid syntax, so I removed them with python script
mlkkk has joined #ruby
<Zladivliba>
now i'm not sure what the error is about : not mapping what ? the article ? or what else...
<Inside>
So here base.validates works - I was expecting base.load_serial_numbers to work as well
<apeiros>
yeah, while ruby on rails got a lot better, I wouldn't consider it a role model in quite a couple regards :-/
alfiemax has quit [Remote host closed the connection]
<apeiros>
you probably should make beater_sn an array instead of having beater1-4_sn
<apeiros>
but let me try to find an answer to your question re "how should I do the mixin"
cschneid has joined #ruby
blackmesa has joined #ruby
<apeiros>
when you say "a bit of ruby on rails" - do you actually use that in ruby on rails?
<Inside>
Yes, haha.
<apeiros>
you probably should read their guide on how to do custom validators
<Inside>
Here's my use case: I have a very large legacy table with hundreds of columns. I'm trying to create a series of controllers that touches only a couple of columns at a time. However, some controllers need to touch the same columns as the other controllers so I'm trying to pull some of the custom validators & loading/saving code into a mixin
<apeiros>
yeah, rails provides ways to create validation classes. I think that's the way to go.
<Inside>
The validators work, it's just the common loading/unloading part that doesn't since I'm not sure how to pull out the loading/saving part into a some sort of callback chain on the base class
<apeiros>
but questions related to that are better asked over in #rubyonrails
<Inside>
Well - the RoR part works - it's the ruby mixin part that doesn't :P
<apeiros>
yeah, you can't use load_beater_serial_numbers within the included. you probably want to register an after_initialize hook instead.
dr3w_ has quit [Ping timeout: 260 seconds]
<apeiros>
so while you say "it's the ruby mixin" I tell you "it's related to how rails works and you'll make use of rails facilities" :-p
<apeiros>
oh, cross-posting without telling. well then, good luck.
<Inside>
:|
RougeR has joined #ruby
RougeR has quit [Changing host]
RougeR has joined #ruby
<ellcs>
what is meant with cross-posting?
<apeiros>
asking in other channels
<Inside>
Is that frowned upon? Since i've been doing that for years :P
<apeiros>
did you update #rubyonrails on what information you got from here?
leitz has quit [Quit: Nappy time]
saksida has quit [Ping timeout: 248 seconds]
saksida has joined #ruby
aupadhye has quit [Ping timeout: 256 seconds]
synthroid has quit [Remote host closed the connection]
Keltia_ is now known as Keltia
<Inside>
Not yet - still looking for something new to add to that conversion
<Inside>
conversation
BloopMonsterOMG has joined #ruby
amar has joined #ruby
ellcs has quit [Remote host closed the connection]
<apeiros>
and you don't see a problem with that behavior?
pabs has quit [Ping timeout: 240 seconds]
pabs has joined #ruby
pastorinni has joined #ruby
ta_ has joined #ruby
synthroid has joined #ruby
<Inside>
what would you like me to cross post over there?
<Inside>
I don't 100% get where you're coming from
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros>
the bare minimum is to announce that you are asking elsewhere too
amar has quit [Ping timeout: 265 seconds]
blackmesa has quit [Ping timeout: 245 seconds]
<apeiros>
I'm coming from not wanting to waste my time explaining you something somebody else already explained you elsewhere
<Inside>
Fair enough
<Inside>
Although that's the first time I've been asked that in 20 years of IRCing
<Inside>
But I will keep that in mind.
<Inside>
(Well, 18)
<apeiros>
yeah, look, some things you should think of yourself without people having to tell you.
<Inside>
I don't ever recall anyone posting a cross-post notice before either.
<Inside>
I'm 100% serious. Never crossed my mind.
BloopMonsterOMG has quit [Ping timeout: 245 seconds]
byte00 has quit [Ping timeout: 265 seconds]
<apeiros>
a) they didn't realize you cross-post, b) they realized it and simply did what I normally do: ignored you
<Inside>
well - ok then
jrafanie has joined #ruby
amar has joined #ruby
kapil___ has quit [Remote host closed the connection]
mlkkk has quit [Remote host closed the connection]
chat__ has joined #ruby
<CuriousMind>
siaw23: I guess so yes. I am learning rails still
chat_ has quit [Ping timeout: 248 seconds]
Burgestrand has joined #ruby
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
alfiemax has joined #ruby
shwouchk has joined #ruby
weird_error has joined #ruby
<siaw23>
i strongly believe this is coming from ActiveStorage and that your setup might be off, mind sharing your repo so i can have a look?
<siaw23>
@CuriousMind ^^
alfiemax has quit [Ping timeout: 256 seconds]
venmx has quit [Ping timeout: 260 seconds]
fmcgeough has joined #ruby
krawchyk has quit [Quit: krawchyk]
alfiemax has joined #ruby
siaw23 has left #ruby [#ruby]
sphenxes has joined #ruby
sanscoeur has joined #ruby
amar has joined #ruby
kt has quit [Ping timeout: 276 seconds]
ta_ has joined #ruby
mtkd has quit []
kt has joined #ruby
amar has quit [Ping timeout: 256 seconds]
kt has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
amar has joined #ruby
kt has joined #ruby
CuriousMind has quit [Ping timeout: 260 seconds]
ramfjord has joined #ruby
tdy has joined #ruby
jottr has quit [Ping timeout: 240 seconds]
mtkd has joined #ruby
thebetrayer has quit [Ping timeout: 265 seconds]
ramfjord has quit [Read error: Connection reset by peer]
ldepandis has joined #ruby
raynold has joined #ruby
BloopMonsterOMG has joined #ruby
amar_ has joined #ruby
kt has quit [Ping timeout: 276 seconds]
kt has joined #ruby
BotBelBroche has joined #ruby
<BotBelBroche>
hi
<havenwood>
BotBelBroche: hi
<BotBelBroche>
can you help me
BotBelBroche has quit [Client Quit]
blackmesa has joined #ruby
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
amar has quit [Ping timeout: 265 seconds]
BloopMonsterOMG has quit [Ping timeout: 260 seconds]
_habnabit has joined #ruby
<_habnabit>
hey! is sigprocmask(2) exposed in ruby somewhere? looking to set the procmask so it's inherited by a child
kmurphy4 has quit [Remote host closed the connection]
guille-moe has joined #ruby
blizzow has joined #ruby
mlkkk has joined #ruby
<blizzow>
I'm doing some maintenance on a really old(unmaintained) ruby app that uses mongoid/moped to connect to a mongo database. For some reason, I'm getting lots of errors for each member of my replica set:
<blizzow>
"MOPED: Could not resolve IP for: myreplicasethost.mydomain.com:27017 runtime n/a"
<blizzow>
I'm hoping someone in here might have an idea of what's going on. If I log into the host, it's able to ping my mongo database hosts just fine.
bradland has joined #ruby
SeepingN has joined #ruby
hinbody has joined #ruby
hinbody has left #ruby [#ruby]
<gizmore>
blizzow: dns problem
cagomez has joined #ruby
leitz has joined #ruby
sauvin has quit [Read error: Connection reset by peer]
aspleenic has joined #ruby
pastorinni has quit [Remote host closed the connection]
guille-moe has quit [Ping timeout: 240 seconds]
<aspleenic>
is this still an active IRC channel?
<leitz>
Okay, stuck newbie. I have an array of small hashes, and iterate over the array to pull a value out as a key. Then the code makes an Object with the key as the name and the original hash as input. How can I pull an object from the hash of objects? https://gist.github.com/LeamHall/8ff47f1b1cbd42fdc83509ca00b23a60
<blizzow>
gizmore, the host that the app runs on is able to ping the mongo members just fine.
<blizzow>
I'm trying to find out why/where/how Resolv::DNS is failing.
jenrzzz has quit [Ping timeout: 276 seconds]
alfiemax_ has joined #ruby
Mike11 has joined #ruby
alfiemax has quit [Ping timeout: 248 seconds]
lmat has joined #ruby
<lmat>
I ran gem install vimgolf; (and it says, " Successfully installed vimgolf-0.4.8" and had some error about documentation (RDoc is not installed: cannot load such file -- rdoc/rdoc). When I run vimgolf setup, I get "-bash: vimgolf: command not found"
<lmat>
Where is vimgolf supposed to be?
tdy has quit [Ping timeout: 240 seconds]
eckhardt_ has joined #ruby
<Inside>
leitz: You need to do p["name"] instead of p.name
thebetrayer has joined #ruby
<Inside>
wait, ignore that
<leitz>
Inside, I forgot to use key and value.
<Inside>
First, on line 36 you're doing p.name - there is no variable 'p' anywhere
<lmat>
(gem is a ruby thing, right...)
<leitz>
lmat, yes.
<leitz>
lmat, not sure what vimgolf is though. Sorry.
<lmat>
leitz: I would think the installation procedure is similar enough for different packages...where do packages usually get installed? I didn't run as root.
<leitz>
Inside, the answer is in line 32 I need to use { |key, person| and then "puts person.name', etc.
<Inside>
Yes, that too
<leitz>
lmat, I think you have to install gems as root. They usually goi in /usr/local/lib/ in my machine.
<lmat>
leitz: I see
<Inside>
if you do {k: v, k:v} .each { |x| ... } x takes on the values [key,value]
<Inside>
or you can expand that array implicitly by doing |key,value|
<havenwood>
lmat: Check: gem env gemdir
<leitz>
lmat, look in /usr/local/lib/ruby/gems/<ruby version>/gems.
<leitz>
Or do what havenwood said. :)
<havenwood>
lmat: You'll want the GEM_ROOT/bin in your PATH.
<havenwood>
we should add an env command flag for the RubyGems bin dir directly
<havenwood>
bindir
coderphive is now known as ChrisHansen
ChrisHansen is now known as coderphive
alfiemax has joined #ruby
alfiemax_ has quit [Ping timeout: 245 seconds]
alfiemax has quit [Remote host closed the connection]
<blizzow>
if I hopen an interactive session (irb) and do: require 'resolv' then I do: Resolv::DNS.new.each_address("myhost.mydomain.com") { |addr| puts addr } I get "nil" as a response from one of my containers. Even if I make an entry in /etc/hosts, it still returns nil.
alfiemax has joined #ruby
<blizzow>
Anyone know where resolv is trying to resolve hosts? If I do a dig or nslookup from the host, it resolves fine.
karapetyan has quit [Remote host closed the connection]
mlkkk has quit [Remote host closed the connection]
karapetyan has joined #ruby
mlkkk has joined #ruby
postmodern has joined #ruby
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
alfiemax has quit [Ping timeout: 240 seconds]
sparr has quit [Changing host]
sparr has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jrabe has quit [Quit: Disconnected]
eelster has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jrabe has joined #ruby
Rapture has quit [Ping timeout: 265 seconds]
mlkkk has quit [Remote host closed the connection]
alfiemax has joined #ruby
CuriousMind has joined #ruby
<CuriousMind>
siaw23, I am back sorry
<CuriousMind>
havenwood: Hi, I am back sorry
blizzow has quit [Ping timeout: 260 seconds]
<CuriousMind>
Can you still help me with my problem which is my crashing heroku app?
c0ncealed1 has quit [Remote host closed the connection]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Mike11 has quit [Max SendQ exceeded]
ramfjord has joined #ruby
bmurt has joined #ruby
grilix_ has quit [Ping timeout: 260 seconds]
Dice has quit [Ping timeout: 260 seconds]
ldepandis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Guest27724 has quit [Changing host]
Guest27724 has joined #ruby
Guest27724 is now known as Nicmavr
guacamole has joined #ruby
Dabo has joined #ruby
roamingdog has joined #ruby
Rapture has joined #ruby
kmurphy4 has joined #ruby
rubyblunder has joined #ruby
<rubyblunder>
Hi there, Can anyone help me with the steps to compile this github repo of a static site https://github.com/cis198-2016s/cis198-2016s.github.io? I'm not familiar with what one does with a repo that has Gemfiles... and I can't seem to find a simple answer on google. Thanks so much!
dionysus69 has quit [Ping timeout: 245 seconds]
Mike11 has joined #ruby
rubyblunder has quit [Quit: Page closed]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
mitsuhiko_ is now known as mitsuhiko
byte00 has joined #ruby
mitsuhiko has quit [Changing host]
mitsuhiko has joined #ruby
siery has joined #ruby
krawchyk has quit [Quit: krawchyk]
<siery>
Hi! Can someone help me to make `line.each_char.with_index do |char, x|` loop to iterate each second character, like 0, 2, 4 ..
minimalism has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
synthroid has quit []
byte00 has quit [Ping timeout: 260 seconds]
<dminuoso>
>> 1.step.lazy.filter(&:odd).take(50)
<ruby[bot]>
dminuoso: # => undefined method `filter' for #<Enumerator::Lazy: #<Enumerator: 1:step>> (NoMethodError) ...check link for more (https://eval.in/1014893)
<dminuoso>
>> 1.step.lazy.select(&:odd?).take(50)
<ruby[bot]>
dminuoso: # => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:select>:take(50)> ...check link for more (https://eval.in/1014894)
<siery>
I am writing load module to my game map, and each tile is codet with two charasters in the file (s, i) where s is tile number and i is the item used by one other object
<ruby[bot]>
havenwood: # => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: "siery":each_char>>:each_s ...check link for more (https://eval.in/1014901)
<havenwood>
baweaver: I tried ^ to make Enumerable#step pass relevant Range#step specs.
<wkoszek_>
what's so magic about json extension, that unlike e.g.: yaml extension, it has to be compiled each time you want to gem install it?
<baweaver>
You should add that to a Ruby core issue havenwood
<baweaver>
Probably FFI vs native C extension if I had to bed wkoszek_
<havenwood>
baweaver: Good idea. If they accepted it the TruffleRuby implementation is done. ;-)
<wkoszek_>
it's like the top issue I'm having figuring how to deploy my ruby code
<havenwood>
baweaver: On that note, have you seen enumerator_generate? I think that's an interesting approach to getting an unfoldesque function: https://github.com/zverok/enumerator_generate
emilford has quit [Ping timeout: 248 seconds]
<wkoszek_>
That was my guess too, but looking at the repo, the 'ext' directory, there's bunch of plugins.
emilford has joined #ruby
<wkoszek_>
Including the one for YAML, for which there's no drama
<wkoszek_>
And it also has a pile of .c files there.
tvw has quit []
amar_ has quit [Ping timeout: 265 seconds]
shinnya has joined #ruby
GodFather has quit [Ping timeout: 264 seconds]
hph^ has joined #ruby
sanscoeu_ has quit [Remote host closed the connection]
ta_ has quit [Ping timeout: 260 seconds]
amar has joined #ruby
p0p0pr37_ has joined #ruby
p0p0pr37_ has quit [Changing host]
p0p0pr37_ has joined #ruby
<wkoszek_>
it's a little weird, since otherwise, one could e.g.: get sinatra app deployed in a alpine docker image with just like 100MB of stuff
<wkoszek_>
but for `bundle install` with sinatra which sucks in json you need to fetch ruby-dev, g++ and make
<wkoszek_>
which isn't so beautiful.
p0p0pr37 has quit [Ping timeout: 240 seconds]
p0p0pr37_ is now known as p0p0pr37
emilford has quit [Ping timeout: 256 seconds]
chat_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 240 seconds]
emilford has joined #ruby
Azure has quit [Read error: Connection reset by peer]
pastorinni has quit [Remote host closed the connection]
jenrzzz has joined #ruby
chat has joined #ruby
chat_ has quit [Ping timeout: 256 seconds]
eckhardt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eckhardt_ has joined #ruby
chat has quit [Ping timeout: 256 seconds]
kmurphy4 has quit [Quit: kmurphy4]
chat has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
kmurphy4 has joined #ruby
tlaxkit has joined #ruby
snickers has joined #ruby
ramfjord_ has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
ogres has joined #ruby
chat_ has joined #ruby
chat has quit [Ping timeout: 240 seconds]
eckhardt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eelster has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
amar has quit [Remote host closed the connection]
amar has joined #ruby
amar has quit [Ping timeout: 248 seconds]
chat has joined #ruby
chat_ has quit [Ping timeout: 256 seconds]
zautomata has quit [Ping timeout: 248 seconds]
<havenwood>
wkoszek_: Ruby does ship with the JSON gem. Show us your Gemfile?
jcarl43 has quit [Quit: WeeChat 2.1]
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<wkoszek_>
havenwood: Just has the sinatra in it.
<wkoszek_>
havenwood: And during numerous occasions, I'm hitting "gem failed to build a native extension"
eckhardt_ has joined #ruby
agit0 has quit [Ping timeout: 256 seconds]
<wkoszek_>
havenwood: Was wondering why it's happening at all, if json is in stdlib.
Lyubo1 has joined #ruby
<havenwood>
wkoszek_: If you can't build native extensions you get limited to pure Ruby gems. It's possible you're building a newer version of Ruby than shipped with the stdlib.
<havenwood>
wkoszek_: I'd suggest just installing build tools.
<havenwood>
a newer version of JSON*
<havenwood>
wkoszek_: Are you using Ruby 2.5.1? Is it a new Gemfile, or is there already a Gemfile.lock?
<wkoszek_>
havenwood: Let me see. It's whatever alpine linux ships with.
<wkoszek_>
havenwood: No .lock file. Just a Gemfile + pure system. I'm essentially making myself a miniature Docker dev environment with Ruby + Sinatra in it.
karapetyan has quit [Remote host closed the connection]
<wkoszek_>
havenwood: I don't get it. Doesn't Ruby's JSON require libjson as well ?
<havenwood>
wkoszek_: nope
<wkoszek_>
Ah, I see.
pabs has quit [Ping timeout: 260 seconds]
<wkoszek_>
havenwood: So whatever Ruby has for JSON serialization/deserialization is faster than libjson ?
<wkoszek_>
I think the question is: why is it the way it is.
* wkoszek_
was wondering if that would be a good project for a ruby hacking
<havenwood>
wkoszek_: Someone wrote a pure Ruby, C and Java implementation of the JSON spec. It's fast and uses less memory than libjson. You can't use libjson on JRuby.
<havenwood>
wkoszek_: Not Ruby's JSON is slightly slower than libjson, but uses less than 3x the memory.
<havenwood>
Note*
<wkoszek_>
This is very informative.
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
<havenwood>
wkoszek_: libjson is ~30% faster but uses 3x the memory
cagomez has quit [Ping timeout: 245 seconds]
<havenwood>
wkoszek_: believe it or not, many Ruby libs are actually memory conscious!
ogres has quit [Read error: Connection timed out]
chat_ has joined #ruby
ogres has joined #ruby
<wkoszek_>
havenwood: I can see that. I'm here just because I've seen so many hacks like: 'bundle install' <- fails with json building. Solution: 'gem install json -v 1.8.3' that finally I decided to ask about that.