Assuming you used the Ubuntu package for Ruby Enterprise Edition:
Step 1: Download nginx, untar it and put it into /tmp/
sudo mv nginx-0.7.65.tar.gz /tmp
tar xvzf nginx-0.7.65.tar.gz
Step 2: Run the phusion installer for nginx:
Step 3: When it asks you, choose the advanced option 
For the location of nginx, enter the path from Step 1.
--> Where is your Nginx source code located?
Step 4: When it asks you for extra arguments, enter this one for SSL
--> Extra arguments to pass to configure script
And then it should happily go about compiling nginx with SSL support. From there it's just a matter of following the instructions the installer gives you!