def'd haml-engine cannot be eval'd via the REPL?

  • Download Gist
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
(ns blog.core
(:require [ring.adapter.jetty :as jetty]
[ :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))
(gem-require "rubygems"
(gem-require "haml-3.1.3/gem/haml")
(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.

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.