Write the correct rc file path. Set ownership of gems properly.