Hello,
First of all, I would like to congratulate those who make possible this awesome project called Yesod. It's very useful and impressive, and I hope it will last for long.
Secondly, I'm completely new to Yesod, but after some research I found it's the best option for a project I am working on. My Master's thesis uses Grammatical Framework and I need a wesbite for entering data and processing it in a Haskell environment, so it makes sense to use also Haskell for the website. After I installed Yesod through cabal, I tried to create a new project following this basic tutorial (I'd post my problem there, but it's not a question of what is written on the tutorial, but the first launch). I just created a project called "Test" with the sqlite option and then, when I launch it I get this problem:
fer@PC:~/Test$ cabal-dev install && yesod --dev devel
Resolving dependencies...
In order, the following will be installed:
Test-0.0.0 (reinstall)
Warning: Note that reinstalls are always dangerous. Continuing anyway...
Configuring Test-0.0.0...
Building Test-0.0.0...
Preprocessing library Test-0.0.0...
Registering Test-0.0.0...
Preprocessing executable 'Test' for Test-0.0.0...
Linking dist/build/Test/Test ...
Installing library in /home/fer/Test/cabal-dev//lib/Test-0.0.0/ghc-7.4.2
Installing executable(s) in /home/fer/Test/cabal-dev//bin
Registering Test-0.0.0...
Yesod devel server. Press ENTER to quit
Rebuilding application... (using cabal-dev)
ERROR: Could not read BuildInfo file: dist/setup-config
Make sure that cabal-install has been compiled with the same GHC version as yesod.
and that the Cabal library used by GHC is the same version
file does not exist: dist/setup-config
yesod: ExitFailure 1
After that error, when I open "localhost:3000", I just have the message: App not ready, please refresh. And it keeps refreshing the webpage continously until I kill the process. My cabal version is:fer@PC:~/Test$ cabal --version
cabal-install version 0.14.0
using version 1.14.0 of the Cabal library
For Yesod:fer@PC:~/Test$ yesod version
yesod-core version:1.1.6
yesod version:1.1.4
And the ghc one, you can check it in the logs of Yesod, above (ghc-7.4.2). I'm not sure if I did something wrong when I installed the package, but I did not find anything related on Google. You may help me this time and I'd be very grateful.
Thanks for your time! Best regards.
[..]
Preprocessing library yesod-static-1.1.1.1...
[1 of 1] Compiling Yesod.Static ( Yesod/Static.hs, dist/build/Yesod/Static.o )
Registering yesod-static-1.1.1.1...
Installing library in /home/fer/.cabal/lib/yesod-static-1.1.1.1/ghc-7.4.2
Registering yesod-static-1.1.1.1...
Yesod devel server. Press ENTER to quit
Configuring Test-0.0.0...
yesod: user error (Cannot find the program 'ghc' at 'yesod-ghc-wrapper' or on the path)
fer@PC:~/Test$ ghc-pkg list
/var/lib/ghc/package.conf.d
Cabal-1.14.0
array-0.4.0.0
base-4.5.1.0
bin-package-db-0.0.0.0
binary-0.5.1.0
bytestring-0.9.2.1
containers-0.4.2.1
deepseq-1.3.0.0
directory-1.1.0.2
extensible-exceptions-0.1.1.4
filepath-1.3.0.0
ghc-7.4.2
ghc-prim-0.2.0.0
haskell2010-1.1.0.1
haskell98-2.0.0.1
hoopl-3.8.7.3
hpc-0.5.1.1
integer-gmp-0.4.0.0
old-locale-1.0.0.4
old-time-1.1.0.0
pretty-1.1.1.0
process-1.1.0.1
rts-1.0
template-haskell-2.7.0.0
terminfo-0.3.2.3
time-1.4
unix-2.5.1.1
/home/fer/.ghc/x86_64-linux-7.4.2/package.conf.d
Cabal-1.16.0.3
HTTP-4000.2.6
MonadCatchIO-mtl-0.3.0.5
QuickCheck-2.5.1.1
ReadArgs-1.2.1
SHA-1.6.1
aeson-0.6.0.2
ansi-terminal-0.5.5
asn1-data-0.7.1
attoparsec-0.10.2.0
attoparsec-conduit-0.5.0.3
authenticate-1.3.2
base-unicode-symbols-0.2.2.4
base64-bytestring-1.0.0.0
basic-prelude-0.3.1.0
blaze-builder-0.3.1.0
blaze-builder-conduit-0.5.0.3
blaze-html-0.5.1.1
blaze-markup-0.5.1.2
byteorder-1.0.3
case-insensitive-0.4.0.3
cereal-0.3.5.2
certificate-1.3.3
cgi-3001.1.8.3
cipher-aes-0.1.2
classy-prelude-0.4.1
classy-prelude-conduit-0.4.1
clientsession-0.8.0.1
cmdargs-0.10.1
conduit-0.5.4.1
cookie-0.4.0.1
cpphs-1.14
cprng-aes-0.2.4
cpu-0.1.1
crypto-api-0.10.2
crypto-conduit-0.4.1
crypto-pubkey-types-0.2.0
cryptocipher-0.3.6
cryptohash-0.7.9
css-text-0.1.1
data-default-0.5.0
date-cache-0.3.0
derive-2.5.11
dlist-0.5
email-validate-0.2.8
email-validate-0.3.2
entropy-0.2.1
failure-0.2.0.1
fast-logger-0.3.1
file-embed-0.0.4.6
fsnotify-0.0.4
fst-0.9.0.1
gf-3.3.3
ghc-paths-0.1.0.8
hamlet-1.1.1.1
hashable-1.1.2.5
haskeline-0.7.0.3
haskell-src-exts-1.13.5
hinotify-0.3.5
hjsmin-0.1.3
hlint-1.8.35
hoogle-4.2.14
hscolour-1.20.3
http-conduit-1.8.4.3
http-date-0.0.3
http-reverse-proxy-0.1.0.6
http-types-0.7.3.0.1
httpd-shed-0.4
json-0.7
language-javascript-0.5.7
largeword-1.0.3
lifted-base-0.2
mime-mail-0.4.1.2
mime-types-0.1.0.0
monad-control-0.3.1.4
monad-logger-0.2.1
mtl-2.0.1.0
network-2.3.2.0
network-conduit-0.6.1.1
optparse-applicative-0.4.2
parallel-3.2.0.3
parallel-io-0.3.2.1
parsec-3.1.3
path-pieces-0.1.2
pem-0.1.1
persistent-1.0.2.2
persistent-sqlite-1.0.1
persistent-template-1.0.0.2
pool-conduit-0.1.0.3
primitive-0.5.0.1
project-template-0.1.0.1
pureMD5-2.1.2.1
pwstore-fast-2.3
random-1.0.1.1
ranges-0.2.4
regex-base-0.93.2
regex-compat-0.95.1
regex-posix-0.95.2
resource-pool-0.2.1.1
resourcet-0.4.4
safe-0.3.3
scion-browser-0.2.12
semigroups-0.8.4.1
shakespeare-1.0.2
shakespeare-css-1.0.2
shakespeare-i18n-1.0.0.2
shakespeare-js-1.0.2
shakespeare-js-1.1.0
shakespeare-text-1.0.0.5
silently-1.2.4
simple-sendfile-0.2.8
skein-0.1.0.10
socks-0.4.2
split-0.2.1.1
stm-2.4.2
stringsearch-0.3.6.4
syb-0.3.7
system-fileio-0.3.10
system-filepath-0.4.7
tagged-0.4.4
tagsoup-0.12.8
tar-0.3.2.0
tar-0.4.0.1
terminfo-0.3.2.5
text-0.11.2.3
tls-1.0.2
tls-extra-0.5.0
transformers-0.2.2.0
transformers-base-0.4.1
uniplate-1.6.7
unix-compat-0.4.0.0
unix-time-0.1.2
unordered-containers-0.2.2.1
utf8-light-0.4.0.1
utf8-string-0.3.7
vault-0.2.0.1
vector-0.10.0.1
void-0.5.8
wai-1.3.0.1
wai-app-static-1.3.0.4
wai-extra-1.3.0.4
wai-logger-0.3.0
warp-1.3.5
word8-0.0.2
xhtml-3000.2.1
xml-conduit-1.0.3.3
xml-types-0.3.3
xss-sanitize-0.3.2
yaml-0.8.1.1
yesod-1.1.4
yesod-auth-1.1.1.7
yesod-core-1.1.6
yesod-default-1.1.2
yesod-form-1.2.0.1
yesod-json-1.1.2
yesod-persistent-1.1.0
yesod-routes-1.1.1.1
yesod-static-1.1.1.1
zlib-0.5.4.0
zlib-bindings-0.1.1.2
zlib-conduit-0.5.0.3
My guess would be that somehow PATH is getting reset before whatever is trying to run ghc actually calls exec.
Registering Test-0.0.0...
Preprocessing executable 'Test' for Test-0.0.0...
[1 of 1] Compiling Main ( app/main.hs, dist/build/Test/Test-tmp/Main.o )
Linking dist/build/Test/Test ...
Installing library in /home/fer/.cabal/lib/Test-0.0.0/ghc-7.4.2
Installing executable(s) in /home/fer/.cabal/bin
Registering Test-0.0.0...
Yesod devel server. Press ENTER to quit
Configuring Test-0.0.0...
yesod: user error (Cannot find the program 'ghc' at 'yesod-ghc-wrapper' or on the path)
export PATH="$HOME/.cabal/bin":$PATH
And then it worked. Thanks a lot to all of you. I hope this also helps to future users with problems.