I ran into this issue trying to install ruby 2.2 from source. More info here: https://github.com/sstephen...
You can set CFLAG=-fPIC
or install sudo apt-get install libffi-dev
This is awesome news! Getting that first one setup after debugging for what seems like endless amounts of time is a great feeling. Hopefully you learned quite a bit along the way.
Why don't you try hard coding the keys into secrets.yml just to get it working. It's not the most secure way but you will get yourself going, then you can worry about setting env vars.
Also, have you run source ~/.bashrc to reload bash and reading S3_KEY or S3_SECRET to see if it returns the key?
The following is link is pretty thorough on setting env vars: