Yuki-Inoue / jupyter_on_rails

Integrate Rails and Jupyter
MIT License
83 stars 11 forks source link

daru-view supports #50

Closed travisliu closed 2 years ago

travisliu commented 2 years ago

thanks for building this gem. it's really useful. can it have daru-view gem built-in or supports? I have tried to install it by myself. but I got an error as follows. Does anyone has any idea?

[I 2022-05-15 14:19:17.835 LabApp] Build is up to date
[I 2022-05-15 14:19:17.950 ServerApp] Kernel started: c707027a-eb81-421d-8f9f-2b1ea653b34d
W, [2022-05-15T14:19:18.498594 #684]  WARN -- : parent process poller thread started.
F, [2022-05-15T14:19:18.557595 #684] FATAL -- : Kernel died: uninitialized constant JupyterOnRails::Kernel::ActiveRecord
/root/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/jupyter_on_rails-0.11.0/lib/jupyter_on_rails/kernel.rb:32:in `block (2 levels) in load_extensions'
/root/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/iruby-0.7.4/lib/iruby/display.rb:206:in `call'
/root/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/iruby-0.7.4/lib/iruby/display.rb:265:in `match?'
/root/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/iruby-0.7.4/lib/iruby/display.rb:134:in `block in render_by_registry'
/root/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/iruby-0.7.4/lib/iruby/display.rb:134:in `select'
/root/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/iruby-0.7.4/lib/iruby/display.rb:134:in `render_by_registry'
/root/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/iruby-0.7.4/lib/iruby/display.rb:50:in `display'
/root/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/iruby-0.7.4/lib/iruby/utils.rb:10:in `display'
/root/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/nyaplot-0.1.6/lib/nyaplot/core.rb:45:in `init_iruby'
/root/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/nyaplot-0.1.6/lib/nyaplot/core.rb:48:in `<module:Nyaplot>'
/root/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/nyaplot-0.1.6/lib/nyaplot/core.rb:3:in `<main>'
/root/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/nyaplot-0.1.6/lib/nyaplot.rb:4:in `require_relative'
/root/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/nyaplot-0.1.6/lib/nyaplot.rb:4:in `<main>'
/root/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/root/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/root/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/daru-0.3/lib/daru.rb:57:in `block in create_has_library'
/root/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/daru-0.3/lib/daru/dataframe.rb:13:in `<class:DataFrame>'
/root/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/daru-0.3/lib/daru/dataframe.rb:9:in `<module:Daru>'
/root/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/daru-0.3/lib/daru/dataframe.rb:8:in `<main>'
/root/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/root/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/root/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/daru-0.3/lib/daru.rb:106:in `<main>'
/root/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/root/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/root/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/jupyter_on_rails-0.11.0/lib/jupyter_on_rails/initializer.rb:8:in `run'
/root/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/jupyter_on_rails-0.11.0/lib/jupyter_on_rails/kernel.rb:27:in `block in load_extensions'
/root/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/iruby-0.7.4/lib/iruby/event_manager.rb:29:in `block in trigger'
/root/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/iruby-0.7.4/lib/iruby/event_manager.rb:28:in `each'
/root/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/iruby-0.7.4/lib/iruby/event_manager.rb:28:in `trigger'
/root/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/iruby-0.7.4/lib/iruby/kernel.rb:56:in `initialize'
/root/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/iruby-0.7.4/lib/iruby/command.rb:106:in `new'
/root/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/iruby-0.7.4/lib/iruby/command.rb:106:in `run_kernel'
/root/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/iruby-0.7.4/lib/iruby/command.rb:37:in `run'
/root/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/iruby-0.7.4/bin/iruby:5:in `<top (required)>'
/root/.rbenv/versions/2.7.2/bin/iruby:23:in `load'
/root/.rbenv/versions/2.7.2/bin/iruby:23:in `<main>'
Yuki-Inoue commented 2 years ago

Just released v0.12.0.

It changes order of initialization logic, so that IRuby is not called until Kernel starts.

Could you use that version to see whether it fixes this problem?

Yuki-Inoue commented 2 years ago

@travisliu

travisliu commented 2 years ago

sorry for late reply. it works now! thanks for your great work.