Create a gist now
Instantly share code, notes, and snippets.
HTTPS clone URL
Subversion checkout URL
def'd haml-engine cannot be eval'd via the REPL?
|(:require [ring.adapter.jetty :as jetty]|
|[clojure.contrib.io :as io]|
|[clojure.contrib.classpath :as cp])|
|(:import [org.jruby.embed ScriptingContainer LocalContextScope]))|
|(def scripting-container (ScriptingContainer. LocalContextScope/THREADSAFE))|
|(defn execute-rb [rb-string]|
|(. scripting-container runScriptlet rb-string))|
|(def haml-engine (execute-rb "Haml::Engine")) ;; C-x C-e from the REPL says HAML is not defined|
|;; However, if I type this line out in the REPL, it works. Puzzling.|