You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey,
looks like :install_kernels task (lib/jupyter_on_rails/railtie/jupyter.rake) has some default that is not the same on my installation.
$ rails jupyter:notebook
/home/domen/.rbenv/versions/3.2.4/lib/ruby/gems/3.2.0/gems/io-event-1.4.0/lib/io/event/support.rb:27: warning: IO::Buffer is experimental and both the Ruby and C interface may change in the future!
JUPYTER_DATA_DIR=<path to proj>/.ipython bundle exec iruby register --force
EXECUTE: jupyter kernelspec install --name=ruby3 --user /tmp/iruby_kernel20240821-126386-gxplqt/ruby3
[InstallKernelSpec] Removing existing kernelspec in <path to proj>/.ipython/kernels/ruby3
[InstallKernelSpec] Installed kernelspec ruby3 in <path to proj>/.ipython/kernels/ruby3
rm -rf <path to proj>/.ipython/kernels/rails
cp -r <path to proj>/.ipython/kernels/ruby <path to proj>/.ipython/kernels/rails
cp: cannot stat '<path to proj>/.ipython/kernels/ruby': No such file or directory
bin/rails aborted!
Command failed with status (1): [cp -r <path to proj>/.ipython/kernels/ruby <path to proj>/.ipython/kernels/rails]
Tasks: TOP => jupyter:notebook => jupyter:install_kernels
(See full trace by running task with --trace)
To make this gem work with my installation and Rails, I needed to change line 54 to use ruby3, not ruby: sh "cp -r #{Shellwords.shellescape(ipython_dir.to_s)}/kernels/ruby #{Shellwords.shellescape(ipython_dir.to_s)}/kernels/#{cfg.kernel_name}"
to: sh "cp -r #{Shellwords.shellescape(ipython_dir.to_s)}/kernels/ruby3 #{Shellwords.shellescape(ipython_dir.to_s)}/kernels/#{cfg.kernel_name}"
Hey,
looks like
:install_kernels
task (lib/jupyter_on_rails/railtie/jupyter.rake) has some default that is not the same on my installation.To make this gem work with my installation and Rails, I needed to change line 54 to use
ruby3
, notruby
:sh "cp -r #{Shellwords.shellescape(ipython_dir.to_s)}/kernels/ruby #{Shellwords.shellescape(ipython_dir.to_s)}/kernels/#{cfg.kernel_name}"
to:
sh "cp -r #{Shellwords.shellescape(ipython_dir.to_s)}/kernels/ruby3 #{Shellwords.shellescape(ipython_dir.to_s)}/kernels/#{cfg.kernel_name}"
Info:
Let me know if there is anything missing. Thanks!
The text was updated successfully, but these errors were encountered: