Reddit for Rubyists
0 FOLLOWERS
A sub-Reddit for discussion and news about Ruby programming.
Reddit for Rubyists
51m ago
submitted by /u/Apprehensive_Bit7392
[visit reddit] [comments ..read more
Reddit for Rubyists
9h ago
An error occurred while installing unf_ext (0.0.7.5), and Bundler
cannot continue.
Make sure that `gem install unf_ext -v '0.0.7.5' --source
'https://rubygems.org/'\` succeeds before bundling.
im just trying to do make boostrap and this stupid thing keeps showing then i do
gem install unf_ext -v '0.0.7.5' --source
'https://rubygems.org/'
and it shows another error
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.
then i do it with sudo and it shows a even longer error
Building native extensions. This could ta ..read more
Reddit for Rubyists
9h ago
Hello to the community!
Within my 10 years of developer experience, over and over again I see an unnecessarily complex code: methods span tens of lines, contain a ton of low-level details, are hard to understand and very expensive to test. This causes programmers who come to change them due to some new requirements to prefer just adding their stuff to the mix cause, well, "I have work to do, no time for the design". This makes perfect sense: refactoring such code may take days, if not weeks. But it is also true that this makes things even worse with time.
Today I had a chance to refactor anot ..read more
Reddit for Rubyists
14h ago
I'm building an application where I have to extract text from PDFs. I've been toying around with the `rtesseract` gem, but it's really bad...
Have any of you tried something good recently?
submitted by /u/AddSalt1337
[visit reddit] [comments ..read more
Reddit for Rubyists
20h ago
Ruby 3.3.1 was released two days ago. This release includes a fix for a regression in 3.3.0 causing for instance roda and sinatra apps to hog memory. So time to retest roda/rodauth app performance.
The good news is that the memory leaks have disappeared! Compared to 3.2.2 the latest Ruby uses a little bit less memory and shows fewer slow responses. However the median response time is a bit higher. All results can be found here.
Looking at the results for a sample rails/devise application Ruby 3.3.0+yjit showed improvements in all indicators compared to 3.2.2+yjit. With ~12% better medium resp ..read more
Need help with my code giving error: wrong number of arguments (given 0, expected 2) (ArgumentError)
Reddit for Rubyists
22h ago
The code is supposed to let me create dice, an array of all outcomes if the dice played "rollies", and then give me the percentage chance of one di winning, drawing, or losing with another. The issue comes from me trying to use these functions and getting error that's in the title. Any help or insight would be highly appreciated.
def create_di(sidenum)
di = Array.new(sidenum) {|i| i+1}
return di
end
#create di with (var)=create_di(side_num)
#rollies_array creates an array of positive and negative nums for the dice entered.
#Negative nums mean a win for the second di and vice versa.
def rollie ..read more
Reddit for Rubyists
22h ago
Why are there so many libraries (gems) in Ruby that use metaprogramming for DSLs? For example, when I started learning Rails, it had keywords like "route", "get" which are not Ruby's keywords. Similarly, in RSpec, it has keywords like "it" which is also not a Ruby keyword. As someone who is just starting to delve into Ruby with its many gems, I find it a bit confusing because each library has its own syntax.
submitted by /u/dojiggers
[visit reddit] [comments ..read more