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!
cnsvc has quit [Ping timeout: 240 seconds]
drincruz has joined #ruby
cnsvc has joined #ruby
drincruz has quit [Ping timeout: 240 seconds]
nate48423 has quit [Remote host closed the connection]
nate48423 has joined #ruby
wymillerlinux has quit [Ping timeout: 264 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
dfucci has joined #ruby
mossplix has joined #ruby
TCZ has joined #ruby
gavlee has quit [Ping timeout: 260 seconds]
mossplix has quit [Remote host closed the connection]
schne1der has quit [Ping timeout: 256 seconds]
chris___ has quit [Remote host closed the connection]
jenrzzz has joined #ruby
dfucci has quit [Ping timeout: 240 seconds]
ur5us has quit [Ping timeout: 256 seconds]
davispuh has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
BSaboia has quit [Quit: This computer has gone to sleep]
DaRock has joined #ruby
oneeggeach has joined #ruby
oneeggeach has quit [Client Quit]
BSaboia has joined #ruby
KramerC has quit [Quit: Leaving]
ur5us has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
TCZ has quit [Quit: Leaving]
BSaboia has quit [Quit: This computer has gone to sleep]
oddp has quit [Ping timeout: 256 seconds]
BSaboia has joined #ruby
KramerC has joined #ruby
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SeepingN has joined #ruby
sagax has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gix has quit [Ping timeout: 246 seconds]
ule has quit [Changing host]
ule has joined #ruby
jetchisel has quit [Quit: Unfortunately time is always against us -- [Morpheus]]
BSaboia has quit [Quit: This computer has gone to sleep]
bmurt has joined #ruby
BSaboia has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cd has quit [Quit: cd]
dfucci has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AnomalyXII has quit [Ping timeout: 265 seconds]
dfucci has quit [Ping timeout: 240 seconds]
alfiemax has joined #ruby
memcorrupt has quit [Ping timeout: 244 seconds]
braincrash has quit [Quit: bye bye]
nicholaslyang has joined #ruby
alfiemax has quit [Ping timeout: 256 seconds]
memcorrupt has joined #ruby
braincrash has joined #ruby
bamdad has quit [Remote host closed the connection]
bamdad has joined #ruby
ChmEarl has quit [Quit: Leaving]
nicholaslyang has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bambanx has joined #ruby
BSaboia has quit [Quit: This computer has gone to sleep]
chris__ has joined #ruby
fabio_ has joined #ruby
MadLamb has quit [Ping timeout: 258 seconds]
chris__ has quit [Ping timeout: 256 seconds]
kinduff has quit [Read error: Connection reset by peer]
kinduff has joined #ruby
lmat has quit [Ping timeout: 246 seconds]
lmat has joined #ruby
graphicsv has quit [Quit: Connection closed for inactivity]
alfiemax has joined #ruby
lmat has quit [Ping timeout: 264 seconds]
lmat has joined #ruby
zacts has joined #ruby
Xiti` has quit [Quit: Leaving]
nicholaslyang has joined #ruby
Xiti has joined #ruby
gogonuts has joined #ruby
gogonuts has quit [Client Quit]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
Esa__ has quit [Ping timeout: 260 seconds]
anandprabhu has joined #ruby
bamdad has quit [Remote host closed the connection]
bamdad has joined #ruby
Uncle_Cid has joined #ruby
UncleCid has quit [Ping timeout: 256 seconds]
Uncle_Cid has quit [Ping timeout: 256 seconds]
tsrt^ has joined #ruby
bambanx has quit [Quit: Leaving]
SanguineAnomaly has joined #ruby
ur5us has quit [Ping timeout: 256 seconds]
alfiemax has quit [Remote host closed the connection]
nicholaslyang has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
BSaboia has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
schne1der has joined #ruby
schne1der has quit [Client Quit]
BSaboia has quit [Quit: This computer has gone to sleep]
schne1der has joined #ruby
mossplix has joined #ruby
mossplix has quit [Remote host closed the connection]
CrazyEddy has quit [Ping timeout: 260 seconds]
bocaneri has joined #ruby
contradictioned has joined #ruby
mossplix has joined #ruby
dfucci has joined #ruby
mossplix has quit [Remote host closed the connection]
mossplix has joined #ruby
go|dfish has quit [Ping timeout: 256 seconds]
dfucci has quit [Ping timeout: 244 seconds]
FastJack_ has quit [Quit: leaving]
FastJack has joined #ruby
go|dfish has joined #ruby
chalkmonster has joined #ruby
dfucci has joined #ruby
lmat has quit [Ping timeout: 244 seconds]
TzilTzal has joined #ruby
lmat has joined #ruby
duderonomy has joined #ruby
Industrial` has joined #ruby
apteryx is now known as Guest47826
Guest47826 has quit [Killed (tolkien.freenode.net (Nickname regained by services))]
apteryx has joined #ruby
memcorrupt has quit [Quit: -a- ...]
Tuor has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
Tuor has joined #ruby
mossplix has quit [Remote host closed the connection]
<Industrial`> bHi
<Industrial`> ActiveRecord::FixtureSet.create_fixtures(fixtures_directory, fixtures)
<Industrial`> This will put '.yml' at the end of every file path in the fixtures array
vondruch has quit [Quit: vondruch]
<Industrial`> and then try to load them
<Industrial`> I have JSON files, not YML files, what now?
vondruch has joined #ruby
<havenwood> Industrial`: JSON is a subset of YAML.
<havenwood> Industrial`: Change the extensions to `.yml`?
<Industrial`> havenwood: Can't. It's not "my" project and I have to bake something in :-)
lmat has quit [Ping timeout: 256 seconds]
<Industrial`> I'm adding cucumber testing with capybara and cucumber-rails and I need test data, which in this project is saved in JSON files in (not spec/ but) test/fixtures
UncleCid has joined #ruby
<Industrial`> How does ActiveRecord know which model to create an instance of anyway :S
lmat has joined #ruby
<havenwood> Industrial`: Dir["#{path}/{**,*}/*.yml"]
<havenwood> Industrial`: The filename.
<havenwood> Industrial`: I believe you could override #read_fixtures_files to also include your JSON.
<Industrial`> okay, i'll try that :-) thanks
envex has quit []
al2o3-cr has quit [Quit: WeeChat 2.8]
mossplix has joined #ruby
al2o3-cr has joined #ruby
TomyWork has joined #ruby
mossplix has quit [Ping timeout: 258 seconds]
TomyWork has quit [Ping timeout: 256 seconds]
<Industrial`> havenwood: I'm not sure exactly how to extend/reopen the class. https://gist.github.com/Industrial/105ad53a8387bc5d07321c39428b352e when I run with this code it seems that my class isn't ran. :-)
venmx has joined #ruby
<havenwood> Industrial`: Looks like. you're not in the ActiveRecord namespace here: https://gist.github.com/Industrial/105ad53a8387bc5d07321c39428b352e#file-features-support-env-rb-L15
<havenwood> class ActiveRecord
<havenwood> class FixtureSet
<havenwood> Industrial`: ^
<rapha> good morning dear rubyistas
<havenwood> rapha: g'day
<Industrial`> right, got it :D
<rapha> yes, or g'whatever-it-is-in-your-TZ havenwood :)
<Industrial`> rapha: hi
<havenwood> ?ugt rapha
<ruby[bot]> rapha: it's morning, see http://www.total-knowledge.com/~ilya/mips/ugt.html
ellcs has joined #ruby
<havenwood> rapha: So it's morning, g'mornin'
<havenwood> rapha: Also the benefit of an interpretable greeting: g'mornin'
<havenwood> &>> alias g p; g'mornin'
<rubydoc> # => "mornin"... check link for more (https://carc.in/#/r/9ddu)
<havenwood> I came up with that one, but it only seems to amuse me, heh. ¯\_(ツ)_/¯
<havenwood> ?snowman havenwood
<ruby[bot]> havenwood: Here's a snowman for you: ☃
* rapha reeds
<rapha> reads*
* rapha likes UGT
sarna has joined #ruby
anandprabhu has quit [Quit: Leaving]
petru has joined #ruby
petru is now known as legit
Industrial` has quit [Ping timeout: 264 seconds]
SanguineAnomaly is now known as AnomalyXII
fanta1 has joined #ruby
Industrial` has joined #ruby
oddp has joined #ruby
apotheon has quit [Ping timeout: 260 seconds]
apotheon has joined #ruby
gavlee has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
alfiemax has joined #ruby
imode has quit [Ping timeout: 256 seconds]
UncleCid has quit [Remote host closed the connection]
UncleCid has joined #ruby
Uncle_Cid has joined #ruby
UncleCid has quit [Remote host closed the connection]
Uncle_Cid has quit [Remote host closed the connection]
jenrzzz has joined #ruby
UncleCid has joined #ruby
Uncle_Cid has joined #ruby
UncleCid has quit [Client Quit]
ur5us has joined #ruby
ellcs has quit [Quit: Leaving.]
ellcs has joined #ruby
tau has joined #ruby
tau has quit [Changing host]
tau has joined #ruby
alfiemax has quit [Remote host closed the connection]
funnel has quit [Ping timeout: 256 seconds]
IceDragon has quit [Ping timeout: 256 seconds]
TCZ has joined #ruby
IceDragon has joined #ruby
funnel has joined #ruby
Industrial` has quit [Ping timeout: 256 seconds]
alfiemax has joined #ruby
TCZ has quit [Remote host closed the connection]
TCZ has joined #ruby
Industrial` has joined #ruby
gavlee has quit []
MrCrackPot has joined #ruby
gigetoo has quit [Ping timeout: 258 seconds]
gavlee has joined #ruby
alfiemax has quit [Remote host closed the connection]
postmodern has quit [Read error: Connection reset by peer]
postmodern has joined #ruby
Azure has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Industrial` has quit [Ping timeout: 256 seconds]
tau has quit [Ping timeout: 246 seconds]
TzilTzal has quit [Quit: Leaving.]
_whitelogger has joined #ruby
gigetoo has joined #ruby
TCZ has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
x0f_ has quit [Quit: quit]
bamdad has quit [Remote host closed the connection]
x0f has joined #ruby
bamdad has joined #ruby
TCZ has quit [Ping timeout: 246 seconds]
oziyasin has quit [Quit: Connection closed for inactivity]
TCZ has joined #ruby
plutes has joined #ruby
<rapha> hmm
<rapha> if i have a script that depends on a gem installed only as part of a bundle and i want to call that script like ./script, what does the shebang have to look like to make that work?
<rapha> (because "#!/usr/bin/env bundle exec ruby" doesn't work)
oziyasin has joined #ruby
TCZ has quit [Remote host closed the connection]
TCZ has joined #ruby
<rapha> aha!
<rapha> env -S
sarna has quit [Quit: Connection closed]
<jhass> rapha: alternatively just require "bundler/setup"
<rapha> oh! that seems much more sensible, thank you jhass!
sarna has joined #ruby
TCZ has quit [Ping timeout: 260 seconds]
ignorand has joined #ruby
<ignorand> Hi
<rapha> outside of the whole hipster heroku world ... do people use vendor/bundle/ and do they check it into their git repos?
<jhass> rapha: some do but I find that ugly. First of all vendor/bundle is not intended for redistribution, bundler supports that separately under the package/cache subcommand (I think it was renamed in 2.0?). Even then I would recommend that to happen in a CI/CD pipeline step that packages a deployment bundle (tarball or whatever) to be uploaded to the deployment target
<jhass> the big problem with packaging vendor/bundle is ABI incompatibility of native extensions between the packaging environment and the deployment environment
darkstardev13 has quit [Ping timeout: 260 seconds]
<jhass> and I'd argue to not commit the package cache because it bloats the repository a lot
<jhass> as long as you commit Gemfile.lock, the --deployment flag will make sure to install the exact versions again
<jhass> so it's only a question of network availability and _maybe_ deployment speed (which could be solved with proper caching inside the CI/CD environment) and build tool availability for native extensions in the deployment environment
darkstardevx has joined #ruby
TCZ has joined #ruby
* rapha loves opinionated advice
<rapha> also, neither are a concern in my case, as all involved machines are VMs on the same hunk of metal
Industrial` has joined #ruby
kinduff has quit [Read error: Connection reset by peer]
kinduff has joined #ruby
postmodern has quit [Quit: Leaving]
alfiemax has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
ignorand has quit [Ping timeout: 260 seconds]
drincruz has joined #ruby
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
drincruz has quit [Ping timeout: 256 seconds]
plutes has quit [Ping timeout: 272 seconds]
alfiemax has quit [Ping timeout: 246 seconds]
lmat has quit [Ping timeout: 244 seconds]
lmat has joined #ruby
<jhass> that doesn't mean the have the same upgrade level or even OS
<jhass> ABI incompatiblity is far beyond architecture
plutes has joined #ruby
aesthe has joined #ruby
TCZ has quit [Quit: Leaving]
arekushi has quit [Quit: Gateway shutdown]
cgfbee has joined #ruby
tau has joined #ruby
tau has joined #ruby
tau has quit [Changing host]
TCZ has joined #ruby
oziyasin has quit [Quit: Connection closed for inactivity]
Esa__ has joined #ruby
ta has quit [Quit: WeeChat 2.8]
Esa__ has quit [Client Quit]
ta has joined #ruby
Esa__ has joined #ruby
tau has quit [Remote host closed the connection]
rippa has joined #ruby
jingjinghack has joined #ruby
jingjinghack has quit [Quit: WeeChat 2.1]
hiroaki has joined #ruby
Azure has joined #ruby
<rapha> it kind of does mean that because they're all maintained by me.
<rapha> which is a very different situation from someone who tries to maintain a Gem for the world to use...
ignorand has joined #ruby
<ignorand> @rapha /vendor/bundle is in my gitignore by default when creating a project
<ignorand> so I think most people ignore it
TomyWork has joined #ruby
bamdad has quit [Remote host closed the connection]
bamdad has joined #ruby
sarna has quit [Quit: Connection closed]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
chris__ has joined #ruby
BSaboia has joined #ruby
gitter1234 has joined #ruby
<gitter1234> Rouby - Enta Aref Leih: https://www.youtube.com/watch?v=--oTv4bfp7I
<gitter1234> No idea what she's saying, but I love it!
chris__ has quit [Ping timeout: 265 seconds]
alfiemax has joined #ruby
DaRock has quit [Ping timeout: 264 seconds]
mossplix has joined #ruby
TomyWork has quit [Remote host closed the connection]
ChmEarl has joined #ruby
akem_ has joined #ruby
akem has quit [Ping timeout: 240 seconds]
vondruch has quit [Quit: vondruch]
chris__ has joined #ruby
TCZ has quit [Quit: Leaving]
zacts has quit [Quit: WeeChat 2.8]
shansen has quit [Quit: ZNC 1.7.4+deb0+bionic0 - https://znc.in]
shansen has joined #ruby
chris__ has quit [Ping timeout: 256 seconds]
secret-fire__ has joined #ruby
venmx has quit [Quit: leaving]
agit0 has joined #ruby
lypsis_ has joined #ruby
jinie_ has joined #ruby
venmx has joined #ruby
Lyubo1 has quit [Ping timeout: 240 seconds]
lypsis has quit [Ping timeout: 240 seconds]
jinie has quit [Read error: Connection reset by peer]
Eiam has quit [Ping timeout: 240 seconds]
Secret-Fire has quit [Ping timeout: 240 seconds]
ErhardtMundt has quit [Ping timeout: 240 seconds]
jinie_ is now known as jinie
ErhardtMundt has joined #ruby
alfiemax_ has joined #ruby
alfiemax has quit [Ping timeout: 264 seconds]
colins has joined #ruby
bmurt has joined #ruby
vpw has joined #ruby
colins has quit [Read error: Connection timed out]
colins has joined #ruby
rkoller has joined #ruby
rhiza has joined #ruby
comet23 has joined #ruby
jenrzzz has joined #ruby
colins has quit [Quit: WeeChat 2.8]
nicholaslyang has joined #ruby
vpw has quit [Remote host closed the connection]
vpw has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
CrazyEddy has joined #ruby
chris__ has joined #ruby
secret-fire__ has quit [Quit: Leaving]
Secret-Fire has joined #ruby
<lmat> It is so frustrating not to know everything there is to know about rails and all the libraries in use and trying to maintain rails code!
<lmat> Discoverability? Who needs it?
dfucci has quit [Ping timeout: 244 seconds]
<lmat> Every time I try to make any progress on anything, I'm thwarted! I try to make a spec for a controller. Struggle through 12 or so issues absolutely in the dark, guessing and groping. Eventually I come to an issue that takes more than 1.5 days or so and still no progress. "I know, I'll make a minimum example from the ground up and see if I can figure out what is going on."
<lmat> Building that example up, there's more magic and mystery! 8 more road blocks here and there: completely non-obvious problems and solutions that require deep incantations to fix. Everything makes sense once you know what was wrong in the first place, but before you know, there's no way to learn!
<lmat> Okay, I'll stop.
<lmat> Back to the galleys.
<gitter1234> lmat: You talking about Whac-A-Mole? :)
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<lmat> gitter1234: No, it's worse than that. Whac-a-mole in the dark.
<gitter1234> Hehe
<lmat> gitter1234: I've been a professional programmer for over a decade and worked on lots of different frameworks and languages. I've done lots of whac-a-mole.
<lmat> gitter1234: This is sadism.
<lmat> gitter1234: It's torture for the uninitiated.
<lmat> over and over and over I have a question like "where is that defined/specified?" and there is never an answer.
<lmat> If I find an answer, it's NEVER in the code!! The answer to "where is that defined/specified?" is always found on STACK OVERFLOW!!
<lmat> So if I'm lucky enough that 1) some other sap had the same problem and 2) someone showed him the solution, then I'm in the clear.
<gitter1234> Best bet is to create a reduced test app IMHO. Accompanied by a detailed and well laid out gist. Folks here are always willing to take a look then.
<gitter1234> Although asking at the right times when the right people are around is a whole 'nother ball game.
<gitter1234> Sorry to hear that though.
<gitter1234> For what it's worth, I'm a real sucky programmer, so take what I say with a grain of salt :)
<al2o3-cr> he's not so bad. "it him again rocky!"
<lmat> I think I would be okay if I were building an app from scratch. I would find the getting started guide, follow the magic incantations and everything is gravy. The problem is, someone else has already done the incantations, and now I have to do reverse-incantations. There are no traces left because of the Rails Way which seems to be: type as little as possible, leave no traces behind.
<al2o3-cr> *him
<al2o3-cr> *hit
<al2o3-cr> WOWzer
<gitter1234> Hit and miss? hehe
<lmat> gitter1234: Even creating a minimal example is bound to be frustrating to folks here because I'll be saying, "See, this doesn't work." The community verifies: "yup, doesn't work. You need to define X in your Y." Then I say, but in my real project, that's not defined that way. Then everyone looks around and shrugs.
<al2o3-cr> Search Results
<al2o3-cr> Web results
<al2o3-cr> Ży
<al2o3-cr> xzz
<lmat> al2o3-cr: My web history would not fit on your hard drive :-P
<lmat> Okay, I'm really going to stop complaining now ^_^
<al2o3-cr> 256mb
<adam12> rapha: I only have vendor/bundle checked in for a single project and I _hate_ it.
<gitter1234> lmat: That's never been a problem to me at least. My app is super complex too but extracting code into a reduced test case has never been a problem. Though it's been very time-consuming :(
<adam12> I didn't realize bundle had an option to maybe make a single gem a vendor'd dependency. Might have to look at that.
<al2o3-cr> lmat: crazy?
<adam12> lmat: I've heard lots of people complain about Rails discoverability. Boils down to if you weren't there for the 0.x, 1.x, 2.x releases you won't know a lot of history behind design choices and functionality.
<gitter1234> * My app is super complex too, but extracting its code into reduced test cases have never been a problem. Although extremely time-consuming :(
<adam12> lmat: I'm reading through a book for the heck of it by Noah Gibbs called Rebuilding Rails and it's interesting. Basically "Rails" from the ground up. Might be worth a read to you.
<adam12> I wish in some ways Merb lived on more than it did way back when, but I have some hope for Hanami.
<al2o3-cr> lmat: consider using a piss easy framework like sinatra or hanami then?
Esa__ has quit []
<gitter1234> al2o3-cr: Can Jeremy's Rhoda be added to that list? https://github.com/jeremyevans/roda
<gitter1234> He's always like "I don't use Rails, but use Rhoda, and then I'll help you" lol
<gitter1234> For Ruby questions he always helps though, much like you guys
<al2o3-cr> no
<gitter1234> al2o3-cr: It runs many of the websites of the Californian government though
<gitter1234> But yeah probably not the same thing :(
<al2o3-cr> roda yes, rhoda no.
<gitter1234> Haha
ignorand has quit [Ping timeout: 256 seconds]
<al2o3-cr> :P
jenrzzz has joined #ruby
<al2o3-cr> rails is a vast framework and it's understandable where people come to a standing dance.
<lmat> adam12: "if you weren't there...you won't know a lot of history..." makes sense.
edwardly has quit [Ping timeout: 265 seconds]
<lmat> al2o3-cr: "consider using a[n] ... easy framework" I'm sure that would be fine. The problem is that I'm now a code maintainer. I have no control over the history of the code and a rewrite is not in the cards.
chris__ has quit [Ping timeout: 244 seconds]
dfucci has joined #ruby
<lmat> al2o3-cr: What's a standing dance? As in the ecosystem is too large to make any changes with confidence?
alfiemax_ has quit [Remote host closed the connection]
<lmat> I have a user class: https://paste.rs/4tC
jenrzzz has quit [Ping timeout: 246 seconds]
<lmat> and a simple schema: https://paste.rs/v0B. My gemfile: https://paste.rs/rlW and my spec: https://paste.rs/ABf
<lmat> When I run rspec, I get "undefined method `encrypted_password=' for #<User:0x00005588152a4b10>"
<lmat> That makes sense because there is no "encrypted_password" field on my User object.
<lmat> When I remove :database_authenticatable from the model, I get, "undefined method `password=' for #<User:0x000055e7ba628868>" when I run rspec.
<lmat> Again, makes sense because there is no password field on the User class.
<lmat> I have a working project that has a setup like this one and it does not seem to have a password field on the user class either. But clearly there's some magic in the other project that makes this work?
<al2o3-cr> lmat: isn't this better asked in #rubyonrails ?
<gitter1234> lmat: Sorry but that's still not a reduced test app accompanied by a well-formated gist :(
dfucci has quit [Ping timeout: 256 seconds]
<adam12> lmat: You definitely want to share stack traces in this case. My guess is `login_admin` does something like User.create(.., password: "blah") and that's where the error is.
<gitter1234> Example: https://gist.github.com/anon987654321/4532cf8d6c59c1f43ec8973faa031103 - although it's no longer a problem
<gitter1234> al2o3-cr: No :) That channel is about as dead as mammoths and dinosaurs :/
<al2o3-cr> gitter1234: really?
<gitter1234> Wonder why it doesn't automatically redirect here
<gitter1234> al2o3-cr: Not anymore IMHO :(
<al2o3-cr> oh well
<gitter1234> Radar & co all left to start their own families etc.
<lmat> adam12: Here is the full rspec output: https://paste.rs/2l5
<al2o3-cr> gitter1234: right
<lmat> spec/support/spec_test_helper.rb is https://paste.rs/iWc
<rhiza> check your user factory
<lmat> So line 6 is sign_in create(:super_user) I think it's in the "create" function.
<lmat> rhiza: User factory is https://paste.rs/tWJ
jenrzzz has joined #ruby
<rhiza> there you go, remove the password/password_confirmation lines
<gitter1234> al2o3-cr: You don't think so? Only people helping out in #rubyonrails are the OPs here because they feel sorry for the channel
<lmat> rhiza: But the other project has that.
<adam12> lmat: What's the ultimate end goal here? You want there to be a password or no?
<rhiza> are you missing an attr_accessor :password or similar?
<adam12> lmat: Seems like adding an encrypted_password field to the users table would solve the problem. You're saying your other project doesn't include that and you're using that as a reference?
<lmat> adam12: The ultimate goal is to make sure the documents are sorted on display so they don't sometimes show up in a different order. Along those lines, I created a controller spec to test that
<al2o3-cr> gitter1234: never ventured there, just gave it a wake up call.
<lmat> adam12: Yes, exactly. The other project doesn't include that and I'm using that as a reference!
<lmat> rhiza: where would attr_accessor go? In the model/user.rb?
<adam12> lmat: What happens if you never call `login_admin` in your controller spec?
<lmat> adam12: Checking!
<adam12> lmat: Presuming it's going to error. I think you just need to add that database column.
<lmat> The error is reasonable because I haven't set up routes yet: https://paste.rs/LwI
<rhiza> I feel like you should search your reference project for `password` and see where it's missing in your new project
<lmat> adam12: but the other project...
<rhiza> maybe the reference project added those columns in a later migration
<adam12> lmat: Can you show _entire_ schema.rb for other project? Only thing I can think of is using Devise with a different auth mechanism? I'm not sure.
<rhiza> or maybe the reference project is using attr_accessor, etc
<lmat> rhiza: Oh yes, I've done it a dozen times ^_^ you know... password is in the controller and I currently don't have a controller at all in the minimal project...
jenrzzz has quit [Ping timeout: 256 seconds]
<lmat> adam12: I don't think I can do that, but here's the user table from the schema in the original project https://paste.rs/MbW
<al2o3-cr> people that go straight to rails without learning ruby should be chucked in the bin
* lmat flings himself in the bin.
<adam12> lmat: It's second line inside the block. t.string "encrypted_password", null: false
<Uncle_Cid> if I were to post some rspec code here without any reference to the code it's testing, could I possibly get some comments on my rspec syntax at least?
* lmat shoots himself
<havenwood> lmat: I think many relate to your frustrations with a lack of cookie crumbs to follow with implicit Rails conventions. Phoenix does a better job of being explicit with what's going on with less garbled params.
<adam12> lmat: Seems like you're missing all devise fields. Maybe you need a devise migration.
<Uncle_Cid> anymore self deprecating actions?
<al2o3-cr> Uncle_Cid: yes, don't trip
<havenwood> lmat: Even once you get up to speed with Rails, Devise can be difficult to customize.
<lmat> rhiza: What the $@$&*# is DatabaseAuthenticatable !!??
<havenwood> lmat: A Devise thing.
<lmat> Uncle_Cid: No. My relationship with rails is an exercise in masochism in the first place, so self-deprecation I expect will be the norm.
<Uncle_Cid> lmao
<lmat> havenwood: I'm complaining about lack of cookie crumbs again. What divination would lead me to DatabaseAuthenticatable? The only way is for me to seek out the wisdom of the sages (thus).
<Uncle_Cid> I always have a hard time writing specs because I think too much about if I'm correct or not
<Uncle_Cid> I have working specs, and it seems clean right now
<lmat> Uncle_Cid: What is this pile of terd vomit!? Dude, you need to go back and do "hello, world"
<Uncle_Cid> :P
<havenwood> lmat: You can ask Ruby about these things! :D Ruby is really nice.
<lmat> Uncle_Cid: Sorry, Feeling a bit aggressive today.
<Uncle_Cid> You're good my friend
<havenwood> lmat: Ruby can tell you in the REPL where constants and methods are defined.
<lmat> havenwood: I've heard as much.
<lmat> adam12: Thank you very much for your help!
<lmat> And the rest of you are oh-so friendly to a wandering beggar!
<adam12> lmat: Cheers.
<rapha> gitter1234: the title can be translated as "you know why (!)" or "do you know why (?)" (not sure which of those two it is) and then it goes on "... i love you" and then it goes on to a lot of very, very cheesy love babble that even without having ever taken egyptian colloquial at uni, with just my read/written arabic, i understand is nothing i want to listen to for too long :-P
<adam12> Devise is definitely a special project. I noticed that just recently, the creator of Devise went the complete opposite direction for his new authentication "framework". Can't say I blame him.
<adam12> s/project/challenge
<rapha> modern _arabic_ popular music is _surprisingly_ similar to the _german_ music my grandma liked to listen to
<havenwood> lmat: In the REPL: Module.const_source_location(DatabaseAuthenticatable)
<havenwood> ?irb lmat
<ruby[bot]> lmat: irb is "interactive ruby", it is part of ruby. You can run ruby code and see results immediately. it's useful for testing code. Also see ?pry, a gem which is a popular alternative to irb.
<havenwood> ?pry lmat
<ruby[bot]> lmat: Pry, the better IRB, provides easy object inspection `ls`, `history`, viewing docs `?`, viewing source `$`, syntax highlighting and other features (see `help` for more). Put `binding.pry` in your source code for easy debugging. Install Pry (https://pryrepl.org/): gem install pry pry-doc
<havenwood> lmat: In Rails, the default console uses IRB or you can switch it to Pry. Either are great.
<havenwood> lmat: rails console
<havenwood> lmat: Or rather: bin/rails console
<lmat> havenwood Thanks!
<havenwood> A `binding.irb` with a little introspection can work wonders.
<lmat> havenwood: (oops, somehow I typed /msg havenwoord instead of havenwood ^_^)
<havenwood> lmat: You're welcome.
<lmat> havenwood: I have some experience with pry from adam12 's advice before.
<havenwood> lmat: Ah, nice.
<lmat> havenwood: It's a very good tool.
<lmat> Haven't used it on this project, but I likely will!
<havenwood> ?pry_the_good_parts
<ruby[bot]> Pry the Good Parts: https://www.youtube.com/watch?v=jDXsEzOHb2M
<havenwood> There have also been some great recent improvements to IRB.
oziyasin has joined #ruby
<havenwood> lmat: Other Pry gems that mesh well with Rails are: pry-doc, pry-rails, pry-rescue, pry-stack_explorer, & pry-theme
* lmat bookmarks these
<rapha> wow, the poor Ruby was heavily critized for her style of clothing and one of her movies was even banned by the government :(
<adam12> pry-byebug is nice too
<rapha> wow
<rapha> that's awesome, thanks adam12
<adam12> I talked to someone once who _hated_ Ruby (& Rails). I watched them work for a few minutes and their _only_ mechanism for investigating / debugging was awesome_print.. so no use of the REPL or poking around. Once they could look at objects and start a debugger anywhere, things changed competely for them.
<rapha> hmm ... look at me ... puts debugging (or, as of recently, pp debugging) for years and loving ruby even so
nicholaslyang has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<al2o3-cr> adam12: you need to know the shit before you spread it
<lmat> adam12: Gotta embrace the whole ecosystem! No hope for a fella who's going to use assembly debug methods in rails ^_^
<havenwood> lmat: Only hope for gals using assembly debug methods in Rails? :P
rkoller has quit [Quit: Textual IRC Client: www.textualapp.com]
<adam12> LOL. Not saying anything is wrong with puts debugging but just looking at an object can be sometimes unhelpful. Looking at it's methods, checking it's instance, navigating around, etc. just opens up so much more of a good experience.
<havenwood> rapha: You are in good company, at least: https://tenderlovemaking.com/2016/02/05/i-am-a-puts-debuggerer.html
<al2o3-cr> havenwood: that's me right there ^
<rapha> wtf lol
<rapha> that's a funky website name
<adam12> rapha: lol. you're not familiar with tenderlove (the person)?
<rapha> no!
s_ has quit [Ping timeout: 260 seconds]
<rapha> is it like, the american matz?
<al2o3-cr> rapha: lol
<adam12> rapha: you should watch some of his keynotes. Lots of great information in them.
* rapha goes and searches
<adam12> rapha: He's sometimes known as Aaron Patterson.
s_ has joined #ruby
<al2o3-cr> rapha: he's a funny guy ;)
<adam12> rapha: Need to flip at least 10 minutes in to get past the puns, but some of then puns are the best part.
<adam12> rapha: He's been working on the packing GC.
<rapha> wow
schne1der has quit [Ping timeout: 256 seconds]
<al2o3-cr> rapha: he's comical
<rapha> i'm seeing that rn
<rapha> no shit
<al2o3-cr> sherlock
<havenwood> This reminds me of a Rails vs Django contributors visual comparison from years ago: https://pbs.twimg.com/media/Bn8ZYxrIMAIBMG3.png
<adam12> Wasn't there a video series too?
<rapha> o_O
<havenwood> I'd like to see it if there was.
<havenwood> Hah.
<al2o3-cr> havenwood: hahaaaa that is funny as fuck lol
<rapha> okay, no wonder that rails doesn't get used a lot in europe
<rapha> all the rails guys look too much like cowboys
<al2o3-cr> phhaaa i can't stop laughing...
<lmat> capybara?
<adam12> I wonder if Gregg and Jason are still doing anything Rails related.
<adam12> Ah, I forgot Jason passed.
<al2o3-cr> that shit is funny
<al2o3-cr> y so serial
<al2o3-cr> joker
ule has quit [Ping timeout: 256 seconds]
<rapha> is there a comparison between rails-ruby-people and non-rails-ruby-people?
<rapha> "i get a lot done when i'm supposed to be doing something else" ... my brother
<al2o3-cr> rapha: why should there be?
<rapha> al2o3-cr: mostly so that i can feel good about myself.
<al2o3-cr> rapha: it's all ruby at the end of the day!
<rapha> no. it's ruby with too many rules.
<al2o3-cr> &>> God < BasicObject
<rubydoc> stderr: -e:4:in `<main>': uninitialized constant God (NameError)... check link for more (https://carc.in/#/r/9dhd)
ctOS has quit [Quit: Connection closed for inactivity]
orbyt_ has joined #ruby
<rapha> it should say "uninstantiable class God (ProtoError)", but i do appreciate the link, rubydoc
ule has joined #ruby
vpw has quit [Ping timeout: 240 seconds]
<al2o3-cr> rapha: what is ProtoError?
<rapha> dunno ... it's like ... the mother of all errors
<al2o3-cr> rapha: how?
<rapha> well ... it's in the name!
<rapha> i mean
<rapha> have you ever tried to instantiate Universe?
<al2o3-cr> rapha: lol
<rapha> it's not possible because #initialize is not only private, it's outright *hidden* and can only be called by Universe itself, and there's no #new (or if there is, only God knows)
<rapha> so, it's difficult
<al2o3-cr> rapha: anything is possibe.
<rapha> Universe and God nod their heads in agreement ... if they have heads ... they're not quite sure, though
* rapha needs to stop watching the first 10 minutes of Aaron Patterson keynotes now
<adam12> rapha: Hah.
<adam12> rapha: after the puns, he gets into some great bits. Always a highlight of Ruby/Railsconf for me.
<lmat> rapha is serious polyglot...how many languages do you know?
TCZ has joined #ruby
<al2o3-cr> god doesn't exist, government exist. and what a fucked up party.
vpw has joined #ruby
<rapha> lmat: only German, English, Arabic and French, probably in that order. Unless you count anything where I know >= 10 but <= 20 words or phrases, then the list gets longer.
<lmat> rapha: German is your first?
<rapha> lmat: yes, annoyingly so. Also, unlike Aaron Patterson I know no Japanese at all.
<rapha> apparently "-mas" is an important syllable in Japanese, judging from Aaron's use of it.
<lmat> rapha: Annoyingly so? What would prefer be your first language?
postmodern has joined #ruby
<al2o3-cr> roda is king
<rapha> lmat: Something without cases perhaps ... I hear that Indonesian is nice.
nicholaslyang has joined #ruby
<lmat> rapha: You want to be ignorant of cases!?
nicholaslyang has quit [Client Quit]
* lmat wonders what it would be like if there was a nominative and accusative case in ruby...
howdoi has joined #ruby
<Uncle_Cid> https://gist.github.com/SirUncleCid/d4d86927cd3a01829e4076d5c6f5b6dc Still don't know what I'm doing, but it's working so far lol
<rapha> lmat: a life without cases is a life lived more easily. just use syntax instead! no need for so much analytical thinking ... go surfing more!
fabio_ has quit [Remote host closed the connection]
<adam12> Uncle_Cid: Looks OK. Deep nesting is the 1000 papercuts of rspec so definitely watch how deep you nest.
<adam12> Uncle_Cid: I personally dislike setting subject quite frequently, but I think that's up for debate. I _might_ reach for described_class but everything else is explicit. Boils down to personal taste.
<adam12> Uncle_Cid: If you haven't read the RSpec book by Myron I definitely encourage you to pick it up too.
<Uncle_Cid> Thank you for your input
<Uncle_Cid> I have Effective Testing
<Uncle_Cid> currently started it recently
<Uncle_Cid> that sentence is dongs^ anyways
<Uncle_Cid> I was kind of off with the subject juggling too, but
<Uncle_Cid> I have seen it suggested as good practice
<al2o3-cr> Uncle_Cid: that smells like python
* Uncle_Cid shrugs
* kaleido plugs his nose
<adam12> Uncle_Cid: For me, biggest risk of spec's are indirection and mystery guests. Deep nesting and using subject seem to exuberate that.
<Uncle_Cid> Heard that. I'll keep an eye out. The only tests I've ever written are ones from tutorials and books
<Uncle_Cid> and I try to read the content and then apply it without the aid of the book.. or much aid from the book
<Uncle_Cid> so it's not so much copying. But that's just syntax. It's difficult knowing what and how... and if you write crap code and try to test it after, you'll find when writing your specs that your code REALLY IS CRAP.. and that you should think about it more
Industrial` has quit [Ping timeout: 256 seconds]
<Uncle_Cid> Writing that one file worth of specs changed a lot of code, even though the untested code I had was working as expected
<Uncle_Cid> time to eat now.
vpw has quit [Ping timeout: 244 seconds]
en10n has quit []
go|dfish has quit [Ping timeout: 256 seconds]
en10n has joined #ruby
aesthe has quit [Quit: Leaving]
nicholaslyang has joined #ruby
go|dfish has joined #ruby
davispuh has joined #ruby
jenrzzz has joined #ruby
segy has quit [Ping timeout: 260 seconds]
segy has joined #ruby
BSaboia has quit [Quit: This computer has gone to sleep]
plutes has quit [Ping timeout: 272 seconds]
jenrzzz has quit [Ping timeout: 244 seconds]
BSaboia has joined #ruby
BSaboia has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
cd has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
imode has joined #ruby
ule has quit [Ping timeout: 256 seconds]
jenrzzz has quit [Ping timeout: 256 seconds]
ule has joined #ruby
rhiza has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
oziyasin has quit [Quit: Connection closed for inactivity]
Industrial` has joined #ruby
plutes has joined #ruby
mcspud has quit [Ping timeout: 240 seconds]
fanta1 has quit [Quit: fanta1]
mcspud has joined #ruby
jenrzzz has joined #ruby
gix has joined #ruby
<al2o3-cr> rapha: namika
jenrzzz has quit [Ping timeout: 246 seconds]
venmx has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
jenrzzz has joined #ruby
nebiros has left #ruby [#ruby]
<leftylink> ah, right, it might not be known where tap comes from... in such a case I would have to do something like
<leftylink> &>> true.method(:tap).owner
<rubydoc> # => Kernel (https://carc.in/#/r/9dir)
jenrzzz has quit [Ping timeout: 246 seconds]
ctOS has joined #ruby
ur5us has joined #ruby
<lmat> Can't talk now, watching asmr haircut video.
<havenwood> Stop spying on my haircut.
cnsvc has quit [Quit: WeeChat 2.8]
<havenwood> &>>. method(:method).owner.method(:method).owner.name.ord.digits.join.hex.div(method(:method).class.name.to_s.ord.size)
<rubydoc> stderr: -e:4: syntax error, unexpected '.'... check link for more (https://carc.in/#/r/9dis)
<havenwood> &>> method(:method).owner.method(:method).owner.name.ord.digits.join.hex.div(method(:method).class.name.to_s.ord.size)
<rubydoc> # => 10 (https://carc.in/#/r/9dit)
dfucci has joined #ruby
chris___ has joined #ruby
dfucci has quit [Ping timeout: 240 seconds]
chris___ has quit [Ping timeout: 246 seconds]
nicholaslyang has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
segy has quit [Quit: ZNC - http://znc.in]
TCZ has quit [Quit: Leaving]
segy has joined #ruby
schne1der has joined #ruby
nicholaslyang has joined #ruby
<lmat> You guys can open a bottle of wine on my behalf. I was about to come here and ask a question about a controller spec that didn't work but the real web site does work. I think I figured out at least what the difference is so I can keep working on it without help \o/
TCZ has joined #ruby
bambanx has joined #ruby
mossplix has quit [Remote host closed the connection]
ur5us has quit [Quit: Leaving]
fanta1 has joined #ruby
<al2o3-cr> lmat: ruby ruby ruby!
tau has joined #ruby
tau has joined #ruby
<al2o3-cr> shit happenz
<al2o3-cr> zzzz....
drincruz has joined #ruby
jenrzzz has joined #ruby
mossplix has joined #ruby
gato has joined #ruby
russano has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
mossplix has quit [Ping timeout: 246 seconds]
ur5us has joined #ruby
russano has quit [Client Quit]
russano has joined #ruby
russano has quit [Client Quit]
TCZ has quit [Quit: Leaving]
DaRock has joined #ruby
wymillerlinux has joined #ruby
gato has quit [Quit: Connection closed]
tau has quit [Ping timeout: 246 seconds]
ur5us has quit [Ping timeout: 256 seconds]
drincruz has quit [Ping timeout: 246 seconds]
TCZ has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
<lmat> THE TEST PASSED!!! \o/
nicholaslyang has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cnsvc has joined #ruby
fanta1 has quit [Quit: fanta1]
howdoi has quit [Quit: Connection closed for inactivity]
gitter1234 has quit [Quit: Connection closed for inactivity]
nicholaslyang has joined #ruby
Garb0 has joined #ruby
Garb0 has quit [Max SendQ exceeded]
Garb0 has joined #ruby
ur5us has joined #ruby
troulouliou_dev has joined #ruby
<havenwood> 🟢🟢🟢🟢🟢🟢🟢🟢
<havenwood> lmat: Congrats!
<Uncle_Cid> I'm getting more comfortable writing tests myself
<Uncle_Cid> These past couple weeks have been quite a lit time for progress
<Uncle_Cid> sorry people who are dying, but I get to stay home and study
DaRock has quit [Ping timeout: 256 seconds]
DaRock has joined #ruby
SuperLag has joined #ruby
plutes has quit [Ping timeout: 272 seconds]
imode has quit [Quit: WeeChat 2.8]
segy has quit [Quit: ZNC - http://znc.in]
segy has joined #ruby
jenrzzz has joined #ruby
TCZ has quit [Quit: Leaving]
plutes has joined #ruby