triska / the-power-of-prolog

Introduction to modern Prolog
https://www.metalevel.at/prolog
1.23k stars 76 forks source link

Error trying to connect to local server #28

Closed GeoffChurch closed 2 years ago

GeoffChurch commented 2 years ago

The server appears to start, but when I navigate to localhost:6012/prolog on my browser it can't seem to find seq/3.

$ scryer-prolog -g "server(6012)" server.pl 
waiting for connections...
handling client '127.0.0.1:52410'...
"server(6012)" causes: error(existence_error(procedure,seq/3),seq/3)

My Scryer version is cargo:0.8.127, and I'm at commit c0d48dd2023987432eda6dac0b77be45c2e03bd8 of the-power-of-prolog. I'm happy to provide more info if needed.

triska commented 2 years ago

Could you please try it with the latest git version of Scryer Prolog, compiled with cargo build --release?

Thank you a lot!

GeoffChurch commented 2 years ago

That worked, thank you!

For anyone with the same issue, this worked for me:

cargo uninstall scryer-prolog
cargo install --git https://github.com/mthom/scryer-prolog
simonhaines commented 2 years ago

Does the container need updating as well? The latest is a couple of years old.

root@331a431fa929:/mnt/the-power-of-prolog# scryer-prolog -g "server(6012)" server.pl
caught: error(existence_error(source_sink,library(files)),use_module/1)
"server(6012)" causes: error(existence_error(procedure,server/1),server/1)
?- 
root@331a431fa929:/mnt/the-power-of-prolog# scryer-prolog -v
"cargo:0.8.122"