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.
Strong growth in Ruby usage according to TIOBE Programming Community index
Ruby is in top 10 languages [more inside]
Elasticsearch Part 7: Aggregations (Faceted Search)
In this episode we show you how you can begin implementing aggregates (faceted search) in your application Video
Rails DB version 0.2.1 with new cool features
https://github.com/igorkasyanchuk/rails_db inspect DB without any DB viewer [more inside]
The not so low cost of calling dynamically defined methods
Ruby is great for metaprogramming, but what about the performance of calling metaprogrammed methods? We expect it to be on par with the equivalent ordinarily defined method but that’s not really the case as highlighted in this post.
Understanding Ruby Refinements and Lexical Scope
If you’ve never used Ruby’s refinements, you might be surprised to learn that they’re lexically scoped. We’ll discuss what this means, and the implications for your code. http://blog.honeybadger.io/understanding-ruby-refinements-and-lexical-scope/
Introducing Tremolo for Tracking Stats to InfluxDB
InfluxDB has been a very useful tool that has mostly replaced StatsD/Graphite in my use case. So, by way of an introduction to Tremolo, I’ve written a little how-to for using ActiveSupport::Notifications to send stats to InfluxDB. Chat with me on Twitter or open any Issues you might find!
Making a custom logger for Rails query optimization
I’ve spent a lot of time tracing problematic queries and figuring out where ActiveRecord chains were called in views. I’ve made a simple logging tool to visualize what is happening through the full MVC stack.
Delay API calls to Twilio with Rails, Active Job and Sidekiq
Performing long running, blocking tasks during the course of a request is a top way to slow down responses for any web application. Things like HTTP requests to 3rd party APIs can tie up processes. We’ll see how to improve the situation using Active Job and Sidekiq to delay API calls and speed up our Rails application.
Solutions for Slugs of All Sizes: acts_as_url + to_param
Rails loves convention over configuration. But sometimes we need to tweak those configurations, like using a slug in our parameters instead of an object’s primary key! Luckily, we don’t need to reinvent the wheel, because this problem has been solved in a variety of ways. This blog post looks at one of those solutions, the acts_as_url
library, and how it overrides Rails’ to_param
method.
Effective TDD With Ruby: Time & Flow
Do you find Test Driven Development (TDD) good in theory but hard to practice? Do you think it requires too much discipline and you don’t have time? You can improve a lot with some techniques that are simple, effective and easy to apply. [Read more]
Picking the right data structure
If you see code that’s using an Array, could it use a Set instead? If so, is it worth the time and effort to swap them out? I wrote up some notes on picking the right data structure.
Duck typing
Duck typing is about making an object suitable for a certain task based on its methods and properties rather than its type. It’s like this: if you see a dog (type) that quacks like a duck, then I will call that dog a duck (duck-typing). http://davidmles.com/blog/duck-typing/
Advantages of working on a legacy Rails application
On my first day I sit down, pulled the repository, installed dependencies and run the tests. Almost everything failing. I looked at the code and it was terrible. So much business logic in controllers and views. I wanted to cry… [more inside]
The Test That Cried Fail
Nobody likes failing tests, but intermittent test failures are maddening. We’ll explore four common reasons for intermittent test failure, and approaches to solving them. [more inside]
How To Integrate Clickatell In Rails Application
Clickatell delivers short message service (SMS) messages through its Clickatell Gateway to mobile phone users through more than 800 networks in more than 220 countries and territories, with the potential to reach five billion mobile phone users, or more than 70 percent of the world’s population. Read full article at RailsCarma Blog
Building a Simple Web Server with Ruby 2.0+ (Part 2)
In a previous post, a very simple Ruby server was created to listen to HTTP requests. While great for a first step, this example server does nothing more than respond with “Hello World”. Greetings are nice and polite, but I think we can do better.
Layering API Defenses With Caching
Learn how to effectively layer caching around an API endpoint for defense and massive performance gains.
The Many Uses Of Ruby Case Statements
An article about the different things you can do with the case statement in Ruby http://www.blackbytes.info/2015/10/ruby-case/
Getting A Users Change History Using Audited Gem
How get a users history using Audited. http://solidfoundationwebdev.com/blog/posts/getting-a-users-change-history-using-audited-gem
Getting started in Rust from a love for Ruby
After reading and seeing a presentation about writing Ruby methods in Rust, and the benefits of Rust, I just had to give it a try. Here’s my journey so far, including links to what has inspired me to do so. Getting started in Rust
7 Points To Remeber While Hiring Ruby on Rails Development Company
Hiring a technology partner is not a difficult task if you know what to ask. Check out these 7 tips in our blog to learn how you can hire ruby on rails development companies even if you know nothing about technology.
Ruby 2.2.3 Symbol Basics : Part 1
Ruby 2.2.3 Symbol methods such as object_id, to_s, ==, <=>, to_s, [] and all_symbols is covered in this video
Leveraging Rails’ Custom Configuration
Rails 4.2 introduced Rails.configuration.x
and Rails.application.config_for
. I combined both to have a single handy YAML configuration file. http://jeromedalbert.com/leveraging-rails-custom-configuration
Ruby 2.2.3 Hash Basics : Part 7
Ruby 2.2.3 Hash methods such as to_a, to_h, to_s, inspect, merge!, has_value?, values and values_at is covered in this video