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.
Retrieving the last N ordered records with ActiveRecord using subqueries
We recently built a chat, and ran into an interesting issue regarding retrieval of chat messages, with an interesting solution. There’s a blog post about it on the Elabs blog: http://www.elabs.se/blog/72-retrieving-the-last-n-ordered-records-with-activerecord
Holy Hacking, Batman! Create Alfred Workflows in Ruby
Introduces the productivity tool Alfred and describes how to implement workflows in Ruby without using the Alfred libraries.
Heroku - process exited with status 0
Short debugging story about setting up Sidekiq on Heroku and “process exited with status 0” puzzle to solve
Break it Baby, Break It – How the network sniffer "Wireshark" can break Rubygems
Occasionally I get some really weird errors when I try to install gems using gem or bundler. It took me some time to find out the reason for this. Read this article if you’d like to hear the full story.
Ruby 2.2.3 Module Basics : Part 7
Ruby 2.2.3 Module methods such as remove_class_variable, singleton_class, alias_method and using instance_method in combination with define_method is covered in this video
Part 4: Importing book sales from Amazon with Ruby on Rails
Finally the part 4 of How to build a Ruby app series, where we create the Rake tasks to fetch sales ranking data for our Ruby on Rails books from Amazon.
Announcing Rubinius Analyst
Want to know what your app is really doing with no runtime cost? Check out Rubinius Analyst.
Rubocop as a Teaching Tool
I summarized my experience using Rubocop to teach the style guide for a big Ruby project.
Introduction to Verifying Doubles in RSpec
Ever wondered how you can write less brittle unit tests with RSpec? Find out how verifying doubles, introduced in RSpec 3, help you do just that. Introduction to Verifying Doubles in RSpec
Testing Ruby Mixins with Minitest in isolation
Just published a blog post about testing mixins with Minitest in isolation. You can check it out here.
Dynamically compile stylesheets with rails and sass
A small blog post how did I manage to compile css file on the fly for Rails app.
Application Deployment On Heroku
Heroku offers Ruby web developers instant deployment, fast & easy scaling, and vast tool selection. Now we can concentrate on building our applications and forget the tedious deployment and server administration tasks that used to strangle our productivity. We can deploy fast, scale quickly, and adjust to circumstance as needs arise. Read more at RailsCarma Blog.
Rails 4.2.4 and Paper Trail 4.0
Checkout the sample Rails 4.2.4 and Paper Trail 4.0 App
How Ruby Interprets and Runs Your Programs
In this post we’ll follow the journey of a simple program as it’s lexed, parsed and compiled into bytecode. We’ll use the tools that Ruby gives us to spy on the interpreter every step of the way. http://blog.honeybadger.io/how-ruby-interprets-and-runs-your-programs/
How to Apply RuboCop to Your Large Rails Codebase
Learn how to use HoundCI and RuboCop to maintain your codebase with an evolving team.
How to Write a Cucumber Test for Google Maps
Trying to write a Cucumer test for a Google Maps related feature is a bit trickier than you might expect. It involves tweaking the Google Map on the testing environment and using a javascript capable driver like Selelnium. How to Write a Cucumber Test for Google Maps
Administrate, by thoughtbot
A framework for creating flexible admin dashboards in Rails. Read more
Finding and Fixing Frustrating Test Behavior
Tests that behave oddly by failing or even passing in unexpected ways decrease confidence in your test suite, and are simply a pain. Luckily there are some pragmatic solutions to frustrating tests. Read more
Bootstrapping a Business Around Open Source
Phusion, the authors behind the popular Passenger app server, published an article on how they’ve built a business around open source. This article discusses how building a business can make an open source project sustainable. Features a quote from Mike Perham who now works on the Sidekiq gem full time.
Hunting Down The Scoop On ActiveRecord Scopes
Scopes are a handy tool provided to us by ActiveRecord. But how do you know when to use a scope? And what makes a scope different — and sometimes more useful! — than a class method? This blog post hunts down the scoop on exactly how the scope method works.
New rails importing gem
A new and modern importing gem for ruby on rails.
Using a Proc for Rails' asset_host
A quick Rails workaround for CORS headers not appearing on your fonts: http://cookieshq.co.uk/posts/rails-tips-asset-host-proc
CAS Authentication Explained
There are some great tools in Ruby for doing single sign-on with CAS. But before you get started, you should make sure you understand the basic concept of how CAS works.
Ruby 2.2.3 Module Basics : Part 6
Ruby 2.2.3 Module methods such as private_class_method, private_instance_methods, private_method_defined?, protected_method_defined? and public_method_defined? is covered in this video
Fix RSpec!
A short session that demonstrate RSpec capacity to match abstract stuff such as the Answer to Life, the Universe, and Everything, literally. Read more