2017-09-20 37 views
1

我用蒸汽加载HTML或叶,它给我的错误信息“500'.The服务器日志显示我蒸汽无法加载HTML和叶

[Data File Error: unable to load file at path /Users/apple/Desktop/QSSwiftServer/Resources/Views/welcome.leaf] 
[Identifier: Core.DataFileError.load] 

[Possible Causes: file doesn't exist, missing read permissions at specified path, data read is corrupted, system issue] 

[Suggested Fixes: ensure that file permissions are correct for specified paths] 

[Documentation Links: https://developer.apple.com/reference/foundation/filemanager] 

这里是我的代码:

get { req in 
     return try self.view.make("welcome.leaf", ["message": "Hello world!"]) 
    } 

我该如何解决这个问题呢?

+0

@CalebKleveter我面临同样的错误。你能解释更多细节吗? – lee

+0

@lee我没有足够的信息来回答这个问题。我需要知道诸如文件的实际路径是什么,它的权限等等。 –

回答

0

你应该把你的文件转换成{Project Dir}/Resources/Views/

在你的CAS e welcome.leaf应该在/Users/apple/Desktop/QSSwiftServer/Resources/Views/