SciRuby / daru-view

daru-view is for easy and interactive plotting in web application & IRuby notebook. daru-view is a plugin gem to the existing daru gem.
https://sciruby.github.io/daru-view/
MIT License
95 stars 20 forks source link

problem with daru-view and IRuby , ffi-rzmq #155

Open mb52089 opened 4 years ago

mb52089 commented 4 years ago

When IRuby and ffii-rzmq gems are installed, Daru-view creates an issue when loading the rails server whereby cannot load such file -- daru-view (LoadError).

Daru-view without IRuby works. IRuby without Daru-view works. But together they don't work.

Thoughts?

mb52089 commented 4 years ago

When trying to load the rails console when Daru-view and IRuby gems are both in the gemfile, IRuby fails:

/Users/michaelburke/.rvm/gems/ruby-2.6.5@copient_health_rails6/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/active_support.rb:79:in `block in load_missing_constant': uninitialized constant IRuby::Utils (NameError)

Daru-view does work in the Iruby notebook though. I just can't get rails server or console to run along with it.....

lokeshh commented 4 years ago

@mb52089 Could you share the complete error log? You can post the log at http://gist.github.com/ and share the link here.

mb52089 commented 4 years ago

Thank you. Here is the gist: https://gist.github.com/mb52089/b343d742253df10d616c84e08095e4c9

It has the gemfile first then the error log when running the rails server when both Daru-View and IRuby are included in the gemfile.

On Sun, Mar 15, 2020 at 1:30 PM Lokesh Sharma notifications@github.com wrote:

@mb52089 https://github.com/mb52089 Could you share the complete error log? Share it via gist.github.com maybe.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SciRuby/daru-view/issues/155#issuecomment-599240137, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANV5YSWWYD3OKB5GIEXDJDRHUGCBANCNFSM4LHNF4EA .

-- Michael Burke 404.271.8652 LinkedIn https://www.linkedin.com/in/michael-burke-6418681/

Shekharrajak commented 4 years ago

It looks like an issue in IRuby installation: https://github.com/SciRuby/daru-view/blob/master/lib/daru/view/plot_list.rb#L8

Can you please use version 0.2.4 https://rubygems.org/gems/daru-view/versions/0.2.4 ?

Shekharrajak commented 4 years ago

It looks like we should require the IRuby util when it is needed IRuby.html in any method.

Shekharrajak commented 4 years ago

@Prakriti-nith any thoughts ?

mb52089 commented 4 years ago

I tried using version 0.2.4 of daru-view and I still get the same error when launching a rails server or rails console.

On Sat, Mar 21, 2020 at 3:57 AM Shekhar Prasad Rajak < notifications@github.com> wrote:

It looks like an issue in IRuby installation: https://github.com/SciRuby/daru-view/blob/master/lib/daru/view/plot_list.rb#L8

Can you please use version 0.2.4 https://rubygems.org/gems/daru-view/versions/0.2.4 ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SciRuby/daru-view/issues/155#issuecomment-602010884, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANV5YSCSQEEHXA3HBZG5OLRIRXNNANCNFSM4LHNF4EA .

-- Michael Burke 404.271.8652 LinkedIn https://www.linkedin.com/in/michael-burke-6418681/

Shekharrajak commented 4 years ago

@mb52089 , please let me know which ruby and ROR version you are using. I am looking into it. let me know if you can paste the code snippet as well or it is coming on rails server itself.

Shekharrajak commented 4 years ago

Our demo version of rails is present in this repo: https://github.com/Shekharrajak/demo_daru-view, you may check the gemfile and other configuration once.

Shekharrajak commented 4 years ago

@mb52089 , I am not able to reproduce it. I am seeing rails server is running perfectly with Ruby 2.53, 'rails', '~> 5.1.1' for all the rails examples present in https://github.com/Shekharrajak/demo_daru-view

Shekharrajak commented 4 years ago

Simple solution could be: using rbenv install a ruby version and use it for running the rails server - (so basically there will not be any IRuby installed), so this error should not come.

mb52089 commented 4 years ago

ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-darwin19]

Rails 6.0.2.1

On Sat, Mar 21, 2020 at 11:33 AM Shekhar Prasad Rajak < notifications@github.com> wrote:

@mb52089 https://github.com/mb52089 , please let me know which ruby and ROR version you are using. I am looking into it.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SciRuby/daru-view/issues/155#issuecomment-602061115, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANV5YWREXUH27WXFLI3623RITM5VANCNFSM4LHNF4EA .

-- Michael Burke 404.271.8652 LinkedIn https://www.linkedin.com/in/michael-burke-6418681/

Shekharrajak commented 4 years ago

Hi @mb52089 , did you try https://github.com/Shekharrajak/demo_daru-view rails example ?

mb52089 commented 4 years ago

It doesn't appear that the example you reference has the iruby-rails gem installed. The conflict I'm experiencing requires both iruby-rails and daru-view gems to be installed. If I remove either one, the issue disappears. But if both are present, I can't load a rails server or console.

Also, it's a rails 5 example on an older version of ruby.

On Mon, Mar 23, 2020 at 12:40 PM Shekhar Prasad Rajak < notifications@github.com> wrote:

Hi @mb52089 https://github.com/mb52089 , did you try https://github.com/Shekharrajak/demo_daru-view rails example ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SciRuby/daru-view/issues/155#issuecomment-602717538, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANV5YXMLDGZUEBIWYUCDXLRI6GIPANCNFSM4LHNF4EA .

-- Michael Burke 404.271.8652 LinkedIn https://www.linkedin.com/in/michael-burke-6418681/

Shekharrajak commented 4 years ago

Okay! Understool. I am not sure your usecase. But why do we need IRuby gem to be installed when we are using rails server ?

Let me try it in newer rails version.

mb52089 commented 4 years ago

I may not be using the Jupiter notebook in the correct configuration, but currently it is being used for feature selection and what-if analysis as part of a rails project. So I typically have a rails server and sidekiq server running along with a Jupiter notebook. I do data cleaning and feature selection for the prediction algorithm in the Jupyter notebook, and of course the actual app requires the rails server and sidekiq.

On Sat, Apr 4, 2020 at 4:57 AM Shekhar Prasad Rajak < notifications@github.com> wrote:

Okay! Understool. I am not sure your usecase. But why do we need IRuby gem to be installed when we are using rails server ?

Let me try it in newer rails version.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SciRuby/daru-view/issues/155#issuecomment-608998538, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANV5YRPZYRVJQRYKC7P743RK3Y7RANCNFSM4LHNF4EA .

-- Michael Burke 404.271.8652 LinkedIn https://www.linkedin.com/in/michael-burke-6418681/