Skip to content

error installing 0.4.0 on Windows #263

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
MatthewSteen opened this issue Dec 8, 2019 · 9 comments
Closed

error installing 0.4.0 on Windows #263

MatthewSteen opened this issue Dec 8, 2019 · 9 comments

Comments

@MatthewSteen
Copy link

MatthewSteen commented Dec 8, 2019

I'm getting the following error trying to update from 0.3 to 0.4.0 using Ruby 2.2.4 and Windows 10.

$ iruby register --force
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/iruby-0.4.0/lib/iruby/jupyter.rb:35:in `windows_user_appdata': uninitialized constant Module::Fiddle (NameError)
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/iruby-0.4.0/lib/iruby/jupyter.rb:9:in `default_data_dir'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/iruby-0.4.0/lib/iruby/jupyter.rb:26:in `kernelspec_dir'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/iruby-0.4.0/lib/iruby/command.rb:76:in `resolve_kernelspec_dir'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/iruby-0.4.0/lib/iruby/command.rb:12:in `initialize'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/iruby-0.4.0/bin/iruby:5:in `new'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/iruby-0.4.0/bin/iruby:5:in `<top (required)>'
        from C:/Ruby22-x64/bin/iruby:23:in `load'
        from C:/Ruby22-x64/bin/iruby:23:in `<main>'
@kojix2
Copy link
Member

kojix2 commented Dec 8, 2019

Hi @MatthewSteen
Thank you for your report.

This error appears to be caused by not loading the Fiddle module.
I added require 'fiddle/import' .
If you don't mind, please install it from master and see if the error continues.

gem install specific_install
gem specific_install https://github.com/SciRuby/iruby
iruby register --force

@MatthewSteen
Copy link
Author

MatthewSteen commented Dec 9, 2019

Thanks @kojix2. I have to use Ruby 2.2.4 so it looks like I can't test.

Also, that minor 😉 piece of info looks like it's missing from the install instructions, namely the minimum Ruby version requirement.

$ gem specific_install https://github.com/SciRuby/iruby
/mingw64/bin/git
Cloning into 'C:/Users/matt/AppData/Local/Temp/d20191208-26560-m6ndwb'...
remote: Enumerating objects: 49, done.
remote: Counting objects: 100% (49/49), done.
remote: Compressing objects: 100% (40/40), done.
remote: Total 2944 (delta 21), reused 22 (delta 9), pack-reused 2895
Receiving objects: 100% (2944/2944), 1.32 MiB | 2.34 MiB/s, done.
Resolving deltas: 100% (1499/1499), done.
WARNING:  open-ended dependency on ffi-rzmq (>= 0) is not recommended
  if ffi-rzmq is semantically versioned, use:
    add_runtime_dependency 'ffi-rzmq', '~> 0'
WARNING:  open-ended dependency on minitest (>= 0, development) is not recommended
  if minitest is semantically versioned, use:
    add_development_dependency 'minitest', '~> 0'
WARNING:  open-ended dependency on pycall (>= 1.2.1, development) is not recommended
  if pycall is semantically versioned, use:
    add_development_dependency 'pycall', '~> 1.2', '>= 1.2.1'
WARNING:  open-ended dependency on rake (>= 0, development) is not recommended
  if rake is semantically versioned, use:
    add_development_dependency 'rake', '~> 0'
WARNING:  See http://guides.rubygems.org/specification-reference/ for help
ERROR:  While executing gem ... (Gem::RuntimeRequirementNotMetError)
    iruby requires Ruby version >= 2.3.0. The current ruby version is 2.2.0.
http installing from https://github.com/SciRuby/iruby
  Successfully built RubyGem
  Name: iruby
  Version: 0.4.0
  File: iruby-0.4.0.gem

@kojix2
Copy link
Member

kojix2 commented Dec 9, 2019

Thanks.
Ruby 2.2 was recently removed from support, because we don't test iruby on version 2.2.
eb8dc27
But it might work without problem.

git clone https://github.com/SciRuby/iruby
git checkout  b4bdd7e4ab6fa0f130b427ba9c10123e35a3b774
rake install
iruby register --force

Also If you don't mind, could you tell me the reason why you have to use ruby 2.2?

@MatthewSteen
Copy link
Author

@kojix2 I checked out/installed b4bdd7e and added the require 'fiddle/import' to jupyter.rb.

Seems to be working, although I don't know how to check that Jupyter Lab is running 0.4.0 instead of 0.3.0.

I do whole-building energy simulation for work and regularly use the https://github.com/NREL/OpenStudio Ruby API, which is currently using 2.2.4.

@kojix2
Copy link
Member

kojix2 commented Dec 11, 2019

Thanks @MatthewSteen MatthewSteen.
I didn't know IRuby was used in such a great project. I think the actual use case is important. I'm going to add version 2.2 again. If you need to upgrade your OpenStudio project Ruby version, please let me know.

image

@mrkn
Copy link
Contributor

mrkn commented Dec 11, 2019

@MatthewSteen Ruby 2.2 died about two years ago, and Ruby 2.7 will come this month. We must keep IRuby go forward as Ruby evolves.
Could you please consider forking IRuby to support Ruby 2.2 by yourself?

@MatthewSteen
Copy link
Author

@kojix2 to be clear, IRuby is not used in OpenStudio. It has a Ruby API that I use regularly through IRuby. There may be a few other OpenStudio users that also use IRuby for their workflows, but probably not enough to support Ruby 2.2.4.

@mrkn thanks for the suggestion. I will probably just use IRuby 0.3.0 until OpenStudio updates to a newer version of Ruby, which is hopefully next year.

@kojix2
Copy link
Member

kojix2 commented Dec 11, 2019

Thanks @mrkn, @MatthewSteen

I was impressed to see the IRuby use case. I don't see many people using IRuby besides me. But the principle is important. My commt was careless this time 🤦.

@MatthewSteen
Copy link
Author

@kojix2 so far I'm really just using it for the syntax highlighting and passing of objects between cells that IPython's %%script ruby cell magic doesn't have. At some point I'd like to try some of the other SciRuby libraries. Anyway, thanks for the fix here. Please close when appropriate.

kojix2 added a commit that referenced this issue Dec 12, 2019
Revert "support_ruby_2.2_again" #263
@kojix2 kojix2 closed this as completed Dec 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants