{"action":"created","issue":{"url":"https://api.github.com/repos/cursive-ide/cursive/issues/970","repository_url":"https://api.github.com/repos/cursive-ide/cursive","labels_url":"https://api.github.com/repos/cursive-ide/cursive/issues/970/labels{/name}","comments_url":"https://api.github.com/repos/cursive-ide/cursive/issues/970/comments","events_url":"https://api.github.com/repos/cursive-ide/cursive/issues/970/events","html_url":"https://github.com/cursive-ide/cursive/issues/970","id":96048319,"number":970,"title":"Cursive REPL with FigWheel","user":{"login":"simax","id":1292469,"avatar_url":"https://avatars.githubusercontent.com/u/1292469?v=3","gravatar_id":"","url":"https://api.github.com/users/simax","html_url":"https://github.com/simax","followers_url":"https://api.github.com/users/simax/followers","following_url":"https://api.github.com/users/simax/following{/other_user}","gists_url":"https://api.github.com/users/simax/gists{/gist_id}","starred_url":"https://api.github.com/users/simax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simax/subscriptions","organizations_url":"https://api.github.com/users/simax/orgs","repos_url":"https://api.github.com/users/simax/repos","events_url":"https://api.github.com/users/simax/events{/privacy}","received_events_url":"https://api.github.com/users/simax/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cursive-ide/cursive/labels/CLJS","name":"CLJS","color":"1abc9c"},{"url":"https://api.github.com/repos/cursive-ide/cursive/labels/REPL","name":"REPL","color":"f39c12"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2015-07-20T11:54:25Z","updated_at":"2016-08-07T23:27:23Z","closed_at":"2016-08-07T23:27:09Z","body":"I'm having an issue starting a Cursive REPL with **FigWheel** and my project. The project is ClojureScript front-end with a Clojure back-end. \r\n\r\nI've tried the following scenarios:- \r\n\r\n**Scenario 1**\r\n\r\nFollowing the instructions here: https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL\r\n\r\nI created a **REPL** in IntelliJ by doing the following:\r\n\r\n1. Click Run->Edit configurations.\r\n2. Click the + button at the top left and choose Clojure REPL\r\n3. Enter a name in the Name field (e.g. \"REPL\")\r\n4. Choose the radio button Use clojure.main in normal JVM process\r\n5. In the Parameters field put script/repl.clj\r\n6. Click the OK button to save your REPL config. \r\n\r\nWhen I click the 'Run' **REPL** I see the following output:\r\n\r\n```\r\nFigwheel: Starting server at http://localhost:3449\r\nFocusing on build ids: dev\r\nCompiling \"resources/public/js/compiled/app.js\" from [\"src/cljs\"]...\r\nSuccessfully compiled \"resources/public/js/compiled/app.js\" in 0.824 seconds.\r\nWARNING: run! already refers to: #'clojure.core/run! in namespace: reagent.ratom, being replaced by: #'reagent.ratom/run!\r\nStarted Figwheel autobuilder\r\n\r\nLaunching ClojureScript REPL for build: dev\r\nFigwheel Controls:\r\n          (stop-autobuild)                ;; stops Figwheel autobuilder\r\n          (start-autobuild [id ...])      ;; starts autobuilder focused on optional ids\r\n          (switch-to-build id ...)        ;; switches autobuilder to different build\r\n          (reset-autobuild)               ;; stops, cleans, and starts autobuilder\r\n          (reload-config)                 ;; reloads build config and resets autobuild\r\n          (build-once [id ...])           ;; builds source one time\r\n          (clean-builds [id ..])          ;; deletes compiled cljs target files\r\n          (fig-status)                    ;; displays current state of system\r\n          (add-dep [org.om/om \"0.8.1\"]) ;; add a dependency. very experimental\r\n  Switch REPL build focus:\r\n          :cljs/quit                      ;; allows you to switch REPL to another build\r\n    Docs: (doc function-name-here)\r\n    Exit: Control+C or :cljs/quit\r\n Results: Stored in vars *1, *2, *3, *e holds last exception object\r\nPrompt will show when figwheel connects to your application\r\n```\r\n\r\nIf I then browse to ```http://localhost:3449``` I simply get a **Page Not Found** error and the REPL prompt never appears.\r\n\r\n**Scenario 2**\r\n\r\nIf I simply run ```lein figwheel``` from the terminal without creating and running a **Cursive REPL**. I see the same output as above but when I browse to ```http://localhost:3449``` my app appears correctly and the REPL prompt appears.\r\n\r\n**Scenario 3**\r\n\r\nIf I create an **empty** FigWheel project with ```lein new figwheel my-app``` and create a REPL as described in **Scenario 1** then browse to ```http://localhost:3449```  my app appears correctly and the REPL prompt appears.\r\n\r\nMy question is **How can I get Scenario 1 to work?**\r\n\r\n\r\nI notice I'm also getting the following warning:\r\n\r\n```\r\nWARNING: run! already refers to: #'clojure.core/run! in namespace: reagent.ratom, being replaced by: #'reagent.ratom/run!\r\n```\r\n\r\nNot sure if this is related or not - its only a warning and it doesn't prevent **Scenario 2** and **Scenario 3** from working. I've tried to add ```refer-clojure``` clauses in the various ```ns``` calls, Maybe I've missed one.\r\n\r\nThis is my **Project.clj** file\r\n\r\n```\r\n(defproject metime \"0.1.0-SNAPSHOT\"\r\n  :description \"FIXME: write description\"\r\n  :url \"http://example.com/FIXME\"\r\n  :license {:name \"Eclipse Public License\"\r\n            :url \"http://www.eclipse.org/legal/epl-v10.html\"}\r\n\r\n            :dependencies [[org.clojure/clojure \"1.7.0\"]\r\n                           [org.clojure/clojurescript \"0.0-3297\"]\r\n                           [org.clojure/core.async \"0.1.346.0-17112a-alpha\"]\r\n                           [figwheel \"0.3.6\"]\r\n                           [figwheel-sidecar \"0.3.6\"]\r\n\r\n\r\n                           [cljs-hash \"0.0.2\"]\r\n                           [com.novemberain/validateur \"2.4.2\"]\r\n                           [metis \"0.3.3\"]\r\n                           [ring-cors \"0.1.7\"]\r\n                           [clj-time \"0.9.0\"]\r\n                           [digest \"1.4.4\"]\r\n\r\n\r\n                           ;; Server\r\n                           [ring \"1.4.0-RC2\"]\r\n                           [compojure \"1.3.4\"]\r\n                           [cljs-http \"0.1.35\"]\r\n                           [yesql \"0.5.0-rc3\"]\r\n                           [org.xerial/sqlite-jdbc \"3.7.2\"]\r\n                           [liberator \"0.13\"]\r\n                           [cheshire \"5.5.0\"]\r\n                           [prone \"0.8.2\"]\r\n                           [org.clojure/data.json \"0.2.5\"]\r\n\r\n                           ;; UI\r\n                           [reagent \"0.5.0\"]\r\n                           [re-frame \"0.4.1\"]\r\n                           [re-com \"0.5.4\"]\r\n                           [secretary \"1.2.3\"]\r\n\r\n                           ;; Dev\r\n                           [org.clojure/tools.trace \"0.7.8\"]\r\n                           [enlive \"1.1.5\"]\r\n                           [selmer \"0.8.0\"]\r\n                           [environ \"1.0.0\"]\r\n                           [expectations \"2.1.2\"]]\r\n\r\n\r\n  :plugins [[lein-figwheel \"0.3.7\"]\r\n            [lein-cljsbuild \"1.0.5\"]\r\n            [lein-environ \"1.0.0\"]\r\n            [lein-ring \"0.9.6\"]\r\n            [lein-asset-minifier \"0.2.2\"]]\r\n\r\n  :source-paths [\"src/clj\" \"src/cljs\"]\r\n\r\n  :clean-targets ^{:protect false} [\"resources/public/js/compiled\" \"target\"]\r\n\r\n  ;; Used for data migrations\r\n  :clj-sql-up {:database {:classname \"org.sqlite.JDBC\"\r\n                          :subprotocol \"sqlite\"\r\n                          :subname \"data/metime.sqlite\"}\r\n               :deps [[org.xerial/sqlite-jdbc \"3.7.2\"]]}\r\n\r\n\r\n  :ring {:handler metime.core/app :auto-reload? true}\r\n\r\n  :min-lein-version \"2.5.0\"\r\n\r\n  :uberjar-name \"metime.jar\"\r\n  :main metime.server\r\n\r\n  :cljsbuild {\r\n              :builds [{:id           \"dev\"\r\n                        :source-paths [\"src/cljs\"]\r\n\r\n                        :figwheel     {:on-jsload \"metime.core/mount-root\"}\r\n\r\n                        :compiler     {:main                 metime.core\r\n                                       :asset-path           \"js/compiled/out\"\r\n                                       :output-to            \"resources/public/js/compiled/app.js\"\r\n                                       :output-dir           \"resources/public/js/compiled/out\"\r\n                                       :source-map-timestamp true}}\r\n                       {:id           \"min\"\r\n                        :source-paths [\"src/cljs\"]\r\n                        :compiler     {:output-to     \"resources/public/js/compiled/app.js\"\r\n                                       :main          metime.core\r\n                                       :optimizations :advanced\r\n                                       :pretty-print  false}}]}\r\n  :figwheel {\r\n             ;:http-server-root \"public\"\r\n             ;:nrepl-port       7888\r\n             ;:port             3449\r\n             :css-dirs     [\"resources/public/assets/css\"]\r\n             :ring-handler metime.core/app\r\n             })\r\n```\r\n\r\n\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/cursive-ide/cursive/issues/comments/238115679","html_url":"https://github.com/cursive-ide/cursive/issues/970#issuecomment-238115679","issue_url":"https://api.github.com/repos/cursive-ide/cursive/issues/970","id":238115679,"user":{"login":"danielcompton","id":811954,"avatar_url":"https://avatars.githubusercontent.com/u/811954?v=3","gravatar_id":"","url":"https://api.github.com/users/danielcompton","html_url":"https://github.com/danielcompton","followers_url":"https://api.github.com/users/danielcompton/followers","following_url":"https://api.github.com/users/danielcompton/following{/other_user}","gists_url":"https://api.github.com/users/danielcompton/gists{/gist_id}","starred_url":"https://api.github.com/users/danielcompton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielcompton/subscriptions","organizations_url":"https://api.github.com/users/danielcompton/orgs","repos_url":"https://api.github.com/users/danielcompton/repos","events_url":"https://api.github.com/users/danielcompton/events{/privacy}","received_events_url":"https://api.github.com/users/danielcompton/received_events","type":"User","site_admin":false},"created_at":"2016-08-07T23:27:23Z","updated_at":"2016-08-07T23:27:23Z","body":"Closing for now, reopen if this is still an issue."}}
{"actor":{"display_login":"danielcompton"}}