<myappie>
wuz the best gpt-like chatbot i can use with ruby?
John_Ivan has quit [Quit: Phantom of the future.]
snonux has quit [Ping timeout: 252 seconds]
myappie has left #ruby [#ruby]
gonix has quit [Ping timeout: 252 seconds]
ollysmith has quit [Quit: ZNC 1.8.2+deb3+b4 - https://znc.in]
ollysmith has joined #ruby
blaster has joined #ruby
<blaster>
Hi I am trying to install ruby 2.7.6 on OSX 11.7.2, and when I run rbenv install 2.7.6 it's failing with "configure: error: cannot run C compiled programs."
<blaster>
I have tried multiple solutions online but nothing seems to work.
<blaster>
It's an intel x86_64 mac.
ollysmith has quit [Ping timeout: 252 seconds]
<adam12>
blaster: What have you tried
<blaster>
Reinstalling rbenv and reinstalling xcode tools
<adam12>
blaster: How did you install rbenv?
<blaster>
brew install rbenv ruby-build
<adam12>
What's the output of `brew --prefix`
<blaster>
adam12, /usr/local
<adam12>
Can you paste entire error in a github gist? gist.github.com
<adam12>
What's the output of `ls -fl /usr | grep local`
<blaster>
drwxr-xr-x 14 root wheel 448 8 Jan 18:35 local
<blaster>
I will paste the full output of the install in a moment, I just restarted to see if that might fix anything, and just waiting for the command to finish.
<adam12>
No problem.
<blaster>
It's seems to be doing more this time, hopefully it works.
<blaster>
It worked :) I thought hail mary restarts were a Windows thing
<blaster>
Thank you for the support
ollysmith has joined #ruby
<adam12>
blaster: Cheers.
ollysmith has quit [Ping timeout: 252 seconds]
ollysmith has joined #ruby
razetime has joined #ruby
gonix has joined #ruby
caedmon has joined #ruby
caedmon has quit [Quit: caedmon]
howdoi has quit [Quit: Connection closed for inactivity]
jhass has quit [Ping timeout: 248 seconds]
gastus has joined #ruby
gastus_ has quit [Ping timeout: 248 seconds]
jhass has joined #ruby
moldorcoder7 has quit [Ping timeout: 252 seconds]
<ox1eef_>
OptionParser makes no sense to me. Why does it have a concept of required, and optional options but do neither raise an error, or call an option block, if a "required" option is missing?
<ox1eef_>
Now I know why Slop exists.
blaster has quit [Ping timeout: 248 seconds]
ur5us has quit [Ping timeout: 248 seconds]
c10l has quit [Read error: Connection reset by peer]
c10l has joined #ruby
gonix has quit [Remote host closed the connection]
Ziyan has joined #ruby
rvalue has quit [Remote host closed the connection]
rvalue has joined #ruby
Mo has joined #ruby
Aminda has quit [Remote host closed the connection]
Linux_Kerio has quit [Read error: Connection reset by peer]
Linux_Kerio has joined #ruby
<sam113101>
rapha: because when you use Hash there, it refers to CoreExtensions::Hash rather than the standard library Hash, because of scoping
<sam113101>
use seed[key].is_a?(::Hash) and it'll work
<rapha>
woah!!! i've seen that before ... the ::Something notation ... and finally i learned what it is. thank you, sam113101!! :D
<sam113101>
no problem
<adam12>
ox1eef_: Worth upstreaming perhaps? I do find Optionparser both powerful and strange at the same time.
szkl has joined #ruby
Mo has quit [Ping timeout: 252 seconds]
moldorcoder7 has quit [Ping timeout: 252 seconds]
moldorcoder7_ has joined #ruby
dionysus69 has quit [Ping timeout: 252 seconds]
kovital has joined #ruby
aeris has quit [Remote host closed the connection]
jonathan8 has joined #ruby
<jonathan8>
hi, I'm having trouble building a form partial with ERB. Basically, if I'm doing a form_with; model: <%= model %> it doesn't work.
<jonathan8>
ERB doesn't seem to like one liners
_aeris_ has joined #ruby
jonathan8 has quit [Quit: Ping timeout (120 seconds)]
jonathan8 has joined #ruby
<ox1eef_>
adam12: Yeah it crossed my mind. I will battle test the changes in my project, and see where it goes. I thought about forking it altogether as well.
<adam12>
jonathan8: Can you shar what you're trying? It's not obvious from your example.
<adam12>
Oh. My wget from homebrew is corrupt. I wonder if ruby-install prefers wget over curl..
<jonathan8>
To give you some context it's a partial where I'd like to be able to construct a form with different fields each time.
<adam12>
jonathan8: Ah. If you take out the ERB brackets, what is the line you want?
<jonathan8>
The thing is, form_with can take many different params.
<adam12>
form_with model, id: form_id do |f|
<adam12>
but only if model is present, if not, just `form_with id: form_id do |f|` ?
<jonathan8>
Again I'd like something configurable. Like being able to pass, no parameters, model, or anything else.
<adam12>
That was it. `brew reinstall wget` fixed it.
<adam12>
jonathan8: IMHO? Pass in the created form object from outside the partial.
<adam12>
<%= form_with your_options do |f| %>; <%= render "your_partial", f: f %>
<adam12>
If that doesnt' work for you, perhaps you want to make a helper? form_with_options(model=nil, **opts) or something. Then you can build what you want inside Ruby, and not be at the whim of ERB parsing.
<jonathan8>
Hum... It seems a good idea. I'll try that. Thanks.
<jonathan8>
I like your first option.
finsternis has quit [Read error: Connection reset by peer]
jonathan8 has quit [Quit: Ping timeout (120 seconds)]
hightower3 has quit [Remote host closed the connection]
hightower3 has joined #ruby
hightower3 has quit [Ping timeout: 264 seconds]
hightower2 has joined #ruby
joto has quit [Ping timeout: 252 seconds]
joto has joined #ruby
szkl has quit [Quit: Connection closed for inactivity]
reset has joined #ruby
haxn9k has joined #ruby
ziqehu has joined #ruby
kovital has quit [Ping timeout: 264 seconds]
haxn9k has quit [Ping timeout: 252 seconds]
razetime has joined #ruby
razetime has quit [Remote host closed the connection]
<ox1eef_>
Does Ruby still have a HTML builder, besides what's built into nokogiri ?
<ox1eef_>
I seem to remember a library or two dedicated to it, but not anytime recently.
haxn9k has joined #ruby
ziqehu has quit [Ping timeout: 260 seconds]
teclator has quit [Ping timeout: 260 seconds]
__ht has joined #ruby
_ht has quit [Ping timeout: 248 seconds]
__ht is now known as _ht
ziqehu has joined #ruby
haxn9k has quit [Ping timeout: 260 seconds]
<adam12>
ox1eef_: DSL like? Builder from Jim Weirich can do it, I think. Then there's oldschool Markaby, Erector, etc. New kid on the block is Phlex.
<adam12>
I'm still slightly worried about Phlex performance. That's _a lot_ of method calls, and more constants in RAM, but maybe it won't be that bad.
<leah2>
p
<adam12>
ox1eef_: Interesting.
<ox1eef_>
I think you could even have placeholder content, and replace it. Nice way to develop in HTML first then add Ruby later.
<adam12>
ox1eef_: Kinda reminds me of the view library for Pakyow.