RailsCasts Pro episodes are now free!

Learn more or hide this

brucepom's Profile

GitHub User: brucepom

Comments by


I guess Google would index the endless page as multiple pages (products?page=1, products?page=2) by following the links in the will_paginate nav.

If Google then directs a user to, say, /products?page=2 then that user would have no way to conveniently navigate to the content on page 1. Has anyone tried addressing this, perhaps with two-directional endless scrolling (when user scrolls near top of page we load in previous records if they exist), or by redirecting to page 1 if a JavaScript-enabled browser requests any other page?


Thanks for posting this. Very useul.


Thanks for for the screencast Ryan and thanks everyone for the helpful comments. I was able to deploy to AWS EC2 Ubuntu 11.10 (ami-baba68d3) using this script with a few minor changes.

A. Not sure if this is good practice but I used the default ubuntu user rather than creating a new user with admin rights. Couldn't get it to work with a new user, I think because AWS relies on keypair rather than password authentication for ssh. I suspect there is a better solution here, I'm not an expert on this.

B. In deploy.rb I used ssh_options to specify the location of my AWS keypair file:

server "ec2-23-20-247-239.compute-1.amazonaws.com", :web, :app, :db, primary: true
ssh_options[:keys] = [File.join(ENV['HOME'], '.ec2', 'ec2-keypair')] # Path to your aws keypair on your local machine

C. Added the solution from Breno Santos Salgado (above) in postgres, nginx and nodejs recipes to prevent the deployment getting stuck when the system asks you to "Press [enter] to continue".

D. Changed Ubuntu version number on line two of rbenv.rb for the version of Ubuntu I used:

set_default :rbenv_bootstrap, "bootstrap-ubuntu-11-10"