Had the same issue trying to install 2.3.1 with openssl installed (system and homebrew)
I presume you've already solved it, but here's what just worked for me.
$ export LDFLAGS=-L/usr/local/opt/openssl/lib
$ export CPPFLAGS=-I/usr/local/opt/openssl/include
$ export PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig
$ rvm install 2.3.1 --autolibs=homebrew
RVM controls which Ruby your current shell points to, but it doesn't install a user-controlled Ruby for you by default. If you haven't installed any specific Ruby versions via RVM, the only Ruby you have is the one OS X installed and that requires sudo permissions to write to.
You can see available Rubies with:
> rvm list
=* ruby-2.1.2 [ ...
It is not an issue with rvm, but with homebrew:
Since 15th of December 2013 zsh is not longer build with the --enable-etcdir flag by default. Therefore /usr/libexec/path_helper is no longer used to initialize $PATH and all path in /etc/paths as well as in /etc/paths.d are completely ignored. (I know, I just found out myself and am speechless as well.)
You should also look at /etc/profile file, as it may have references to /etc/profile.d/rvm.sh.
It's also worth it to read the manual for bash, as it lists all files bash will look at for configuration. This will be towards the end of the man page. To read it, in Terminal.app type man bash.
Finally, you can run, again in Terminal.app, the following command:...
This command should show you where any openssl binaries may be located on your system:
locate openssl | grep bin/openssl
For homebrew, make sure you have /usr/local/bin and /usr/local/sbin in your $PATH. You can check your current path setting by issuing echo $PATH.