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

Rake bootstrap failure help #74

Open
mwoollard opened this issue Jan 23, 2018 · 7 comments
Open

Rake bootstrap failure help #74

mwoollard opened this issue Jan 23, 2018 · 7 comments

Comments

@mwoollard
Copy link

Could someone give me some pointers on what is probably a configuration issue of my environment? New to ruby + config:-) I do have CocoaPods + Fastlane running fine on the system, just getting the CocoaPods dev environment setup isn't working.

Thanks
Mark

$ rake bootstrap
/usr/local/bin/bundle

... goes through cloning of all repos

--------------------------------------------------------------------------------
Bootstrapping all the repositories
--------------------------------------------------------------------------------

Bootstrapping Core
[!] Some Rake tasks haven been disabled because the environment couldn’t be loaded. Be sure to run `rake bootstrap` first.
rake --no-search bootstrap
[!] Some Rake tasks haven been disabled because the environment couldn’t be loaded. Be sure to run `rake bootstrap` first.
Updating submodules...
/usr/local/bin/bundle
Installing gems
rake aborted!
Errno::ENOENT: No such file or directory - bundle
/Users/markw/iPhoneDevelopment/Rainforest/Core/Rakefile:11:in ``'
/Users/markw/iPhoneDevelopment/Rainforest/Core/Rakefile:11: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/markw/iPhoneDevelopment/Rainforest/Rakefile:117:in `block (3 levels) in <top (required)>'
/Users/markw/iPhoneDevelopment/Rainforest/Rakefile:115:in `chdir'
/Users/markw/iPhoneDevelopment/Rainforest/Rakefile:115:in `block (2 levels) in <top (required)>'
/Users/markw/iPhoneDevelopment/Rainforest/Rakefile:114:in `each'
/Users/markw/iPhoneDevelopment/Rainforest/Rakefile:114:in `block in <top (required)>'
/Users/markw/iPhoneDevelopment/Rainforest/Rakefile:56:in `block in <top (required)>'
Tasks: TOP => bootstrap_repos
(See full trace by running task with --trace)

I also notice that:

$ /usr/local/bin/bundle --version
bash: /usr/local/bin/bundle: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby: bad interpreter: No such file or directory

If relevant...

$ printenv PATH
PATH=/usr/local/bin:/Users/markw/.gem/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/opt/X11/bin
@segiddins
Copy link
Member

Can you try running gem install bundler?

@mwoollard
Copy link
Author

Some progress, ran gem install bundler and also removed /usr/local/bin from head of PATH. Was then able to run $ rake bootstrap. However $ CocoaPods/bin/pod --help (or any other attempt to use the development version) gives error:

$ CocoaPods/bin/pod --help
Could not find rake-10.5.0 in any of the sources

Do I need make some further changes to PATH to locate rake-10.5.0 ?

Thanks!

@segiddins
Copy link
Member

Odd, further changes shouldnt be necessary but it seems like your local ruby install is in a weird state.

@icecrystal23
Copy link

icecrystal23 commented Jan 28, 2019

I finally got rake bootstrap to complete with this specific setup:

  • ruby version 2.3.8 (kudos to rbenv)
  • gem install bundler -v 1.17.3
  • gem install rspec

And then rake bootstrap succeeded

I was getting failures with ruby version 2.5.3 and also with bundler 2.x. Not sure why I had to explicitly install rspec.

@mfaani
Copy link
Contributor

mfaani commented Dec 26, 2020

@icecrystal23 why 2.3.8? for example Specs's Gemfile is pointing to:

ruby '> 2.0.0'

@icecrystal23
Copy link

Not sure. It was likely just another ruby version I already had set up so I tried it and it worked. Or I saw it referenced somewhere in one of the tools and decided to give it a shot.

I find ruby versions to be quite finicky and even minor version updates can easily break things.

@mfaani
Copy link
Contributor

mfaani commented Dec 28, 2020

@icecrystal23
Your setup helped better understand the whole Ruby setup. Yet I think your fix can no longer work 😕 :

See https://github.com/rails/rails/blob/master/activesupport/activesupport.gemspec#L12
and https://github.com/CocoaPods/Core/blob/master/cocoapods-core.gemspec#L22-L23

basically the current setup for the core gem has a dependency on activesupport which has a dependency on: s.required_ruby_version = ">= 2.5.0"

Among a few other errors I was getting and thought to dig deeper in the gemspec of Core. Ultimately I realized the ruby versions are never going to work.

Bootstrapping Core
[!] Some Rake tasks haven been disabled because the environment couldn’t be loaded. Be sure to run rake bootstrap first.
rake --no-search bootstrap
[!] Some Rake tasks haven been disabled because the environment couldn’t be loaded. Be sure to run rake bootstrap first.
Updating submodules...
/Users/mfaani908/.rbenv/versions/2.3.8/bin/bundle
Installing gems

Maybe I need to bump the ruby version to 2.5.0 instead of 2.3.8

Or I might have to abandon your setup and try again the original setup with no rbenv involvement. I had some errors with that, but circumvented them a bit as outlined here 🤔 🤔 🤔

This is all a huge/fun learning curve for someone who's never done any Ruby development, but I feel I'm super close to getting my setup right

EDIT:
The cocoapods-try repo was also failing. Because that also has a dependency on cocoapods-core: https://github.com/CocoaPods/cocoapods-try/blob/master/Gemfile#L8

rake boostrap builds with a development environment right?

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

4 participants