haskell - How can I run a scaffolded Yesod website in a cabal sandbox? -
let's have cabal sandbox @ folder root , i've installed yesod packages in it. then, do:
root> yesod init   i go through prompts , end folder project inside root.
yesod devel doesn't appear support passing sandbox arguments it, packages install in sandbox not visible scaffolded yesod site (and don't want install in global space, because that's impossible manage , replicate).
i've tried the suggestion here, gives me these errors:
root> runhaskell -no-user-package-db -package-db=.cabal-sandbox\x86_64-windows-ghc-7.8.4-packages.conf.d project/app/main.hs  project\app\main.hs:2:8:   not find module `application'   use -v see list of files searched for.   running inside root/project:
root/project> runhaskell -no-user-package-db -package-db=../.cabal-sandbox\x86_64-windows-ghc-7.8.4-packages.conf.d app/main.hs  foundation.hs:6:8:   not find module `text.jasmine'   use -v see list of files searched for.  settings.hs:8:8:   not find module `classyprelude.yesod'   use -v see list of files searched for.  settings.hs:14:8:   not find module `database.persist.sqlite'   perhaps meant     database.persist.sql (from persistent-2.1.2)     database.persist.sql.util (from persistent-2.1.2)     database.persist.class (from persistent-2.1.2)   use -v see list of files searched for.  settings\staticfiles.hs:4:8:   not find module `yesod.static'   use -v see list of files searched for.   does know of flag can set or something?
this should work:
just init sandbox scaffolded site
cabal sandbox init --sandbox=[path yesod-sandbox]   or alternatively init new sandbox
cabal sandbox init  cabal install --dependencies-only   script
there script written krdlab automates using stackage:
wget http://www.stackage.org/lts/cabal.config cabal update cabal sandbox init cabal install alex happy yesod-bin export path=./.cabal-sandbox/bin:$path yesod init --bare cabal install -j --enable-tests --max-backjumps=-1 --reorder-goals yesod devel      
Comments
Post a Comment