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.
Blogpost about pundit > cancan, first part.
If you like to read about why in our company we belive that pundit is a way better solution for compliacted authorization features than cancan (or cancancan for rails > 4.0) i have a first part of my blogpost for you : some groovy thing
Pronto can now lint HAML!
Pronto performs quick automated code reviews with the help of various analysis tools (RuboCop, Brakeman, Flay, etc.) by checking only the introduced changes. And now it also lints your HAML with the help of HAML-Lint. Check it out: Pronto and pronto-haml.
3 Ways to Create Classes in Ruby
Out of the box, there are 3 ways to create classes in Ruby. Find out how to use all 3 options, and learn when to use one option over another.
Profile your cucumber tests!
Just released a new gem cucumber_characteristics to fully profile your cucumber test runs with the goal of understanding exactly where your test time is going. This is not a formatter and should drop into your existing setup transparently. [more inside]
MemFs v0.4.0 is out
MemFs is an in-memory filesystem for Ruby that can be used for your tests. This release brings some useful methods to Dir like the most wanted Dir.glob. Get it while it’s hot ! https://github.com/simonc/memfs
The structure of s-expressions
You will see the structure of s-expressions for language features supported by Ruby interpreters and the InfraRuby compiler.
Integration testing on different levels
I wrote a blog post about reusing the same test code on different levels (app logic, Web UI, API) [more inside]
Why we use React.js in our Rails projects
We’ve had a whole journey on how to do UI for Rails projects in Arkency. Starting from Rails views, then gradually switching to more JS (with JQuery), had a short adventure with Angular and now settled with React. [more inside]
Free Online Ruby Tutorials for Beginners
A pretty decent (I hope!) list of free online Ruby tutorials for beginners.
RailsInMotion Ruby/Rails Screencast Is Official!
It’s happening, we will soon have a new Ruby/Rails weekly screencast! I’m going to be launching in the next 1-3 months depending on how things go, but you can read the full story here: http://blog.motioninmotion.tv/railsinmotion-it-s-official
Ninefold introduces a free tier for Rails app hosting & deployment
You can get a 1.5 GB combined Rails app server in the US region for absolutely free. How does the free tier work? 1. Sign-up to Ninefold 2. Deploy a Rails app 3. Enter your billing details within 30 days 4. We’ll waive the first $50 of your monthly invoice - forever. Visit ninefold.com for more information.
High-Low Testing
I’ve just published High-Low Testing, a detailed look at my Rails testing philosophy. I address working at the poles of test abstractions in a Rails application in order to more easily manage dependencies. Doing so provides increased test speed and better OOP feedback systems, with minimal costs.
Nuts & Bolts #1: Create a simple Jekyll-like blog in your Rails 4 app
When I needed a blog system for my company blog, I had a hard time deciding if I should use Jekyll, another Rails blog engine or just build a simple blog functionality on my own. I implemented my own, see why and how I did it. [more inside]
Introduction to PostGIS and Rails - Part 2
Rob just wrote a very useful piece, specially if you’re looking for an intro on PostGIS and geolocation.Read it on the CookiesHQ blog and let us know what you think.
Analytics Option in Rails Composer
Now, when you build a Rails starter application with Rails Composer, you get the option of page-view tracking with either Google Analytics or Segment.io (see a blog post for details). My article on Analytics for Rails explains everything Rails Composer adds, so there is no mystery code. Thanks to RailsApps subscribers for their project support.
Most Common Mistakes On Legacy Rails Apps
Lately I’ve been supporting several legacy projects. [more inside]
When using an API goes terribly wrong
API docs will tell you how to use an API. But when things go wrong, you can be left on your own. Error messages are often incomplete, misleading, or unhelpful. And what are you supposed to do with NoMethodError: undefined method '[]' for nil:NilClass, anyway? When you learn an API, framework, or library, you can’t just learn how to use it when things go well. You also need to figure out what to do when it hands an error back.
The ultimate list of Ruby / Rails resources
Ruby on Rails is so popular, that there are merely thousands of good sources of how to learn it. You can choose if you prefer online courses, video courses, live courses, tutorials, blog posts, books, screencats, podcasts or another way. You can learn Ruby and then Rails, you can learn both together, you can even learn only Rails without knowing much about the underlying language. So why write another article about it? I am offering you a very full list of resources, which will help you to find the right way of learning that fits your needs. Continue reading →
Rails 4 and PostgreSQL Arrays
Bernardo Chaves from Plataformatec talks about how Rails treats PostgreSQL’s array type, and how to use PL/pgSQL custom functions to do unique validations in PostgreSQL arrays. [more inside]
bhf Rails-Engine-Gem that offers an admin interface
I just launched bhf. A simple to use Rails-Engine-Gem that offers an admin interface for trusted user. Easy integratable, highly configurable and agnostic. Works with ActiveRecord and Mongoid. It’s an interesting alternative for ActiveAdmin with a slick user interface.
Update your Rubygems automatically
Starting from this week, Gemnasium can update the dependencies of your project automatically. It is now easier than ever to keep your Ruby project in shape by getting rid of the outdated dependencies. Read more
Code style matters
Are you using some guidelines in your project? If not, read how important is code syle.
The first Ruby on Rails in Asia - RailsPacific
The first ever Ruby on Rails Conference in Asia - RailsPacific. ( one day conference, one day workshop ) [more inside]