akem__ has quit [Remote host closed the connection]
akem__ has joined #ruby
skyikot has quit [Ping timeout: 256 seconds]
ogres has quit [Quit: Connection closed for inactivity]
sagax has quit [Ping timeout: 246 seconds]
sagax has joined #ruby
dellavg__ has quit [Ping timeout: 250 seconds]
efertone has quit [Quit: Bye o/]
segy has quit [Ping timeout: 246 seconds]
yitsushi has joined #ruby
spacesuitdiver has joined #ruby
r29v has joined #ruby
r29v has quit [Client Quit]
conta has joined #ruby
hiroaki has quit [Ping timeout: 246 seconds]
renich has quit [Remote host closed the connection]
akem__ has quit [Read error: Connection reset by peer]
akem__ has joined #ruby
renich has joined #ruby
renich has quit [Remote host closed the connection]
renich has joined #ruby
segy has joined #ruby
spacesuitdiver has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Inline has quit [Quit: Leaving]
aufi has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dionysus69 has joined #ruby
\void has quit [Quit: So long, and thanks for all the fish.]
orbyt_ has joined #ruby
aufi has quit [Ping timeout: 268 seconds]
opya has joined #ruby
aupadhye has joined #ruby
clemens3_ has joined #ruby
ravenousmoose has joined #ruby
clemens3_ has quit [Ping timeout: 268 seconds]
opya has left #ruby [#ruby]
lytol_ has joined #ruby
esrse has quit [Ping timeout: 246 seconds]
clemens3_ has joined #ruby
cd has quit [Quit: cd]
cthulchu has quit [Ping timeout: 240 seconds]
prestorium has joined #ruby
BH23 has joined #ruby
jcarl43 has quit [Quit: WeeChat 2.3]
aufi has joined #ruby
desnudopenguino has quit [Ping timeout: 272 seconds]
nowhere_man has quit [Ping timeout: 259 seconds]
agent_white has quit [Quit: night]
AJA4350 has joined #ruby
jmcgnh has quit [Ping timeout: 268 seconds]
jmcgnh_ has joined #ruby
amerlin has joined #ruby
ansraliant has quit [Quit: My planet needs me]
status402 has joined #ruby
mikecmpbll has joined #ruby
prestori_ has joined #ruby
prestorium has quit [Ping timeout: 244 seconds]
aufi has quit [Ping timeout: 258 seconds]
lunarkitty7 has joined #ruby
_ikke__ is now known as _ikke_
jmcgnh_ is now known as jmcgnh
status402_ has joined #ruby
status402 has quit [Read error: Connection reset by peer]
lxsameer has joined #ruby
sleetdrop has joined #ruby
prestori_ has quit [Quit: prestori_]
GodFather_ has quit [Read error: Connection reset by peer]
GodFather_ has joined #ruby
apparition has joined #ruby
postmodern has quit [Quit: Leaving]
ta_ has quit [Ping timeout: 268 seconds]
ta_ has joined #ruby
prestorium has joined #ruby
clemens3_ has quit [Remote host closed the connection]
prestori_ has joined #ruby
prestorium has quit [Ping timeout: 245 seconds]
Bish has joined #ruby
aufi has joined #ruby
BH23 has quit [Ping timeout: 246 seconds]
tdy3 has joined #ruby
tdy2 has quit [Ping timeout: 268 seconds]
ellcs has joined #ruby
Puppet_ has quit [Remote host closed the connection]
Puppet_ has joined #ruby
Tuor has joined #ruby
blackmesa has joined #ruby
prestori_ has quit [Quit: prestori_]
prestorium has joined #ruby
_whitelogger has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
blackmesa has quit [Ping timeout: 259 seconds]
yitsushi is now known as efertone
v01d4lph4 has joined #ruby
BH23 has joined #ruby
sleetdrop has quit [Ping timeout: 250 seconds]
markoong has joined #ruby
sleetdrop has joined #ruby
gnufied has quit [Remote host closed the connection]
lucasb has joined #ruby
blackmesa1 has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
Nicmavr has joined #ruby
ravenousmoose is now known as ravenousmoose[aw
ravenousmoose[aw has quit [Quit: Taking a quick nap...ZZzzz]
Tuor has quit [Quit: Konversation terminated!]
ravenousmoose has joined #ruby
sylario has joined #ruby
tdy3 has quit [Ping timeout: 245 seconds]
stryek has joined #ruby
blackmesa1 has quit [Remote host closed the connection]
bmurt has joined #ruby
p47r30n has joined #ruby
gigetoo has joined #ruby
p47r30n has quit [Read error: Connection reset by peer]
reber has joined #ruby
awkwords has joined #ruby
v01d4lph4 has quit [Remote host closed the connection]
yokel has quit [Remote host closed the connection]
v01d4lph4 has joined #ruby
apparition has quit [Quit: Bye]
yokel has joined #ruby
segy has quit [Ping timeout: 245 seconds]
segy has joined #ruby
mikecmpbll has quit [Ping timeout: 257 seconds]
awkwords has quit [Quit: sleepy time]
mikecmpbll has joined #ruby
awkwords has joined #ruby
v01d4lph4 has quit [Remote host closed the connection]
v01d4lph4 has joined #ruby
v01d4lph4 has quit [Ping timeout: 250 seconds]
clemens3 has joined #ruby
sgen_ has joined #ruby
s2013 has joined #ruby
mkroman has quit [Read error: error:1408F10B:SSL routines:ssl3_get_record:wrong version number]
mkroman has joined #ruby
Rapture has joined #ruby
KeyJoo has joined #ruby
rippa has joined #ruby
conta has quit [Ping timeout: 246 seconds]
polishdub has joined #ruby
Bish has quit [Quit: leaving]
BH23 has quit [Ping timeout: 250 seconds]
kapil____ has quit [Quit: Connection closed for inactivity]
mensvaga has joined #ruby
<mensvaga>
I'm running ubuntu 18.04 . There's a system package, bundler 1.16.1-1 , which is installed.
<mensvaga>
When I `gem install bundler`, I get: Successfully installed bundler-2.0.1
<mensvaga>
Actually, I ran that as root.
<mensvaga>
anyway
reber has quit [Remote host closed the connection]
<mensvaga>
when I run `bundle --version` as my user, I get: Bundler version 2.0.1
<mensvaga>
But when I try and run my script, I get: Bundler could not find compatible versions for gem "bundler": , In Gemfile: bundler (~> 2.0) , Current Bundler version: bundler (1.16.1)
<darix>
mensvaga: how does your script call bundler?
<darix>
full path maybe?
<mensvaga>
require "bundler/setup"
<mensvaga>
That's it.
<darix>
uhm
<darix>
why not run your script with
<darix>
bundle exec yourscript
<mensvaga>
That's in the stub console file when you first create the project.
<mensvaga>
"bundle exec" ?
<mensvaga>
oh
<darix>
to make sure that you run in a locked down env from the beginning
<mensvaga>
OK, bundle exec worked.
eindoofus has joined #ruby
<eindoofus>
anyone else find enumerators annoying when first learning Ruby? i'm reading up on the unending number of enumerator options and functionality, and i'm hating it. not sure whether i should be enjoying this or if i should just power through it
<mensvaga>
And, it depends. Would you like enjoying learning a spoken language by reading a dictionary, and getting pissed off because of the "number of words" ?
<mensvaga>
So, with those books, they turn into part reference, part tutorial
Inline has joined #ruby
<mensvaga>
When I first started learning this stuff, it was hard to discern the two; mainly because it was difficult to anticipate what was going to be important later
<eindoofus>
it's more like the overwhelming variations in the usage of grammar for the same sentence
<mensvaga>
Don't get discouraged by it. All programming languages are like that.
<mensvaga>
The book is just presenting the information to you in what the Author thought was a useful way.
jordanm has quit [Ping timeout: 250 seconds]
<eindoofus>
thanks for the words of wisdom. i'll try to keep that in mind and keep at it
<mensvaga>
It seems like what you need to do is get confident in your ability to "just look stuff up" when you need to, and then skip the "boring" parts.
<mensvaga>
you're welcome.
<mensvaga>
eindoofus: Another thing: You probably already made the leap and didn't realize it.
<mensvaga>
Were you sitting there thinking, "Yeah, ANOTHER Iterator. I get it. Ruby has iterators. Oh, what's this? ANOTHER iterator? How many pages...? UGH"
<mensvaga>
Yeah, at that point, you know what an iterator is. You know what a data type is, you can lookup up iterators for data types.
<mensvaga>
This is when "actual" speed reading applies. Look at the headings, look at the first sentence, and then just breeze through those pages.
<phaul>
what is an iterator?
<eindoofus>
it's interesting you mention that. now that i think about it i use such books as a crutch since i lack the confidence to do anything without them. i also don't trust in my ability to skim information and remember that the concept exists.
<mensvaga>
What's a diarama?
<phaul>
is it something that includes Enumerable or instance of Enumerator
<mensvaga>
eindoofus: That comes with experience.
<mensvaga>
If you've driven a car, they're pretty much "all the same", except where the shifter is, and how to turn on the headlights, etc.
<mensvaga>
You know tire pressure is a concept. You don't need to read and learn the correct tire pressure measurements before you use somebody else's car.
spacesuitdiver has joined #ruby
dviola has joined #ruby
<mensvaga>
If a light comes on, pull over, look up what the warning indicators are in the manual. You probably didn't learn what every damn light in the car does. But, you know how to look it up :)
powerbit has quit [Remote host closed the connection]
SeepingN has joined #ruby
<phaul>
sounds like I'm trolling but I'm geniunely curious how that book defines iterators
akem__ has quit [Remote host closed the connection]
akem has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mensvaga>
If you're familiar with Tensors, some people define Tensors as "Things that Tensor operations can be done on."
<mensvaga>
Which, when you're first learning about them does NOT help you understand what they are.
<mensvaga>
But when you know what they are, you're answer is going to be "Things you can do Tensor things with."
<mensvaga>
Which makes it hard to figure out if people actually know what they're talking about.
akem__ has joined #ruby
akem has quit [Read error: Connection reset by peer]
conta has joined #ruby
<phaul>
also makes it hard when books come up with concepts on their own, that are not part of a language. Makes ppl familiar with the language confused
<mensvaga>
My favorite example of that is indentation style in books. Why do people use the indentation style that's in books? Books need to save whitespace.
blackmesa1 has joined #ruby
akem__ has quit [Remote host closed the connection]
gnufied has joined #ruby
akem__ has joined #ruby
uplime has quit [Ping timeout: 250 seconds]
bruul has joined #ruby
s2013 has joined #ruby
<phaul>
ah, Kernel#iterator? is an alias to block_given?. I never knew. Altough "mildly depricated".
<blerrp>
If this is your first time running the bundle gem command, you will be asked whether you want to include a the CODE_OF_CONDUCT.md and LICENSE.txt files with your project.
<blerrp>
rofl
<blerrp>
:(
awkwords_ has quit [Ping timeout: 250 seconds]
ravenousmoose has joined #ruby
<mensvaga>
Oh, yeah, so, I've made gems before. Not many
<mensvaga>
But each damn time was an adventure.
<mensvaga>
And now, I need to write documentation so people can take the adventure with me.
valadares has quit [Ping timeout: 240 seconds]
\void has joined #ruby
<mensvaga>
I'm making it public.
conta1 has joined #ruby
lucasb has quit [Quit: Connection closed for inactivity]
<mensvaga>
That is a possibility. However, designing and maintaining a secure infrastructure in that way was out of the scope for the current project.
BH23 has quit [Ping timeout: 250 seconds]
<mensvaga>
Basically, our users can already authenticate to where they need to, and have the appropriate access. So, a tiny shell script which writes things to a directory that's exported by apache was all we needed.
<mensvaga>
Yes, if we need to manage lots of these in a different way, we'll do that. We already host our own packages with other packaging systems, and have workflows for them.
ellcs has quit [Ping timeout: 250 seconds]
v01d4lph4 has quit [Remote host closed the connection]
<mensvaga>
Specifically, I'm concerned with if running "gem install bundler" as root is a "good" thing. I want it to be available to all users
<mensvaga>
I don't want the users to have to install much. But, if the user uses "gem install" in their environment, I want it to work.
ravenousmoose has quit [Quit: Taking a quick nap...ZZzzz]
<phaul>
I never install anything to system level, I agree with that
ravenousmoose has joined #ruby
<phaul>
gem wise that is
<mensvaga>
There's a nuance there:
<mensvaga>
I want for a user to be able to run bundler without having to install anything. But I want their own environment to overried what's installed system-wide
<mensvaga>
*override
<mensvaga>
So, if running as root doesn't prevent them from installing their OWN version of bundler, than I'm OK with installing it system-wide
cow[moo] has joined #ruby
valadares has quit [Ping timeout: 240 seconds]
dinfuehr has quit [Ping timeout: 272 seconds]
cthulchu has joined #ruby
cthulchu_ has joined #ruby
dinfuehr has joined #ruby
valadares has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
maryo has joined #ruby
v01d4lph4 has joined #ruby
v01d4lph4 has quit [Ping timeout: 246 seconds]
<havenwood>
mensvaga: Gem names, files and directories should all be lowercase.
<havenwood>
mensvaga: You can have multiple locations in GEM_PATH, one of which can be GEM_HOME.
akem__ has quit [Remote host closed the connection]
<havenwood>
mensvaga: RubyGems will install to GEM_HOME, but look for gems in all the locations in GEM_PATH.
<ngw>
I'm unsure on how to cleanly have a huge chunk of data in a class. This data is basically static (Elasticsearch index definition) and is basically a normal Hash
<havenwood>
mensvaga: You have an issue with you executable location. I the spec you say "exe" but you put it in the "bin" dir.
<ngw>
I'm fiddling with the idea of having an external configuration file that I just load, but I'm 'stopped' by the fact that in the end it's just an Hash, and I'd need to save the conf as json/yaml
<mensvaga>
havenwood: so, that's interesting. That "spec.bindir" is indeed what was given to me by builder
<havenwood>
ngw: You could Marshal it (or another serializer) the Hash and save it as a separate file or put it in at the end of the file with DATA __END__.
<ngw>
I'm really very anal right now, but wanted to hear someone elses pov
<havenwood>
mensvaga: It's a common pattern to use "bin" as your executable dir. The Bundler folk like using "bin" for developer niceties and put executables in "exe". You can do it however you like. I use "bin".
<mensvaga>
havenwood: any idea of how it came to be that 'exe' was chosen for bundler, when I'm running this on Linux?(!)
<havenwood>
mensvaga: Pass #expand_path a second argument, and consider __dir__: File.expand_path(__dir__, 'foodie/foodie.erb')
<havenwood>
mensvaga: Nothing to do with a .exe extension.
<mensvaga>
ah, __dir__ , I will do that.
<havenwood>
mensvaga: That's what Bundler chose to name that directory. Most non-Bundler-generated gems use "bin" not "exe". Your choice.
<mensvaga>
So, what else can I use to generate gems?
<mensvaga>
(that's recommended...)
<havenwood>
mensvaga: I do it from scratch. Many folk make their own or use one of the many gems (including Bundler) which will generate a gem layout.
<mensvaga>
hehe, yeah, so, what else aside from bundler?
<mensvaga>
I mean, of course "from scratch" is an option, but, what year is this?
<havenwood>
mensvaga: That way I think about every file and whether I need it and what should go in it. I've thought about generating but I kinda like starting with nothing.
<havenwood>
mensvaga: Drop the .rb extension for your executable. You might also want to document the: chmod +x
<havenwood>
mensvaga: or my little gem, digest-sip_hash adds another digest. that's not a plugin, but it's adding a new module to an existing, common digest module from the stdlib.
eindoofus has quit [Remote host closed the connection]
ravenousmoose[aw is now known as ravenousmoose
lxsameer has quit [Ping timeout: 268 seconds]
nowhere_man has quit [Ping timeout: 258 seconds]
Dbugger has joined #ruby
valadares has quit [Remote host closed the connection]
valadares has joined #ruby
prestorium has quit [Quit: prestorium]
[Butch] has joined #ruby
awkwords has joined #ruby
awkwords has quit [Client Quit]
ogres has joined #ruby
AJA4350 has quit [Ping timeout: 250 seconds]
tdy4 has joined #ruby
ravenousmoose is now known as ravenousmoose[aw
awkwords has joined #ruby
tdy3 has quit [Ping timeout: 244 seconds]
ravenousmoose[aw is now known as ravenousmoose
mikecmpbll has joined #ruby
skryking has joined #ruby
AJA4350 has joined #ruby
valadares has quit [Read error: Connection reset by peer]
valadares has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
KeyJoo has quit [Ping timeout: 245 seconds]
gix has joined #ruby
blackmesa1 has quit [Ping timeout: 250 seconds]
nowhere_man has joined #ruby
clemens3 has joined #ruby
scrptktty has joined #ruby
Inline has quit [Read error: Connection reset by peer]
Inline has joined #ruby
tdy has joined #ruby
tdy4 has quit [Ping timeout: 250 seconds]
agent_white has joined #ruby
sauvin has quit [Read error: Connection reset by peer]
cthu| has joined #ruby
cthulchu_ has quit [Remote host closed the connection]
code_zombie has joined #ruby
cthulchu_ has joined #ruby
cthulchu has quit [Ping timeout: 258 seconds]
lxsameer has joined #ruby
nowhere_man has quit [Ping timeout: 258 seconds]
dviola has quit [Quit: WeeChat 2.3]
blackswan has joined #ruby
<blackswan>
i am trying to use rails in Perl. don't ask why, it's not safe for you to know.
<KindOna>
@_@
<blackswan>
it's complaining "Subroutine new redefined at (eval 324) line 518." for some deprecated OpenSSL classes
<blackswan>
it's complaining this because it (meaning the Perl Inline::Ruby module) is trying to redefine 'new' for the Ruby class (i think), but it is also finding that the Ruby code it ran has defined a method named 'new'. so it's generating a string to be eval'ed by ruby that contains two different definitions of 'new'
<blackswan>
one from the Inline::Perl module, and one from the OpenSSL Ruby classes
<blackswan>
except... as far as i can tell, the OpenSSL code doesn't override 'new'.
<KindOna>
are you just blabbering without purpose or do you actually have a question
<KindOna>
because i'm hoping it's the former
<blackswan>
it *does* override 'initialize', and the Inline::Perl isn't seeing that in the list of symbols it thinks got defined when the OpenSSL Ruby code was loaded.
<blackswan>
so i have a question, yes.
<KindOna>
:(\
<blackswan>
is there some magic internally in the ruby code i should be looking for that might be taking the fact that this openssl code overrides the 'initialize' method and turning it into something that Inline::Perl is thinking is it overriding the 'new' method?
conta has quit [Quit: conta]
<blackswan>
grepping for 'initialize' and 'new' would be difficult, so i thought i'd ask in the hopes that somebody who knows more about ruby internals would hear my plea and take pity on me
<phaul>
classes all override the new method. That's how you get instances of classes
<blackswan>
i mean, grepping would be easy finding the lines i'm looking for wouldn't be easy.
<phaul>
disclaimer: as far as I understand things.
<blackswan>
well, it's not complaining about other classes, just these OpenSSL classes
<blackswan>
so something is different and i am trying to understand what it is so i can determine whether it is a problem and make it stop warning me about it.
<blackswan>
(whether it is a problem or not. if it's a problem, i want to fix it)
<blackswan>
hm. it's trying to define the two 'news' in Perl, not ruby.
<blackswan>
it looks at the ruby namespace before and after it evaluates ruby code, and finds new definitions of methods and instance methods, and defines perl counterparts.
Swyper has joined #ruby
<blackswan>
it's skipping a method named 'new' from ruby if it finds it as a class method but not if it finds it as an instance method.
Swyper has quit [Remote host closed the connection]
<flux__aeon>
either way i got it to work. debugging is kind of a pain
<havenwood>
flux__aeon: look at: customer.class
<havenwood>
flux__aeon: Pry makes debugging far easier.
<havenwood>
?pry flux__aeon
* havenwood
pokes ruby[bot]
<havenwood>
flux__aeon: 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>
flux__aeon: binding.pry ftw
sgen_ has quit [Ping timeout: 268 seconds]
<havenwood>
flux__aeon: or these days you can binding.irb too
renich has quit [Ping timeout: 272 seconds]
<flux__aeon>
i don't know what any of that means. i know almost zero ruby. i only figured that part out because it's the same syntax as python loll
<havenwood>
flux__aeon: Do you know python's interactive mode?
<flux__aeon>
yes
<flux__aeon>
how do i load an entire rails project into irb?
<flux__aeon>
so many moving parts
<havenwood>
flux__aeon: Ruby ships with IRB, which is similar. You can jump out to irb from your code by putting a `binding.irb` on the line you want to be at.
<havenwood>
flux__aeon: Try adding a `binding.irb` to a line in your code, then run the app.
<flux__aeon>
what does that mean
<flux__aeon>
add the phrase "binding.irb" and then run foreman start?
<havenwood>
flux__aeon: You'll see the app freeze when it gets to that line, then if you check your console you'll see an interactive terminal.
<havenwood>
flux__aeon: yup
<havenwood>
flux__aeon: To get a fancier interactive terminal, you can add `gem pry-rails` to your Gemfile and run: bundle
<havenwood>
flux__aeon: It's well worth getting the hang of.
<havenwood>
flux__aeon: I mean: gem 'pry-rails'
<flux__aeon>
wow you're so helpful! thank you i appreciate the help
reber has quit [Remote host closed the connection]
nowhere_man has joined #ruby
AJA4350 has joined #ruby
skyikot has joined #ruby
nowhere_man has quit [Read error: Connection reset by peer]
skryking has quit [Quit: Leaving]
jcalla has quit [Remote host closed the connection]
<Puppet_>
So I am using pry just like I normally would use IRB, if I made an error in a method I was trying to make in pry is there a way I can go back and edit it or do I have to remake the whole method?
<phaul>
edit methodname
<Puppet_>
ah, thanks
<phaul>
np
orbyt_ has joined #ruby
xco has quit [Quit: xco]
lunarkitty7 has joined #ruby
bruul has quit [Quit: WeeChat 2.3]
Dbugger has quit [Ping timeout: 268 seconds]
polishdub has quit [Remote host closed the connection]
akem__ has quit [Remote host closed the connection]
akem__ has joined #ruby
cd has joined #ruby
arekushi has joined #ruby
Tharbakim has quit [Quit: Something has gone terribly wrong. Send help.]