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.
Rails migration files generate into corresponding modular directories
In a Ruby on Rails project, all migration files generate into the same directory db/migrate. It’s enough for simple projects, but not that good for large modulized projects. It is inconvenient to review thousands of files in the same directory for one project. [more inside]
Rails and the Warped Asset Pipeline
To most Rails developers, just starting or otherwise, the Asset Pipeline is like the magical warp pipe in a certain 8-bit – and its many incarnations – video game most of us grew up with. [more inside]
Build a Custom Query with AREL - Codemy
We show you how you can build a custom query using AREL in this video tutorial.
Stop rails from swallowing after_commit exceptions
Fun fact: rails just swallows exceptions in after_commit hooks, never to be seen again … fix it via gem or monkeypatch
Method visibility in ruby
Want to know about method visibility works in ruby (private public protected), some interesting corner cases and ruby 2.1 related updates? Then read this blog post :)
Search engine like fulltext queries for ActiveRecord via attr_searchable
In case you want to add fulltext (mysql/postgres) query support to your models and you don’t want to install additional search engine servers, check out attr_searchable: https://github.com/mrkamel/attr_searchable [more inside]
How to Debug Rails in the Context of Your App
I wrote a blog post about how to bring in Ruby gems or Rails source code together with your app to do some debugging. Digging into source code really shouldn’t be difficult.. Check it out here! [more inside]
Goal! Detecting the most important World Cup moments in Twitter
A simple strategy to detect spikes in Tweets and how to create a bell that rings at each goal using Raspberry Pi. Check it out
Why does refactoring make code simpler?
Last week, I wrote about methods with consistent return values, and how they’ll make your code simpler. But how does that happen? Why does the right refactoring make your code easier to work with? What makes good abstraction good, and bad abstraction bad? I mean, you can’t just blindly rearrange your code and end up with quality software. If you can learn why these techniques work, you’ll be better able to understand where your code needs help. And you’ll be able to use the right tools where they matter the most.
How to create digital clock using Ruby Shoes
I’ve created step by step guide to creating digital clock in Ruby Shoes.
Ruby blocks precedence
Carlos Antonio talks about the precedence difference between the curly braces {...} and the do...end Ruby’s blocks notations, and how that subject even generated an issue in Rails issues tracker. [more inside]
What are my goto set of Gems?
Everyone has their goto list of gems when they start a new project. Here’s a look at my standard Gemfile for new projects
mandriller 0.1.0 release!
I just released mandriller 0.1.0. It’s a simple gem for Mandrill SMTP API integration. Just replace ActionMailer::Base to Mandriller::Base, then put some lines for settings!
rufus-lua 1.1.1 released
Just released rufus-lua 1.1.1, a Ruby - Lua (5.1.x) bridge. This release includes work and ideas from Matthew Nielsen and Nathanael Jones, many thanks to them.
My Dilemma Of Semantic Versioning
Following a progressive path when developing gems and following semantic versioning results in fast-growing major version numbers. With two examples I explain my dilemma and open the discussion for proper versioning of Ruby gems.
Screencast: Introducing Mutant
Short (15 minutes) video demonstrating the awesome mutation tester Mutant. [more inside]
Custom Video Players and Animating Videos in RubyMotion
In the previous episode we looked at CALayer and how easy it makes animating your views. We’re going to expand on this by looking at a class I mentioned at the end of that episode called AVPlayerLayer, and it’s buddy AVPlayer. Using these classes you can creating custom designed video players and animate them in the same ways that you can animate CALayer (because AVPlayerLayer is a subclass of CALayer), without making the video jump, it’s all very smooth. [more inside]
ITTIA DB SQL Receives "Editor's Choice Award" From Embedded Computing Design
ITTIA DB SQL is selected as an “Editor’s Choice Award” by the respected Embedded Computing Design magazine. ITTIA DB SQL continues “targeting embedded systems, mobile devices, and other Internet of Things (IoT) appliances that require non-stop access to data”, allowing manufacturers to benefit from relational model and SQL to build fast, scalable, reliable and highly available applications.
Testing Sinatra application methods in isolation with RSpec
A small blog post on how to test Sinatra application methods, without having to perform full requests. More isolation easier. Testing Sinatra application methods in isolation with RSpec
N+1 Series: Eager Loading with Active Record - Codemy
We show you some eager loading techniques in this ~ 13 minute video.
Gem Active Admin Jcrop
I’ve just developed this gem called Active Admin Jcrop that adds an image cropping functionality to Active Admin. I guess it’s really useful in many projects. GitHub RubyGems Hope you like it and please feel free to contribute :D [more inside]
ojogo gem - another world cup command line tool - who's playing today?
Hello, I’ve put together another command line tool for the World Cup 2014 in Brazil that lets you query the football.db HTTP JSON API and prints today’s matches. For example, typing on Jun/29 $ ojogo will print
Netherlands (NED) vs Mexico (MEX)
Costa Rica (CRC) vs Greece (GRE)
That’s it. More info. Cheers.
FastAttributes - fast way to define attributes with their types in your model
If you are looking for a gem which allows you to define attributes in your model and you care about performance, please check out fast_attributes. [more inside]
Duckpond Gem 1.2, now with added screencast!
I just launched DuckPond version 1.2 - it’s either a good idea or a horrible idea, I haven’t quite made my mind up yet! I also recorded a screencast which gives a quick run through of the functionality the gem provides.