The Ruby and Rails community linklog
Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!
Submit a post
Post Preview
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
Ruby on Rails - easy configuration for you app with YAML files
Did you know that Rails has a built-in method to load configuration defined in yml files? You don’t have to use any external gem to use it in your app. Read more
Ruby 2.6 is at least 2 times faster with new JIT: MJIT
JIT feature has been merged to Ruby 2.6 and here is an introduction to JIT. To install Ruby 2.6 with rvm use following commands:
rvm install 2.6.0-head or rvm install ruby-head
rvm use ruby-2.6-head
Sidekiq 5.1 released
It’s Sidekiq’s 6th birthday and I’ve shipped three releases to celebrate! [more inside]
A Quick Lesson on CRuby's 'Memory Slots'
Noah Gibbs looks at how Ruby stores objects in memory, works out where it stored those objects, and how can you look at what’s going on under the covers?
Ruby on Rails - improve your presence validation on the database level
Usually, when we want to ensure that value for a given column will be always present we would use the presence validator - it’s not enough. You should also validate it on the database level. Learn how
Reduce Rails build time from over 2 hours to 13 minutes
This post is written by a senior par8o engineer about how they reduced build time from over 2 hours to 13 minutes with Semaphore Boosters, fully automated parallel CI for Rails. Read it here
How Fast is Ruby 2.5.0?
Appfolio wrote a blog post as a followup on a previous article on the speed of Ruby 2.5.0, check it out here.
RSpec - make your specs beautiful, extract common test functionality
Since tests are just code, we can refactor it the same way we refactor our application classes. Many times we would need the same piece of code in the different tests so it would be nice to not repeat it over and over again. I want to make my specs beautiful
StimulusJS review
Review and opinion piece on StimulusJS.
Microservice Boundaries: 5 characteristics to guide your design
Are your Ruby microservices too small? Too tightly coupled? This design guide can help.
RSpec - by using let and before block you are doing it wrong
Not without a reason before and let blocks were created by RSpec authors but it’s better to avoid them when we don’t really need to use them. I want to know the right way
What Ruby Taught Me?
I’m working with Ruby for 4 weeks now. This is what this language taught me as a developer. [more inside]
A Safer Rails Console
Rails console is great to have in your toolkit, but its power can amplify the effects of mistakes. We discuss strategies for making it safer and built a gem around that.
[Screencast] Ruby on Rails - Tips and Tricks
In this episode, we will go through some of the tips and tricks that we often take for granted. We will be looking at nested routes, scopes, migrations and more. https://www.driftingruby.com/episodes/ruby-on-rails-tips-and-tricks
Optimize Rails performance bottleneck with caching and Rack middleware
A tutorial about Ruby on Rails optimization technique which resulted in over 500% performance improvement. Covers basic caching with Redis and custom Rack middleware setup. [more inside]
RSpec - create your own custom matcher
RSpec built-in matchers are great but sometimes they are not enough. Fortunately, we can create easily our own matchers. Of course, we can then reuse them across the whole application - I want to level up my RSpec game
Hello Stimulus on Rails
A pull request to get you started with Stimulus on Rails via webpacker [more inside]
Embedding Go into Ruby applications
Execution time in Ruby compared to other languages is extremely high, especially when we want to use complex algorithms. In general, data structures in interpreted languages become incredibly slow compared to compiled languages. This is one of the reasons It is interesting to embed Go code in a Ruby environment. [more inside]
Views in Ruby on Rails – advanced usage of content_tag helper
Generally, there are two common ways of creating HTML code in your Ruby on Rails app views: you can simply write HTML code or generate it by using helpers from ActionView module. LEARN MORE