Currently working on a Rails-AngularJS (1.5) project and encountering difficulties accessing my ENV variables in the JavaScript components such as services and console.
I've implemented dotenv, stored my SECRET_KEY in a .env file, and included the following snippet at the end of the body tags within my application's layout.html.erb:
<script type="text/javascript">
var SECRET_KEY = "<% ENV['SECRET_KEY'].html_safe %>";
</script>
Any insights or assistance would be greatly appreciated!