buckwheatsuperpo has quit [Ping timeout: 245 seconds]
reset has joined #ruby
brokkoli_origin has quit [Ping timeout: 245 seconds]
desnudopenguino has quit [Remote host closed the connection]
desnudopenguino has joined #ruby
brokkoli_origin has joined #ruby
keypresser86 has joined #ruby
roadie has joined #ruby
roadie has quit [Ping timeout: 255 seconds]
reset has quit [Quit: reset]
markong has quit [Ping timeout: 245 seconds]
buckwheatsuperpo has joined #ruby
buckwheatsuperpo has quit [Ping timeout: 245 seconds]
roadie has joined #ruby
roadie has quit [Ping timeout: 255 seconds]
roadie has joined #ruby
roadie has quit [Ping timeout: 255 seconds]
finsternis has quit [Read error: Connection reset by peer]
caedmon has joined #ruby
Sankalp has quit [Ping timeout: 246 seconds]
Sankalp has joined #ruby
caedmon has quit [Ping timeout: 245 seconds]
c10l has quit [Quit: Ping timeout (120 seconds)]
c10l has joined #ruby
caedmon has joined #ruby
<KOTP>
oxleef, of course, since that is what gets does, but to_i or Float or Integer will naturally remove that since a number will not, by its very property, have it. So no reason to remove it with an explicit call of chomp.
<KOTP>
Though `gets` is "get string" so it will not get a pure number, it will get a string.
cognemo has quit [Server closed connection]
cognemo has joined #ruby
<ox1eef_>
Yeah, I would still use gets.chomp rather than rely on that. It is much more clear to the reader.
roadie has joined #ruby
goldfish has quit [Ping timeout: 260 seconds]
roadie has quit [Ping timeout: 255 seconds]
roadie has joined #ruby
caedmon has quit [Ping timeout: 252 seconds]
caedmon has joined #ruby
roadie` has joined #ruby
roadie has quit [Ping timeout: 255 seconds]
grenierm has joined #ruby
caedmon has quit [Ping timeout: 246 seconds]
fcser has quit [Quit: zzzzz]
fcser has joined #ruby
graaff has quit [Quit: Leaving]
graaff has joined #ruby
fcser has quit [Quit: zzzzz]
fcser has joined #ruby
fcser has quit [Quit: zzzzz]
fcser has joined #ruby
keypresser86 has quit []
roadie` has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.0.92)]
<havenwood>
There's a #code-review channel there ^
<havenwood>
(for Ruby)
___nick___ has quit [Ping timeout: 240 seconds]
crapes65 has quit [Remote host closed the connection]
crapes65 has joined #ruby
<desnudopenguino>
anyone working with roda floating around? i'm working through the "mastering roda" book, and have hit a wall with the inject_erb example
_ht has quit [Quit: _ht]
eulogi has joined #ruby
infinityfye has quit [Quit: Leaving]
<desnudopenguino>
the example shows using a method and calling it from an erb template file, but when i try that, i get a NoMethodError for the method. i tried moving the method definitial all over the place in the app file and template file with no luck
crapes65 has quit [Ping timeout: 260 seconds]
<havenwood>
desnudopenguino: I think #inject_erb is meant to be called from your Roda routes. Make sure you enable the plugin.
<havenwood>
Use #inject_erb from methods inside your routing tree, I believe. Then call those methods from your erb.
<adam12>
desnudopenguino: I use Roda.
<adam12>
desnudopenguino: I think it should work inside a template file too, but a stracktrace would be helpful.
<adam12>
desnudopenguino: And this is assuming you loaded the plugin (which you did, right? :P )
<adam12>
I normally use it inside a method and not inside a template, but because they share the same context when rendering a template, it should make no difference.
<adam12>
Also make sure you've restarted your app.
<ruby[bot]>
desnudopenguino: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
<desnudopenguino>
sorry ruby[bot]
<desnudopenguino>
i tried a plain <% inject_erb <somethnig> %> line in the erb file and that works
eulogi has quit [Quit: Best CPUs can count to infinity twice without being bugged out by zero division errors or whatnot.]
<adam12>
desnudopenguino: Oh. You'e defined try_it inside the template?
<adam12>
desnudopenguino: The NoMethodError isn't from inject_erb but from try_it.
<adam12>
desnudopenguino: You could try using define_method or define_singleton_method instead. IMHO, I'd extract this out to some other class and make it available to the view. If you need `inject_erb` in that class, pass in the roda instance.
<adam12>
desnudopenguino: class TaskPage; def initialize(roda_instance); @roda_instance = roda_instance; end; def try_it(&block); @roda_instance.inject_erb(@roda_instance.cpature_erb...rest_of_bits); then in your route, task_page = TaskPage.new(self).
gr33n7007h has joined #ruby
dsc_ has joined #ruby
<dsc_>
after `gem install bundler` I get `ERROR: While executing gem ... (Gem::Exception) OpenSSL is not available. Install OpenSSL and rebuild Ruby (preferred) or use non-HTTPS sources`
<dsc_>
this happened after I did: rvm install ruby-3.0.6
<dsc_>
(and using that version)
<dsc_>
how to fix this openssl error?
<dsc_>
since I am using `rvm` I would expect it to install a correct version