Genie Discord forum

Author AvatarGenerallyClueless
6/29/2023, 8:11:41 PM

@Rabbit38 I have run into many errors until I was able to get my Julia / Genie Builder environment working properly. I was actually able to write my first web app only today.

Author AvatarGenerallyClueless
6/29/2023, 8:12:10 PM

So, I am going to give you some of the best advice that I had gotten and hopefully save you some time

Author AvatarGenerallyClueless
6/29/2023, 8:13:23 PM

So, VS Code terminal and your system terminal may be relying on different paths. In my case, my path changes in VS Code would be reset each time the application started. It was annoying.

Author AvatarGenerallyClueless
6/29/2023, 8:15:25 PM

Try running "where julia" (I use Linux, so I had to run "which julia") in both the windows command prompt and the VS Code command prompt. Make sure that they match.๐Ÿ‘

Author AvatarGenerallyClueless
6/29/2023, 8:21:19 PM

They should display the location of the julia executable. Then, verify that the executable is actually there.
This is important, because I used juliaup install julia (originally I downloaded and manually installed). I had to remove the old path and since VS Code kept ignoring my path changes, I just used static links to where juliaup installed the executable.

I did notice that somewhere I had found instructions to add a specific path to my $PATH envioronmental variable as part of the installation process, but it ended up NOT CORRECT instructions as juliaup installed the executable in a different folder. So, as part of due diligence, trust but verify the path to the julia executable. โœ…

Author AvatarGenerallyClueless
6/29/2023, 8:22:11 PM

And again, I used static links to the executable, and added them to a folder which was consistenly part of the VS Code path.

Author AvatarRabbit38
6/29/2023, 8:42:54 PM

I'm not having any luck with your suggestions. "where julia" doesn't work in the REPL nor at the PS command line.

Author AvatarGenerallyClueless
6/29/2023, 8:45:31 PM

You would need the regular command line. Maybe search for julia.exe using windows explorer... as a last resort

Author AvatarGenerallyClueless
6/29/2023, 8:46:19 PM

It was a real headache for me because VS Code kept obliterating my PATH changes... so linking is definitely the way to go

Author AvatarGenerallyClueless
6/29/2023, 8:47:55 PM

Also, I could still do a lot of work in Genie Builder... and I thought running a REPL and installing packages would work... but it was actually the WRONG move for working in Genie Builder. Stick to the Genie Builder Package Manager and save yourself a headache (because I thought it was working in a different environment)

Author AvatarGenerallyClueless
6/29/2023, 8:51:09 PM

When my path was not correct, Package Manager would run... but it would freeze up. When I Launched a REPL, I could actually get further and complete an installation. All for not. It did not help, felt like wrong environment, and I pulled out my hair trying to fix it...... and it was a path problem afterall.

Author AvatarPere
7/3/2023, 9:03:06 AM

Hi @Rabbit38 . As @GenerallyClueless pointed out, there seems to be an issue with your PATH. Are you able to run Julia from a terminal?

Author AvatarRabbit38
7/4/2023, 7:28:29 PM

Yes. I launched the Command Prompt, typed Julia and it started up the REPL. Thanks for your reply, I was offline yesterday.

Author AvatarGenerallyClueless
7/5/2023, 4:22:46 PM

Good first step @Rabbit38. Have you also done this within VS Code itself? I have to make mention again that VS Code may not share the same environmental variables as the command prompt. This gave me a headache because each time I restarted VS Code I would lose my PATH changes. So, I made a link to the julia executable and placed it within a folder that VS Code and Command Prompt both shared, rather than appending to PATH. ๐Ÿซฃ

Author AvatarRabbit38
7/5/2023, 7:05:33 PM

@GenerallyClueless , I have not been able to figure out how to do what you suggest. How do I test launching Julia in VS Code other that what I do now. I launch VS Code and Julia is also started. How do you see what VS Code is using? I also see the Start Server icon, which when clicked tries to start the Genie Server causing the error as shown in the error message. How do I accomplish your link suggestion?

Author AvatarRabbit38
7/5/2023, 7:07:36 PM

Thanks @Pere. Yes. I launched the Command Prompt, typed Julia and it started up the REPL.

Author AvatarGenerallyClueless
7/5/2023, 7:18:14 PM

@Rabbit38 I have no doubt that you are running the terminal correctly. I am just trying to emphasize that VS Code terminal loads different environmental variables than a terminal like command prompt. It caused me to have a headache because I would add the julia executable to my $PATH ... but the path would always revert to a previous state.

Author AvatarGenerallyClueless
7/5/2023, 7:22:06 PM

Also, I could still perform some actions with julia, like start the genie builder server, install dependencies etc... using Pkg which made it feel like it was working correctly, but unfortunately my tools were not set up correctly.

Author AvatarGenerallyClueless
7/5/2023, 7:26:41 PM

โญ @Rabbit38 My advice, is to:

  1. Echo the PATH and make sure that VS Code terminal has the same path as your command prompt (there may be some differences)
  2. Find the actual installation directory of julia executable, and
  3. create a link to the julia executable and put it in a folder common to the PATH in VS Code terminal and command prompt โญ
Author AvatarRabbit38
7/5/2023, 9:38:34 PM

@GenerallyClueless I appologize for being so dense. (1): In VS Code, if I open a new terminal and type "echo PATH" without the "s, it returns "PATH" again without the parens. Typing the same thing in the REPL returns a syntax error. (2): julia.exe is at: C:\Users\Harvey\AppData\Local\Programs\Julia-1.7.1\bin. (3): I'm pretty computer literate but totally clueless how to do this step. a) how to create a link?, b) how to find the common folder?. I'm wondering if we are in totally different computer worlds. My VS Code About: Version: 1.79.2 (user setup) Commit: 695af097c7bd098fbf017ce3ac85e09bbc5dda06 Date: 2023-06-14T08:57:04.379Z Electron: 22.5.7 Chromium: 108.0.5359.215 Node.js: 16.17.1 V8: 10.8.168.25-electron.0 OS: Windows_NT x64 10.0.22621

Author AvatarRabbit38
7/5/2023, 9:39:18 PM

@GenerallyClueless on a Win 10 PC

Author AvatarGenerallyClueless
7/5/2023, 9:53:07 PM

Okay @Rabbit38 I think you need to type: echo %Path% forgive me... I hardly do anything technical in Windows, so I had to look this up ๐Ÿ˜ณ

Author AvatarGenerallyClueless
7/5/2023, 10:03:09 PM

I think the easiest way to create the link is to open Windows Explorer.... navigate to C:\Users\Harvey\AppData\Local\Programs\Julia-1.7.1\bin\ ... then right click on julia.exe and "create shortcut"..... then cut/paste the shortcut to some sensible folder in your %Path

Author AvatarRabbit38
7/8/2023, 9:28:03 PM

Problem Solved: I noted that I was not using the lasted stable version of Julia. I just upgraded to 1.9.2 and now I can start Genie Builder. Thusly, I can move on to exploring and using this tool. @GenerallyClueless and @Pere, big thanks for your help. BTW: I found a method that works for getting the VS Code PATH on my system: In VSCode, Preferences, Settings, type in the Search Box: julia.executablePath.

Author AvatarPere
7/8/2023, 10:37:01 PM

Good to hear @Rabbit38 thanks for the notice