<jidar>
it's causing issues with some commands, namely puppet spewing out stuff like `Ignoring byebug-11.1.3 because its extensions are not built. Try: gem pristine byebug --version 11.1.3`
<jhass>
that doesn't sound related
<jidar>
when I run the same command as root, it has no issues
<jhass>
what does gem which byebug, sudo gem which byebug and bundle exec gem which byebug say?
<jidar>
the first lists /usr/share/gems/gems/byebug-11.1.3/lib/byebug.rb, the second /bin/byebug
<jhass>
sudo gem which, not sudo which
<jhass>
what does which ruby (this time without gem) and sudo which ruby say?
ttoocs has quit [Quit: WeeChat 2.8]
<jidar>
sudo gem which is blank, which ruby /usr/bin/ruby, and sudo which ruby => /bin/ruby
<jhass>
sudo gem which byebug of course
<jhass>
so there's a /bin/ruby and a /usr/bin/ruby? weird
<jidar>
$ sudo gem which byebug => /usr/share/gems/gems/byebug-11.1.3/lib/byebug.rb
<jhass>
/bin/ruby -v vs /usr/bin/ruby -v ?
<jidar>
same version
<jidar>
neither are links, oddly
<jidar>
both belong to package: rubypick-1.1.1-12.fc32.noarch
<jhass>
did you try sudo gem pristine byebug fwiw?
<jidar>
I did a while back, I don't recall it fixing the issue but I'll try again
<jhass>
I mean the only message you pointed so far is actually a warning
<jhass>
it's not fatal
<jidar>
well, it later goes on to not find the gem
<jidar>
and then the vendered ruby also produces a bunch of warnings for puppet
sarna has quit [Quit: Connection closed]
burningserenity has quit [Ping timeout: 240 seconds]
<jidar>
from what I'm reading, I expect it to believe GEM_PATH to have the hiera gem, which is in /opt/puppetlabs/bin/hiera, and not in my GEM_PATH
<jhass>
maybe this is more of a fedora/puppet question :/
<jidar>
I guess, but I was really hoping to figure out why my gem env and my .gemrc don't match
<jhass>
if it were a standard ruby app I'd recommend to just delcare what you need in a Gemfile somewhere, bundle --path vendor and bundle exec, sidestepping all the distro mess
<jhass>
but for puppet, idk :/
<jhass>
you keep saying they don't match, but I don't actually see why?
<jhass>
because EXECUTABLE DIRECTORY?
<jhass>
it probably doens't parse the options for gem env like that
<jidar>
- USER INSTALLATION DIRECTORY: /home/jidar/.gem/ruby
<jhass>
USER INSTALLATION DIRECTORY is not affected by either option, it's the directory that's chosen for specifying --user-install
<jhass>
but as said, I wouldn't be surprised if those values are not parsed from the options for gem env
Industrial has quit [Ping timeout: 260 seconds]
Industrial has joined #ruby
schne1der has quit [Ping timeout: 246 seconds]
wymillerlinux has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
<oddp>
Why's StringScanner#scan_until not accepting a string pattern when #scan and similar functions do? What's the reason behind that?
<jidar>
jhass: ok, eventually figured things out. I think gdm or similar was caching some ENV vars I had set for GEM_HOME/GEM_PATH, things seem to be right now
ellcs has quit [Quit: Leaving.]
<jidar>
jhass: is there any possible way to set the bindir for --user-install then? ie: in a config of some sort
<jhass>
it's not working together?
<jhass>
I'd consider that a bug
<jhass>
if you're certain it's not working together (in the latest version, gem update --system), file an issue at https://github.com/rubygems/rubygems
<jhass>
oddp: I doutb the author of StringScanner is here to answer that, sorry
<oddp>
Fair enough. Thanks.
<jhass>
though I don't see the issue, scan until "foo" and scan until /foo/ is the same thing?
<jidar>
jhass: ok, I think I see what you're getting at now, you don't think the output of `gem env` is going to accurately represent the output of say, "gem install --user-install ..." ie: .gemrc has the line: gem: --user-install --bindir /home/jidar/.local/bin -N
<jhass>
yeah
<jidar>
which is actually true, gem env and the actual install are different
<jhass>
but what can passing a string do that passing a regex cannot?
<apotheon>
oddp: Just use /42/ instead of "42" then, I guess.
<apotheon>
15:03 < jhass> though I don't see the issue, scan until "foo" and scan until /foo/ is the same thing?
<jidar>
one is quite a bit slower than the other, no?
<jidar>
ie: regex scanning vs string scanning?
<apotheon>
Technically, I think scanning until /foo/ might differ from scanning until "foo" in that /foo/ might involve more parsing behind the scenes.
<apotheon>
Then again, I'm not sure how the parsing for /foo/ and "foo" differ under the hood. If it was 'foo', I'd feel more confident that there's less parsing than for "foo".
<apotheon>
jidar: Yeah, that's what I was just saying.
<apotheon>
jidar: great minds, et cetera
<jhass>
if you have that level of performance concerns, Ruby might not be the right tool for your problem, StringScanner certainly isn't (vs a dedicated parsing library)
<jidar>
where is stdlib even stored for ruby?
apotheon has quit [Remote host closed the connection]
apotheon has joined #ruby
<jhass>
I think each distro does it a little different unfortunately. But should be somewhere below ruby -e 'puts $LOAD_PATH'
<apotheon>
That'd actually add a parsing step or two.
<apotheon>
. . . but it'd allow for string representations to be passed as arguments.
<jhass>
jidar: where does that do anything I described?
<jidar>
I mean the struct at the top there is setting previous/next/current markers to do string matching
<jhass>
apotheon: maybe, but it's essentially a lie. I'm sure String#scan(String) actually has a more efficient implementation than that, without even looking
<jhass>
jidar: pretty sure that's just positions to hand to the regex engine
<apotheon>
jhass: Yeah, I'd guess so, too.
<jidar>
ah well, I am very rusty with c
<apotheon>
I didn't say I especially *liked* my approach.
<apotheon>
s/my approach/"my" approach/
Industrial has quit [Ping timeout: 265 seconds]
<jhass>
jidar: don't get me wrong, I don't say it would be terribly hard to add an efficient implementation to match against a static string token vs a regex. It's just not there.
chris__ has joined #ruby
Try2Code has quit [Quit: leaving]
burningserenity has joined #ruby
pgib has quit [Ping timeout: 240 seconds]
chris__ has quit [Ping timeout: 256 seconds]
howdoi has joined #ruby
doomlist3 has joined #ruby
mossplix has joined #ruby
pgib has joined #ruby
doomlist3 has quit [Quit: not part but quit]
TCZ has quit [Quit: Leaving]
ctOS has quit [Quit: Connection closed for inactivity]
ellcs has joined #ruby
al2o3-cr has quit [Quit: WeeChat 2.8]
al2o3-cr has joined #ruby
Industrial has joined #ruby
ChmEarl has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ellcs has quit [Ping timeout: 244 seconds]
rippa has joined #ruby
chris__ has joined #ruby
cd has joined #ruby
chris__ has quit [Remote host closed the connection]
ellcs has joined #ruby
chris__ has joined #ruby
orbyt_ has joined #ruby
<pgib>
Hi. I'm having some trouble with my bundler environment. I'm no Ruby expert, so I appreciate the help. Here is a synopsis w/ some shell transcripts: https://dpaste.org/V5qw Thanks
<havenwood>
pgib: I responded the other day, but maybe you missed my comments.
<pgib>
I must have. Sorry for reposting
<havenwood>
pgib: No prob at all.
<havenwood>
pgib: Multitasking right now or I'd post a link.
<pgib>
REDACTED/vendor/bundle/ruby/2.3.0/gems/activesupport-4.1.15/lib/active_support/cache.rb:105:in `rescue in retrieve_store_class': Could not find cache store adapter for dalli_store (cannot load such file -- dalli) (RuntimeError
<havenwood>
pgib: HRMMM
<havenwood>
oops, caps
<havenwood>
pgib: Same with?: bin/rails console
bocaneri has quit [Read error: Connection reset by peer]
<pgib>
bundle exec bin/rails c => same. ./bin/rails c => same
mossplix has quit [Remote host closed the connection]
mossplix has joined #ruby
<pgib>
I'll bootstrap a vagrant box and see if it has the same issue.
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
postmodern has joined #ruby
justache has quit [Remote host closed the connection]
justache has joined #ruby
davispuh has joined #ruby
colins has joined #ruby
vondruch_ has joined #ruby
gix has joined #ruby
vondruch has quit [Ping timeout: 244 seconds]
vondruch_ is now known as vondruch
Emmanuel_Chanel has quit [Ping timeout: 260 seconds]
Emmanuel_Chanel has joined #ruby
<pgib>
Meh... of course development just uses memory_store.
<pgib>
I'll have to work through that. It is just very odd to me. The files seem to be in place. Staging can't find them though. And even 'bundle show' doesn't *find* dalli, but it knows about it enough to suggest it
<pgib>
Looking like i just need to roll back to 2.1.5 and let this thing bitrot even further.
schne1der has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
postmodern has quit [Quit: Leaving]
mossplix has quit [Remote host closed the connection]
<adam12>
pgib: Oh I see you responded to me.
<adam12>
pgib: Can you paste `bundle env` somewhere?
nofxx has quit [Remote host closed the connection]
<adam12>
pgib: The bundle setting `without` looks uber odd to me.
mossplix has joined #ruby
<adam12>
pgib: Out of curiosity, can you try deleting that value? `bundle config --local without ""`
<adam12>
pgib: Then see what `bundle exec ruby -rdalli -e true` shows
TCZ has joined #ruby
<adam12>
pgib: It's definitely a strange one.
cnsvc has joined #ruby
mossplix has quit [Remote host closed the connection]
mossplix has joined #ruby
<pgib>
thanks. will try
jinie_ has joined #ruby
<pgib>
Could not find annotate-2.6.5 in any of the sources
jinie has quit [Ping timeout: 265 seconds]
jinie_ is now known as jinie
<pgib>
adam12 - I can try a bundle install, but don't want to jump the gun if you have bigger ideas
<adam12>
pgib: Annotate is in the development group. Maybe update the config to be development:test. `bundle config --local without "development:test"`
jetchisel has joined #ruby
chris__ has quit [Remote host closed the connection]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
s_ has quit [Ping timeout: 260 seconds]
s_ has joined #ruby
bmurt has joined #ruby
<pgib>
$ bundle exec ruby -rdalli -e true
<pgib>
[snip]/runtime.rb:34:in `block in setup': You have already activated dalli 2.7.10, but your Gemfile requires dalli 2.7.2. Prepending `bundle exec` to your command may solve this. (Gem::LoadError)
<adam12>
pgib: Well that's closer I guess.
<adam12>
pgib: Same deal with `ruby -rbundler/setup -rdalli -e true`?
<pgib>
yeah. I'm just happy to see a different message for once
<pgib>
Exits with no output, returncode = 0
<pgib>
adam12
<adam12>
pgib: So it's working. What about your rails stuff you were trying?
<pgib>
adam12: it successfully deploys now. So, wtf was that about? Excuse me for being ignorant.
<adam12>
pgib: My guess is that bundler wasn't really sure what to do with the load paths, since `without` included all groups.
<adam12>
pgib: You specified `with` when installing, but it never stuck. So when you ran anything, bundler looked at the without group in the config and decided it could only setup load paths for ungrouped gems.
<adam12>
pgib: dalli was probably the first grouped dependency to be required because of where it was in the chain. Probably could of been any gem at any time.
<adam12>
pgib: Not sure if the `--with` being ignored when `--without` was set is a bug or not. I don't normally mix them.
<pgib>
makes sense. And all of this environment was setup by the orig devs who left a year or so ago. This is a medium sized internal system that doesn't get much attention, so all those details were lost to the ages.
<pgib>
All I wanted to do was use the &. operator ;-)
<adam12>
pgib: Yea :(
<pgib>
Thanks for your keen eye.
<adam12>
pgib: Cheers :)
orbyt_ has joined #ruby
<pgib>
Because I dislike emojis: :cheers:
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dfucci has quit [Ping timeout: 240 seconds]
burningserenity has quit [Remote host closed the connection]
Industrial has quit [Ping timeout: 264 seconds]
dfucci has joined #ruby
kinduff has quit [Read error: Connection reset by peer]
Iambchop has quit [Read error: Connection reset by peer]
kinduff has joined #ruby
Iambchop has joined #ruby
chris__ has joined #ruby
ur5us has joined #ruby
TomyWork has quit [Remote host closed the connection]
TomyWork has joined #ruby
schne1der has quit [Ping timeout: 246 seconds]
chris__ has quit [Ping timeout: 256 seconds]
Bounga has joined #ruby
ctOS has joined #ruby
ellcs has quit [Ping timeout: 244 seconds]
TCZ has quit [Quit: Leaving]
Swyper has joined #ruby
dfucci has quit [Ping timeout: 264 seconds]
dfucci has joined #ruby
lazarus1 has joined #ruby
levifig has joined #ruby
code_zombie has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
extrowerk has quit [Ping timeout: 260 seconds]
extrowerk_ has joined #ruby
mossplix has quit [Ping timeout: 265 seconds]
extrowerk_ is now known as extrowerk
drincruz has quit [Ping timeout: 265 seconds]
mossplix has joined #ruby
jenrzzz has joined #ruby
chris__ has joined #ruby
chris__ has quit [Ping timeout: 265 seconds]
troulouliou_dev has joined #ruby
TCZ has joined #ruby
mossplix has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 260 seconds]
lazarus1 has quit [Quit: Leaving]
coniptor has quit [Ping timeout: 265 seconds]
nychtel has joined #ruby
<nychtel>
Hey all
<nychtel>
Hey all. I was wondering, is there a way to manually pass a string through ruby's interpolation?
<nychtel>
Like, if I load up a file of SQL commands and want to put #{table_name} in there
<nychtel>
can I somehow pass that string through interpolation?
TCZ has quit [Quit: Leaving]
TomyWork has quit [Ping timeout: 244 seconds]
ur5us has quit [Ping timeout: 244 seconds]
<apotheon>
Is there a good IRC bot gem replacement for Cinch, or does having a good gem for that necessarily entail creating it at this point?
<kaleido>
i like cinch
<apotheon>
It's a dead project as of 2019-04-13.
<kaleido>
all the necessary guts are there and adding your own stuff is pretty easy
<havenwood>
nychtel: You can interpolate into a String just like you wrote. I'm confused what you're asking.
<apotheon>
kaleido: Yeah, but then I'd have to become the maintainer for a Cinch fork.
r3m has quit [Quit: WeeChat 2.9-dev]
<kaleido>
not really, just write addons that do what you want
<havenwood>
nychtel: Ah, maybe I kinda glean the point. You want to interpolate into a file?
<apotheon>
I think you fail to undertand the underlying problem -- that the library will not keep up with new Ruby versions and updated dependencies.
<havenwood>
nychtel: You can use #format or more commonly erb.
<kaleido>
apotheon: ahh *shrug* from my searching it's the only decent one out there
<apotheon>
I mean, if I wanted to use something that will never get another needed update, I could just write a bot with Isaac, which hasn't been updated since 2009.
ur5us has joined #ruby
<apotheon>
If the answer is "no, there isn't anything", then I'll contemplate whether I want to maintain a Cinch fork or fall back to writing a bot in C.
<kaleido>
i haven't found anything else :(
<apotheon>
I was just wondering if there's an alternative that will measure up.
<apotheon>
le sad
<havenwood>
apotheon: Write a C bot library and Ruby FFI. :P
<apotheon>
May . . . be . . .
<apotheon>
It's an option.
ctOS has quit [Quit: Connection closed for inactivity]
<nychtel>
I just figured since most of the heavy lifting was done by sql it doesn't make readability sense to do it statement by statement with ActiveRecord::Base.connection.execute or the like
UncleCid has joined #ruby
<nychtel>
The 10 lines of SQL will read like a normal SQL script, and ruby only does the part it's needed for: the table name.
<nychtel>
Super thanks again havenwood, that was the idea I was looking for but couldn't quite arrive at.