Mounting a RAM disk on startup, but seems to be unmounted automatically
Not really sure whether this is truly an answer to your question, but this Applescript works for me, run as an App.

set RAMDisk to "RAM_Disk" as text
tell application "Finder"
    if not {exists disk RAMDisk} then
        set VolumeName to RAMDisk
        set SizeInMB to 1024
        set NumSectors to ((2 * 1024 * SizeInMB))
        set DeviceName to do shell script "hdid -nomount ram://" &amp; NumSectors
        do shell script "diskutil eraseVolume 'HFS+' '" &amp; VolumeName &amp; "' " &amp; DeviceName
        do shell script "SetFile -a V /Volumes/" &amp; VolumeName       
    end if  
end tell


It needs Developer Command Line Tools installed to run, but will ask &amp; auto-install if not present.