How can I install Yaws as a Rebar dependency in my Erlang application?
Thanks,
LRP
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
First, make sure you’re using a recent version of
rebar, say from April 2012 or later (rebarcommitdc472bor later), as changes to it were made in early 2012 specifically to support projects like Yaws.To use Yaws as a dependency, specify the following in your
rebar.configfile:You can replace the
{branch, "master"}part with a specific Yaws tag if you like:Note, though, that I don’t recommend using a version lower than Yaws 1.94 due to changes made to Yaws specifically for
rebarbuild support.How you actually run Yaws depends on how your app uses it. Using it in an embedded fashion is probably best for rebar-built apps, since that way you won’t have any dependencies on
yaws.conffiles. But if you want to run Yaws as a stand-alone web server, you can build your dependencies and your application and then run Yaws interactively like this:This uses the default
yaws.conffile found in./deps/yaws/etc/yaws/yaws.conf, which you can modify as needed. Starting Yaws in this fashion won’t include theebindirectories of any other of your application’s rebar dependencies in the load path, but you can either add the necessary paths using additional-paoptions to Yaws, or by specifying them in theyaws.conffile.