You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/03/29 14:05:00 UTC
[jira] [Commented] (FLINK-9110) Building docs with Ruby 2.5 fails
if bunder is not globally installed
[ https://issues.apache.org/jira/browse/FLINK-9110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16419048#comment-16419048 ]
ASF GitHub Bot commented on FLINK-9110:
---------------------------------------
GitHub user NicoK opened a pull request:
https://github.com/apache/flink/pull/5788
[FLINK-9110][docs] fix local bundler installation
## What is the purpose of the change
The fallback to installing `bundler` locally within `docs/build_docs.sh` did not work for several reasons:
- the `-rubygems` parameter to `ruby` is failing with Ruby 2.5:
```
> ruby -rubygems -e 'puts Gem.user_dir'
Traceback (most recent call last):
1: from /usr/lib64/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
/usr/lib64/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require': cannot load such file -- ubygems (LoadError)
```
- the locally installed bundler formatted executables with the ruby version and was thus not available as `bundle`
## Brief change log
- remove `-rubygems` parameter in `ruby` call
- do not echo a warning when a local `bundle` is found (adapt the `PATH` to look for that in a second step)
- install `bundler` locally with `--no-format-executable`
## Verifying this change
This change added tests and can be verified as follows:
- run `./docs/build_docs.sh` without globally installed `bundler`
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): **no**
- The public API, i.e., is any changed class annotated with `@Public(Evolving)`: **no**
- The serializers: **no**
- The runtime per-record code paths (performance sensitive): **no**
- Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: **no**
- The S3 file system connector: **no**
## Documentation
- Does this pull request introduce a new feature? **no**
- If yes, how is the feature documented? **not applicable**
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/NicoK/flink flink-9110
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/5788.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #5788
----
commit b6258697aabb8688aac19b5b228ddf8926e518f3
Author: Nico Kruber <ni...@...>
Date: 2018-03-29T13:55:47Z
[FLINK-9110][docs] fix local bundler installation
commit 540485a5620f6dcdd98e751a086076fb80997f65
Author: Nico Kruber <ni...@...>
Date: 2018-03-29T13:56:23Z
[hotfix][docs] remove duplicate bundle installation
----
> Building docs with Ruby 2.5 fails if bunder is not globally installed
> ---------------------------------------------------------------------
>
> Key: FLINK-9110
> URL: https://issues.apache.org/jira/browse/FLINK-9110
> Project: Flink
> Issue Type: Bug
> Components: Documentation
> Affects Versions: 1.5.0, 1.6.0
> Reporter: Nico Kruber
> Assignee: Nico Kruber
> Priority: Blocker
> Fix For: 1.5.0
>
>
> If {{bundler}} is not installed, {{build_docs.sh}} attempts to install it locally but updating the {{$PATH}} environment variable is broken at least in my setup with ruby 2.5 because of this command failing:
> {code}
> > ruby -rubygems -e 'puts Gem.user_dir'
> Traceback (most recent call last):
> 1: from /usr/lib64/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
> /usr/lib64/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require': cannot load such file -- ubygems (LoadError)
> > ruby -e 'puts Gem.user_dir'
> /home/nico/.gem/ruby/2.5.0
> {code}
> Additionally, the {{bundle}} binary is not even in that path::
> {code}
> > find ~/.gem/ruby/2.*/bin
> /home/nico/.gem/ruby/2.4.0/bin
> /home/nico/.gem/ruby/2.4.0/bin/bundle.ruby2.4
> /home/nico/.gem/ruby/2.4.0/bin/bundler.ruby2.4
> /home/nico/.gem/ruby/2.5.0/bin
> /home/nico/.gem/ruby/2.5.0/bin/bundle.ruby2.5
> /home/nico/.gem/ruby/2.5.0/bin/bundler.ruby2.5
> {code}
> but indeed here:
> {code}
> > ls ~/.gem/ruby/2.*/gems/bundler-*/exe/bundle
> /home/nico/.gem/ruby/2.4.0/gems/bundler-1.15.3/exe/bundle
> /home/nico/.gem/ruby/2.5.0/gems/bundler-1.16.1/exe/bundle
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)