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.
5 habits that made me a better Ruby developer
Over the last two years as a freelance developer I’ve picked up a couple of habits that improved the quality of my work and that I’d like to share:
Faster RSpec: Profiling FactoryGirl
One way to speed up a slow test suite is to optimize how FactoryGirl is used, but where do you focus your efforts? Before tuning your factory usage, use FactoryGirlProfiler to measure which factories are adding the most time to your test runs:
Methods Can Be Longer Than Five Lines
Let’s look at the pros and cons of short methods, and when it’s OK to break the rules.
Release acts_as_hashids 0.1.4
If you want to use Youtube-Like IDs seamlessly in your Rails Apps, please give it a try!
Necromancer with new syntax
Necromancer adds new syntax for data transformations such as coercion into range
Necromancer.convert('1-10') >> Range, or casting to boolean type Necromancer.convert('yes') >> :boolean. Enjoy!
Coders-log.com released! Rubyflow & JSLive clone for all development technologies.
I have released the website https://coders-log.com This is a website similar to RubyFlow and JSLive but instead supporting all of the other technologies such as Go, Crystal, Elixir, Java, Unix, SQL, CSS, Design, and many more. Check it out! https://coders-log.com
Replacing the asset pipeline with Webpack 2 in Rails
I have just finished writing an article on how to replace the asset pipeline with Webpack 2 in Rails
Ruby code I no longer write
Learn what kind of Ruby code I started to avoid after a few years of working with it and maintaining large, legacy applications.
Start Using Yarn With Rails Today
Rails 5.1 will support Yarn out of the box, but in the meanwhile, if you want to start using yarn to manage your JS dependencies, here’s a short post showing how you can add Bootstrap to your Rails app using Yarn.
Things I learned developing Ruby and Rails apps over the past 3+ years
Blogged here: Things I learned developing Ruby and Rails apps over the past 3+ years
Using Bootstrap 4 with Ruby On Rails
A quick walkthrough on how to add Bootstrap 4 to an existing Ruby on Rails application. We use the bootstrap gem to manage the files and updates, and update the stylesheet and JavaScript manifestos.
Spreadsheet Architect v2.0.1 released!
New version released of Spreadsheet Architect gem. Spreadsheet Architect is the simplest way to generate xlsx, ods, and csv spreadsheetsfrom your application.
Core Ruby Tools
A short exploration of several core tools (Rubygems, Rbenv/RVM, Bundler, Rake) that should be in every Ruby developer’s toolkit, with an emphasis on how the components fit together on your system. Includes troubleshooting tips.
Upgrade Ruby, find a bug
Some notes on finding a bug as a result of a Ruby upgrade. OpenSSL, Ruby 2.4.0, dotenv, all that.
yield default object
A pattern for passing object with default values for the caller to change only some parts of it. We often use it in testing.
Let's learn rack by re building it
Since there are lot of buzz happening about rack and http2 . I tried to learn how rack works by making a rack clone and wrote a blog post about it [more inside]
How to deal with technical debt?
I have shared my approach about How to deal with technical debt? [more inside]
Code refactoring - The when, the why and the who
A brief blog post explaining basic concepts about code refactoring, who should be doing it, why and in which cases. [more inside]
Airbrake: show unique error ids to speed up support
Instead of letting users explain how and where they got an error, let them tell you “I got error number 123423423424” and then simply open up all the details in airbrake with airbrake-user_informer
PolyBelongsTo reaches 1.0.0!
After two years PolyBelongsTo has its 1.0.0 release! PolyBelongsTo allows you to access model relations with ActiveRecord in a more across-the-board meta-programming friendly way. It includes database model relation integrity checking, deep nested relation cloning of model records, and plenty of nifty simplifications for your database relations. See PolyBelongsTo.
How to Read Ruby Documentation
Beginners use tutorials while experienced programmers read and refer to documentation. But how do you do that, exactly? This post explains the anatomy of a Ruby doc to help expand your understanding of Ruby:
Using Rails Admin with a Rails 5 API application
A followup to my previous article on adding Active Admin to a Rails 5 API. This time we’re using Rails Admin which is even easier than before to setup. - http://www.carlosramireziii.com/how-to-use-rails-admin-with-a-rails-5-api-application.html
Rails Optimization: Introduction to cache
Need to speed up your website’s performance? This article will introduce you to the basics of caching in Rails applications. -
How to grow your own web development framework from Rack (4 part series)
The 4 part series will cover what Rack is, how to use it to handle incoming requests, how to use templating techniques to return a response, and finally, how to extract common code to plant the seeds for your very own web application development framework. [more inside]