havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.7.1, 2.6.6, 2.5.8: 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!
Try2Code has quit [Quit: Lost terminal]
s_ has quit [Ping timeout: 260 seconds]
s_ has joined #ruby
cadeskywalker has quit [Ping timeout: 260 seconds]
mossplix has joined #ruby
gix has quit [Ping timeout: 264 seconds]
mossplix has quit [Ping timeout: 264 seconds]
postmodern has quit [Quit: Leaving]
cadeskywalker has joined #ruby
drincruz has joined #ruby
oddp has quit [Ping timeout: 258 seconds]
drincruz has quit [Ping timeout: 246 seconds]
dfucci has quit [Read error: Connection reset by peer]
dfucci has joined #ruby
alexherbo24 has joined #ruby
alexherbo2 has quit [Ping timeout: 265 seconds]
alexherbo24 is now known as alexherbo2
reaVer has joined #ruby
mossplix has joined #ruby
meinside has joined #ruby
drincruz has joined #ruby
drincruz has quit [Ping timeout: 260 seconds]
cnsvc has joined #ruby
rafadc has joined #ruby
venmx has quit [Ping timeout: 240 seconds]
s_ has quit [Ping timeout: 260 seconds]
venmx has joined #ruby
s_ has joined #ruby
thecoffemaker has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
guinslym has joined #ruby
guinslym has quit [Client Quit]
SeepingN has quit [Ping timeout: 256 seconds]
chris__ has joined #ruby
venmx has quit [Ping timeout: 240 seconds]
chris__ has quit [Ping timeout: 256 seconds]
cnsvc has quit [Quit: WeeChat 2.8]
davispuh has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
bmurt has joined #ruby
f3ttX] has joined #ruby
Garb0 has joined #ruby
kinduff has quit [Read error: Connection reset by peer]
kinduff has joined #ruby
bradfordli123 has joined #ruby
<bradfordli123> hello
<havenwood> bradfordli123: hi
drincruz has joined #ruby
jimeh has quit [Ping timeout: 240 seconds]
<bradfordli123> i am trying to test my controller helpers but Rspec is giving me an undefined method error : https://dpaste.org/jBcZ
gorsuch has quit [Ping timeout: 265 seconds]
Mutsuhito has quit [Ping timeout: 240 seconds]
redlegion has quit [Ping timeout: 260 seconds]
itok has quit [Ping timeout: 260 seconds]
MentalPower has quit [Read error: Connection reset by peer]
teej has quit [Read error: Connection reset by peer]
markin has quit [Read error: Connection reset by peer]
<havenwood> bradfordli123: So `helper` is `nil` there?
fowlduck has quit [Ping timeout: 240 seconds]
pitastrudl has quit [Ping timeout: 246 seconds]
<bradfordli123> Not really sure why this error is happening. But yes I think helper is `nil`. for some reason
<bradfordli123> havenwood I'm not sure how rails is importing my helpers to be used
jimeh has joined #ruby
markin has joined #ruby
gmcintire has quit [Ping timeout: 240 seconds]
darthThorik has quit [Ping timeout: 260 seconds]
pyrmont has quit [Ping timeout: 260 seconds]
MentalPower has joined #ruby
pitastrudl has joined #ruby
Mutsuhito has joined #ruby
<havenwood> bradfordli123: What do you expect `helper` to be? I'm used to Minitest with Rails.
<bradfordli123> havenwood at the top of my spec file I have `require 'rails_helper'` but not the admin_helper.rb file where the method lives
itok has joined #ruby
fowlduck has joined #ruby
<bradfordli123> havenwood I am expecting helper to be my `AdminsHelper` module which is in `admins_helper.rb`
teej has joined #ruby
teej has quit [Max SendQ exceeded]
darthThorik has joined #ruby
pyrmont has joined #ruby
itok has quit [Max SendQ exceeded]
gorsuch has joined #ruby
redlegion has joined #ruby
gmcintire has joined #ruby
<havenwood> bradfordli123: Have you looked at the `spec/rails_helper.rb` file?
jenrzzz has joined #ruby
itok has joined #ruby
<bradfordli123> havenwood yes i have and it doesn't contain anything related to my helpers
<havenwood> bradfordli123: I'm not a good person to help on this one. I don't recall RSpec Rails conventions.
<bradfordli123> no worries havenwood thanks anyways =]
s2013 has joined #ruby
itok has quit [Max SendQ exceeded]
teej has joined #ruby
teej has quit [Max SendQ exceeded]
itok has joined #ruby
teej has joined #ruby
teej has quit [Max SendQ exceeded]
BH23 has quit [Ping timeout: 260 seconds]
teej has joined #ruby
stdedos has quit [Quit: Connection closed]
braincrash has quit [Quit: bye bye]
braincrash has joined #ruby
drincruz has quit [Ping timeout: 260 seconds]
jenrzzz has quit [Ping timeout: 256 seconds]
tau has joined #ruby
tau has joined #ruby
bradfordli123 has quit [Remote host closed the connection]
Mia has quit [Ping timeout: 240 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mossplix has quit [Remote host closed the connection]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s2013 has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
wymillerlinux has joined #ruby
postmodern has joined #ruby
mossplix has joined #ruby
mossplix has quit [Ping timeout: 260 seconds]
duderonomy has joined #ruby
donofrio_ has joined #ruby
djdduty has joined #ruby
donofrio has quit [Ping timeout: 256 seconds]
Technodrome has joined #ruby
f3ttX] has quit [Remote host closed the connection]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
bambanx has quit [Quit: Leaving]
ChmEarl has quit [Quit: Leaving]
donofrio_ has quit [Remote host closed the connection]
s_ has quit [Ping timeout: 260 seconds]
s_ has joined #ruby
Garb0 has quit [Ping timeout: 260 seconds]
Garb0 has joined #ruby
chris__ has joined #ruby
chris__ has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wymillerlinux has quit [Ping timeout: 256 seconds]
rhe has quit [Ping timeout: 258 seconds]
rhe has joined #ruby
SeepingN has joined #ruby
leah2 has joined #ruby
djdduty has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
cd has quit [Quit: cd]
djdduty has joined #ruby
schne1der has joined #ruby
bocaneri has joined #ruby
cnsvc has joined #ruby
tau has quit [Ping timeout: 258 seconds]
Garb0_ has joined #ruby
Garb0 has quit [Ping timeout: 265 seconds]
mossplix has joined #ruby
mossplix has quit [Ping timeout: 265 seconds]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dfucci has quit [Ping timeout: 265 seconds]
Garb0__ has joined #ruby
Garb0__ has quit [Max SendQ exceeded]
dfucci has joined #ruby
Garb0__ has joined #ruby
Garb0_ has quit [Ping timeout: 260 seconds]
Garb0__ has quit [Remote host closed the connection]
Uncle_Cid has quit [Remote host closed the connection]
Uncle_Cid has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
chris__ has joined #ruby
chris__ has quit [Ping timeout: 265 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
TheBrayn has quit [Quit: WeeChat 2.8]
rafadc has quit [Ping timeout: 246 seconds]
rafadc has joined #ruby
nate48423 has joined #ruby
Jonopoly has joined #ruby
mossplix has joined #ruby
mossplix has quit [Ping timeout: 264 seconds]
TheBrayn has joined #ruby
mossplix has joined #ruby
s_ has quit [Ping timeout: 260 seconds]
Jonopoly has quit [Quit: WeeChat 2.8]
Jonopoly has joined #ruby
s_ has joined #ruby
mossplix has quit [Ping timeout: 256 seconds]
mheld has quit [Quit: Connection closed for inactivity]
doomlist3 has joined #ruby
imode has quit [Ping timeout: 256 seconds]
BrianWGray has quit [Ping timeout: 264 seconds]
skx86 has quit [Quit: Connection closed for inactivity]
vondruch_ has joined #ruby
vondruch has quit [Ping timeout: 240 seconds]
vondruch_ is now known as vondruch
venmx has joined #ruby
voker57 has quit [Ping timeout: 272 seconds]
voker57 has joined #ruby
djdduty has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hsiktas[m] has quit [Quit: killed]
batisi[m] has quit [Quit: killed]
finn[m] has quit [Quit: killed]
turt2live has quit [Quit: killed]
sepp2k has quit [Quit: killed]
execat[m] has quit [Quit: killed]
doug[m]1 has quit [Quit: killed]
Manchotix[m] has quit [Quit: killed]
prkn8[m] has quit [Quit: killed]
simi[m] has quit [Quit: killed]
Hanma[m] has quit [Quit: killed]
bradfordli123 has joined #ruby
newalexandria[m] has quit [Quit: killed]
tranch[m] has quit [Quit: killed]
Vagabond[m] has quit [Quit: killed]
<bradfordli123> Is there a way I can return `nil` at any point I get a `NoMethodError` in this function?
<bradfordli123> def parameter_value(param_object) param_type = param_object.id.type param_object.body[param_type.to_s.downcase] end
<bradfordli123> oops
Lyubo1 has quit [Ping timeout: 264 seconds]
sarna has joined #ruby
Lyubo1 has joined #ruby
<leftylink> well, to do that, it would be possible to rescue NoMethodError, wouldn't it
bradfordli123 has quit [Remote host closed the connection]
<leftylink> okay
plutes has quit [Ping timeout: 272 seconds]
akem has quit [Ping timeout: 258 seconds]
bradfordli has joined #ruby
<bradfordli> leftylink sorry I DCed
<bradfordli> leftylink is it proper ruby to rescue NoMethodError to simply return nil? New to ruby so I'm not quite sure what are best practices
sepp2k has joined #ruby
bradfordli has quit [Remote host closed the connection]
dionysus69 has joined #ruby
<nemesit|znc> anyone using rails and got an idea why I might get seemingly random data from self.some_association in a custom validation function?
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
Axy has joined #ruby
Axy has quit [Changing host]
Axy has joined #ruby
Mia has quit [Ping timeout: 265 seconds]
venmx has quit [Ping timeout: 240 seconds]
akem has joined #ruby
venmx has joined #ruby
oddp has joined #ruby
ur5us has quit [Ping timeout: 244 seconds]
hsiktas[m] has joined #ruby
execat[m] has joined #ruby
tranch[m] has joined #ruby
doug[m]1 has joined #ruby
newalexandria[m] has joined #ruby
finn[m] has joined #ruby
batisi[m] has joined #ruby
Hanma[m] has joined #ruby
turt2live has joined #ruby
Vagabond[m] has joined #ruby
simi[m] has joined #ruby
Manchotix[m] has joined #ruby
prkn8[m] has joined #ruby
apotheon has quit [Read error: Connection reset by peer]
tau has joined #ruby
tau has quit [Changing host]
tau has joined #ruby
apotheon has joined #ruby
<nemesit|znc> got it
cnsvc has quit [Ping timeout: 240 seconds]
tau has quit [Ping timeout: 265 seconds]
chris__ has joined #ruby
axsuul has quit [Ping timeout: 256 seconds]
Takumo has joined #ruby
chris__ has quit [Ping timeout: 246 seconds]
doomlist3 has quit [Ping timeout: 265 seconds]
code_zombie has joined #ruby
code_zombie has quit [Remote host closed the connection]
universa1 has quit [Quit: ZNC 1.6.1+deb1~ubuntu14.04.0 - http://znc.in]
universa1 has joined #ruby
dionysus69 has quit [Remote host closed the connection]
TCZ has joined #ruby
vondruch_ has joined #ruby
postmodern has quit [Quit: Leaving]
roelof has quit [Quit: Connection closed for inactivity]
vondruch has quit [Ping timeout: 244 seconds]
vondruch_ is now known as vondruch
drincruz has joined #ruby
doomlist3 has joined #ruby
bmurt has joined #ruby
<sarna> nemesit|znc: you can try in #RubyOnRails
burningserenity has joined #ruby
drincruz has quit [Ping timeout: 260 seconds]
sarna has quit [Quit: Connection closed]
sarna has joined #ruby
Industrial has joined #ruby
<Industrial> Hi! I ran `rbenv install 2.7.1` and `which ruby` and `which gem` and `which bundler` return the correct path.
<Industrial> When I run bundler in this project I inherited then it will install a lot of gems
<Industrial> included in the list is rails version 5.1.0 (specifically)
<Industrial> bundler lists this as installed
<Industrial> Now, when I run `rails s` the command isn't recognized.
<Industrial> Is this a $PATH issue?
s_ has quit [Ping timeout: 260 seconds]
<Industrial> nvm, it was.
s_ has joined #ruby
TCZ has quit [Quit: Leaving]
drincruz has joined #ruby
ram_ has joined #ruby
ram_ is now known as Try2Code
Try2Code has quit [Client Quit]
jetchisel has quit [Ping timeout: 264 seconds]
ram_ has joined #ruby
ram_ has quit [Client Quit]
Try2Code has joined #ruby
wmoxam has quit [Ping timeout: 260 seconds]
Jonopoly has quit [Quit: WeeChat 2.8]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
Secret-Fire has quit [Remote host closed the connection]
kinduff has quit [Read error: Connection reset by peer]
kinduff has joined #ruby
cek has joined #ruby
<cek> do I get it right that Enumerable is not lazy and when I implement #each, I have to yield all possible values?
<cek> vs. what would java-like iterator would do?
<jhass> yes
<jhass> Also check Enumerator/enum_for
<jhass> and Enumerator::Lazy
<jhass> (and Enumerable#lazy)
ivan` has joined #ruby
TCZ has joined #ruby
chalkmonster has joined #ruby
ivan` has left #ruby [#ruby]
banisterfiend has joined #ruby
Secret-Fire has joined #ruby
Secret-Fire has quit [Max SendQ exceeded]
<cek> tnx
cek has left #ruby [#ruby]
Secret-Fire has joined #ruby
Secret-Fire has quit [Remote host closed the connection]
Secret-Fire has joined #ruby
skx86 has joined #ruby
plutes has joined #ruby
cek has joined #ruby
<cek> `binding.irb` doesn't switch into repl. wtf?
<cek> 2.6.0/irb.rb:393:in `throw': uncaught throw :IRB_EXIT (UncaughtThrowError)
<cek> Switch to inspect mode.
<cek> can run `irb` from shell just fine, but I need to invoke it from inside the code
orbyt_ has joined #ruby
<cek> oh, I know why. STDIN is not a tty!
<cek> sorry
cek has left #ruby [#ruby]
TCZ has quit [Quit: Leaving]
axsuul has joined #ruby
con3_ has joined #ruby
con3_ has quit [Client Quit]
con3 has joined #ruby
con3 has quit [Client Quit]
con3 has joined #ruby
doomlist3 has quit [Ping timeout: 260 seconds]
donofrio has joined #ruby
donofrio has quit [Remote host closed the connection]
donofrio has joined #ruby
con3 has quit [Quit: ZNC 1.7.5 - https://znc.in]
con3 has joined #ruby
s_ has quit [Ping timeout: 260 seconds]
s2013 has joined #ruby
s_ has joined #ruby
dualfade has quit [Read error: Connection reset by peer]
dualfade has joined #ruby
<jidar> https://gist.github.com/d4905f0c89b7ac38a07a65f0743f9c24 I'm having a problem where my .gemrc is ignored and not using the defined --bindir, any help?
<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
<jidar> - "gem" => "--user-install --bindir /home/jidar/.local/bin -N"
<jidar> or even yeah, EXECUTABLE DIRECTORY
<jidar> - EXECUTABLE DIRECTORY: /home/jidar/.gem/ruby/bin
TCZ has joined #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
<jidar> so there we go, mystery solved!
<jhass> :)
<jidar> as always, thanks for all of your help
<jhass> yw
alexherbo2 has quit [Quit: The Lounge - https://thelounge.chat]
alexherbo2 has joined #ruby
<oddp> jhass: StringScanner.new("foo42").scan_until("42") #=> TypeError (wrong argument type String (expected Regexp))
<jhass> yes
<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'
<jidar> oh! Apologies, I was more looking for the code itself, I think I found it: https://github.com/ruby/strscan
<jhass> ah
TomyWork has joined #ruby
<jidar> similar issue to apotheon https://github.com/ruby/strscan/issues/5
<jidar> although different conditions
<jhass> looks vendored into ruby/ruby too https://github.com/ruby/ruby/blob/master/ext/strscan/strscan.c
chalkmonster has quit [Quit: WeeChat 2.8]
ttoocs has joined #ruby
<jidar> my c++/c is awful, but https://github.com/ruby/strscan/blob/master/ext/strscan/strscan.c#L107 seems to clearly indicate there's no desire to do anything but a regex for "scan_until" oddly enough
<jhass> why oddly?
<jidar> wouldn't it be simple to overload the call to include strings?
<jhass> probably not
<jhass> for regex you just hand off the pattern and the current position to the regex engine
<jhass> for string you have to loop, peek, fill a buffer, match the buffer
<jidar> that code is already doing that though
<jhass> it's entirely different code paths
<jidar> for the .new()
<jhass> no?
<apotheon> I suppose it could coerce a string into a regex literal.
<jhass> why do you think so?
<jidar> jhass: ^
<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.
<havenwood> pgib: See the logs: https://irclog.whitequark.org/ruby
<pgib> looks like you may have cited the wrong nick and I missed it https://freenode.irclog.whitequark.org/ruby/2020-06-29#;deimos
<pgib> $ bundle exec rails console
<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]
nofxx has joined #ruby
<pgib> adam12 thanks: https://dpaste.org/mxfh
<adam12> pgib: 404. Link correct?
<pgib> adam12 - I missed a redaction. New paste: https://dpaste.org/Ai8a#
<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.
<havenwood> nychtel: Here's my example template: https://gist.github.com/havenwood/4469e3975ce0b597e00a3cf205dea4bb
<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]
<apotheon> havenwood: That license is inimical to my needs.
<apotheon> Well . . . off to pick up dinner. I expect I'll be back later.
<nychtel> havenwood: that's a lot better than eval() :)
<havenwood> nychtel: Agreed!
<havenwood> nychtel: For short clips, you can alternatively use #format like: format 'Hello, %<name>s ...', name: 'Shannon'
bamdad is now known as bam
<havenwood> &>> format 'Hello, %<name>s ...', name: 'Shannon'
<rubydoc> # => "Hello, Shannon ..." (https://carc.in/#/r/9cuk)
bam is now known as bamdad
<havenwood> #printf uses that same format ^
<nychtel> havenwood - yeah, I have a 10 or so line sql script that really only needs 1 thing dynamically generated: the name for a backup table.
<nychtel> So it makes more sense to do it with the <<~ syntax and dump the sql in there
bamdad is now known as bam
<havenwood> nychtel: yup
bam is now known as bamm
<havenwood> nychtel: ERB FTW
bamm is now known as bamdad
<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.
nychtel has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
Uncle_Cid has quit [Ping timeout: 265 seconds]
coniptor has joined #ruby