add rails engine

add rails engine which provides helpers to return the javascript paths
based on Rails env