Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/62.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 如何在为Rails应用程序设置PredictionIO时指定目标应用程序_Ruby On Rails_Predictionio - Fatal编程技术网

Ruby on rails 如何在为Rails应用程序设置PredictionIO时指定目标应用程序

Ruby on rails 如何在为Rails应用程序设置PredictionIO时指定目标应用程序,ruby-on-rails,predictionio,Ruby On Rails,Predictionio,我是PredictionIO的新手,我正在学习本教程。我进入了需要导入rake任务的步骤。好吧,这不起作用,我得到这个错误: PredictionIO::EventClient::NotCreatedError: The requested resource could not be found. 当我尝试这一行时会发生这种情况: client.set_user(user.id) 现在,就在这一步之前,它说要更改文件params/datasource.json并指定目标应用程序。我不知道如何

我是PredictionIO的新手,我正在学习本教程。我进入了需要导入rake任务的步骤。好吧,这不起作用,我得到这个错误:

PredictionIO::EventClient::NotCreatedError: The requested resource could not be found.
当我尝试这一行时会发生这种情况:

client.set_user(user.id)
现在,就在这一步之前,它说要更改文件params/datasource.json并指定目标应用程序。我不知道如何获得这个ID,我怀疑这可能是这里的问题


希望这是清楚的,并且有人知道答案。

为您的应用程序选择一个唯一的数字,例如5

在rails代码中将PIO_APP_ID替换为5并运行。这是为了通知事件服务器传入的事件与appId=5有关

注册所有事件后,转到io.prediction.engines.itemrec/params/datasource.json并将appId更改为5。现在,按照该顺序训练、部署引擎

您可以通过以下方式查看事件服务器注册的事件: curl-i-X得到http://localhost:7070/events.json?appId=5