moved ruby block under script generate