#ruby - 18 June 2017
« Back 1 day Forward 1 day »
[00:32:37] s3a: Hello, everyone. :) I'm trying to run this code ( http://dpaste.com/10RZBDA ) which makes use of this ( http://dpaste.com/2DTRD41 ) and this ( http://dpaste.com/0HARDJE ), and I get this error ( http://dpaste.com/0HTSDAE ). Could someone please help me figure out what I am doing wrong?
[00:41:36] Guest97411: You can drop the .rb extension, and then use `require_relative` instead of `require`
[00:42:30] adam12: (require the .rb extension from the require line, not from the filename itself :)
[00:48:56] s3a: adam12, Why does require_relative instead of require work? Is it because of inheritance?
[00:49:40] adam12: s3a: when you use a regular `require`, only the $LOAD_PATH array is searched for files, and your current working directory isn't included by default
[00:49:54] adam12: s3a: The .rb extension isn't required when you require a file. Ruby knows wht kind of files it likes :)
[00:50:48] adam12: s3a: instead of require_relative, you could of used require but passed a full path, like './your-file'
[09:24:54] Zarthus: any suggestions for debugging a "bundle exec ..." call not finding any of the installed gems?
[09:25:27] Zarthus: it's literally the first gem it can find that errors, and 'bundle install' succeeds.
[15:53:40] cam27: After reading through the well grounded rubyist, I was kind of wondering why they didn’t always use initializers, and sometimes they only initialized some of the instance variables. Not really sure when I have to use them
[15:55:32] cam27: I think it is for when a instance passes in an argument like david = Person.new(34) and that would set the age
[16:27:13] cam27: are my underscores around FILE ok? they look longer in the book, and I’m getting an error message saying no method
[18:01:44] pvsukale: hello there, I am a cs student . I want to start digging into MRI . where should I start?
[18:03:20] elomatreb: I've heard good things about https://www.nostarch.com/rum, but I haven't yet gotten around to reading it myself
[18:05:24] Hanmac: pvsukale: you mean something like this ? http://patshaughnessy.net/2012/1/4/never-create-ruby-strings-longer-than-23-characters
[18:48:59] matugm: pvsukale, I think this is a good introduction to what you want to do :) http://www.blackbytes.info/2016/02/exploring-mri/
[19:22:20] empty_cup: is anyone familiar with minitest, i assumed i could have a before do block setup an instance variable that i could later reference in test cases. i'm unable to do so at the moment
[19:44:56] matugm: enpty_cups, it should work if you are using it inside a describe block (for RSpec-like syntax). Otherwise use a setup method to define your instance variable.
[19:51:05] empty_cup: i am following the rspec/expectations like syntax, i'll take a closer look, thanks matugm
[23:45:35] hightower2: geggam, of course it makes new lines. The \n is just the format used for printing out the value to the screen. And keep in mind that if you want to use this in HTML context, you'll need \n<br>, not just \n
[23:48:50] Mon_Ouie: ERB replaces <%= expr %> by calling the to_s method on whatever object expr evaluates to