Hi,
Everything worked fine. But after connecting the demo app with
PredictionIO, comics are recommending correctly when I dislike the comic.
But when I like any comic, it keeps on loading and never gives any result.
On seeing logs, this is what I got :
Started POST "/episodes/query" for ::1 at 2016-11-07 20:31:47 +0530
Processing by EpisodesController#query as */*
Parameters: {"likes"=>"[74215]", "dislikes"=>"[76877]"}
Completed 500 Internal Server Error in 1007ms (ActiveRecord: 0.0ms)
NameError (uninitialized constant Net::HTTPOK):
app/controllers/episodes_controller.rb:27:in `query'
Rendered
/Library/Ruby/Gems/2.0.0/gems/actionpack-4.2.1/lib/action_dispatch/middleware/templates/rescues/_source.erb
(4.5ms)
Rendered
/Library/Ruby/Gems/2.0.0/gems/actionpack-4.2.1/lib/action_dispatch/middleware/templates/rescues/_trace.text.erb
(0.8ms)
Rendered
/Library/Ruby/Gems/2.0.0/gems/actionpack-4.2.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.text.erb
(0.8ms)
Rendered
/Library/Ruby/Gems/2.0.0/gems/actionpack-4.2.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.text.erb
(24.9ms)
Rendered
/Library/Ruby/Gems/2.0.0/gems/web-console-2.1.2/lib/web_console/templates/_markup.html.erb
(0.4ms)
Rendered
/Library/Ruby/Gems/2.0.0/gems/web-console-2.1.2/lib/web_console/templates/style.css.erb
within layouts/inlined_string (0.5ms)
Rendered
/Library/Ruby/Gems/2.0.0/gems/web-console-2.1.2/lib/web_console/templates/_inner_console_markup.html.erb
within layouts/inlined_string (0.5ms)
Rendered
/Library/Ruby/Gems/2.0.0/gems/web-console-2.1.2/lib/web_console/templates/_prompt_box_markup.html.erb
within layouts/inlined_string (0.6ms)
Rendered
/Library/Ruby/Gems/2.0.0/gems/web-console-2.1.2/lib/web_console/templates/console.js.erb
within layouts/javascript (40.8ms)
Rendered
/Library/Ruby/Gems/2.0.0/gems/web-console-2.1.2/lib/web_console/templates/main.js.erb
within layouts/javascript (0.5ms)
Rendered
/Library/Ruby/Gems/2.0.0/gems/web-console-2.1.2/lib/web_console/templates/error_page.js.erb
within layouts/javascript (0.9ms)
Rendered
/Library/Ruby/Gems/2.0.0/gems/web-console-2.1.2/lib/web_console/templates/index.html.erb
(85.0ms)
What does this mean?
On Mon, Nov 7, 2016 at 8:24 PM, Shantanu Deshpande <[email protected]>
wrote:
> Hi,
>
> This did solved the problem. But why did this happened? I mean if this
> line is really meant to be added, this should have been faced by others too.
>
> Thanks & Regards,
> Shantanu
>
> On Mon, Nov 7, 2016 at 3:06 AM, Chan Lee <[email protected]> wrote:
>
>> Hi Shantanu,
>>
>> Looks like Net:Http module is not being loaded properly. Could you try
>> putting `require "net/http"` at the top of your predictionio.rake file?
>>
>> Chan
>>
>> On Sun, Nov 6, 2016 at 9:53 AM, Shantanu Deshpande <
>> [email protected]> wrote:
>>
>>> Hi,
>>>
>>> I am trying the tapster demo template of recommendation engine.
>>>
>>> I had all the parameters setup correctly.
>>>
>>> pio build worked correctly, but when I did *rake import:predictionio*,
>>> it gave me this error:
>>>
>>> rake aborted!
>>>
>>> NameError: uninitialized constant Net::HTTPCreated
>>>
>>> /Library/Ruby/Gems/2.0.0/gems/predictionio-0.9.0/lib/predictionio/event_client.rb:326:in
>>> `sync_events'
>>>
>>> /Library/Ruby/Gems/2.0.0/gems/predictionio-0.9.0/lib/predictionio/event_client.rb:132:in
>>> `create_event'
>>>
>>> /usr/local/Cellar/Demo-Tapster/lib/tasks/import/predictionio.rake:54:in
>>> `block (3 levels) in <top (required)>'
>>>
>>> /usr/local/Cellar/Demo-Tapster/lib/tasks/import/predictionio.rake:48:in
>>> `each'
>>>
>>> /usr/local/Cellar/Demo-Tapster/lib/tasks/import/predictionio.rake:48:in
>>> `each_with_index'
>>>
>>> /usr/local/Cellar/Demo-Tapster/lib/tasks/import/predictionio.rake:48:in
>>> `block (2 levels) in <top (required)>'
>>>
>>> Tasks: TOP => import:predictionio
>>>
>>> (See full trace by running task with --trace)
>>>
>>>
>>> On running the same with --trace it gave the following result:
>>>
>>> rake aborted!
>>>
>>> NameError: uninitialized constant Net::HTTPCreated
>>>
>>> /Library/Ruby/Gems/2.0.0/gems/predictionio-0.9.0/lib/predictionio/event_client.rb:326:in
>>> `sync_events'
>>>
>>> /Library/Ruby/Gems/2.0.0/gems/predictionio-0.9.0/lib/predictionio/event_client.rb:132:in
>>> `create_event'
>>>
>>> /usr/local/Cellar/Demo-Tapster/lib/tasks/import/predictionio.rake:54:in
>>> `block (3 levels) in <top (required)>'
>>>
>>> /usr/local/Cellar/Demo-Tapster/lib/tasks/import/predictionio.rake:48:in
>>> `each'
>>>
>>> /usr/local/Cellar/Demo-Tapster/lib/tasks/import/predictionio.rake:48:in
>>> `each_with_index'
>>>
>>> /usr/local/Cellar/Demo-Tapster/lib/tasks/import/predictionio.rake:48:in
>>> `block (2 levels) in <top (required)>'
>>>
>>> /Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:240:in `call'
>>>
>>> /Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:240:in
>>> `block in execute'
>>>
>>> /Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:235:in `each'
>>>
>>> /Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:235:in
>>> `execute'
>>>
>>> /Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:179:in
>>> `block in invoke_with_call_chain'
>>>
>>> /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/l
>>> ib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
>>>
>>> /Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:172:in
>>> `invoke_with_call_chain'
>>>
>>> /Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:165:in
>>> `invoke'
>>>
>>> /Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:150:in
>>> `invoke_task'
>>>
>>> /Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:106:in
>>> `block (2 levels) in top_level'
>>>
>>> /Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:106:in
>>> `each'
>>>
>>> /Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:106:in
>>> `block in top_level'
>>>
>>> /Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:115:in
>>> `run_with_threads'
>>>
>>> /Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:100:in
>>> `top_level'
>>>
>>> /Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:78:in
>>> `block in run'
>>>
>>> /Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:176:in
>>> `standard_exception_handling'
>>>
>>> /Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:75:in
>>> `run'
>>>
>>> /Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/bin/rake:33:in `<top
>>> (required)>'
>>>
>>> /usr/local/bin/rake:23:in `load'
>>>
>>> /usr/local/bin/rake:23:in `<main>'
>>>
>>> Tasks: TOP => import:predictionio
>>>
>>>
>>> Is there anyway to solve this issue?
>>>
>>>
>>>
>>> Thanks & Regards,
>>>
>>> Shantanu
>>>
>>>
>>
>>
>