I'd add a dash at the end to prevent erb to write a new line, just being paranoiac

    Conekta.setPublishableKey('<%= payment_method.preferred_auth_token -%>');