【发布时间】:2013-10-21 03:42:22
【问题描述】:
我遵循'Building web application with Erlang' book 的 REST API with yaws 教程。
启动$ yaws时出现以下错误:
file:path_eval([".","/Users/<uername>"],".erlang"): error on line 3: 3: evaluation failed with reason error:{undefined_record,airport} and stacktrace [{erl_eval,exprs,2,[]}]
.erlang文件:
application:start(mnesia).
mnesia:create_table(airport,[{attributes, record_info(fields, airport)}, {index, [country]}]).
rest.erl文件可以在here找到。
如何定义记录?我尝试添加rd(airport, {code, city, country, name}).,但没有成功。
【问题讨论】: