Other notes related to Rails:
Rails setup
- GoRails: Setup Ruby On Rails on Ubuntu 16.10 Yakkety Yak - Detailed installation instructions. Also contains setup instructions for other OSes.
Debugging techniques
Rails application servers
- A Comparison of Popular Ruby Application Servers on the Engine Yard blog (Passenger, Unicorn, Thin, Puma)
- Ruby on Rails Server Options (StackOverflow question)
Rails metrics
- Pssst… your Rails application has a secret to tell you on 37signals blog
- ActiveSupport::Notifications, statistics and using facts to improve your site
- Using Statsd and Graphite from a Rails App
- Setup Statsd and Graphite: 1 2
- Practical Guide to Statsd/Graphite Monitoting
- Docker Image for Graphite and Statsd
Rails Deployment
- capistrano-ec2tag - A Capistrano plugin to deploy to Amazon EC2 instances based on their tags
- Capistrano 3 Upgrade Guide
- Configuring Rails Environments
Rails Internals
- A Visual Trace of How Rails Responds to a Request
- The Lifecycle of a Request
- Examining The Internals Of The Rails Request/Response Cycle
- Diving in Rails - The request handling
Rails and Databases
Rails API applications
Indexing in Rails
- Always add index for foreign keys
# Bad
create_table(:tweets) do |t|
t.string :text
t.integer :user_id
end
# OK
create_table(:tweets) do |t|
t.string :text
t.integer :user_id
end
add_index :posts, :user_id
# Better - automatically adds user_id field and creates index
create_table(:tweets) do |t|
t.string :text
t.references :user
end
- When to add indexes in a table in Rails
- Using indexes in Rails - Choosing additional indexes
- Add index when the field is used for ordering
- Using indexes in Rails - Index your associations
- Rails Guides: Association basics
- Finding and Indexing: You May Be Doing It Wrong
Authentication from scratch
- Railscasts: Authentication from scratch
- A Basic User Authentication Model in Rails 4
- User Authentication from Scratch
Rate limiting
Contributing to Rails
- Install Virtualbox - https://www.virtualbox.org/wiki/Downloads
- Install Vagrant - http://www.vagrantup.com/downloads
- Clone rails-dev-box - https://github.com/rails/rails-dev-box
- git clone https://github.com/rails/rails-dev-box.git
cd rails-dev-box
vagrant up
This will take a lot of time the first time. A LOT.
git clone [email protected]:nithinbekal/rails.git
The current directory will be mounted as /vagrant in the vagrant box.
vagrant ssh
cd /vagrant/rails
bundle
Get the latest changes from upstream rails:
git remote add rails git://github.com/rails/rails.git
git fetch rails
git checkout master
git rebase rails/master
git push origin master
bundle exec rake test
- takes long long time to run