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!
<havenwood> hahuang65: Yes, technically. You can edit your Gemfile.lock. You can more practically edit your Gemfile to include a secondary local Gemfile if it exists or even take optional piped extra gems.
<havenwood> hahuang65: Gemfiles are just Ruby code and can be loaded as such.
<hahuang65> havenwood hmm, I was hoping there was a way to do it without affecting anything that's in source control.
<havenwood> hahuang65: You'll sometimes see something committed to the Gemfile like: load 'Gemfile.local' if File.file?('Gemfile.local')
<havenwood> hahuang65: You can setup a git post-receive hook or something like that if you want to do a repeated process locally.
<havenwood> hahuang65: cd .git/hooks && cat *
<hahuang65> yeah that might be acceptable as a 1-time thing
<hahuang65> the issue basically is I have a bunch of personal gems to try out, like LSPs or linting stuff, that I don't want to bother my co-workers with everytime I try something new.
DarthGandalf has quit [Quit: Bye]
ur5us has quit [Ping timeout: 260 seconds]
TCZ has joined #ruby
gix has quit [Ping timeout: 264 seconds]
markopasha has quit [Remote host closed the connection]
<adam12> hahuang65: Haven't tried it but had this bookmarked. https://phili.pe/posts/loading-additional-ruby-gems-in-development/
<hahuang65> adam12 that looks helpful, thanks for the link!
ur5us has joined #ruby
sergioro has quit [Quit: leaving]
DarthGandalf has joined #ruby
kristian_on_linu has quit [Remote host closed the connection]
mokha has quit [Quit: mokha]
cnsvc has joined #ruby
markoong has quit [Ping timeout: 256 seconds]
pwnd_nsfw has quit [Ping timeout: 250 seconds]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
brool has joined #ruby
ThinkDao has joined #ruby
donofrio has quit [Remote host closed the connection]
dviola has quit [Ping timeout: 258 seconds]
dviola has joined #ruby
cnsvc has quit [Ping timeout: 240 seconds]
lucasb has quit [Quit: Connection closed for inactivity]
sergioro has joined #ruby
cnsvc has joined #ruby
cnsvc has quit [Ping timeout: 240 seconds]
drincruz_ has joined #ruby
TCZ has quit [Quit: Leaving]
drincruz_ has quit [Ping timeout: 260 seconds]
djdduty has joined #ruby
djdduty has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hassox has quit [Ping timeout: 256 seconds]
Esa__ has joined #ruby
ThinkDao has left #ruby [#ruby]
code_zombie has quit [Quit: Leaving]
cnsvc has joined #ruby
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
BTRE has quit [Quit: Leaving]
ChmEarl has quit [Quit: Leaving]
ur5us has quit [Ping timeout: 260 seconds]
ur5us has joined #ruby
beaorn has quit [Quit: WeeChat 2.6]
BTRE has joined #ruby
akem has quit [Ping timeout: 256 seconds]
d3bug has quit [Quit: Connection closed for inactivity]
lineus has quit [Ping timeout: 240 seconds]
impermanence has quit [Ping timeout: 265 seconds]
ur5us has quit [Ping timeout: 260 seconds]
matled- has joined #ruby
matled has quit [Read error: Connection reset by peer]
matled- is now known as matled
miskatonic has joined #ruby
kotrcka has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
_whitelogger has joined #ruby
plutes has quit [Quit: See ya around!]
dinfuehr has quit [Ping timeout: 256 seconds]
dinfuehr has joined #ruby
tankf33der has joined #ruby
brool has quit [Ping timeout: 265 seconds]
roadie has joined #ruby
cthulchu_ has quit [Ping timeout: 240 seconds]
miskatonic has quit [Remote host closed the connection]
miskatonic has joined #ruby
xco has joined #ruby
blackmesa has joined #ruby
rafadc has quit [Ping timeout: 256 seconds]
zacts has quit [Quit: WeeChat 2.8]
markopasha has joined #ruby
markopasha has quit [Max SendQ exceeded]
jetchisel has quit [Quit: Unfortunately time is always against us -- [Morpheus]]
markopasha has joined #ruby
vondruch has joined #ruby
tpanarch1st has joined #ruby
hhzza has joined #ruby
jetchisel has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
conta has joined #ruby
xco has joined #ruby
dionysus69 has joined #ruby
gix has joined #ruby
sergioro has quit [Quit: leaving]
schne1der has joined #ruby
ur5us has joined #ruby
jetchisel has quit [Quit: Unfortunately time is always against us -- [Morpheus]]
jetchisel has joined #ruby
cd has quit [Quit: cd]
cisco has joined #ruby
raj has quit [Quit: No Ping reply in 180 seconds.]
s5 has quit [Quit: No Ping reply in 180 seconds.]
cisco has quit [Quit: leaving]
raj has joined #ruby
hays has joined #ruby
roadie has quit [Ping timeout: 264 seconds]
_phaul has quit [Quit: :wq]
fercell has joined #ruby
phaul has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
miskatonic has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rprimus has quit [Remote host closed the connection]
sysh has joined #ruby
markoong has joined #ruby
roadie has joined #ruby
roadie has quit [Read error: Connection reset by peer]
markoong has quit [Client Quit]
akem has joined #ruby
akem has quit [Max SendQ exceeded]
akem has joined #ruby
xco has joined #ruby
hhzza has quit [Quit: Connection closed for inactivity]
ws2k3 has joined #ruby
<ws2k3> suddenly today i got this error Could not find a valid gem 'english' (=0.6.3) in any repository what could this be?
pixelspaceships has joined #ruby
<pixelspaceships> Hey, I'm trying to feed a Net::HTTP stream to Ox for SAX XML parsing but Ox wants an IO object and Net::HTTP uses a callback. Is there any way to create an IO object from the callback?
zenspider has quit [Read error: Network is unreachable]
ur5us has joined #ruby
vondruch has quit [Ping timeout: 265 seconds]
darkstardev13 has quit [Ping timeout: 260 seconds]
darkstardev13 has joined #ruby
zlogan2003 has quit [Ping timeout: 265 seconds]
roadie has joined #ruby
Esa__ has quit [Ping timeout: 256 seconds]
ur5us has quit [Ping timeout: 260 seconds]
funnybunny2 has joined #ruby
<funnybunny2> Hello. Is there a way to write really_long_annoying_name[:really_long_annoying_symbol] = [] if really_long_annoying_name[:really_long_annoying_symbol].nil? Without repeating the name of the hash or symbol?
<funnybunny2> I just started learning Ruby
donofrio has joined #ruby
TCZ has joined #ruby
chalkmonster has joined #ruby
zlogan2003 has joined #ruby
drincruz_ has joined #ruby
vondruch has joined #ruby
drincruz_ has quit [Ping timeout: 265 seconds]
GodFather has joined #ruby
drincruz_ has joined #ruby
<TheBrayn> you can have a hash with default values: really_long_annoying_name = Hash.new []
burningserenity has joined #ruby
<funnybunny2> TheBrayn: Oh, right. Thanks, I think that will help
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
Technodrome has joined #ruby
conta has quit [Quit: conta]
dionysus69 has quit [Quit: dionysus69]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
troulouliou_dev has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
rmnull has joined #ruby
hhzza has joined #ruby
rmnull has quit [Quit: WeeChat 2.7.1]
abclol33 has joined #ruby
<abclol33> hi there, I'm looking to get into web development and programming and decided to start with rails. 1. How much ruby should I learn first? Can I start with rails straight away? 2. What resources/methods do you suggest I should use to learn ruby/rails? Thanks in advance! P.S I am already familiar with HTML and CSS
postmodern has quit [Quit: Leaving]
abclol33 has quit [Ping timeout: 240 seconds]
TCZ has quit [Quit: Leaving]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
abclol33 has joined #ruby
brool has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.8]
abclol33 has quit [Ping timeout: 240 seconds]
funnybunny2 has quit [Quit: leaving]
kinduff has quit [Read error: Connection reset by peer]
kinduff has joined #ruby
burningserenity has quit [Remote host closed the connection]
TCZ has joined #ruby
vondruch has quit [Quit: vondruch]
gitter1234 has joined #ruby
vondruch has joined #ruby
TCZ has quit [Quit: Leaving]
d3bug has joined #ruby
ChmEarl has joined #ruby
chalkmonster has joined #ruby
rippa has joined #ruby
<ws2k3> i got a difficult issue. i need english 0.6.3 which was pulled offline. so im manualy installing it with gem instal english.gem. but ruby still cant find it
zenspider has joined #ruby
<ws2k3> im already stuck on this al day. please let me know if anyone has any advice
<adam12> ws2k3: Ruby is moving towards gemifying stdlib. English is a library in stdlib.
<adam12> ws2k3: I wonder if this is a bug you've encountered because of it.
<adam12> ws2k3: There was chatter in the Rubygems repo yesterday/today about flipping things over.
<ws2k3> adam12 well the issue problem for me is thay they pulled english 0.6.3 offline from rubygems.org
<ws2k3> if they would make that available again i would not have a problem
<adam12> ws2k3: I think that's because they were taking over the namespace for some gems. What was the english gem originally?
<adam12> ws2k3: Maybe try posting to that issue I mentioned that you relied on the english gem 0.6.3 but it's been yanked. I'm not sure what else to suggest.
roadie has left #ruby ["ERC (IRC client for Emacs 25.3.50.1)"]
<adam12> Rubygems also has a support system. https://help.rubygems.org/
<havenwood> ablackack: 1. You can start Rails without knowing any Ruby if you want. I did Ruby for years before creating a Rails app, but some learn Ruby alongside Rails, which is fine too. Most folk do advise learning some Ruby first.
<havenwood> ablackack: Here are some resources for learning Ruby: https://ruby-community.com/pages/links
<havenwood> ablackack: I'd suggest starting here, if you're brand new to Ruby: https://try.ruby-lang.org/
<havenwood> ablackack: Then go through some exercises and get feedback: https://exercism.io/tracks/ruby
<havenwood> ablackack: It's a great idea to read some code. You can look at a gem with `gem open` like: gem open pry
<havenwood> ?pry
<gitter1234> Adam hey :)
lypsis has quit [Quit: ZNC - https://znc.in]
lypsis has joined #ruby
zacts has joined #ruby
<havenwood> TheBrayn: funnybunny2: For a default value of a fresh Array, it's: Hash.new { |h, k| h[k] = [] }
<havenwood> `Hash.new []` is usually not what's intended, since that same Array is the default value for all keys.
<havenwood> &>> h = Hash.new []; h[:oop] << 'hrm'; h.default
<rubydoc> # => ["hrm"] (https://carc.in/#/r/8upn)
sergioro has joined #ruby
golevka has joined #ruby
troulouliou_dev has quit [Quit: Leaving]
<havenwood> funnybunny2 (if they check the logs): really_long_annoying_name[:really_long_annoying_symbol] ||= []
troulouliou_dev has joined #ruby
<gitter1234> Howdy havenwood!
<havenwood> gitter1234: g'morin'
<havenwood> Or it's readable to write it: h = {}; h.default_proc = ->(h, k) { h[k] = [] }
<havenwood> The block becomes a proc either way, so you're not allocating an extra objec.
<havenwood> It is't a lambda with the Hash.new syntax, fwiw.
<havenwood> &>> h = Hash.new { |h, k| h[k] = [] }; h.default_proc.lambda?
<rubydoc> # => false (https://carc.in/#/r/8upo)
<gitter1234> Are there any Ruby on Rails UX pattern guides out there?
<havenwood> &>> h = {}; h.default_proc = ->(h, k) { h[k] = [] }; h.default_proc.lambda?
<rubydoc> # => true (https://carc.in/#/r/8upp)
<gitter1234> Also does anybody know what font icon set www.carc.in uses? I contacted and asked the Font Awesome people and it was not them
<havenwood> gitter1234: system-ui
chalkmonster has quit [Quit: WeeChat 2.8]
blackmesa has quit [Ping timeout: 265 seconds]
TCZ has joined #ruby
<gitter1234> Thanks!
<gitter1234> One possible UX pattern: instead of having to first click "Login" or "Sign up", return to the front page and then having to click "New post"
<gitter1234> The user would just click "New post" and either get taken to the new post form, or to a combined "Login + Signup" page which would remember and automatically redirect to the new post form afterwards
cranq has quit [Ping timeout: 264 seconds]
<gitter1234> This is what they call controller magic right?
fercell has quit [Quit: WeeChat 2.7.1]
cisco has joined #ruby
TCZ has quit [Quit: Leaving]
cranq has joined #ruby
<gitter1234> havenwood: system-ui looks incredible!
<havenwood> gitter1234: It depends on your system. It can also look terrible!
cthulchu_ has joined #ruby
t3hyoshi has joined #ruby
aesthe has joined #ruby
arcaos has quit [Ping timeout: 265 seconds]
roadie has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
BH23 has quit [Ping timeout: 256 seconds]
arcaos has joined #ruby
oncall-pokemon has quit [Quit: Connection closed for inactivity]
BH23 has joined #ruby
TCZ has joined #ruby
arcaos has quit [Ping timeout: 240 seconds]
arcaos has joined #ruby
code_zombie has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 256 seconds]
TCZ has quit [Quit: Leaving]
cisco has quit [Ping timeout: 260 seconds]
schne1der has quit [Read error: Connection reset by peer]
Emmanuel_Chanel has joined #ruby
schne1der has joined #ruby
schne1der has quit [Client Quit]
john2496 has joined #ruby
Technodrome has joined #ruby
cgfbee has joined #ruby
rcvalle has joined #ruby
cgfbee has quit [Remote host closed the connection]
rafadc has joined #ruby
kinduff has quit [Read error: Connection reset by peer]
kinduff has joined #ruby
cnsvc_ has joined #ruby
troulouliou_dev has quit [Ping timeout: 260 seconds]
troulouliou_dev has joined #ruby
ldepandis has joined #ruby
cnsvc_ has quit [Quit: WeeChat 2.8]
blackmesa has joined #ruby
kristian_on_linu has joined #ruby
s2013 has joined #ruby
<kristian_on_linu> cheers
<kristian_on_linu> jekyll user here, just recently updated everything and I'm getting a ton of warnings and stuff now
zacts has quit [Quit: WeeChat 2.8]
<kristian_on_linu> /home/kristian/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/jekyll-4.0.0/lib/jekyll/tags/include.rb:179: warning: Using the last argument as keyword parameters is deprecated
<kristian_on_linu> I get this error all the time
<kristian_on_linu> I believe this is the line: File.read(file, file_read_opts(context))
ellcs has joined #ruby
CrazyEddy has quit [Ping timeout: 265 seconds]
gitter1234 has quit [Quit: Connection closed for inactivity]
cd has joined #ruby
<kristian_on_linu> hurm, "bundle exec jekyll build" appears to fix/silence this
vondruch_ has joined #ruby
CrazyEddy has joined #ruby
GodFather has quit [Ping timeout: 258 seconds]
vondruch has quit [Ping timeout: 265 seconds]
vondruch_ is now known as vondruch
cgfbee has joined #ruby
cnsvc_ has joined #ruby
aesthe has quit [Quit: Leaving]
chalkmonster has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mark0n has joined #ruby
cnsvc_ has quit [Quit: WeeChat 2.8]
Technodrome has joined #ruby
mark0n has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
miskatonic has joined #ruby
howdoi has joined #ruby
troulouliou_dev has quit [Quit: Leaving]
<howdoi> is there a way to tap into constructor's arguments in a test?
<howdoi> like spying and then tapping into the arguments
<havenwood> howdoi: Can you show what you mean in psudo code?
<havenwood> howdoi: There's Method#parameters and you can look at local variables, but I'm not quite sure what you're asking.
<howdoi> allow_any_instance_of(X::Y).to receive(:initialize) do |opt, _| end
<howdoi>
<leftylink> hmm. usually I did that with `allow(Widget),to receive(:new).with(stuff)`
<howdoi> I need to tap into the initialize's arugments
<howdoi> *arguments
<havenwood> howdoi: What about them? Why?
<havenwood> howdoi: Can you show an example of arguments and what you want to know about them?
<howdoi> I need to make sure in a flow that a constructor is receiving and tap into what it is receiving to assert on it
<havenwood> howdoi: Like a mock?
<howdoi> stub
<havenwood> I've probably overly-zealously stuck to Minitest, where I'd use a Minitest::Mock like: https://gist.github.com/havenwood/84207afa092ce5d5a680
<havenwood> howdoi: My RSpec-fu is not so great, but I'd have expected a mock if you want to test that your object initializes with particular arguments
<howdoi> cool, let me paw at it a bit more
<howdoi> `allow_any_instance_of(x::y).to receive(:initialize)` will give the class before it received anything
<howdoi> leftylink: .with(stuff); I want to tap to the `stuff`
<leftylink> great. but you already know how to do that
<leftylink> 20:03:21 < howdoi> allow_any_instance_of(X::Y).to receive(:initialize) do |opt, _| end
<leftylink> so you know how to use `receive` with block
<leftylink> so you are able to combine what I said with what you said
<howdoi> and that would be like?
<leftylink> as you wrote it.
<howdoi> allow(Widget),to receive(:new).with(stuff)?
<leftylink> no of course not, then you don't have a block.
<howdoi> confused :(
TCZ has joined #ruby
<howdoi> something like a matchers
<leftylink> how can I help
ur5us has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.8]
<leftylink> except with different values substituted in for `dbl` and `:foo` of course.
<howdoi> expect(X::T).to receive(:initialize).with(an_instance_of(T), anything)) do...
miskatonic has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
<leftylink> oh very interesting! I didn't think of that. it appears I still have much to learn
<leftylink> thank you
johnny56_ has quit [Remote host closed the connection]
<s2013> hello.. im having trouble with mocking rspec for a method inside a callback
<s2013> this should explain better what im looking for
nofxx_ has quit [Remote host closed the connection]
nofxx has joined #ruby
<s2013> anyone?
Esa__ has joined #ruby
ellcs has quit [Ping timeout: 260 seconds]
<havenwood> s2013: What's the trouble?
<s2013> its still aking the call
<s2013> making*
<s2013> i dont want it to make that call
<havenwood> s2013: Is `:find_type` then meant to be `:do_something` in your example? I'm confused.
roadie has quit [Ping timeout: 264 seconds]
<s2013> no
<s2013> hold on
<s2013> new_type = SomeGem.find_type(self) <-- this is an external call
<s2013> i want new_type to be set to 'b' in the test so it wont have to actually execute SomeGem.find_type..
<s2013> i refactored it a bit, let me paste the update
<s2013> https://paste.ubuntu.com/p/mS6g6n8yf6/ i want to mock a sevice
roadie has joined #ruby
cnsvc_ has joined #ruby
roadie has quit [Ping timeout: 260 seconds]
roadie has joined #ruby
roadie has quit [Ping timeout: 256 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
roadie has joined #ruby
roadie has quit [Ping timeout: 240 seconds]
<s2013> anyone?
roadie has joined #ruby
cnsvc_ has quit [Ping timeout: 240 seconds]
robotmay has quit [Remote host closed the connection]
roadie has quit [Ping timeout: 256 seconds]
robotmay has joined #ruby
Milos_ has joined #ruby
kristian_on_linu has quit [Remote host closed the connection]
Milos has quit [Ping timeout: 268 seconds]
blackswan has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<blackswan> hi. i have a ruby gem i want to run on a mac mini that's remote and i don't want to screw with the system's ruby install, so i have installed macports ruby 2.7. i made a directory and created a Gemfile listing my gem and installed it in vendor/bundle with bundle install after doing bundle config set path vendor/bundle. but, it wants to use rake, which isn't installed. so i added rake to the gemfile and ran bundle install, but it is still
<blackswan> omplaining about not being able to find rake. what obvious thing am i missing? is it because the only 2.7 version of gem is the one named gem2.7 installed with macports, and the macports installation of gem is broken because of this?
<blackswan> this was supposed to be so simple...
<blackswan> i hate computers.
pixelspaceships has quit [Quit: Connection closed for inactivity]
al2o3-cr has quit [Quit: WeeChat 2.8]
al2o3-cr has joined #ruby
blackmesa has quit [Ping timeout: 256 seconds]
TCZ has quit [Quit: Leaving]
roadie has joined #ruby
<havenwood> blackswan: Show the "not being able to find rake" error?
<blackswan> Could not find gem 'rake (~> 10.0)' in any of the gem sources listed in your Gemfile.
<blackswan> Run `bundle install` to install missing gems.
<havenwood> blackswan: And it appears to install when you run `bundle install`?
<havenwood> blackswan: Is it in your Gemfile.lock?
<havenwood> blackswan: Are you running it with?: bundle exec rake
<blackswan> i have to run bundle2.7 install. but yes
burningserenity has joined #ruby
<blackswan> i'm not running rake, i don't know how rake got involved here
burningserenity has quit [Remote host closed the connection]
<havenwood> blackswan: What command are you running that results in the error?
<havenwood> blackswan: Are you prefixing `bundle exec` to the command?
john2496 has quit []
roadie has quit [Ping timeout: 250 seconds]
<blackswan> no, the problem was i'm an idiot
<blackswan> and not just a regular idiot, and extra-stupid one
<blackswan> an*
postmodern has joined #ruby
markopasha has quit [Read error: Connection reset by peer]
roadie has joined #ruby
cisco has joined #ruby
brool has quit [Quit: WeeChat 2.8]
roadie has quit [Ping timeout: 240 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
drincruz_ has quit [Ping timeout: 265 seconds]
kristian_on_linu has joined #ruby
kristian_on_linu has quit [Remote host closed the connection]
SeepingN has joined #ruby
roadie has joined #ruby
sysh has quit [Remote host closed the connection]
gitter1234 has joined #ruby
mark0n has joined #ruby
roadie has quit [Ping timeout: 265 seconds]