Keeping it DRY. Same constant needed in js, sass, and rails

I need a constant, X, to be known in a   jQuery script   In an .rb file in Rails   ins some css/SASS

How can I get this constant known in all three places?