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.
Free Video Series On Getting Started with RubyMotion
I’ve created a series of raw, barely edited, YouTube videos to help others get started with creating iOS applications with RubyMotion. Enjoy! [more inside]
Essential Object Oriented Design in Ruby Book Released
Check it out on Kindle store : Essential Object Oriented Design in Ruby
New releases of dry-types and dry-validation
Check out the official announcement.
Speeding up RSpec and Cucumber with PostgreSQL fsync flag and parallel execution
After we’ve added RSpec and Cucumber to our CI build process, it got really, really slow. Due to the application character, after each scenario (for Cucumber) we truncate and restore the whole database. 45 minutes for a single build is definitely not what we aimed to get. See how we got it down by 75%.
Database-agnostic case-insensitive equality and full text search
Different relational databases treat text search very differently. The new DbTextSearch gem provides a unified interface on top of ActiveRecord for SQLite, MySQL, and PostgreSQL to do: [more inside]
Multiple Joins and Ambiguous Column References
Have you ever ran into an ambiguous column reference when doing multiple joins to the same table? See how I circumvented that issue.
Efficient Rails DevOps (ebook)
An ebook I wrote about how to efficiently provision your Rails stack, deploy your applications and manage your production environment with Ansible. Visitors of RubyFlow may use the discount code rbflw to get $5 off when buying the book on its website.
Pattern matching [:ok, result]
I use a lot of [:ok, result]-like return values to avoid using exception as flow control. It’s not fun to pattern match on this in Ruby, so I write a small gem that handles that problem gracefully: [more inside]
SecretGarden = Vault + Secretfile for 12-Factor-Apps
You want to secure your secrets in a central store like Vault, and make it easy to configure which secrets your application has access to. Even better is a way to be able to configure your app via the environment, and fall back to a secret storage service like Vault! [more inside]
Wait, where does what?
No matter how much I know there are always bits that slip by. I’ve used Rails for years. Which means I’ve queried models using where for years. Even so, I recently saw someones code and thought, “that can’t work.” I was wrong. [more inside]
Free Light-Weight Open Data Catalog (CKAN Clone) w/ Jekyll Incl. Admin Pages w/ Auth
Hello, Via @statictimes - a static site (Jekyll, Middleman & friends) news channel: Tim Wisniewsk (from Philadelphia) has put together a free open source CKAN clone for light-weight open data catalog sites. Add/edit datasets in the _datasets collection/directory or use the user-friendly (admin) editing pages (requires login e.g. authentication). Cheers.
PS: Waldo Jaquith has published a Q&A w/ Tim Wisniewsk on the U.S. Open Data site. ++ What are you using Jekyll for? Let us know.
Get More Out of Queries in Rails Using Bullet in Just 3 Steps
For a large scale projects with added complexity, manual code refactoring becomes a huge risk and time consuming. Therefore, it is recommended to use third party tools like Bullet Gem for the maintenance, security and optimization of codes. Read more at RailsCarma Blog on Bullet Gem.
Five More Active Record Features You Should Be Using
ActiveRecord is the backbone for most Ruby on Rails applications. The entire API of ActiveRecord cannot possibly be contained within a single or even a handful of digestible posts; but, here are at least five more pieces of that massive API that some might find useful.
Generating Reports with Pure RoR
I recently created a pattern for generating reports in the background in a Rails app. In this post I’ll show you how to use a simple yet powerful reporting pattern that can later be expanded to quickly generate complex reports for your customers.
Processing large CSV files with Ruby
Processing large CSV files with Ruby
Active Admin Bootstrap Skin
A tiny gem supports Twitter Bootstrap in Active Admin
Spree Uname Login/Signup
Spree default provides login/signup with just email. [more inside]
Different approach to Ecommerce on Rails
I always wanted to build my own ecommerce platform from scratch. That’s not because I don’t like to reuse existing code – I really love to. That’s because I believe that we can do better. Now I have a chance to do it and you can follow my work on Github.
Paloma: page-specific javascript for Rails done right
Paloma offers a simple way to organize javascript code for your Rails project.
Rails 5: Belongs to Is Now a Required Association
I spent a couple of hours yesterday trying to track down why one of my models would not save without it’s relationship. Unfortunately, I was too deep into accepts_nested_attributes_for and fields_for to see the real problem. Turns out it was an easy change.
Moving from Mandrill to SendGrid or Amazon SES
With Mandrill going away soon, I’ve explored two of the main alternatives to their addon.
tty-prompt v0.5.0
Newest tty-prompt adds ability to expand options similar to Git hunks functionality, gather more than one answer with intuitive DSL using collect prompt and makes asking boolean question yes?/no? much more flexible and robust. Finally, you can theme all the prompts!
Sycamore
I’m very happy to share Sycamore, a slightly unusual tree data structure with you. It’s MIT-licensed, has quite good test- and documentation-coverage and even if it’s not for you, it might be worth checking out since it contains an interesting solution to the problem of null-values. [more inside]
Start testing your HTTP proxies with `proxy_rb`
I just released v0.9.3 of proxy_rb. It’s an extension for rspec and cucumber to write unit and acceptance tests for your HTTP proxy infrastructure. There’s also some “getting started”-documentation available. [more inside]