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.
Enabling SSL for your Rails apps with Intercity
A guide that shows you how easy it is to enable SSL for your Ruby on Rails apps if they’re hosted with Intercity. - https://intercityup.com/blog/enabling-ssl-ruby-on-rails-apps.html
STI for Beginners from a Beginner
The way I understood STI as a beginner. http://blog.katpadi.ph/sti/
Are you using RSpec+Cucumber+FactoryGirl right now, read this.
My default testing stack consists of RSpec, Cucumber and FactoryGirl. I’ve been on the prowl for a something better and I think I’ve found it. Read more at Ariejan.net about Testing with Minitest.
ActiveRecord vs Me… Round 1 – FIGHT!
With difficulty in adding a method like first_or_create to ActiveRecord’s WhereChain I came to an alternative solution. http://6ftdan.com/allyourdev/2015/04/08/activerecord-vs-me-round-1-fight/
E-mail in Rails with MailChimp and Mandrill, a comprehensive guide
Setting up and using MailChimp and Mandrill in Rails, start to finish. A comprehensive tutorial. http://aspiringwebdev.com/e-mail-in-rails-with-mailchimp-and-mandrill-a-comprehensive-guide/ [more inside]
Video Tutorial: Logrotate
Learn how to manage your server’s logs and set up log rotation for your Ruby on Rails logs in this video tutorial: http://www.rubytreesoftware.com/resources/logrotate.
Hijacking Rack to add Websockets to Rails 4
As Rails 4 is full concurrent, there’s no full-stack lock on a request. You can use threads to hold websocket connections open without bogging down the server. Nick Gauthier wrote about this approach in this article: http://blog.codeship.com/websockets-in-rails-4/
Reading Ruby - Minitest's Plugin System
We’re going to dive into Minitest’s source and learn how it implements a simple but effective plugin system. If you’re curious about Minitest’s internals, are interested in the learning some more about Ruby less well known features, or are interested in building an extensible command line application, come along. [more inside]
Querying At Warp Drive: Using ActiveRecord Includes
We can make our code work and make our code right, but when it comes to making it fast…well, that’s a whole other story. Learn how to make smart queries at warp speed using a handy ActiveRecord method called includes. This post dives into the computer science theory behind quick querying and explains how this method can make your Rails apps more efficient.
7 Steps to Better Cucumber Tests
When you are starting out with rails testing there are so many things you need to learn about and thus it’s very hard to have a clear picture of what goes where. I’ve posted a few tips on how to improve your cucumber features. Check them out
Best GUI Tool for for Ruby Desktop Based Application Developement
Need a GUI Tool like WindowBuilder provided in Eclipse for Swing Application Development. [more inside]
Template Method Pattern in Ruby
When working as a software developer, knowledge of some design patterns is always welcomed. If you’ve never heard about design patterns, they are basically some general reusable patterns for common problems that developers run into. Lets explore the Template Method Pattern and implement it in Ruby.
Token authentication with multiple tokens support
I described how to use Tiddle - gem for token authentication, which supports multiple tokens for each user.
Building An Unbeatable Tic-Tac-Toe Game In Ruby Pt. 3
Final post in a short series of posts describing how I designed and implemented an unbeatable TicTacToe game using Ruby.
Crash Course on Modern Web Development, now with Frontend Frameworks section
Just updated my guide to modern web development using Ruby with resources about the most popular frontend frameworks today. Always happy to get some feedback about it, thanks!
Use Minitest for Your Next Rails Project
I recently switched to Minitest after using RSpec exclusively for many years. Being the less-popular Rails test framework, Minitest documentation and examples can be hard to find. Rails 3 and 4 instructions can contradict each other. And even the basic terminology is confusing: what is the difference between Test::Unit and Minitest? Which does Rails ship with? I answer questions like these and more in my Rails and Minitest setup guide.
How do assigns and reload work in Rails tests?
I wrote a new article in Everyday Rails, exploring a common question I get about testing: how do assigns and reload work with Rails test data?
Five less used enumerators of Ruby
Few more techniques to get rid of each: 5 less used enumerators of Ruby
RSpec Clipboard Formatter
A tiny utility to improve your dev workflow: The RSpec Clipboard Formatter will copy the command to run all failed examples to your clipboard.
Ruby DSL Handbook 50% off discount ends today
If you’re interested in picking up the Ruby DSL Handbook, today is the last day to get it for only $12. It’s just about finished and I’ve been releasing some screencasts to go along with it.
Did you know Ruby? (Unicode and Heredoc Strings)
A quick overview of Unicode chars on variables and method names + Some examples of Heredocs in Ruby - Check it out!
How to write solid data-processing code?
When dealing with data, it’s easy to end up with spaghetti code. This post shows a technique to avoid exactly that using a DSL. Read on: How to write solid data-processing code?
Ruby global method cache invalidation impact on a single and multithreaded apps
Do you know what Ruby global method cache is? No? Well you should, because the way it works can have a serious impact on software that you develop. You can check some single and multithreaded benchmarking that I did together with their results here: http://dev.mensfeld.pl/2015/04/ruby-global-method-cache-invalidation-impact-on-a-single-and-multithreaded-applications/
Gem of Week #14 - html-proofer gem - auto-proofread you hypertext (HTML) pages
Hello, over at the Planet Ruby the Gem of the Week series continues with #14 - html-proofer - that lets check that all your hypertext (HTML) pages open and close all tags according to the specs, that all internal and external links are working (no 404’s not found errors etc.), that all images include an alternative text attribute and so on. Full article. Cheers.
Getting Started with MiniTest
Help get yourself started using MiniTest with, or without, any testing experience. http://6ftdan.com/allyourdev/2015/04/04/getting-started-with-minitest/