What's the correct way to install the tailwindcss dependency? Initial creation of the tutorial seems to require ruby gems to install tailwindcss. I don't remember that dependency last time I worked with Biff (more than a year ago). Otherwise I'm getting errors because it can't find the right version of the rubygem, and then babashka is failing, and so on.
/home/linuxbrew/.linuxbrew/lib/ruby/site_ruby/3.4.0/rubygems.rb:269:in 'Gem.find_spec_for_exe': can't find gem tailwindcss-ruby (>= 0.a) with executable tailwindcss (Gem::GemNotFoundException)
from /home/linuxbrew/.linuxbrew/lib/ruby/site_ruby/3.4.0/rubygems.rb:288:in 'Gem.activate_bin_path'
from /home/linuxbrew/.linuxbrew/lib/ruby/gems/3.3.0/bin/tailwindcss:25:in '<main>'
clojure.lang.ExceptionInfo:
{:proc #object[java.lang.ProcessImpl 0x7b70b90c "Process[pid=336113, exitValue=1]"], :exit 1, :in #object[java.lang.ProcessBuilder$NullOutputStream 0x545d3250 "java.lang.ProcessBuilder$NullOutputStream@545d3250"], :out #object[java.lang.ProcessBuilder$NullInputStream 0x1df6b414 "java.lang.ProcessBuilder$NullInputStream@1df6b414"], :err #object[java.lang.ProcessBuilder$NullInputStream 0x1df6b414 "java.lang.ProcessBuilder$NullInputStream@1df6b414"], :prev nil, :cmd ["/home/linuxbrew/.linuxbrew/lib/ruby/gems/3.3.0/bin/tailwindcss" "-c" "resources/tailwind.config.js" "-i" "resources/tailwind.css" "-o" "target/resources/public/css/main.css" "--watch"], :type :babashka.process/error}
at babashka.process$check.invokeStatic (process.cljc:111)
babashka.process$check.invoke (process.cljc:95)
babashka.process$shell.invokeStatic (process.cljc:646)
babashka.process$shell.doInvoke (process.cljc:622)
clojure.lang.RestFn.applyTo (RestFn.java:137)
clojure.lang.Var.applyTo (Var.java:705)
clojure.core$apply.invokeStatic (core.clj:667)
clojure.core$apply.invoke (core.clj:662)
com.biffweb.tasks.lazy.babashka.process$shell.invokeStatic (process.clj:4)
com.biffweb.tasks.lazy.babashka.process$shell.doInvoke (process.clj:4)
clojure.lang.RestFn.applyTo (RestFn.java:137)
clojure.core$apply.invokeStatic (core.clj:669)
clojure.core$apply.invoke (core.clj:662)
com.biffweb.tasks$shell.invokeStatic (tasks.clj:59)
com.biffweb.tasks$shell.doInvoke (tasks.clj:52)
clojure.lang.RestFn.applyTo (RestFn.java:137)
clojure.core$apply.invokeStatic (core.clj:667)
clojure.core$apply.invoke (core.clj:662)
com.biffweb.tasks$css.invokeStatic (tasks.clj:248)
com.biffweb.tasks$css.doInvoke (tasks.clj:221)
clojure.lang.RestFn.applyTo (RestFn.java:137)
clojure.lang.Var.applyTo (Var.java:705)
clojure.core$apply.invokeStatic (core.clj:667)
clojure.core$apply.invoke (core.clj:662)
com.biffweb.task_runner$run_task.invokeStatic (task_runner.clj:47)
com.biffweb.task_runner$run_tas[main] INFO xtdb.tx - Started tx-ingester
[main] INFO com.biffweb.impl.xtdb - Indexed #:xtdb.api{:tx-time #inst "2025-04-08T23:43:24.197-00:00", :tx-id 0}I could have sworn I looked in that source file for it in the master branch but didn't find it, or I wouldn't have asked. I even did a search for 'uberjar' in that file, and it turned up none. Anyway, it's definitely there now! Thanks again, Jacob!
no problem! you might've been looking at the old babashka tasks file which doesn't have an uberjar task: https://github.com/jacobobryant/biff/blob/master/tasks/src/com/biffweb/tasks.clj
I think that's exactly what I was looking at, yes
One thing I don't like about MailerSend is they only let you send 100 emails before you have to "get approved" which requires having a live URL.
I think you'll find similar requirements on just about any email service provider. They all have some sort of manual screening process for new customers to keep spammers out. one nice thing about mailersend is they have a pretty generous free tier. though if you find any other providers that look better, let me know--always interested to check out new providers in this space. previously I had mailgun as the default recommendation.
hm, ruby shouldn't be required. After creating a new project, a standalone tailwind binary should be downloaded when you run clj -M:dev dev. However if you already have tailwindcss on your path, biff will try to use that. I wonder if you previously installed/partially installed tailwind via ruby gems/homebrew, but for some reason it isn't installed correctly? What output do you get from these commands:
which tailwindcss
tailwindcss --help
(Also, hi Bob!)Assuming that is the problem, you can run clj -M:dev install-tailwind which will force Biff to download a standalone tailwind binary and use that instead of the globally installed tailwindcss command.
It seems I have an old version of Ruby's gem (relative to the latest installed) with tailwindcss and uninstalling it isn't trivial. But running the command to install it locally solved the problem. 🙂
Ok for this project I might accept all the defaults but looking at MailSend I'm confused. The company seems to be called 500 apps, but they offer 50 apps at the cloud pricing level. What does that even mean? That we can use the same key for up to 50 apps?
I think you're looking at the wrong website--check out Mail*er*Send: https://www.mailersend.com/
mailchimp and constant contact are the ones I've used most before.
Yeah, that's better. Thanks. lol.
OK so I got registered with mailersend and reCAPTCHA. I renamed the env variables in config.env and in config.edn, and set the values in config.env. However, clicking the Sign Up button does nothing - and nothing in the logs to explain why nothing is happening.
I know I set the site/secret key for reCAPTCHA correctly and the API token for mailer send. But I am not getting an error or anything to tell me why nothing is happening.
On the recaptcha admin page, you might need to add localhost or localhost:8080 to the list of allowed hosts. When that isn't set, clicking the button won't even trigger a request to the backend since the frontend recaptcha lib checks the host at that point.
Maybe I can add a check for that somehow. I've hit it a few times myself.
Yeah ok adding 'localhost' worked. I am curious how clicking the sign up link in the email redirected to the correct localhost:port....
That comes from the :biff/base-url config key in resources/config.edn
@foo Can you remind me how Biff circa 2023-2024 started up in dev? I'm reviewing the app I first worked on with your help and not sure how to get it running. The new biff version since then changed a lot about how startup, configuration, building an uberjar, etc., works.
bb dev is probably the command you want. I think you can run bb tasks to get a list of commands. the commands should be mostly the same for newer projects, only now it's clj -M:dev ... instead of bb ...
ah right
thanks
I did notice you moved tasks into biff proper. One thing I didn't find right away is where the uberjar task is defined. What if I want to name the jar something besides 'app.jar'?
it's defined here: https://github.com/jacobobryant/biff/blob/1570ccc694c610422d70f4b63eeaa2ba456889ac/libs/tasks/src/com/biffweb/tasks.clj#L322
currently app.jar is hard coded into the task, so there are two options: you can make a custom uberjar task that calls com.biffweb.tasks/uberjar and then moves app.jar to a new file, or you can copy the whole uberjar task function into a new custom task in your project and then have it write the uberjar to a different spot in the first place.