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.
Production Rails Deployment with Nginx and Unicorn
Our new tutorial talks about how to set up production Rails deployment with Nginx and Unicorn. [more inside]
-to cardinal gem- made for learn about ruby
I just launched ToCardinal gem and I really would like that you give me some feedback to improve it. I have two purposes, contribute to community and learn about this. So I’ll appreciate your comments.
Capability Reporting with Service Worker
Some people, when confronted with a problem, think: “I know, I’ll use UA/device detection!” Now they have two problems… Service Worker solves this problem: instead of guessing on the server, we can (finally) teach the client to report the necessary values!
Charts for your rails models with MetricsGraphics.js and NVD3
models_stats gem - it’s graphics for your rails models with MetricsGraphics.js and NVD3. It may show count(or average, or sum, or another sql agregate function) of models for each day with grouping, conditions. It uses Redis for store statistics.
Necromancer v0.3.0 release
New necromancer includes more array conversions and ability to configure global options such as strict mode.
Get insights of your PostgreSQL database with PgHero
PgHero is a ruby gem that gives you insights of your PostgreSQL database: cache hit rate, which queries are too slow, which tables need indexes, and more. Here’s how it looks on a production RoR app.
Hash Tricks in Ruby
A few ways to get more mileage out of Ruby hash.
New version for proxy_pac_rb
I just released a new version of proxy_pac_rb. It uses now thor for commandline parsing and supports a new command to compress an existing proxy.pac.
I made a Tic-tac-toe for the Terminal in Ruby
I recently found about Curses, framework for making Terminal applications, and ruby/curses. I was really interested in how the Terminal works and how can you make a Terminal application (without any framework), which I intend to write a blog post about. Here I wanted to demonstrate how Curses can be used in Ruby. [more inside]
slideshow (S9) RubyGem Update - Adds npm Template Pack Support - $ npm install slideshow-impress.js
I’ve updated the slideshow (S9) machinery. Now you can use npm to install slideshow template packs (e.g. s5, s6, slidy, deck.js, etc.). For example to install the slideshow-impress.js pack type: $ npm install slideshow-impress.js No magic here. The npm package manager will download and copy the package to your working folder in the node_modules/ folder. That’s it. Now the template pack is ready to use with Slide Show (S9) e.g. try $ slideshow new -t impress.js and so on. More details at the Slide Show (S9) project site. Cheers.
Video Tutorial: Deploy Ruby on Rails to Ubuntu Server using Capistrano 3.
Learn how to deploy Ruby on Rails 4.1 to a Ubuntu 14.04 server using Capistrano 3.
Sugarcane 0.0.3 works on OSX
Just realized sugarcane never worked on OSX because I wrote it while on Linux. It uses ncurses-ruby instead of ncursesw now. [more inside]
Applying SitePrism.Vcr to stub API calls triggered by events in SitePrism sections
Recently I have had to stub API responses in our tests when an user uses pagination. We have the pagination similar to the pagination of Facebook: you scroll down and you receive new items in the list. It was challenging, because SitePrism.Vcr only allows you to link VCR cassettes with elements and pages. [more inside]
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.
Video Tutorial: Ruby on Rails 4.1 Ubuntu 14.04 Server Configuration
Learn how to properly configure a Ubuntu 14.04 server to deploy Ruby on Rails 4.1.
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.