I have the following Javascript in my rails application and when trying to attach an event listener to the button it is not outputting anything to the console like it should