Building extractable libraries in rails