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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

rake bootstrap fails due to cocoapods-docs Ruby version requirement #69

Closed
keitaito opened this issue Feb 1, 2017 · 5 comments
Closed

Comments

@keitaito
Copy link

keitaito commented Feb 1, 2017

馃寛

Question

This issue might be related to cocoapods-docs. rake bootstrap fails due to cocoapods-docs ruby version requirement 2.0. Does this requirement can be changed to something like 2.0 or later?

Report

What did you do?

rake bootstrap

What did you expect to happen?

I expected to bootstrap and build CocoaPods and its dependencies.

What happened instead?

rake aborted with the following error while Bootstrapping cocoapods-docs :

Bootstrapping cocoapods-docs
rake --no-search bootstrap
/Users/keitaito/.rbenv/versions/2.3.2/bin/bundle

--------------------------------------------------------------------------------
Installing gems
--------------------------------------------------------------------------------

bundle install
Fetching gem metadata from http://rubygems.org/.............
Fetching version metadata from http://rubygems.org/...
Fetching dependency metadata from http://rubygems.org/..
Resolving dependencies...
cocoapods-docs-0.2.0 requires ruby version = 2.0, which is incompatible with the
current version, ruby 2.3.2p217
rake aborted!
Command failed with status (5): [bundle install...]
/Users/keitaito/dev/Xcode/Repos/Clones/Rainforest/cocoapods-docs/Rakefile:9:in `block in <top (required)>'
Tasks: TOP => bootstrap
(See full trace by running task with --trace)
rake aborted!
Command failed with status (1): [rake --no-search bootstrap...]
/Users/keitaito/dev/Xcode/Repos/Clones/Rainforest/Rakefile:117:in `block (3 levels) in <top (required)>'
/Users/keitaito/dev/Xcode/Repos/Clones/Rainforest/Rakefile:115:in `chdir'
/Users/keitaito/dev/Xcode/Repos/Clones/Rainforest/Rakefile:115:in `block (2 levels) in <top (required)>'
/Users/keitaito/dev/Xcode/Repos/Clones/Rainforest/Rakefile:114:in `each'
/Users/keitaito/dev/Xcode/Repos/Clones/Rainforest/Rakefile:114:in `block in <top (required)>'
/Users/keitaito/dev/Xcode/Repos/Clones/Rainforest/Rakefile:56:in `block in <top (required)>'
Tasks: TOP => bootstrap_repos
(See full trace by running task with --trace)

CocoaPods Environment

Stack

I use rbenv for managing ruby versions.

   CocoaPods : 1.2.0
        Ruby : ruby 2.3.2p217 (2016-11-15 revision 56796) [x86_64-darwin16]
    RubyGems : 2.5.2
        Host : Mac OS X 10.12.3 (16D32)
       Xcode : 8.2.1 (8C1002)
         Git : git version 2.10.2
Ruby lib dir : /Users/keitaito/.rbenv/versions/2.3.2/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ c1b34a8d895229ee7ef5d1a3037843776396456c

Installation Source

Executable Path: /Users/keitaito/.rbenv/versions/2.3.2/bin/pod

Plugins

cocoapods-deintegrate : 1.0.1
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.0.0
cocoapods-trunk       : 1.1.2
cocoapods-try         : 1.1.0

To fix the above issue, I installed ruby 2.0.0-p648, and ran rake bootstrap. Then, I got another error:

An error occurred while installing json (1.7.7), and Bundler cannot
continue.
Make sure that `gem install json -v '1.7.7'` succeeds before bundling.
rake aborted!

Some projects like Xcodeproj use the forked json 1.7.7 gem and it seems ruby 2.0.0-p648 has some issue with it. So, I updated their Gemfiles to use the original json 1.7.7 as the issue 63 mentioned, and it fixes the above error. Even though I'm still seeing some rake aborted! messages, rake bootstrap can be complete now. I was wondering all these issues could be fixed if cocoapods-docs can be built with newer ruby.

The entire log is very long, so I posted it on my gist.

It would be great if I could hear opinions and suggestions from anyone who might know these issues. I would love to contribute to fix this issue as well! Thank you 馃槂

@orta
Copy link
Member

orta commented Feb 1, 2017

Yeah, I think it's fine to make that a > 2.0 in cocoapods-docs

@keitaito
Copy link
Author

keitaito commented Feb 2, 2017

@orta Thanks you for the comment. OK, I will make a PR on cocoapods-docs 馃槂

@keitaito
Copy link
Author

keitaito commented Feb 2, 2017

@orta I tried the change you suggested locally, and it fixes the issue, but I got another error:

Bootstrapping Molinillo
[!] Some Rake tasks haven been disabled because the environment couldn鈥檛 be loaded. Be sure to run `rake bootstrap` first.
cannot load such file -- rspec/core/rake_task
/Users/keitaito/.rbenv/versions/2.3.2/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/Users/keitaito/.rbenv/versions/2.3.2/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/Users/keitaito/dev/Xcode/Repos/Clones/Rainforest/Molinillo/Rakefile:29:in `<top (required)>'
/Users/keitaito/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in `load'
/Users/keitaito/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in `load_rakefile'
/Users/keitaito/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:687:in `raw_load_rakefile'
/Users/keitaito/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:96:in `block in load_rakefile'
/Users/keitaito/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
/Users/keitaito/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:95:in `load_rakefile'
/Users/keitaito/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:79:in `block in run'
/Users/keitaito/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
/Users/keitaito/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:77:in `run'
/Users/keitaito/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
/Users/keitaito/.rbenv/versions/2.3.2/bin/rake:22:in `load'
/Users/keitaito/.rbenv/versions/2.3.2/bin/rake:22:in `<main>'

rake --no-search bootstrap
[!] Some Rake tasks haven been disabled because the environment couldn鈥檛 be loaded. Be sure to run `rake bootstrap` first.
cannot load such file -- rspec/core/rake_task
/Users/keitaito/.rbenv/versions/2.3.2/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/Users/keitaito/.rbenv/versions/2.3.2/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/Users/keitaito/dev/Xcode/Repos/Clones/Rainforest/Molinillo/Rakefile:29:in `<top (required)>'
/Users/keitaito/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in `load'
/Users/keitaito/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in `load_rakefile'
/Users/keitaito/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:687:in `raw_load_rakefile'
/Users/keitaito/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:96:in `block in load_rakefile'
/Users/keitaito/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
/Users/keitaito/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:95:in `load_rakefile'
/Users/keitaito/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:79:in `block in run'
/Users/keitaito/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
/Users/keitaito/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:77:in `run'
/Users/keitaito/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
/Users/keitaito/.rbenv/versions/2.3.2/bin/rake:22:in `load'
/Users/keitaito/.rbenv/versions/2.3.2/bin/rake:22:in `<main>'

/Users/keitaito/.rbenv/versions/2.3.2/bin/bundle

I think the different rake gem is used for bootstrapping. I checked Rainforest's Rakefile at line 117:

sh 'rake --no-search bootstrap' if rake_task?('bootstrap', :allow_bundler => false)

Do you think it should start with bundle exec? When I tried bundle exec rake bootstrap under the Molinillo directory, it succeeds.

@Lucashuang0802
Copy link

@keitaito I have the same issue. +1

@keitaito
Copy link
Author

Thanks for fixing the issue!

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