teaman
05/17/2022, 7:45 AMCommandBox> start
| sword: |ng Server
bash: /private/etc/hosts: Permission denied
bash: /private/etc/hosts: Permission denied
bash: /private/etc/hosts: Permission denied
Ć | Starting Server
|------------------------------ | Adding host 'sb' to your hosts file! | Oh my! Something went wrong when trying to modify the hosts file!
| Adding host '<http://dev.sb|dev.sb>' to your hosts file!
| Oh my! Something went wrong when trying to modify the hosts file!
| Adding host 'sb.local' to your hosts file!
| Oh my! Something went wrong when trying to modify the hosts file!
|------------------------------
| ā | Setting Server Profile to [production]
ERROR (5.5.1+00562)
The host name [sb] can't be found. Do you need to add a host file entry?
sb
elpete
05/17/2022, 1:05 PMbdw429s
05/17/2022, 5:54 PMbdw429s
05/17/2022, 5:55 PMchris-schmitz
05/17/2022, 6:04 PMelpete
05/17/2022, 6:06 PMbdw429s
05/17/2022, 6:06 PMsh
do to change it?chris-schmitz
05/17/2022, 6:06 PMsudo ./box
bdw429s
05/17/2022, 6:06 PMelpete
05/17/2022, 6:07 PMelpete
05/17/2022, 6:08 PMchris-schmitz
05/17/2022, 6:10 PMCOMMANDBOX_HOME
I believechris-schmitz
05/17/2022, 6:12 PMcommandbox.properties
and in there you specify commandbox_home=your-path
that's how I avoided the different servers and moduleselpete
05/17/2022, 6:14 PMchris-schmitz
05/17/2022, 6:15 PMbdw429s
05/17/2022, 6:19 PMbdw429s
05/17/2022, 6:20 PMcommandbox.properties
trick is for pinning the CommandBox home regardless of the user, which is handy if you're running as root some times. It's sort of unrelated to the password prompt stuff since it is a valid use case for a user like Eric to not want to run as root, which can have other considerations.bdw429s
05/17/2022, 6:21 PMchris-schmitz
05/17/2022, 6:29 PMteaman
05/17/2022, 7:01 PMteaman
05/17/2022, 7:02 PMelpete
05/17/2022, 7:02 PMteaman
05/18/2022, 6:17 AMteaman
05/18/2022, 6:21 AMchris-schmitz
05/18/2022, 7:22 AMcommandbox_home
approach you can tell Commandbox to store it's data wherever you want, no matter how you start it. I agree that this is not the optimal solution, but that's how I always did it.teaman
05/18/2022, 4:14 PMchris-schmitz
05/18/2022, 4:51 PMsudo
to start it. Just make sure that before the first start you create commandbox.properties
with a path for commandbox_home
in it. That path will be valid for ALL users of commandbox, so it doesn't matter whether you use sudo
to start it or notteaman
05/18/2022, 4:58 PMbdw429s
05/18/2022, 4:59 PMbdw429s
05/18/2022, 5:00 PMbdw429s
05/18/2022, 5:00 PMteaman
05/18/2022, 5:03 PMbdw429s
05/18/2022, 5:23 PMteaman
05/18/2022, 5:50 PMteaman
05/19/2022, 4:28 AMteaman
05/19/2022, 4:33 AMteaman
05/19/2022, 4:33 AMteaman
05/19/2022, 5:03 AMcommandbox_home=/Users/<my_user_name>/.CommandBox/
into the filepath:
/opt/homebrew/Cellar/commandbox.properties
and then ran
sudo box
but it does not recognize this file location. Here is the run transcript:
Configuring CommandBox home: /var/root/.CommandBox (change with -CommandBox_home=/path/to/dir)
Library path: /private/var/root/.CommandBox/lib
Initializing libraries -- this will only happen once, and takes a few seconds...
...
Libraries initialized
______ ______
/ ____/___ ____ ___ ____ ___ ____ _____ ____/ / __ )____ _ __
/ / / __ \/ __ `__ \/ __ `__ \/ __ `/ __ \/ __ / __ / __ \| |/_/
/ /___/ /_/ / / / / / / / / / / / /_/ / / / / /_/ / /_/ / /_/ /> <
\____/\____/_/ /_/ /_/_/ /_/ /_/\__,_/_/ /_/\__,_/_____/\____/_/|_| (R) v5.5.1+00562
You can open your servers's web administrator by clicking the tray icon
Welcome to CommandBox!
Notice it simply generates a new .CommandBox in /private/var/root.
Why is CB ignoring the commandbox.properties file? it is in the same location as the "commandbox" binaries are located.teaman
05/19/2022, 5:15 AMchris-schmitz
05/19/2022, 6:20 AMteaman
05/19/2022, 6:31 AMteaman
05/19/2022, 6:32 AMchris-schmitz
05/19/2022, 6:57 AMchris-schmitz
05/19/2022, 6:57 AMbdw429s
05/19/2022, 2:12 PMbdw429s
05/19/2022, 2:14 PMcommandbox.properties
file needs to be in whatever folder the binary lives in. So, whatever the heck brew is doing-- you'll need to know what actual directory is being the process thinks it lives in.bdw429s
05/19/2022, 2:15 PMprivate static String getJarDir(){
String path = new File( LoaderCLIMain.class.getProtectionDomain()
.getCodeSource().getLocation().getPath() ).getParent();
// Decode things like spaces in folders which will be %20
return URLDecoder.decode( path );
}
bdw429s
05/19/2022, 2:16 PMbdw429s
05/19/2022, 2:16 PMbdw429s
05/19/2022, 2:16 PMbdw429s
05/19/2022, 2:17 PM-clidebug
flag and you'll get a bunch of extra debugging output
box -clidebug
bdw429s
05/19/2022, 2:17 PMlog.debug( "Checking for properties file " + cliPropFile.getCanonicalPath() );
bdw429s
05/19/2022, 2:17 PMbdw429s
05/19/2022, 2:17 PMchris-schmitz
05/19/2022, 3:08 PMchris-schmitz
05/19/2022, 3:14 PMteaman
05/20/2022, 5:33 AMteaman
05/20/2022, 5:34 AMbdw429s
05/20/2022, 1:13 PMteaman
05/20/2022, 4:03 PM/opt/homebrew/Cellar/commandbox/5.5.1/libexec/bin/commandbox.properties
Turns out there are two "box" files, rather confusing. One in commandbox/5.5.1/bin and the one just mentioned in libexec. Maybe you can explain the why. Seems one should be named differently so as not to confuse. I now notice the size of the file in commandbox/5.5.1/bin is small. The one in libexec/bin is much larger. But that shouldn't detract from my point about the smaller one should be named differently.bdw429s
05/20/2022, 4:03 PMbdw429s
05/20/2022, 4:04 PMbdw429s
05/20/2022, 4:04 PMteaman
05/20/2022, 4:04 PMbdw429s
05/20/2022, 4:04 PMteaman
05/20/2022, 4:04 PMbdw429s
05/20/2022, 4:04 PMteaman
05/20/2022, 4:05 PMteaman
05/20/2022, 4:05 PMteaman
05/20/2022, 4:06 PMbdw429s
05/20/2022, 4:07 PMteaman
05/20/2022, 4:07 PMbdw429s
05/20/2022, 4:07 PMteaman
05/20/2022, 4:08 PMbdw429s
05/20/2022, 4:08 PMWho proofs what others submit using that crowd-sourced documentation approach?Ultimately, I do. But when it comes to something I know nothing about like homebrew, I usually just assume they know what they're talking about. We can ping another homebrew user to help if you'd like.
bdw429s
05/20/2022, 4:08 PMHuh?What didn't make sense?
teaman
05/20/2022, 4:09 PMteaman
05/20/2022, 4:09 PMbdw429s
05/20/2022, 4:09 PMbdw429s
05/20/2022, 4:09 PMbdw429s
05/20/2022, 4:09 PMbdw429s
05/20/2022, 4:09 PMbdw429s
05/20/2022, 4:09 PMbdw429s
05/20/2022, 4:10 PMbdw429s
05/20/2022, 4:10 PMbox
binaryteaman
05/20/2022, 4:10 PMbdw429s
05/20/2022, 4:10 PMteaman
05/20/2022, 4:10 PMbdw429s
05/20/2022, 4:10 PMteaman
05/20/2022, 4:12 PMbdw429s
05/20/2022, 4:12 PMteaman
05/20/2022, 4:13 PMbdw429s
05/20/2022, 4:13 PMbdw429s
05/20/2022, 4:13 PMteaman
05/20/2022, 4:13 PMbdw429s
05/20/2022, 4:14 PMbdw429s
05/20/2022, 4:14 PMteaman
05/20/2022, 4:14 PMbdw429s
05/20/2022, 4:15 PMbdw429s
05/20/2022, 4:15 PMHB install of CB would put in that properties file for youThat's an interesting idea, but if I were to guess, it's probably not possible š¤
teaman
05/20/2022, 4:16 PMbdw429s
05/20/2022, 4:16 PMbdw429s
05/20/2022, 4:16 PMbdw429s
05/20/2022, 4:16 PMbdw429s
05/20/2022, 4:17 PMso I would think you would care.About Mac users on an outdated version of Brew who want to find answers for how their old version of brew works under the covers? Nope. The CommandBox docs is not the place for that information.
teaman
05/20/2022, 4:18 PMteaman
05/20/2022, 4:19 PMbdw429s
05/20/2022, 4:19 PMbdw429s
05/20/2022, 4:19 PMbdw429s
05/20/2022, 4:19 PMteaman
05/20/2022, 4:20 PMbdw429s
05/20/2022, 4:20 PMWho maintains that script you linked to on github?It was originally written by Jon Clausen when he added support for this (He's a Mac user) and I've updated it over the years based on the changes requested by the Brew team and their massive set of super pedantic test servers.
bdw429s
05/20/2022, 4:21 PMteaman
05/20/2022, 4:22 PMbdw429s
05/20/2022, 4:23 PMIt says to put the properties file next to the binary file. But then doesn't say where that is.I get it, but the answer to that depends on your operating system and how you're calling box. Homebrew users are the only people who have to deal with this based on the crazy weird stuff HB does. For the rest of the universe, it's super simple.
bdw429s
05/20/2022, 4:24 PMOrtus would provide their own installation toolWe've talked about an installer, but this is a non-trivial task and gives us one more thing to maintain. I've always really like the fact that
box
is just a binary you can drop on your desktop and run without the need for any sort of complicated installation process.bdw429s
05/20/2022, 4:25 PMteaman
05/20/2022, 4:25 PMbdw429s
05/20/2022, 4:26 PMbdw429s
05/20/2022, 4:26 PMbdw429s
05/20/2022, 4:27 PMteaman
05/20/2022, 4:28 PMbdw429s
05/20/2022, 4:28 PMteaman
05/20/2022, 4:28 PMbdw429s
05/20/2022, 4:28 PMbdw429s
05/20/2022, 4:29 PMteaman
05/20/2022, 4:29 PMbdw429s
05/20/2022, 4:29 PMbdw429s
05/20/2022, 4:29 PMbdw429s
05/20/2022, 4:29 PMteaman
05/20/2022, 4:30 PMteaman
05/20/2022, 4:30 PMbdw429s
05/20/2022, 4:30 PMteaman
05/20/2022, 4:30 PMteaman
05/20/2022, 4:30 PMbdw429s
05/20/2022, 4:31 PMsh -c "$(curl -fsSL <https://commandbox.app/install.sh>)"
bdw429s
05/20/2022, 4:31 PMbdw429s
05/20/2022, 4:32 PMbdw429s
05/20/2022, 4:32 PMbdw429s
05/20/2022, 4:33 PMbdw429s
05/20/2022, 4:34 PMcurl
installed
⢠you have unzip
installed
⢠you want the binary in /usr/local/bin
bdw429s
05/20/2022, 4:34 PMbdw429s
05/20/2022, 4:34 PMjava_home
hasbdw429s
05/20/2022, 4:35 PMbdw429s
05/20/2022, 4:35 PMteaman
05/20/2022, 4:35 PMbdw429s
05/20/2022, 4:36 PMsince I preferāļø And that right there is why it's so hard to build a simpler installer. Everyone wants to do it differently! š
teaman
05/20/2022, 4:36 PMbdw429s
05/20/2022, 4:37 PMbdw429s
05/20/2022, 4:37 PMteaman
05/20/2022, 4:39 PMteaman
05/20/2022, 4:39 PMteaman
05/21/2022, 1:48 AM