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.
Disable dangerous rake tasks in production
Here’s a nifty rake task to disable dangerous rake tasks in production, like rake db:schema:load. Developed after we killed our production database by mistake :-)
Bower integration with Rails without third party gems
Generally integrating bower with Rails require using rails-assets gem wrappers, or bower-rails gems. Recently we stumbled upon sprockets inbuilt ability to detect bower packages, and integrate those packages into asset pipeline. You can read more about it here: Cake walk: Using bower with rails
Upgrade to rails 4!
Are you planning to finally bump your app to the rails 4.0? Check out my article, it will help you!
Rack/Rails middleware that will add rel="nofollow" to all your links
I wrote a post about a simple middleware that can help you ensure, that you don’t have any nofollow links that you don’t want. You can read about it here: Rack/Rails middleware that will add rel=”nofollow” to all your links
Eight game-changing extensions for your Spree storefront
Spree is an open source Ruby on Rails e-commerce platform with a growing community around. If you already use the tool, it’s worth to check this collection of free extensions for Spree storefronts aiming at making the experience more user friendly.
Hijri Date Gem
hijri is full Islamic Hijri calendar library for ruby. It is a lunar calendar consisting of 12 lunar months in a year of 354 or 355 days. [more inside]
Ruminations on calculating item frequency in an array
It’s only five lines of code, but it takes a blog post to highlight the finer points of the solution.
My first ruby scripts - what are yours?
I posted the first ruby scripts I ever wrote, look at them and the motivation to do so. Want to share your first ruby scripts? Tweet them out with #myfirstrubyscript
How to Keep Bad Abstractions From Handcuffing Your Code
What happens when you have a bad abstraction? You have to dig out the API reference every time to understand what that method that clearly should have been named leaderboard is actually called. And whenever you touch the code, something breaks, and you blow the rest of your day trying to debug it (because you tweaked position, but didn’t update score at the same time). So how do you build good abstractions, while staying far away from the bad?
How I went from PHP to Rails
I’d like to share with you “the switch” I made from PHP to Rails, summarized in 5 points.
How to write pretty code using routes constraints
I just wrote a simple example of using routes constraints link. It’s really helpful when we can update one object in many places.
Managing change using a common interface
Continuing my articles about forwarding and object responsibilities, I just released a new post about the benefits of managing change using a common interface.
The Vibe: “RubyConf Edition”
I wasn’t at Ruby Conf, but I followed it vicariously via various social media channels. There is a huge amount of action in Ruby at the moment, including a ton of focus on performance. Continue reading The Vibe.
Using FactoryGirl to easily create complex data sets in Rails
A new post up at the blog about data sets with FactoryGirl.
Gemnasium Auto-Update: Lessons learned
After several months in production, Gemnasium is getting back to the auto-update feature, and explains why it is way more difficult than expected. Read the article here.
Introducing mina_maintenance
mina_maintenance is a maintenance mode for mina deploy. Heavily inspired by Capistrano::Maintenance. Feel free to try it and share your thoughts!
Introducing Traveling Ruby
Traveling Ruby lets you easily ship Ruby apps to end users. Use Traveling Ruby to create self-contained Ruby app packages for Linux and OS X. Completely open source, MIT licensed.
Necromancer v0.2.0 released
I’ve released necromancer for the purpose of ruby core types conversion. Hopefully API will convince you of it’s ease of use, flexibility and composability(you can build custom conversions out of simpler ones). Please give it a try and let me know your thoughts.
beerdb RubyGem Update Incl. Quick Starter Datafiles; Zip Downloads n More
I’ve uploaded a new beerdb gem update. What’s news? The beerdb gem that lets you load datasets (e.g. beers, brewpubs, breweries, etc.) in plain text into your SQL database of choice now includes a new build system. Use the new Datafile - a mini language a.k.a. domain-specific language (DSL) that lets you setup your database in minutes. For example, to setup a beer.db for all Austrian beers n breweries use the at.rb quick starter template. Type $ beerdb new at to download the datasets (as zip archives), setup all tables, indexes, etc. and read in all fixtures. Cheers. Prost.
Ruby Object Mapper 0.4.0
Yesterday ROM 0.4.0 was released along with updated rom-sql, rom-mongo and rom-rails.
Debugging I18n lookup in Rails
Here’s a way to output the I18n lookup chain to debug translation strings on your Ruby on Rails app .
Caching Your Rails App's Dynamic Content With Fastly
This post explains how Fastly works and how to set up Fastly in a Rails application to cache dynamic content (not only assets).