#Rails
48 notas · última:
Capture Less Than You Create
The essay argues that open source creators should not measure success by how much money they personally capture from others’ success. The proper reward is the broader value, use, and work that Rails enables.
In Praise of dhh
A remembrance of Ruby and Rails as joyful, welcoming tools, and a warning that David Heinemeier Hansson now uses his influence to exclude, dominate, and damage the community.
David Heinemeier Hansson on the Future of Rails
DHH says Rails still aims to help small teams build large apps, keep the web simple, and stay relevant through Turbolinks, API mode, and ideas from functional programming.
Is your Rails app ready for Production?
The article argues that a Rails production setup should favor managed deployment, proper web servers, monitoring, current dependencies, Postgresql, CDN use, and access control before a system grows or fails.
Kill Your Dependencies
The post argues that dependencies bloat apps, add bugs, and waste memory, so developers should remove unnecessary gems, prefer stdlib or simpler options, and keep runtime dependencies minimal.
Two Factor Authentication in Rails 4 with Devise and Authy
The post shows how to add Devise authentication to a Rails 4 app and then layer Authy on top to enable two-factor authentication with an API key, an initializer, and a database migration.
Ex Pusher Lite - Part 1: Phoenix Channels and Rails apps
The post shows a Rails chat built with Pusher, then starts replacing Pusher with a Phoenix server that receives POSTs from Rails and broadcasts them over WebSockets.
Prevent information leaking in Rails
Rails sets a browser cache policy that still leaves pages on disk. The post says this can expose sensitive content after logout and suggests overriding Cache-Control for authenticated pages.
Role-based authorization in Rails
The post argues that CanCan makes permissions easy but encourages duplicated rules and repeated overrides, and presents Access Granted as a role-based alternative with inheritance, dynamic checks, and controller protection.
Peeking Under the Hood of ActionController Parameters, Part 2
The post explains why Rails params are not plain hashes, how ActionController::Parameters inherits HashWithIndifferentAccess, and how permit and permit! manage the permitted flag.
How to speed up your Rails app with Cloudfront and the asset pipeline
The post explains how to speed up a Rails app by serving fingerprinted assets through a Cloudfront distribution, using a custom origin and an asset_host in production.
How to use Rails Active Job
The article explains how Rails Active Job standardizes queue adapters and shows when to move work off the request cycle for faster responses, steadier load, and background processing.
A Couple of Callback Gotchas (and a Rails 5 Fix)
The post explains why `after_save` can trigger background jobs before other processes can see the record, why `after_commit` avoids that race, and why test suites need a separate fix until Rails 5.
Debug delayed job in Rails
The post shows how to debug delayed_job in a Rails app by opening Rails console, creating a Delayed::Worker with quiet: false, and starting it so debugger statements in jobs can be used.
Why ActiveRecord Sucks - Very Good Indicators
The post says ActiveRecord is useful, but its convenience comes with memory overhead, tighter coupling, weaker SQL for complex queries, and less readable code when queries get intricate.
Using ReactJS with Rails Action Cable
The post shows how to wire React into a Rails chat app built with Action Cable, using jbuilder, a React comment list, channel subscriptions, and a broadcast job to refresh comments in real time.
Making the best of private methods
The post argues that private methods help narrow public promises, keep code stable, and make it easier to focus on what a class does rather than how it does it. It also treats private methods as a safe place to test abstractions before promoting them.
To Serialize or Not to Serialize: ActiveModel Serializers
The post explains why a Rails API response should be serialized for a JavaScript front end, then shows how ActiveModel Serializers lets you whitelist fields, shape associations, and customize JSON output.
Dynamic Site as fast as a Static Generated One with Raptor
The page shows how a Rails app can serve public pages with static-like speed by combining ETags, caching, Memcached, and Passenger 5, with load tests showing stable response times.
Ember.js: 5 great resources for Rails developers
The page points Rails developers to five starting resources for learning Ember.js: a tutorial, a concepts writeup, a migration video, a Rails API example, and a resource collection.
O Guia Definitivo do deploy Rails App no Amazon EC2 em 15 passos
Guia passo a passo para subir uma aplicação Rails na Amazon Linux AMI em EC2, com instalação de dependências, Redis, banco, Passenger, Nginx, ajuste de SSH e deploy via Capistrano.
Using Services to Keep Your Rails Controllers Clean and DRY
The article argues for moving controller-adjacent work into service objects, keeping Rails controllers thin while models stay focused on business objects and external integrations stay isolated.
Elixir vs Ruby Showdown - Phoenix vs Rails
The post compares Phoenix and Rails on the same routed, rendered request and reports much higher throughput for Phoenix, with lower CPU load and steadier latency in localhost and Heroku benchmarks.
Lembrando os Heróis Ruby que se foram em 2014
O texto lamenta as mortes de Jim Weirich, Ezra Zygmuntowicz e James Golick em 2014, destaca suas contribuições para Ruby e Rails e pede que seu trabalho siga inspirando a comunidade.
The Rails/Merb Merge In Retrospect
The post argues that the Rails/Merb merge delivered limited practical modularity, took too long, and left Rails behind newer web development needs while community pressure and design choices pulled in different directions.
How key-based cache expiration works
The post explains key-based cache expiration as a way to avoid manual cache invalidation by making the cache key change with the object’s updated_at timestamp, so old entries become disposable and stale data is avoided.
Avoid Rails When Generating JSON responses with PostgreSQL
The article argues that moving JSON generation into PostgreSQL removes expensive Ruby object creation and Rails serialization work, cutting response times and memory use for API payloads.
#356 Dangers of Session Hijacking - RailsCasts
Shows how a session cookie exposed over HTTP can be stolen and replayed, then explains Rails protections with force_ssl and a separate secure signed cookie for HTTPS requests.
Reading Rails - The Adapter Pattern
The article surveys how Rails uses the Adapter Pattern to hide differences between JSON libraries, databases, and time classes, keeping a uniform API while still handling library-specific details.
Deploying Multiple Rails apps to a Single VPS
Tutorial showing how to deploy multiple Rails apps on one VPS with Capistrano 2, using multistage setup, Unicorn, and nginx to keep each app’s configuration separate.
Don’t Fear the Reaper: Detecting Failed Delayed Job Workers
The post explains how to detect failed Delayed Job workers sooner by adding worker heartbeats and a reaper process that unlocks orphaned jobs instead of waiting for max_run_time.
Getting to Know Pluck and Select
The post compares `pluck` and `select` in ActiveRecord, showing that `pluck` avoids model instantiation overhead, is faster for raw values, and `select` still matters when you need model objects and methods.
Why I can't install postgresql with rails 4.0.0.rc1 (ruby 2.0)
Describes a Bundler platform detection problem on Windows 7 x64 with Ruby 2.0, Rails 4.0.0, and pg 0.15.1. The temporary fix is to edit Gemfile.lock and add the x64 mingw32 pg variant.
The Traveling Consultant Problem
He argues that consultants see software shops at their worst, so their judgments are skewed by broken codebases. Rails and Ruby are sharp tools that reward craft and can also hurt careless users.
How can I reduce my Ruby/Rails memory usage when running Redmine?
A wrapper script can reduce Redmine’s Ruby memory usage by setting Ruby heap and GC variables, then having nginx call that script instead of the Ruby executable. The setup may save about 20 MB.
Opções de hospedagem Rails: AppFog (#dica melhorando deploys)
A página explica como lidar com deploys Rails no AppFog: precompilar assets localmente, ajustar o desenvolvimento para não usar public/assets, e contornar problemas de compilação da libv8 no staging.
Opções de hospedagem Rails: VPS
O texto compara VPS, PaaS e IaaS para Rails, explica diferenças de virtualização e mostra que a escolha do provedor depende de custo-benefício, serviços gerenciados e esforço de administração.
Rails, You Have Turned into Java. Congratulations!
The post argues that Rails has grown heavier and harder to understand as more frameworks, hosting tools, and customizations get layered on top of it, making upgrades, debugging, and integration increasingly opaque.
Remote visual debugging with RubyMine
The post explains how to set up remote visual debugging for Ruby and Rails apps in RubyMine with Vagrant: forward a port, install debugger gems, configure remote roots, and run Rails through rdebug-ide.
Criando aplicativos Rails multi-tenant com PostgreSQL schemas
O texto explica como usar schemas do PostgreSQL para separar dados por tenant em Rails, definindo search_path por subdomínio, criando schemas novos e ajustando migrações e tabelas compartilhadas.
#292 Virtual Machines with Vagrant - RailsCasts
Vagrant runs a Rails app and its dependencies in a portable, shareable environment, usable for development, a staging server, or a production setup experiment.
Usando responders no Rails
O texto mostra como `respond_with` simplifica controllers que repetem `respond_to`, como a gem `responders` centraliza flash messages e como criar um responder próprio para casos fora do padrão.
Internationalização (I18n) Mínima em Rails 3.2 - Parte 2
A parte 2 mostra como cachear HTML gerado a partir de Markdown, integrar Bootstrap e ActiveAdmin com Globalize 3, e traduzir rotas públicas com troca de idioma pela URL.
Forgotten Rails features: HTTP Streaming
The post explains how Rails HTTP streaming sends the response in chunks, can make pages feel faster, and requires changes to render calls, templates, and server setup.
Caching Strategies for Rails
The page lays out when to use page, action, fragment, and low-level caching in Rails on Heroku, and recommends memcached, Varnish, and Rails.cache for different kinds of slow content.
Everyone should be using low level caching in Rails
The post argues that low level caching in Rails is easy to start using and helps reduce database queries and API calls. It shows Rails.cache.fetch, cache key invalidation, and layered caching in practice.
[Heroku Tips] Enciclopédia do Heroku
O post reúne dicas práticas de configuração do Heroku para apps Rails, cobrindo dynos, concorrência, versão do Ruby, jobs em background, uploads no S3, assets, New Relic e domínios.
Someone Save Us From REST
Rob Conery argues that REST debates have become obsessive and pedantic, with people weaponizing definitions, quotations, and status updates like PATCH while losing sight of practical API design.
