Skip to content
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

Running into an Error on Windows #5

Open
fairingrey opened this issue Jul 10, 2018 · 5 comments
Open

Running into an Error on Windows #5

fairingrey opened this issue Jul 10, 2018 · 5 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@fairingrey
Copy link

I'm running into an error trying to deploy this app on Windows:

C:\Users\allen\Projects\webapp.rs>make deploy
   Compiling webapp v0.3.0 (file:///C:/Users/allen/Projects/webapp.rs)
    Finished release [optimized] target(s) in 7.14s
    Garbage collecting "app.wasm"...
    Processing "app.wasm"...
    Finished processing of "app.wasm"!
The `app` was deployed to "C:\\Users\\allen\\Projects\\webapp.rs\\target\\deploy"!
error: could not find `Cargo.toml` in `/home/rust/src` or any parent directory
make: *** [deploy] Error 101

C:\Users\allen\Projects\webapp.rs>

Though while I'm making this issue, I can provide some extra notes on what I needed to get closer to building the app:

  • Make for Windows
  • sed (this came with Git Bash I believe)
  • Additional SDKs provided by Visual Studio (specifically the Windows 8.1 SDK and Universal CRT SDK to compile sass-rs)

I understand that this might not be a big priority since Windows is somewhat of a second-class citizen for webdev stuff, but I think it would be really cool to see this work there too.

Thanks for making this, by the way!

@saschagrunert
Copy link
Owner

Hey, thank you for the issue. I will have a closer look at the windows support soon. But yes, the intention was not to support Windows out of the box. 😁

@fairingrey
Copy link
Author

fairingrey commented Jul 12, 2018

Came back to this after a day or two, but I realized the problem was pretty obvious when looking at what the makefile commands were doing. It's this line -- In particular, the Windows shell doesn't understand what the $(PWD) variable is.

My quick solution was just to replace the variable with the verbatim working directory path, but this is definitely not ergonomic by any means -- there's probably a better way of doing it. But at the very least this will finish building the webapp image.

I've tried make run, however, and ran into a few more problems. For some reason the webapp container wouldn't stay alive, so I ran it without the detached option so I could see what it says to the console:

$ make run
Error: Error(Some("FATAL:  role \"username\" does not exist\n"))
make: *** [run] Error 1

It's a little strange -- from what I understand, startdb works totally fine. The postgres container stays alive and the db migration works. But perhaps it's related to the Dockerfile that creates the image.

I'll share more of my findings if I get anywhere closer, but I get the feeling somehow that this should be a very simple fix.

@saschagrunert saschagrunert added enhancement New feature or request help wanted Extra attention is needed labels Jul 15, 2018
@saschagrunert
Copy link
Owner

Is it on general possible to run the application on Windows with make backend and make frontend?

@fairingrey
Copy link
Author

I won't be able to answer that right now since there's a dependency that breaks actix-web. ring 0.12.1 won't compile on MSVC 2017 (briansmith/ring#670). It's fixed on the latest release, but https://github.com/alexcrichton/cookie-rs needs to be upgraded to use it.

Sorry this is so troubling. Someone has already submitted a PR for the fix, it's just up to the maintainers now to get to it (rwf2/cookie-rs#106).

@DoumanAsh
Copy link

DoumanAsh commented Jul 19, 2018

I didn't look into code, but if you don't need cookies, you could disable temporarily session feature.

P.s. @saschagrunert you shouldn't treat windows so badly 😄 We poor windows plebs still want to develop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants