I tried to reproduce your problem through building a simple test app - I've put my test rails app on github, for comparison.
My best guess is that the javascript in your front.js.coffee
is executed before alertify (and the DOM) is loaded. In my case, the following worked just fine:
$ ->
alertify.alert "I'm an alertify alert"
This compiles to $(function(){alertify.alert("I'm an alertify alert");});
. See the jQuery documentation for details on the $
function.
By the way, you should also place alertify.core.css
in vendor/assets/stylesheets
and require it in application.css
:
*= require alertify.core
*= require alertify.default
The later does not solve the problem you mentioned, but let's alertify look good ;)