This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-12-01
Channels
- # admin-announcements (20)
- # aws (24)
- # beginners (323)
- # boot (60)
- # business (1)
- # cider (23)
- # clara (7)
- # cljs-dev (38)
- # cljsrn (12)
- # clojure (302)
- # clojure-canada (5)
- # clojure-dev (26)
- # clojure-miami (1)
- # clojure-nl (13)
- # clojure-russia (64)
- # clojurecup (1)
- # clojurescript (202)
- # clojurex (4)
- # code-reviews (5)
- # core-async (23)
- # cursive (39)
- # datavis (26)
- # datomic (34)
- # devcards (5)
- # editors (19)
- # emacs (4)
- # events (6)
- # funcool (55)
- # hoplon (5)
- # ldnclj (3)
- # lein-figwheel (1)
- # luminus (15)
- # om (159)
- # omnext (7)
- # onyx (107)
- # slack-help (2)
- # testing (3)
@jaen: re: boot as root, should be OK
Out of curiosity, can boot do something like sub-tasks? So I could for example be able to write boot create migration "migration-name"
?
@jaen: the migration
bit will be interpreted as a separate task...
I think the way to go for this is using options: boot create —migration “mig-name”
I see. In that case it's probably better to have it like boot migrations -create -name "migration-name"
but I still sense a bit of a mess with options, compared to if you could separate that into tasks.
But that probably could be worked around somehow, with a simple script fronting tasks and dispatching them.
All in all it's just a random thought I had and was curious how does that fit into how you call boot.
is anyone familiar with boot-middleman
? I’m trying to standup a project but keep running into this: An error occurred while installing mime-types-data
. The suggestion is to make sure gem install mime-types-data -v '3.2015.1120’
installs before bundling… it installs just fine. Any ideas?
PS when you do gem install mime-types-data -v '3.2015.1120'
` you're installing the gem with your system Ruby, not the jRuby used by boot-middleman
, so that won't help.
ah - right! So I have to install the gem via jruby
And install the gem into YOUR_PROJECT_ROOT/.gems
but I haven't tried that before so I can't know if it'll work
First is that sometimes I get the same error for ffi
gem (on first gem installation), but running boot once again fixes that.
Another is that some Java libraries can conflict with libraries jRuby needs, this happened for example when I was using buddy
and boot-middleman
in one project.
This happens because for some reason boot middleman injects all the project dependencies into the jRuby pod it runs middleman
in.
the errors seem to be caused by missing gems - I’m setting up jruby and all my gems now. We’ll see how this goes...
Basically you have to change this - https://github.com/jgdavey/boot-middleman/blob/master/src/com/joshuadavey/boot_middleman.clj#L21-l23 - to this:
(defn- make-pod []
(pod/make-pod
(-> (boot/get-env)
(assoc :dependencies [['clj.rb clj-rb-version]]))))
@andreortiz: and running boot again didn't help?
didn’t help
Yeah, so I suppose setting up the same version of jRuby boot-middleman
and installing into ./.gems
might work as a workaround. Do tell whether that helps or not.
I’m still poking around. boot middleman
did create a .gems
dir but I see a different set of gems in there than when I run gem list
(jruby has been installed via rbenv).
so it’s a gem management issue I’m dealing with… at least it feels that way 😉
@andreortiz: if this issue occurs with the most basic boot-middleman setup I’d suggest opening an issue
@andreortiz: you're using --path
to specify that, yes?
I’m not using --path
.
@martinklepsch: I may but the issues are on my side of the computer right now
so something like cd assets && RBENV_VERSION=that-jruby-version bundle install --path ../.gems
I’m not sure if installing via gem
is what you’re supposed to do.
bundle install —path ../.gems
kicked off as expected. However, boot middleman
still produces the same error regarding gem install mime-types-data -v '3.2015.1120’
- I’ll have to switch versions. Currently using jruby-9.0.3.0
@andreortiz: boot-middleman only works with jRuby 1.7.x currently
I looked into updating to 9.x.x.x, but the change ended up being non-trivial due to some other deps (clj.rb). Is jRuby a project dependency?
currently using 1.7.x
- it doesn’t look like 1.7x
has been included in the project
@jgdavey: since you're here, what's the reasoning behind including project dependencies in the jRuby pod? I mean this conj
here:
(defn- make-pod []
(pod/make-pod (-> (boot/get-env)
(update-in [:dependencies] conj ['clj.rb clj-rb-version]))))
@andreortiz: IIRC you don't need to include jRuby in dependencies by hand, boot-middleman
has it as a transitive dependency.
@jgdavey: would be nice if you could, I could then stop using my custom file to override that.
@andreortiz: in you Gemfile, it looks like you may need to specifically lock the mime-types
gem to 2.6.2
.
Hm, guys. I’ve got the following edn in my server-side.cljs.edn
:
{:require [myapp.core]
:init-fns [myapp.core/main]
:optimizations :none
:compiler-options {:target :nodejs
:pretty-print true}}
It compiles fine with boot-cljs and there’s the server-side.js
file and the corresponding server-side.out
folder inside the target
folder. The issue I’ve got is when I try to run this with node, it bails out with:
> Error: Cannot find module ‘~/projects/myapp/server-side.out/goog/bootstrap/nodejs.js’
It looks like it skips the target
folder while trying to locate the module.
The resulting server-side.js
file has this inside:
> require(path.join(path.resolve("."),"server-side.out","goog","bootstrap","nodejs.js"));
Which, as far as I understand, should be resolved properly, but… the devil is in the fact it doesn’t.
I’ve tried to set :asset-path “target”
in the cljs compiler options, but it has no effect, the resulting compiled js is the same.
Any ideas on how this could be resolved?asset-path is not used for Node target, if I recall correctly
You could try running node in the target directory
@juhoteperi: thx for the heads up. will check if i can do that as it’s been ran by a third-party lib.
@jgdavey: I’m also using RBENV - Should I specify jruby-1.7.16.1
in my .ruby-version
file?
or 1.9.3