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

default to ruby 2.0.0p247 on mac VMs #1637

Closed
mk opened this issue Nov 19, 2013 · 19 comments

Comments

Projects
None yet
10 participants
@mk
Copy link

commented Nov 19, 2013

I think it would make sense to default to ruby 2.0.0p247 which ships with mavericks. Currently it's using 1.8.7 which can lead to issues when using the new hash syntax in the CocoaPods Podfile:

[!] Invalid `Podfile` file: compile error
/Users/travis/build/.../Podfile:17: syntax error, unexpected ':', expecting $end

Defaulting to ruby 2.0 should lower the barrier of entry when using travis and cocoapods for non-ruby people.

@roidrage

This comment has been minimized.

Copy link
Contributor

commented Nov 19, 2013

Yup, we just talked about this earlier. Using the system Ruby also prevents gems from being installed with sudo, breaking common behaviour on Travis CI.

It should be either 1.9.3 or 2.0.0.

A quick fix is to add this line to your .travis.yml:

rvm: 1.9.3

@ghost ghost assigned sarahhodne Nov 19, 2013

@sarahhodne

This comment has been minimized.

Copy link
Contributor

commented Nov 19, 2013

Preparing new Mac VMs now, I agree that 2.0.0 would be a good default since it's the system default on Mavericks, the latest version of OS X. Making 2.0.0-p247 the new default.

@mjm

This comment has been minimized.

Copy link
Member

commented Nov 20, 2013

I think this upgrade has broken pod install:

$ pod --version
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:777:in `report_activate_error': Could not find RubyGem cocoapods (>= 0) (Gem::LoadError)
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:211:in `activate'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:1056:in `gem'
    from /usr/bin/pod:18
$ pod install
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:777:in `report_activate_error': Could not find RubyGem cocoapods (>= 0) (Gem::LoadError)
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:211:in `activate'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:1056:in `gem'
    from /usr/bin/pod:18
The command "pod install" failed. Retrying, 2 of 3.
@iprebeg

This comment has been minimized.

Copy link

commented Nov 20, 2013

pod issue happens to me as well

thnx
Ivor

EDIT:
mpapis from #travis suggested that no cocoapods is installed on 2.0.0
adding before_install: gem install cocoapods to .yml seems to fix issue for me

@sarahhodne

This comment has been minimized.

Copy link
Contributor

commented Nov 20, 2013

Yeah, this is because CocoaPods is missing on 2.0.0. Sorry about that, I'll push a fix soon.

koke added a commit to wordpress-mobile/WordPress-iOS that referenced this issue Nov 20, 2013

Pin travis to ruby 1.9
Cocoapods is broken in ruby 2.0

see travis-ci/travis-ci#1637
@AlexDenisov

This comment has been minimized.

Copy link

commented Nov 21, 2013

@iprebeg, I already have this option in my .travis.yml, but issue still exists.

@iprebeg

This comment has been minimized.

Copy link

commented Nov 21, 2013

@AlexDenisov I've checked your build status on travis and looks like passing :-) of course that issue still stays there and you'll see it when travis invokes "pod --version" after detecting your Podfile before your before_install hooks until @henrikhodne pushes fix. With gem install cocoapods you just made it fix for this current build to make it pass.

@AlexDenisov

This comment has been minimized.

Copy link

commented Nov 21, 2013

@iprebeg, yeah, it passed right after my previous post.
Maybe it starts working when someone calls your name? 😄
Anyway, thanks for help!

@iprebeg

This comment has been minimized.

Copy link

commented Nov 21, 2013

@AlexDenisov glad it worked, cheers :-)

@bringel

This comment has been minimized.

Copy link

commented Nov 25, 2013

I'm still getting

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:777:in `report_activate_error': Could not find RubyGem cocoapods (>= 0) (Gem::LoadError)

When after each build. Did I miss an instruction?

@iprebeg

This comment has been minimized.

Copy link

commented Nov 25, 2013

@bringel can you show us your .yml and maybe point to failing build on travis?

@bringel

This comment has been minimized.

Copy link

commented Nov 25, 2013

@mk

This comment has been minimized.

Copy link
Author

commented Nov 25, 2013

@bringel you need to add the following line to you .travis.yml as @roidrage suggested:

rvm: 1.9.3
@bringel

This comment has been minimized.

Copy link

commented Nov 25, 2013

@mk @iprebeg Ah I see, when I read that comment I thought that had already been resolved in the VMs. Problem solved.

mattrubin added a commit to mattrubin/Authenticator that referenced this issue Dec 6, 2013

Specify ruby version to use with Travis
This is a workaround for an issue with Travis and CocoaPods:
travis-ci/travis-ci#1637

lawrencelomax added a commit to lawrencelomax/LLReactiveMatchers that referenced this issue Dec 6, 2013

gerlachry pushed a commit to gerlachry/recipe-searcher that referenced this issue Jan 6, 2014

kt3k added a commit to kt3k/NSDate-Escort that referenced this issue Feb 14, 2014

kt3k added a commit to kt3k/NSDate-Escort that referenced this issue Feb 14, 2014

@liclac

This comment has been minimized.

Copy link

commented Mar 4, 2014

Bump on this. Cocoapods is still unavailable by default, and all builds of Pod-based projects without gem install cocoapods in before_install thus fail.

Right before starting the build, Travis will run pod --version, which will fail with the following message:

$ pod --version
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:777:in `report_activate_error': Could not find RubyGem cocoapods (>= 0) (Gem::LoadError)
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:211:in `activate'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:1056:in `gem'
    from /usr/bin/pod:18
@yuriy-tolstoguzov

This comment has been minimized.

Copy link

commented Mar 11, 2014

I've encountered the same issue today. CocoaPods, despite documentation statements are not installed at CI environment. Here's error description I got after pod install:

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:777:in `report_activate_error': Could not find RubyGem cocoapods (>= 0) (Gem::LoadError)
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:211:in `activate'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:1056:in `gem'
    from /usr/bin/pod:18

@sarahhodne sarahhodne added this to the Next OS X environment update milestone Mar 27, 2014

@eneko

This comment has been minimized.

Copy link

commented Apr 3, 2014

As uppfinnarn commented, adding the following to .travis.yml does solve the issue:

before_install:
  - gem install cocoapods
@sarahhodne

This comment has been minimized.

Copy link
Contributor

commented Apr 15, 2014

This should be fixed in this week's update.

@sarahhodne

This comment has been minimized.

Copy link
Contributor

commented Apr 18, 2014

This should be fixed now.

@sarahhodne sarahhodne closed this Apr 18, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.