seaef has quit [Quit: I am functioning within established parameters.]
BitMac has joined #ruby
Milos has quit [Ping timeout: 256 seconds]
Milos has joined #ruby
quazimodo has quit [Read error: Connection reset by peer]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
quazimodo has joined #ruby
nicholaslyang has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ChmEarl has quit [Quit: Leaving]
alfiemax has joined #ruby
alfiemax has quit [Ping timeout: 260 seconds]
nicholaslyang has joined #ruby
alfiemax has joined #ruby
cassolas has quit [Ping timeout: 256 seconds]
alfiemax has quit [Ping timeout: 256 seconds]
memcorrupt has joined #ruby
memcorrupt has quit [Changing host]
memcorrupt has joined #ruby
jenrzzz_ has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
tau has joined #ruby
tau has joined #ruby
sevvie has joined #ruby
sevvie has joined #ruby
sevvie has quit [Changing host]
rafadc has quit [Read error: Connection reset by peer]
rafadc has joined #ruby
_whitelogger has joined #ruby
alfiemax has joined #ruby
cassolas has joined #ruby
donofrio has quit [Remote host closed the connection]
_whitelogger has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
guardianx has joined #ruby
envex has quit []
blobsson has quit [Quit: Leaving]
Archenoth has joined #ruby
Technodrome has joined #ruby
guardianx has quit [Quit: Konversation terminated!]
ur5us has quit [Ping timeout: 240 seconds]
nicholaslyang has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nicholaslyang has joined #ruby
guardianx has joined #ruby
guardianx has quit [Quit: Konversation terminated!]
howdoi has quit [Quit: Connection closed for inactivity]
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
jenrzzz_ has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
grimgnr has left #ruby ["ERC (IRC client for Emacs 26.1)"]
kent\n has quit [Remote host closed the connection]
kent\n has joined #ruby
<dorian>
okay question: what would cause a ruby program to just hang and hang and hang and hang, and when you finally hit ^C, the backtrace is somewhere in `rubygems/bundler/version_finder.rb`
roadie has joined #ruby
sarna has joined #ruby
nicholaslyang has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dorian>
ah no there we go, it just took ... ten goddamn minutes to start running
waheedi has joined #ruby
_whitelogger has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
imode has quit [Ping timeout: 260 seconds]
Garb0 has quit [Quit: I'm out.]
kent\n has quit [Quit: POWER DOWN]
AndreYuhai has joined #ruby
<yxhuvud>
if it takes that long it probably changed too much. Add some version restraints and it should be faster and not as bad result
<dorian>
add some versoin restraints to what
tau has quit [Ping timeout: 246 seconds]
memcorrupt has quit [Ping timeout: 246 seconds]
schne1der has joined #ruby
vondruch has joined #ruby
memcorrupt has joined #ruby
memcorrupt has quit [Changing host]
memcorrupt has joined #ruby
BitMac has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
BitMac has joined #ruby
memcorrupt has quit [Ping timeout: 264 seconds]
ur5us has joined #ruby
memcorrupt has joined #ruby
memcorrupt has quit [Changing host]
memcorrupt has joined #ruby
bambanx has joined #ruby
bambanx has quit [Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]
troulouliou_dev has joined #ruby
reffle has joined #ruby
roadie has quit [Ping timeout: 272 seconds]
duderonomy has quit [Ping timeout: 264 seconds]
SanguineAnomaly is now known as AnomalyXII
memcorrupt has quit [Ping timeout: 246 seconds]
duderonomy has joined #ruby
<yxhuvud>
gems. Usually to the ones that misbehave the worst. For example, I've seen limiting rspec to a *least* version of 3.0 speed up multiple instances of broken bundler resolutions.
ellcs1 has joined #ruby
sagax has joined #ruby
roadie has joined #ruby
Nerium has joined #ruby
rhe has quit [Ping timeout: 272 seconds]
memcorrupt has joined #ruby
memcorrupt has joined #ruby
rhe has joined #ruby
roadie has quit [Remote host closed the connection]
roadie has joined #ruby
reffle has quit [Quit: This computer has gone to sleep]
reffle has quit [Quit: This computer has gone to sleep]
jetchisel has joined #ruby
reffle has joined #ruby
<sarna>
are dependencies that are needed for tests runtime dependencies or development dependencies?
roadie has joined #ruby
<jhass>
I'd argue dev dependencies
<sarna>
yeah I thought the same. thanks
ellcs1 has quit [Ping timeout: 244 seconds]
cassolas has quit [Ping timeout: 265 seconds]
<sarna>
I'm using the dotenv gem, it tells me I should load it "as early as possible in your application bootstrap process" - when would that be? right after `module Foo` in my Foo gem?
jetchisel has quit [Quit: Unfortunately time is always against us -- [Morpheus]]
troulouliou_dev has quit [Quit: Leaving]
darkstardev13 has quit [Ping timeout: 265 seconds]
<jhass>
is your gem intended to be used as a Ruby library by others? dotenv might not be a good solution then
<jhass>
if it's a standalone app or CLI tool, it's as high as you can put it without breaking in whatever is the main entry point to it
<sarna>
well, I want it to load in tests only, to be honest
<jhass>
then your spec_helper/test_helper
<jhass>
though maybe you can even just do ENV[] = assignments in there instead of using the gem
<sarna>
eh, it's still nil..
<sarna>
okay let me maybe explain what I'm struggling with, I think I'm trying to solve it wrong
darkstardev13 has joined #ruby
<sarna>
I'm still writing a client for that API that only allows basic auth. for running I'll ask the user for credentials, but for testing I wanted to use VCR
ellcs1 has joined #ruby
<sarna>
and for the first try I wanted to read the credentials from a .env file
<sarna>
then I'd delete the file :v
<jhass>
huh
alfiemax has quit [Remote host closed the connection]
<sarna>
but maybe.. could I ask once when testing and then use whatever VCR pulled in? I'd only ask once for each new test
<jhass>
why not ask the user to set the environment variables then?
<memcorrupt>
hello, what files should I add to spec.files list?
<jhass>
.env/dotenv makes sense if you need the values to be present all the timme
snosk8r has joined #ruby
<sarna>
there's stuff like .env.development.local, I thought it would be useful for stuff like this
<memcorrupt>
and may I add docs/* and README files to spec.files?
<jhass>
memcorrupt: anything that's necessary to use your gem (should end up in the .gem package). So for the standard setup everyting in lib/, a lot of people like to add test/ / spec/ as well
<jhass>
you may add anything you want :)
<jhass>
readme certainly makes sense for nice docs
<jhass>
it literally just defines what ends up in the .gem package
BitMac has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
<jhass>
sarna: if you ask me, even just running gets would be legit for this usecase :D
<jhass>
but ymmv of course
<sarna>
jhass: I'm running gets when I have a user! but I don't want to input the password each time I run tests :/
darkstardev13 has quit [Ping timeout: 240 seconds]
<jhass>
it would only be when you record the cassettes, no?
<jhass>
I mean it ought to be possible to setup VCR to match the right ones regardless of the Authorization header
<sarna>
how would I find out if I have a casette already or not?
darkstardev13 has joined #ruby
<sarna>
I mean, I'd like to only run `gets` when I have some cassettes that need recording
<sarna>
if I have everything ready, don't ask for anything
<memcorrupt>
oh... so it's sort of a gdb for ruby...
<jhass>
yeah
TCZ has joined #ruby
memcorrupt has quit [Ping timeout: 260 seconds]
memcorrupt has joined #ruby
memcorrupt has joined #ruby
roadie has quit [Ping timeout: 246 seconds]
alfiemax has joined #ruby
phaul has quit [Ping timeout: 256 seconds]
rubydoc has quit [Ping timeout: 256 seconds]
memcorrupt has quit [Quit: leaving]
donofrio has joined #ruby
donofrio has quit [Remote host closed the connection]
donofrio has joined #ruby
rubydoc has joined #ruby
cassolas has joined #ruby
roadie has joined #ruby
rubydoc has quit [Ping timeout: 256 seconds]
cassolas has quit [Ping timeout: 256 seconds]
Nerium has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rubydoc has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
phaul has joined #ruby
<AndreYuhai>
When you update a DB record by just changing its variable's value then calling save does not handle updated_at column automatically but when using update method does. https://dpaste.org/1q4y
<AndreYuhai>
jhass, That's right. Then I might be doing something wrong. Let me check my code and post a new dpaste.
<rapha>
why is a @var defined on the class itself not accessible to initialize()?
<havenwood>
AndreYuhai: After line 10, note: f.has_changes_to_save? #=> true
<havenwood>
AndreYuhai: f.save
<AndreYuhai>
yes, that's right. I guess I got confused when I was checking whether it was updating or not. Now it's fine. Gotta take a break. :D
<havenwood>
rapha: Because it's defined on the class itself and not on the instance of the class.
<havenwood>
rapha: Use a constant.
<havenwood>
rapha: VAR =
alexherbo2 has joined #ruby
alexherbo2 has quit [Client Quit]
alexherbo2 has joined #ruby
<havenwood>
rapha: You can still get at the instance variable from the instance of the class, but it's nicer to just use a constant.
<havenwood>
rapha: While anything in Ruby can have an instance variable, it's often a strange solution when used on things other than instances of classes.
cassolas has joined #ruby
<leftylink>
aw man
<leftylink>
if I were feeling cranky and adversarial I would have said "the question is nonsensical. it is accessible", and demonstrate its accessibility - however, I don't have enough information about intent to determine whether such an approach would have been helpful
<havenwood>
leftylink: agreed it's accessible ;)
<leftylink>
when should I tell the querent about such an approach
<leftylink>
well, I suppose I would have to have had more info about the intent
<havenwood>
i think it's fine to play with knives
<havenwood>
but this was begging for a fork
<leftylink>
it might also help if I know the history of the querent and therefore have a guess as to what they can handle
<leftylink>
but I do not remember at this moment...
<rapha>
havenwood: okay, that's working better now
<leftylink>
or what they might be intending
<leftylink>
when you have so many people in this channel they just all sort of blend together you know
<havenwood>
leftylink: I recognize people by their name highlight color. It works great until two people have the same color. ¯\_(ツ)_/¯
<havenwood>
I suppose I should reset it occasionally to keep myself on my toes.
<havenwood>
leftylink: You are bright yellow and rapha is violet.
<havenwood>
:P
<havenwood>
leftylink: The eternal question of whether to answer what is actually asked or your best guess at what's meant.
<havenwood>
Maybe both is always best if there's time and energy.
<havenwood>
Always nice to see it can be done and how.
cassolas has quit [Ping timeout: 240 seconds]
Nerium has joined #ruby
<leftylink>
when they invent a way to read minds over the internet then it will be possible to give the most appropriate answer
<leftylink>
but then I suppose if that ever happens I will have other things to worry about
<havenwood>
i can only read minds by fax
reffle has quit [Quit: This computer has gone to sleep]
Nerium has quit [Client Quit]
<rapha>
oh
<rapha>
we're talking about nick colors now? :)
<havenwood>
rapha: bikeshedding :P
<rapha>
oh! a new English word for me?
<rapha>
"The term was coined as a metaphor to illuminate Parkinson’s Law of Triviality. Parkinson observed that a committee whose job is to approve plans for a nuclear power plant may spend the majority of its time on relatively unimportant but easy-to-grasp issues, such as what materials to use for the staff bikeshed, while neglecting the design of the power plant itself, which is far more important but also far
<rapha>
more difficult to criticize constructively. It was popularized in the Berkeley Software Distribution community by Poul-Henning Kamp[1] and has spread from there to the software industry at large." Interesting.
Technodrome has joined #ruby
cassolas has joined #ruby
drincruz has joined #ruby
<rapha>
different thing, anyone ever use Elastic or Solr and figure out a way to use it without first getting a degree in CS? do people dockerize it and pretend it's a blackbox?
<rapha>
[use in Ruby, i should have added]
<rapha>
or else, is there any fulltext search that works, is lean and simple, and keeps away from anything javablahblahcoffee with a 10 mile radius?
<rapha>
(discovered Hyper Estraier last week but still haven't managed to get it working ... seems a little deserted and not maintained anymore, unfortunately)
<havenwood>
rapha: PostgreSQL trigrams are convenient, assuming you're using Postgres.
<sarna>
I compared the tokens - they're *exactly* the same
<adam12>
sarna: You're probably not missing anything. Sounds like a bug. I'd try using a different adapter (maybe just net/http directly) and see if it still happens. If it does, then it's likely in VCR and you could dig into it a bit more.
<sarna>
adam12: frick. they have a nice logo, I thought that would protect me from bugs!
<sarna>
I'll try a different adapter, thanks
coniptor has quit [Ping timeout: 260 seconds]
<rapha>
adam12: i've played with that and found it to be really nice. perhaps that might be an idea for a commandline tool à la `search -rg '*.txt' 'mary had a lamb' foobar/`: slurp all the files into an impromptu sqlite database in /tmp, run the search, delete the database again.
Emmanuel_Chanel has quit [Quit: Leaving]
akem has quit [Read error: Connection reset by peer]
akem has joined #ruby
<adam12>
sarna: LOL. I'm not 100% sure there _is_ a bug, but we're basically talking about 3+ projects working together smoothly, which sometimes isn't the case for some fringe areas
<adam12>
sarna: Any specific reason you're using before_http_request here?
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nicholaslyang has quit [Client Quit]
burningserenity has quit [Remote host closed the connection]
rippa has joined #ruby
burningserenity has joined #ruby
drahosj has quit [Read error: Connection reset by peer]
<adam12>
havenwood: ;)
<oddp>
What, types are being considered? Hell, with a solid concurrency story on the way, are we going to witness the ruby-crystal merge of 2022 which culminates in the glorious alexandrite programming language?
chalkmonster has joined #ruby
burningserenity has quit [Ping timeout: 260 seconds]
roadie has quit [Ping timeout: 272 seconds]
BitMac has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
burningserenity has joined #ruby
dfucci has quit [Ping timeout: 256 seconds]
Technodrome has joined #ruby
roadie has joined #ruby
TomyWork has joined #ruby
mydog2 has quit [Ping timeout: 264 seconds]
BitMac has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jesfre has quit [Ping timeout: 240 seconds]
nicholaslyang has joined #ruby
orbyt_ has joined #ruby
orbyt_ has quit [Client Quit]
nicholaslyang has quit [Client Quit]
burningserenity has quit [Ping timeout: 260 seconds]
burningserenity has joined #ruby
<rapha>
wth is "iconicity"?
<rapha>
fwiw i would welcome python-style (i.e., optional) types in ruby. sooner rather than later if you ask me.
reffle has quit [Quit: This computer has gone to sleep]
plutes has quit [Ping timeout: 272 seconds]
Eiam has quit [Quit: (╯°□°)╯︵ ǝpouǝǝɹɟ]
stryek has quit [Quit: Connection closed for inactivity]
justache has joined #ruby
pwl has quit [Ping timeout: 240 seconds]
quazimodo has quit [Ping timeout: 240 seconds]
pen has quit []
nicholaslyang has joined #ruby
nicholaslyang has quit [Client Quit]
TCZ has joined #ruby
plutes has joined #ruby
impermanence has quit [Quit: Connection closed]
kristian_on_linu has quit [Remote host closed the connection]
chalkmonster has quit [Ping timeout: 265 seconds]
chalkmonster has joined #ruby
<Vashy>
Hi all, idk if this is a rails specific question but I'm having trouble installing rspec onto a rails project. After including `rspec-rails` in my Gemfile + bundle install, when I run a test with `bundle exec rspec <file>` it gives me an error on the `require 'rspec'` line: cannot load such file -- rspec
<Vashy>
rbenv tells me I have two versions of ruby installed (2.5.1 and 2.5.7)
<apotheon>
I really need to get back into Rails a bit more to remind myself how this stuff works so I can help people with such questions.
<apotheon>
I've been away for a bit.
<Vashy>
also I forgot to mention that I ran the installer `rails generate rspec:install` successfully
<Vashy>
I'm not entirely sure it's a rails issue; I have a feeling it's because I have multiple ruby versions installed
<Vashy>
Hm, I don't think that's right either. Looks like `rbenv which rspec` points to the Ruby project version (2.5.1) gem