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.
We just wrote a tutorial series on integ...
We just wrote a tutorial series on integrating Bootstrap with Rails: [more inside]
How to use Ruby's English "and"/"or" operators without going nuts
Ruby has both symbolic (&&/||) and English logical and/or operators. The differences between these operators can be confusing, to the point that many programmers simply avoid using the English versions entirely rather than deal with their sometimes surprising behavior. I’ve made a screencast which explains why the very features which make these operators problematic in a boolean logic setting also make them perfect for certain elegant control flow idioms.
The lesser-known features in Rails 4.2
The first beta of Rails 4.2 was announced last week, and it already looks amazing. I’m really excited to use ActiveJob, Web Console, Adequate Record, and Foreign Key support in my own apps. But the beauty of Rails is in the details. And if you do a little digging, you’ll find some less advertised features that will totally improve your daily work with Rails.
When Should You Not Use Heroku?
Heroku is awesome. It’s a great first stop for deployment. But when is it not the right thing? [more inside]
Normalizr - yet another attribute normalizer
Hi guys! I just released normalizr - lightweight and flexible solution for attribute normalization. Check this out!
Developing with MS SQL on your Mac
We recently had to set up a MS SQL database on a Mac for a client project. So, we thought we’d put together this mini tutorial just incase you ever have to do the same.
Install PostgreSQL on Mac OS X
Postgres has a reputation of being hard to set up, but it seems things are changing now. check out our blog post on how to install Postgres for Mac OS X! [more inside]
Praxis, a ruby framework that takes a different approach to creating APIs.
We’ve just unveiled the first release of Praxis, a ruby framework that takes a different approach to creating APIs. With Praxis you can have different sets of people design, review and implement your API, while resting assured that the resulting code is always consistent with your API specs. Building APIs with Praxis leads to better designs, faster developer times and result in precise documentation that is apt for both human (web browsable) and machine consumption (JSON definition files). [more inside]
RoR based open source extension for Spree/PayU integration
An open source extension that integrates PayU payment gateway with Spree stores.
Cache-controller article from 2009; still interesting
I found this article/blog post from 2009 regarding caching. Still relevant. [more inside]
Digging Rails - How Rails Initializes Itself
I’m reading Rails source code and wanna share what I have learnt as a series of blogs. Here is the first one, How Rails initializes itself.
Green Ruby News #81
Like every week, here is a fresh list of the links from last week on Green Ruby News #81.
Installing Rhodes on Ubuntu and making it run on Ruby 2.1
When you want to write a mobile app, but you don’t want to quit Ruby, it’s worth looking into Rhodes. Unfortunately it might not be so simple to use it on Ubuntu (or any other Linux). Also it won’t work out of the box with anything newer than 1.9.3. I wrote a simple how to bypass all of those issues: Installing Rhodes on Ubuntu and making it run on Ruby 2.1
Dockerfile.erb
A tiny Ruby script to generate a Dockerfile from a Dockerfile.erb template.
JRuby: Performance Plus the Whole Java World on a Silver Platter
Could JRuby have made the largest contribution to the Ruby community? JRuby gives you access to an additional 84,000 libraries. [more inside]
command line power tool for facebook
Hi guys, I just created , a colorful and fun facebook terminal client, which helps you interact with facebook without being distracted by images in a compact way.
Better loging in rake tasks
A lot times when you run rake tasks it would be nice to get output from rails logger into STDOUT. The simplest way to do it is to create a new rake task that will redirect output to STDOUT.
worldlite v0.1 - public domain country data (all data incl. as good ol' ruby code) - no db, no deps
Hello, I’ve put together a new world data gem, that is, worldlite, that includes all the world countries as good ol’ ruby code - no database required, no dependency, and all code and data is public domain, that is, no copyright and no rights reserverd. Try it. Use require 'worldlite'; include WorldLite and
>> WORLD.size # => 245
>> WORLD_UN.size # => 193
>> WORLD_G20.size # => 20
and so on. For countries try:
>> AT.class.name # => WorldLite::Country
>> AT.name # => Austria
>> AT.alpha3 # => AUT
Still early and rough but all the world’s countries and territories (246 total) included. Cheers.
‘Learn Ruby on Rails’ Free for Students
Do you know someone who teaches a class or workshop on Rails? I offer my book for beginners, Learn Ruby on Rails, to students enrolled in classes or workshops. See my blog post for details: ‘Learn Ruby on Rails’ Free for Students.
Reform 1.1 Brings More Reusability!
The 1.1 release of Reform brings better reusability for DRY form objects, simplifies and fixes lots of things and allows deserializing JSON and more, to make forms part of your HTTP API, too.
I just posted a write-up of using Active...
I just posted a write-up of using ActiveRecord’s .pluck if you only need a subset of model attributes. Check it.
Validating email address with domain correctness
Wanna a complete, quick and easy way to validate email address? It validates not only the format, but also domain address. You can check it here .
Rails i18n: 3 quick tips and 1 crazy abuse
Rails’ i18n library is more powerful than it looks. You don’t need to only use it for translation. The i18n library is useful anywhere you want to decouple the text you display from the place you display it. I’m going to share a few of the things that we learned that have come in handy, along with a crazy abuse of the library that ended up working out incredibly well for us.
Redirecting to Custom 404 and 500 Pages in Rails
Rails bundles default 404 (file not found), 422 (unprocessable entity), and 500 (internal server error) pages into every newly generated application. While they get the job done, these pages are pretty bland, so in this post I’ll show you how to update them to suit the logic and design requirements of your application.
Renewed Life for STI with PostgreSQL JSON type
How to avoid creating additional columns for child classes using RoR 4 and PostgreSQL 9.3, with an example based on social media users data: Renewed Life for STI with PostgreSQL JSON type.