Skip to content
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

Add troubleshooting to docs for higher Ruby versions #504

Merged
merged 1 commit into from
May 6, 2019

Conversation

Sylfrena
Copy link
Contributor

@Sylfrena Sylfrena commented Mar 28, 2019

Add troubleshooting to CONTRIBUTING.md pertaining to build failure with Travis on using Ruby >= 2.5.0.

Copy link
Member

@Shekharrajak Shekharrajak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once you are done with changes, it will be merged soon.

Thanks!

CONTRIBUTING.md Outdated
@@ -52,3 +52,14 @@ guard
## Daru internals

To get an overview of certain internals of daru and their implementation, go over [this blog post](http://v0dro.github.io/blog/2015/08/16/elaboration-on-certain-internals-of-daru/).


## Troubleshooting
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think another section is not needed. You can make a Note around line- 24: https://github.com/SciRuby/daru/pull/504/files#diff-6a3371457528722a734f3c51d9238c13R24 , stating the packable issue for running bundle exec rspec for Ruby version >= 2.5 . Then you can mention To reproduce this issue or explore this error further, head over to [issue #503](https://github.com/SciRuby/daru/issues/503).

CONTRIBUTING.md Outdated

## Troubleshooting

Daru uses Travis CI for running and deploying the build. Since Travis is configured only for Ruby versions before Ruby-2.5.0, the test suite returns the following error when `bundle exec rspec` is run
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually you are misunderstanding the Travis CI. We are configuring the travis CI for automatic testing for Ruby versions 2.2, 2.3, 2.4 . Please read more about Travis CI/CD and github hooks, to understand it better.

@Sylfrena
Copy link
Contributor Author

@Shekharrajak I made the changes you have asked for. Please let me know if I have done it correctly.

@Sylfrena Sylfrena closed this Mar 29, 2019
@Sylfrena Sylfrena reopened this Mar 29, 2019
@Sylfrena
Copy link
Contributor Author

I accidentally clicked on close and comment . Sorry for clumsy fingers. Please review the changes.

CONTRIBUTING.md Outdated
@@ -22,12 +22,25 @@ And run the test suite (should be all green with pending tests):

If you have problems installing nmatrix, please consult the [nmatrix installation wiki](https://github.com/SciRuby/nmatrix/wiki/Installation) or the [mailing list](https://groups.google.com/forum/#!forum/sciruby-dev).

**NOTE**: We use Travis CI for automatic testing for Daru. Since we have
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Statement is wrong, please read about travis. daru is confirgured not travis.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can replace this paragraph with this --

daru is compatible with Ruby < 2.5, for later Ruby versions it may break - issue #500, #503

WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey! Terribly sorry for letting this go undone for so late, was caught up with exams. I did read up about Travis, but it is a lot of new terminologies so I think I got confused. I went ahead with what you have suggested, please take a look.

Copy link
Member

@Shekharrajak Shekharrajak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please have a look into my comments.

CONTRIBUTING.md Outdated
versions >= 2.5.

```
bundler: failed to load command: rspec (/home/.rbenv/versions/2.5.1/bin/rspec)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actual error is :

/gems/packable-1.3.10/lib/packable/extensions/io.rb:86:in `pos': Illegal seek @ rb_io_tell - <STDOUT> (Errno::ESPIPE)

Please verify it.

Copy link
Contributor Author

@Sylfrena Sylfrena Apr 5, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this was part of the error message too. Will make changes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see those lines.Here is trace for me :

 daru git:(master) bundle exec rspec
.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................*.....................................................................................................................................*............................................................*.......................................................................................................................................................................................................................................................................................................................................................*.........*....*...........................................*.................../home/sciruby/daru/vendor/bundle/ruby/2.5.0/gems/nmatrix-0.2.4/lib/nmatrix/monkeys.rb:49: warning: constant ::Fixnum is deprecated
................................................................................................................................*.........................F......................................**.................................................................................Rserve: no process found

R version 3.4.4 (2018-03-15) -- "Someone to Lean On"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

Rserv started in daemon mode.
/home/sciruby/daru/vendor/bundle/ruby/2.5.0/gems/rserve-client-0.3.5/lib/rserve/rexp/wrapper.rb:26: warning: constant ::Fixnum is deprecated
/home/sciruby/daru/vendor/bundle/ruby/2.5.0/gems/rserve-client-0.3.5/lib/rserve/rexp/wrapper.rb:56: warning: constant ::Fixnum is deprecated
./home/sciruby/daru/vendor/bundle/ruby/2.5.0/gems/rserve-client-0.3.5/lib/rserve/rexp/wrapper.rb:26: warning: constant ::Fixnum is deprecated
/home/sciruby/daru/vendor/bundle/ruby/2.5.0/gems/rserve-client-0.3.5/lib/rserve/rexp/wrapper.rb:56: warning: constant ::Fixnum is deprecated
...NOTE: Daru::Vector#only_valid is deprecated; use reject_values instead. It will be removed on or after 2016-10-01.
Daru::Vector#only_valid called from /usr/lib/ruby/2.5.0/delegate.rb:83.
...............................................................................................................................................................................................................................................*.............................................................................................................................*.........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................*.........*....................................................................................................................................................................................................................................*.........*........................................................................................................................................................................................................................................*.........*.........................................................................*................................................................................................................................

Traceback (most recent call last):
  9: from /home/sciruby/daru/vendor/bundle/ruby/2.5.0/gems/simplecov-0.16.1/lib/simplecov/defaults.rb:27:in `block in <top (required)>'
  8: from /home/sciruby/daru/vendor/bundle/ruby/2.5.0/gems/simplecov-0.16.1/lib/simplecov.rb:200:in `run_exit_tasks!'
  7: from /home/sciruby/daru/vendor/bundle/ruby/2.5.0/gems/simplecov-0.16.1/lib/simplecov/configuration.rb:182:in `block in at_exit'
  6: from /home/sciruby/daru/vendor/bundle/ruby/2.5.0/gems/simplecov-0.16.1/lib/simplecov/result.rb:48:in `format!'
  5: from /home/sciruby/daru/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/lib/simplecov-html.rb:25:in `format'
  4: from /home/sciruby/daru/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/lib/simplecov-html.rb:25:in `puts'
  3: from /home/sciruby/daru/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/lib/simplecov-html.rb:25:in `puts'
  2: from /home/sciruby/daru/vendor/bundle/ruby/2.5.0/gems/packable-1.3.10/lib/packable/extensions/io.rb:62:in `write_with_packing'
  1: from /home/sciruby/daru/vendor/bundle/ruby/2.5.0/gems/packable-1.3.10/lib/packable/extensions/io.rb:86:in `pack_and_write'
/home/sciruby/daru/vendor/bundle/ruby/2.5.0/gems/packable-1.3.10/lib/packable/extensions/io.rb:86:in `pos': Illegal seek @ rb_io_tell - <STDOUT> (Errno::ESPIPE)
Traceback (most recent call last):
  19: from /home/sciruby/daru/vendor/bundle/ruby/2.5.0/bin/rspec:23:in `<main>'
  18: from /home/sciruby/daru/vendor/bundle/ruby/2.5.0/bin/rspec:23:in `load'
  17: from /home/sciruby/daru/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/exe/rspec:4:in `<top (required)>'
  16: from /home/sciruby/daru/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/runner.rb:45:in `invoke'
  15: from /home/sciruby/daru/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/runner.rb:71:in `run'
  14: from /home/sciruby/daru/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/runner.rb:87:in `run'
  13: from /home/sciruby/daru/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/runner.rb:110:in `run_specs'
  12: from /home/sciruby/daru/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/reporter.rb:76:in `report'
  11: from /home/sciruby/daru/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/reporter.rb:166:in `finish'
  10: from /home/sciruby/daru/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/reporter.rb:186:in `close_after'
   9: from /home/sciruby/daru/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/reporter.rb:169:in `block in finish'
   8: from /home/sciruby/daru/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/reporter.rb:200:in `notify'
   7: from /home/sciruby/daru/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/reporter.rb:200:in `each'
   6: from /home/sciruby/daru/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/reporter.rb:201:in `block in notify'
   5: from /home/sciruby/daru/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/formatters/base_text_formatter.rb:49:in `dump_pending'
   4: from /home/sciruby/daru/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/output_wrapper.rb:24:in `block (2 levels) in <class:OutputWrapper>'
   3: from /home/sciruby/daru/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.8.0/lib/rspec/core/output_wrapper.rb:24:in `puts'
   2: from /home/sciruby/daru/vendor/bundle/ruby/2.5.0/gems/packable-1.3.10/lib/packable/extensions/io.rb:62:in `write_with_packing'
   1: from /home/sciruby/daru/vendor/bundle/ruby/2.5.0/gems/packable-1.3.10/lib/packable/extensions/io.rb:86:in `pack_and_write'
/home/sciruby/daru/vendor/bundle/ruby/2.5.0/gems/packable-1.3.10/lib/packable/extensions/io.rb:86:in `pos': Illegal seek @ rb_io_tell - <STDOUT> (Errno::ESPIPE)

Copy link
Contributor Author

@Sylfrena Sylfrena Apr 5, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Um, I got something slightly different:

......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................./home/sumera/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/nmatrix-0.2.4/lib/nmatrix/monkeys.rb:49: warning: constant ::Fixnum is deprecated
.........................................................................................................................................................F......................................**................................................................................./home/sumera/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rserve-client-0.3.5/lib/rserve/rexp/wrapper.rb:26: warning: constant ::Fixnum is deprecated
/home/sumera/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rserve-client-0.3.5/lib/rserve/rexp/wrapper.rb:56: warning: constant ::Fixnum is deprecated
./home/sumera/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rserve-client-0.3.5/lib/rserve/rexp/wrapper.rb:26: warning: constant ::Fixnum is deprecated
/home/sumera/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rserve-client-0.3.5/lib/rserve/rexp/wrapper.rb:56: warning: constant ::Fixnum is deprecated
...NOTE: Daru::Vector#only_valid is deprecated; use reject_values instead. It will be removed on or after 2016-10-01.
Daru::Vector#only_valid called from /home/sumera/.rbenv/versions/2.5.1/lib/ruby/2.5.0/delegate.rb:83.
.....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................*................................................................................................................................

bundler: failed to load command: rspec (/home/sumera/.rbenv/versions/2.5.1/bin/rspec)
...: command not found

Errno::ESPIPE: Illegal seek @ rb_io_tell - <STDERR>
  /home/sumera/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/packable-1.3.10/lib/packable/extensions/io.rb:86:in `pos'
  /home/sumera/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/packable-1.3.10/lib/packable/extensions/io.rb:86:in `pack_and_write'
  /home/sumera/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/packable-1.3.10/lib/packable/extensions/io.rb:62:in `write_with_packing'
  /home/sumera/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/cli/exec.rb:81:in `abort'
  /home/sumera/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/cli/exec.rb:81:in `rescue in kernel_load'
  /home/sumera/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/cli/exec.rb:65:in `kernel_load'
  /home/sumera/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/cli/exec.rb:28:in `run'
  /home/sumera/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/cli.rb:463:in `exec'
  /home/sumera/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
  /home/sumera/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
  /home/sumera/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
  /home/sumera/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/cli.rb:27:in `dispatch'
  /home/sumera/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
  /home/sumera/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/cli.rb:18:in `start'
  /home/sumera/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/exe/bundle:30:in `block in <top (required)>'
  /home/sumera/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors'
  /home/sumera/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/exe/bundle:22:in `<top (required)>'
  /home/sumera/.rbenv/versions/2.5.1/bin/bundle:23:in `load'
  /home/sumera/.rbenv/versions/2.5.1/bin/bundle:23:in `<main>'

But the failed to load command: rspec didn't show up when I changed the version so I thought it is probably Daru breaking. Will look further into it and let you know.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually all bundler related lines look irrelevent. Only focus on packable/extensions/io.rb:86:in pos': Illegal seek @ rb_io_tell - (Errno::ESPIPE)`

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I have made those changes in my last PR. Kindly take a look.

CONTRIBUTING.md Outdated
@@ -22,12 +22,23 @@ And run the test suite (should be all green with pending tests):

If you have problems installing nmatrix, please consult the [nmatrix installation wiki](https://github.com/SciRuby/nmatrix/wiki/Installation) or the [mailing list](https://groups.google.com/forum/#!forum/sciruby-dev).

**NOTE**: `Daru` is compatible with Ruby versions < 2.5; for later Ruby versions it breaks, returning the following error when `bundle exec rspec` is run for Ruby
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Issue #500, it was breaking while running

df = Daru::DataFrame.new(a: [1,2,3], b:[4,5,6])
df.each(:row) { |i| puts i }

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am guessing this error appears whenever Daru is built using Ruby>2.5? I wanted to include the part here because it's part of the process for setting up Daru. But I guess there are a lot of other instances/commands where the build will eventually fail and return the same error message and we can't document them all here. Will remove the part for now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am guessing this error appears whenever Daru is built using Ruby>2.5?

Yes!

But I guess there are a lot of other instances/commands where the build will eventually fail and return the same error message and we can't document them all here. Will remove the part for now.

I am not aware of those cases. Please let us know if you have in mind. It will help to fix and track it further.

CONTRIBUTING.md Outdated
bundler: failed to load command: rspec (/home/.rbenv/versions/2.5.1/bin/rspec)
...: command not found
```
To reproduce this issue or explore this error further, head over to [issue #500](https://github.com/SciRuby/daru/issues/500),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add this as well :

'Also, if you want to fix this issue, then we can discuss it here : #505'

@Sylfrena
Copy link
Contributor Author

Sylfrena commented May 2, 2019

@Shekharrajak Hey! I had made the changes you asked for above. Are there any other changes I need to make?

@Shekharrajak
Copy link
Member

Thanks! It is in.

@Shekharrajak Shekharrajak merged commit eb2380d into SciRuby:master May 6, 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

Successfully merging this pull request may close these issues.

None yet

2 participants