-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in path expansion #3
Comments
You can add directory with ledger.exe to PATH and run it from directory with ledger.dat file, so your PATH="C:\Somwhere-with-ledger.exe" I use it inside Emacs (x64 edition from sourceforge), but it requires to manually modify all the commands and point ledger-report to binary PATH and remove %(ledger-file) expansion. It also somehow opens a file ledger.dat second time like it's inside cygwin in read-only mode (and prompts me to continue or not reading the file). It works though I also would like to find a better solution. |
I ended up compiling ledeger myself from cygwin as instructed here: https://github.com/ledger/ledger/wiki/Build-instructions-for-Cygwin |
So you don't have the same problem like the one you described and the path expansion works correct? Have you used the patch mentioned at the top of that manual? |
@ngleb Yes, everything works correct that way. I didn't see the patch so I had to do it myself, but I ended up doing the same as described in that patch. |
@aresaguilar Do you think that binaries in this repository are still relevant? Maybe it makes sense to remove them and direct everyone to the build instructions link you posted. Also please feel free to share the updated version of ledger binaries. |
@ngleb @AlexanderAA I don't know why, but it has stopped working now. I've tried recompiling but it does not work. |
I've been debugging ledger and there seems to be a problem with boost library. I know very little C++, so the only solution I've came from is to add a line in src/context.h:120, to go from:
to
I simply erase the "c:\Users\aaguilar" from the path. Obviously it's probably the worst solution, but my knowledge of C++ does not allow me to do anymore. Anyone can help with a better solution? |
@AlexanderAA I think that binaries is still useful, migh be useful to add some instructions/notes on how to use it properly. |
So what is the state of this, because I am getting this error now. |
Same issue here. |
This build was created using Cygwin which will always emulate UNIX/POSIX environment. Probably the easiest way to solve the issue is by compiling ledger in MSYS2/MinGW environment. In this case it will be native Windows application, no MSYS2/MinGW will be required to run it. Ledger source code already has all necessary support (so no changes will be necessary). I combined necessary steps to compile ledger which is very easy, but I will test it and update it soon to make sure everything works: I don't think sharing my binaries would be a good idea as it is totally unsafe. |
Having similar error. When doing ctrlC ctrlO ctrlR in ledger mode it gives error: |
I have found the following bug in the 3.1.1 version:
When using a windows path, cygwin does not expand it properly, e.g.:
> ledger -f "c:\Users\ares\ledger.dat"
Gives the following error (note the incorrect path expansion):
Error: Cannot read journal file "/cygdrive/c/Users/ares/c:/Users/ares/ledger.dat"
The text was updated successfully, but these errors were encountered: