sciruby / iruby Goto Github PK
View Code? Open in Web Editor NEWOfficial gem repository: Ruby kernel for Jupyter/IPython Notebook
Home Page: https://github.com/SciRuby/iruby
License: MIT License
Official gem repository: Ruby kernel for Jupyter/IPython Notebook
Home Page: https://github.com/SciRuby/iruby
License: MIT License
I use Ruby 2.2.2 installed via rbenv on Ubuntu 15.04.
IRuby installed without problems, but when I tried to run iruby notebook
it couldn't load any gems, giving error messages like:
LoadError: cannot load such file -- some_gem_i_have_installed
/usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
...
After spending an hour, trying to make it work, I ended up switching to system Ruby via rbenv shell system
, and installing all my gems into system Ruby. After that everything worked fine.
Is there a way to make iruby work with rbenv Ruby without reinstalling all the gems into system Ruby?
I was able to install fine on ubuntu but would love to be able to install and use this on my main development mac.
Building native extensions. This could take a while... ERROR: Error installing iruby: ERROR: Failed to build gem native extension.
It would be good for folks to know that this is the "official" version by fully breaking it off from the originating repos, either by getting it transferred or by creating it as a wholly new repo. There might be a way to put a ticket in to GitHub to make this a source rather than a fork too. Not sure though.
I updated to IRuby 0.2.0 recently and noticed a bug in which tab completion removes the preceding lines in the cell when I'm in the last line, or doesn't work at all when there are lines after the one I'm on. Take a look at these examples:
puts 123
puts 'asdf'
puts IRuby::VERSION.a<TAB>
In this case, I can choose a method when I press , but if I select one, the other lines are removed and the only one left is the last one (e.g. puts IRuby::VERSION.abs
). If I press ESC and don't select a method, the cell is left as is.
puts 123
puts 'asdf'
puts IRuby::VERSION.a<TAB>
puts "fourth line"
In this case, when I press with the cursor in the third line, nothing happens.
Is there any other information you folks need? Or is this a known bug? I couldn't find anything about it in the issue tracker.
Exactly as the title says. The automatic indentation is 4 spaces, but the default for Ruby is 2.
According to this stackoverflow answer, it should be quite simple to modify.
Currently there are only a few tests. This is unacceptable if we want to achieve higher user adoption.
WARNING:root:kernel 4f8155bd-ecff-4216-b34c-f4dd56bc4a8b restarted
Ignoring ffi-1.9.10 because its extensions are not built. Try: gem pristine ffi --version 1.9.10
Ignoring bond-0.5.1 because its extensions are not built. Try: gem pristine bond --version 0.5.1
ruby(5306,0x7fff7bf1b000) malloc: *** error for object 0x7f87a2cc8938: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
Currently seeing this error when launching notebook using Python3
gems/iruby-0.2.5/lib/iruby/command.rb:73:in `require': cannot load such file -- iruby (LoadError)
Reproduce:
In a shell type: iruby ->
(I'm getting warnings at that point already:
/usr/local/lib/python2.7/dist-packages/IPython/kernel/manager.py:95: UserWarning: Setting kernel_cmd is deprecated, use kernel_spec to start different kernels.
warnings.warn("Setting kernel_cmd is deprecated, use kernel_spec to "
/home/eyal/.rvm/gems/ruby-2.2.0/gems/iruby-0.1.13/lib/iruby/kernel.rb:175: warning: duplicated key at line 176 ignored: :type_class
) ->
After entering the iruby console, before entering any other command, click ^C ->
after doing so I receive the following error:
Kernel died:
/home/eyal/.rvm/gems/ruby-2.2.0/gems/ffi-rzmq-2.0.4/lib/ffi-rzmq/util.rb:38:in `zmq_errno'
/home/eyal/.rvm/gems/ruby-2.2.0/gems/ffi-rzmq-2.0.4/lib/ffi-rzmq/util.rb:38:in `errno'
/home/eyal/.rvm/gems/ruby-2.2.0/gems/ffi-rzmq-2.0.4/lib/ffi-rzmq/util.rb:93:in `raise_error'
/home/eyal/.rvm/gems/ruby-2.2.0/gems/ffi-rzmq-2.0.4/lib/ffi-rzmq/util.rb:73:in `error_check'
/home/eyal/.rvm/gems/ruby-2.2.0/gems/iruby-0.1.13/lib/iruby/session.rb:38:in `recv'
/home/eyal/.rvm/gems/ruby-2.2.0/gems/iruby-0.1.13/lib/iruby/kernel.rb:59:in `run'
/home/eyal/.rvm/gems/ruby-2.2.0/gems/iruby-0.1.13/lib/iruby/command.rb:30:in `run_kernel'
/home/eyal/.rvm/gems/ruby-2.2.0/gems/iruby-0.1.13/lib/iruby/command.rb:16:in `run'
/home/eyal/.rvm/gems/ruby-2.2.0/gems/iruby-0.1.13/bin/iruby:6:in `<top (required)>'
/home/eyal/.rvm/gems/ruby-2.2.0/bin/iruby:23:in `load'
/home/eyal/.rvm/gems/ruby-2.2.0/bin/iruby:23:in `<main>'
/home/eyal/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `eval'
/home/eyal/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `<main>'
KeyboardInterrupt
If pry detects an incomplete chunk of code, like this
def foo
it will wait until the input is complete to continue. I'm sure most IRuby users have bumped into this at some point and just reset the kernel. The problem is that there is no way to tell @pry.eval
in backend.rb
that there is no more input on its way.
There is a hint that things went south: If after running @pry.eval
, there is still code in @pry.eval_string
, then pry is waiting. Ideally, we should throw a syntax error and run @pry.reset_eval_string
.
I would have submitted a PR, but I honestly wasn't sure if I should just reset the eval_string or if there were other things that needed to be cleaned up too. Either way, this shouldn't be terribly difficult to fix.
After I did a bundle install
from the Gemfile I get the following error message every time I start Pry/Iruby console:
require 'pry-syntax-hacks' # Failed, saying: undefined method `retrieve_line' for class `Pry'
$ pry --version
Pry version 0.10.1 on Ruby 2.2.0
Does it work for anybody else?
There is an 2 years old open issue for this at ConradIrwin/pry-syntax-hacks#2 but the gem is not maintained anymore for almost 3 years, falling behind the very active development of the main pry gem. Since it not working anymore, unmaintained and even has hacks in its name, I suggest we remove it from the Gemfile.
Does this have any negative effects on the pry backend for IRuby I overlooked?
Show how each of the following gems can be used with iruby:
There can be examples that use daru/nmatrix for storing data, statsample for analysis and nyaplot to plot it.
I get this really weird issue with iRuby when I just add the nyaplot gem on osx - see domitry/nyaplot#55 for more details, but just wondering if anyone understands the iruby portion of the error message:
iruby-0.2.7/lib/iruby/utils.rb:8:in `display': undefined method `session' for nil:NilClass (NoMethodError)
See kernel.json and kernel.css
I could not install iRuby gem. The problem seems to be occurring during in the installation of the rbczmq 1.7 dependency.
Here is the gem make.out message logged on the C:\Ruby22-x64\lib\ruby\gems\2.2.0\extensions\x64-mingw32\2.2.0\rbczmq-1.7.9.
The message content follows:
C:/Ruby22-x64/bin/ruby.exe -r ./siteconf20150720-6208-162dmho.rb extconf.rb
checking for windows.h... yes
checking for winsock.h... yes
checking for main() in -lkernel32... yes
checking for main() in -lrpcrt4... yes
checking for main() in -lgdi32... yes
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/Ruby22-x64/bin/$(RUBY_BASE_NAME)
--with-kernel32lib
--without-kernel32lib
--with-rpcrt4lib
--without-rpcrt4lib
--with-gdi32lib
--without-gdi32lib
extconf.rb:49:in `
extconf failed, exit code 1
This change is necessary since IPython3 introduces protocol changes and is optimized for other language kernels. With IPython4, the language agnostic part will go to the project http://jupyter.org/
See original issues:
We need documentation which explains the following:
See original documentation issue https://github.com/minad/iruby/issues/31
I followed the Windows installation instructions on the master branch README and gem install iruby -v 0.1.13
for Python27. However, I got the following:
$ iruby notebook
'
[ProfileCreate] Generating default config file: u'C:\Users\Matt.config\iruby\profile_d efault\ipython_config.py'
[ProfileCreate] Generating default config file: u'C:\Users\Matt.config\iruby\profile_d efault\ipython_kernel_config.py'
[ProfileCreate] Generating default config file: u'C:\Users\Matt.config\iruby\profile_d efault\ipython_console_config.py'
[ProfileCreate] Generating default config file: u'C:\Users\Matt.config\iruby\profile_d efault\ipython_qtconsole_config.py'
[ProfileCreate] Generating default config file: u'C:\Users\Matt.config\iruby\profile_d efault\ipython_notebook_config.py'
[ProfileCreate] Generating default config file: u'C:\Users\Matt.config\iruby\profile_d efault\ipython_nbconvert_config.py'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/iruby-0.1.13/lib/iruby/command.rb:89:inreadlink': readlink() function is unimplemented on this machine (NotImplementedError) from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/iruby-0.1.13/lib/iruby/command.rb:89:in
create_profile'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/iruby-0.1.13/lib/iruby/command.rb:62:inrun_ipython' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/iruby-0.1.13/lib/iruby/command.rb:18:in
run'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/iruby-0.1.13/bin/iruby:6:in<top (requ ired)>' from C:/Ruby200-x64/bin/iruby:23:in
load'
from C:/Ruby200-x64/bin/iruby:23:in `
Creating profile directory C:/Users/Matt/.config/iruby/profile_default
Hi,
Would be awesome to use this within the context that rails c
sets up. Is this possible?
Thanks!
The use case is the following: I have a long data massaging loop like
entries.each do
begin
... a lot of stuff that can go wrong
rescue => e
binding.pry
end
if an error occur, I end up inside a pry
session and I can properly inspect the data, error and eventually re-run the computation.
If I do this from within a notebook though the new pry
session is launched in the underlying terminal, somewhat conflicting with the notebook logs.
It would be awesome to have the ability to launch a sub-repl from the notebook and interact with it.
Would this be possible, or it maybe already is, or does what I'm saying not even make sense?
Anyway, thanks for your work on iRuby, it's awesome.
Currently only the notebook is working well since this was the focus. However we should also get the console working well:
A possible solution to having a Gemfile in the directory where the iruby command is run would be create a temporary file called Gemfile
and add all the gems yielded by gem list
to that file, in the format required by Gemfiles.
Once the notebook is terminated, we can delete the Gemfile as a cleanup operation.
This can be done only if a Gemfile is not present in the directory, in which case the default Gemfile will be used.
The cell[8] works fine on the command line, but on iruby notebook fails like this.
https://gist.github.com/kozo2/cfc5b7606cbfa7e8b5f4
Please refer to the following issue
SciRuby/sciruby-notebooks#6
They suggest using methodmissing/rbczmq. But I don't see much difference between them.
Original issue: https://github.com/minad/iruby/issues/28
I didn't observe this one, but we should check this again.
This part of the protocol is not yet implemented.
I found puts
doesn't work with multiple arguments.
with pry
~ ❯❯❯ ruby --version
ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-darwin14]
~ ❯❯❯ pry
[1] pry(main)> puts "A", "B"
A
B
=> nil
with iruby
~ ❯❯❯ iruby --version
2.1.0
~ ❯❯❯ iruby
/Users/mic/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/iruby-0.1.13/lib/iruby/kernel.rb:175: warning: duplicated key at line 176 ignored: :type_class
In [1]: puts "A", "B"
ArgumentError: wrong number of arguments (2 for 1)
/Users/mic/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/iruby-0.1.13/lib/iruby/ostream.rb:36:in `puts'
(pry):1:in `puts'
(pry):1:in `<main>'
/Users/mic/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/pry-0.10.1/lib/pry/pry_instance.rb:355:in `eval'
/Users/mic/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/pry-0.10.1/lib/pry/pry_instance.rb:355:in `evaluate_ruby'
/Users/mic/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/pry-0.10.1/lib/pry/pry_instance.rb:323:in `handle_line'
/Users/mic/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/pry-0.10.1/lib/pry/pry_instance.rb:243:in `block (2 levels) in eval'
/Users/mic/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/pry-0.10.1/lib/pry/pry_instance.rb:242:in `catch'
/Users/mic/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/pry-0.10.1/lib/pry/pry_instance.rb:242:in `block in eval'
/Users/mic/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/pry-0.10.1/lib/pry/pry_instance.rb:241:in `catch'
/Users/mic/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/pry-0.10.1/lib/pry/pry_instance.rb:241:in `eval'
/Users/mic/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/iruby-0.1.13/lib/iruby/backend.rb:28:in `eval'
/Users/mic/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/iruby-0.1.13/lib/iruby/kernel.rb:110:in `execute_request'
/Users/mic/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/iruby-0.1.13/lib/iruby/kernel.rb:62:in `run'
/Users/mic/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/iruby-0.1.13/lib/iruby/command.rb:30:in `run_kernel'
/Users/mic/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/iruby-0.1.13/lib/iruby/command.rb:16:in `run'
/Users/mic/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/iruby-0.1.13/bin/iruby:6:in `<top (required)>'
/Users/mic/.rbenv/versions/2.2.2/bin/iruby:23:in `load'
/Users/mic/.rbenv/versions/2.2.2/bin/iruby:23:in `<main>'
It works at times, but sometimes the kernel suddenly dies with this backtrace:
[2015-06-03T00:28:50.445538 #7036] FATAL -- : Kernel died: cannot load such file -- iruby
/home/sameer/.rvm/gems/ruby-2.2.1/gems/iruby-0.2.4/lib/iruby/command.rb:73:in `require'
/home/sameer/.rvm/gems/ruby-2.2.1/gems/iruby-0.2.4/lib/iruby/command.rb:73:in `run_kernel'
/home/sameer/.rvm/gems/ruby-2.2.1/gems/iruby-0.2.4/lib/iruby/command.rb:33:in `run'
/home/sameer/.rvm/gems/ruby-2.2.1/gems/iruby-0.2.4/bin/iruby:5:in `<top (required)>'
/home/sameer/.rvm/gems/ruby-2.2.1/bin/iruby:23:in `load'
/home/sameer/.rvm/gems/ruby-2.2.1/bin/iruby:23:in `<main>'
/home/sameer/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `eval'
/home/sameer/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `<main>'
/home/sameer/.rvm/gems/ruby-2.2.1/gems/iruby-0.2.4/lib/iruby/command.rb:73:in `require': cannot load such file -- iruby (LoadError)
from /home/sameer/.rvm/gems/ruby-2.2.1/gems/iruby-0.2.4/lib/iruby/command.rb:73:in `run_kernel'
from /home/sameer/.rvm/gems/ruby-2.2.1/gems/iruby-0.2.4/lib/iruby/command.rb:33:in `run'
from /home/sameer/.rvm/gems/ruby-2.2.1/gems/iruby-0.2.4/bin/iruby:5:in `<top (required)>'
from /home/sameer/.rvm/gems/ruby-2.2.1/bin/iruby:23:in `load'
from /home/sameer/.rvm/gems/ruby-2.2.1/bin/iruby:23:in `<main>'
from /home/sameer/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `eval'
from /home/sameer/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `<main>'
Hi @domitry,
could you port your https://github.com/minad/iruby/pull/30 patches to the new version? Unfortunately I cannot test on windows.
I've got a case of this:
❯ jupyter qtconsole --kernel=ruby
W, [2015-12-16T18:04:53.245480 #44379] WARN -- : Could not load bundler: Could not locate Gemfile or .bundle/ directory
/usr/local/var/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler.rb:198:in `rescue in root'
/usr/local/var/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler.rb:194:in `root'
/usr/local/var/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler.rb:101:in `bundle_path'
/usr/local/var/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler.rb:435:in `configure_gem_home'
/usr/local/var/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler.rb:427:in `configure_gem_home_and_path'
/usr/local/var/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler.rb:92:in `configure'
/usr/local/var/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler.rb:153:in `definition'
/usr/local/var/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/iruby-0.2.8/lib/iruby/command.rb:109:in `check_bundler'
/usr/local/var/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/iruby-0.2.8/lib/iruby/command.rb:67:in `run_kernel'
/usr/local/var/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/iruby-0.2.8/lib/iruby/command.rb:34:in `run'
/usr/local/var/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/iruby-0.2.8/bin/iruby:5:in `<top (required)>'
/usr/local/var/rbenv/versions/2.2.0/bin/iruby:23:in `load'
/usr/local/var/rbenv/versions/2.2.0/bin/iruby:23:in `<main>'
ruby(44379,0x7fff7882d300) malloc: *** error for object 0x7f8b2e2b2528: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
[JupyterQtConsoleApp] KernelRestarter: restarting kernel (1/5)
[JupyterQtConsoleApp] WARNING | kernel restarted
W, [2015-12-16T18:04:55.928800 #44385] WARN -- : Could not load bundler: Could not locate Gemfile or .bundle/ directory
/usr/local/var/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler.rb:198:in `rescue in root'
/usr/local/var/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler.rb:194:in `root'
/usr/local/var/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler.rb:101:in `bundle_path'
/usr/local/var/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler.rb:435:in `configure_gem_home'
/usr/local/var/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler.rb:427:in `configure_gem_home_and_path'
/usr/local/var/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler.rb:92:in `configure'
/usr/local/var/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler.rb:153:in `definition'
/usr/local/var/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/iruby-0.2.8/lib/iruby/command.rb:109:in `check_bundler'
/usr/local/var/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/iruby-0.2.8/lib/iruby/command.rb:67:in `run_kernel'
/usr/local/var/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/iruby-0.2.8/lib/iruby/command.rb:34:in `run'
/usr/local/var/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/iruby-0.2.8/bin/iruby:5:in `<top (required)>'
/usr/local/var/rbenv/versions/2.2.0/bin/iruby:23:in `load'
/usr/local/var/rbenv/versions/2.2.0/bin/iruby:23:in `<main>'
ruby(44385,0x7fff7882d300) malloc: *** error for object 0x7f8085d3c398: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
The error keeps respawning unless I Ctrl-C or close the qtconsole. And the similar:
❯ jupyter console --kernel=ruby
W, [2015-12-16T18:10:25.110421 #44674] WARN -- : Could not load bundler: Could not locate Gemfile or .bundle/ directory
/usr/local/var/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler.rb:198:in `rescue in root'
/usr/local/var/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler.rb:194:in `root'
/usr/local/var/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler.rb:101:in `bundle_path'
/usr/local/var/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler.rb:435:in `configure_gem_home'
/usr/local/var/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler.rb:427:in `configure_gem_home_and_path'
/usr/local/var/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler.rb:92:in `configure'
/usr/local/var/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler.rb:153:in `definition'
/usr/local/var/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/iruby-0.2.8/lib/iruby/command.rb:109:in `check_bundler'
/usr/local/var/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/iruby-0.2.8/lib/iruby/command.rb:67:in `run_kernel'
/usr/local/var/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/iruby-0.2.8/lib/iruby/command.rb:34:in `run'
/usr/local/var/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/iruby-0.2.8/bin/iruby:5:in `<top (required)>'
/usr/local/var/rbenv/versions/2.2.0/bin/iruby:23:in `load'
/usr/local/var/rbenv/versions/2.2.0/bin/iruby:23:in `<main>'
ruby(44674,0x7fff7882d300) malloc: *** error for object 0x7f904305a508: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
Jupyter Console 4.0.3
[ZMQTerminalIPythonApp] Loading IPython extension: storemagic
Which hangs until I force TERM the process.
Ruby version is:
ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin13]
I'm on OSX Yosemite 10.10.5, I installed jupyter in a pyenv something like
pyenv virtualenv 3.5 jupyter
pyenv activate jupyter
pip install jupyter
My kernels are:
ruby /Users/<user>/.ipython/kernels/ruby
python3 /usr/local/var/pyenv/versions/jupyter/lib/python3.5/site-packages/ipykernel/resources
ir /usr/local/share/jupyter/kernels/ir
and they seem to work except the ruby one.
Hi,
This isn't an issue but rather a question. I see that for the current iteration, the min required version for ruby is 2.1.0.
I need to use ruby 2.0.0 because I'm using it to access one (and actually only one) API that works only on 2.0.0.
Can I use IRuby with ruby 2.0.0? How?
Thanks !
Hi, I'm trying to install iRuby for the first time. I'm using OS X El Capitan. I've installed Jupyter/iPython and it's working fine. When I try to install iruby using gem install iruby
, I get the following error
Building native extensions. This could take a while...
ERROR: Error installing iruby:
ERROR: Failed to build gem native extension.
/usr/local/var/rbenv/versions/2.2.2/bin/ruby -r ./siteconf20151109-82110-ok5sa9.rb extconf.rb
"./autogen.sh"
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal -I config --force -I config
autoreconf: configure.ac: tracing
autoreconf: configure.ac: subdirectory foreign/openpgm/build-staging/openpgm/pgm/ not present
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/local/Cellar/autoconf/2.69/bin/autoconf --include=config --force
configure.ac:57: error: possibly undefined macro: AC_LIBTOOL_WIN32_DLL
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:58: error: possibly undefined macro: AC_PROG_LIBTOOL
configure:5346: error: possibly undefined macro: AC_DISABLE_STATIC
configure:5350: error: possibly undefined macro: AC_ENABLE_STATIC
autoreconf: /usr/local/Cellar/autoconf/2.69/bin/autoconf failed with exit status: 1
autogen.sh: error: autoreconf exited with status 0
ZeroMQ autogen failed!
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/var/rbenv/versions/2.2.2/bin/$(RUBY_BASE_NAME)
--with-system-libs
--without-system-libs
extconf failed, exit code 1
Gem files will remain installed in /usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rbczmq-1.7.9 for inspection.
Results logged to /usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-14/2.2.0-static/rbczmq-1.7.9/gem_make.out
I tried installing iruby using RVM into my global gemset. Now, I'm getting the following error:
$ iruby
Could not load bundler: Could not locate Gemfile or .bundle/ directory
W, [2015-08-06T05:22:30.899010 #26154] WARN -- : Could not load bundler: Could not locate Gemfile or .bundle/ directory
/Users/yosriady/.rvm/gems/ruby-2.2.0@global/gems/bundler-1.8.4/lib/bundler.rb:198:in `rescue in root'
/Users/yosriady/.rvm/gems/ruby-2.2.0@global/gems/bundler-1.8.4/lib/bundler.rb:194:in `root'
/Users/yosriady/.rvm/gems/ruby-2.2.0@global/gems/bundler-1.8.4/lib/bundler.rb:101:in `bundle_path'
/Users/yosriady/.rvm/gems/ruby-2.2.0@global/gems/bundler-1.8.4/lib/bundler.rb:420:in `configure_gem_home_and_path'
/Users/yosriady/.rvm/gems/ruby-2.2.0@global/gems/bundler-1.8.4/lib/bundler.rb:92:in `configure'
/Users/yosriady/.rvm/gems/ruby-2.2.0@global/gems/bundler-1.8.4/lib/bundler.rb:153:in `definition'
/Users/yosriady/.rvm/gems/ruby-2.2.0@global/gems/iruby-0.2.7/lib/iruby/command.rb:109:in `check_bundler'
/Users/yosriady/.rvm/gems/ruby-2.2.0@global/gems/iruby-0.2.7/lib/iruby/command.rb:67:in `run_kernel'
/Users/yosriady/.rvm/gems/ruby-2.2.0@global/gems/iruby-0.2.7/lib/iruby/command.rb:34:in `run'
/Users/yosriady/.rvm/gems/ruby-2.2.0@global/gems/iruby-0.2.7/bin/iruby:5:in `<top (required)>'
/Users/yosriady/.rvm/rubies/ruby-2.2.0/bin/iruby:23:in `load'
/Users/yosriady/.rvm/rubies/ruby-2.2.0/bin/iruby:23:in `<main>'
/Users/yosriady/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `eval'
/Users/yosriady/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `<main>'
Any ideas? I also tried requiring gnuplot
in my Ruby notebooks, and it fails.
LoadError: cannot load such file -- gnuplot
This is the same as IRkernel/IRkernel#139, but for this kernel.
The messaging spec says:
To disable authentication and signature checking, set the key field of a connection file to an empty string.
Even with the key set to the empty string, IRuby throws an error when it gets messages that have empty signature fields, which means that it does not currently work with Hydrogen (nteract/hydrogen#49)
IRuby should use a ruby Logger
to log rather than directly output to stderr.
My question is, is it necessary to use a multi-logger? The scenarios I can imagine are
There was a Kernel error on
I uploaded the log to
I updated Ruby version, and manage ruby envrionment with rbenv
.
Current iruby gem is installed under Ruby version 2.3.0-dev
.
But jupyter kernels list does not update. I tried command iruby register --force
. It does not register a new version ruby kernel. (I check out new kernel in jupyter notebook button New
.)
Then I try to find out why. I checked out ~/.ipython/kernels/ruby/kernel.json
. It is version 2.3.0
.
{"argv":["/home/stardiviner/.gem/ruby/2.3.0/bin/iruby","kernel","{connection_file}"],
"display_name":"Ruby 2.3.0","language":"ruby"}
There is no other kenel configs under ~/.ipython/kernels/
.
I don't know why jupyter notebook can't find new version ruby kernel.
Hi, I've found this very interesting (FileLink)[http://nbviewer.jupyter.org/github/ipython/ipython/blob/1.x/examples/notebooks/Part%205%20-%20Rich%20Display%20System.ipynb#Links-to-local-files] function in Jupyter / Python for making local files downloadable via HTTP.
Is it possible to do something similar in iruby?
thanks!
Will it possible to define some sort of a constant or something similar that will let a ruby script query if it is running in the iruby browser environment?
This will allow optionally running code that will fancifully print stuff in iruby format (HTML) only when it is running in the iruby browser environment, and something else when running in the console (irb, pry,etc.).
To demonstrate:
if RUNNING_IN_IRUBY_BROWSER
print "<h1>This is in iruby<h1>"
else
print "This is in console"
end
Timeout waiting for kernel_info reply from ...
Somethings wrong with 0mq at startup.
There is still one failure happening. Should be rooted out.
Try this at at try.jupyter.org:
Note that unlike other Download formats in the pulldown menu, "Ruby (rb)" does not have a dot before the extension in parens.
Workaround is to download as Python and rename the .py file to .rb. Bug reproduced using rvm with Ruby 2.2 and iruby gem on OS X 10.10.3 laptop.
Hi! I know this would be better on the actual jupyter repo but wanted to ping you here since this is more active for Rubyists. try.jupyter.org already has a Ruby kernel built in so all that the repo needs is a ruby notebook with a quick few cells of welcome content.
here's their repo: https://github.com/jupyter/docker-demo-images
I could do it but am a ruby novice. Better someone who can showcase why it would be nice to have ruby on a notebook, right?
Hi!
We've upgraded from ipython to jupyter and everthing seems to be working fine.
The only missing part, is that I'm not too sure how to pass this parameters to the kernel.
We used to do this using KernelManager.kernel_cmd
but it's deprecated in Jupyter.
Specificaly, I'm wondering how to pass the boot_file
path to iruby.
thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.