-
Notifications
You must be signed in to change notification settings - Fork 94
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
Using a Gemfile with CocoaPods #139
Comments
I order to control the version or CocoaPods that will be used in a folder for a project I am trying to use a Gemfile to specify the version. Most of my experience is with Node.js and npm which would allow for setting the exact version that is needed. I've tried the following lines in Gemfiles in separate folders. Without any qualifiers installing The docs in the CocoaPods Guides do not show how to specify a specific version of CocoaPods. I'd like to be able to do that with the Gemfile so the Gemfile.lock can be put into source control so it ensures everyone uses the same version. https://guides.cocoapods.org/using/a-gemfile.html gem 'cocoapods'
gem 'cocoapods', '1.1.0.rc.2'
gem 'cocoapods', '0.39'
gem 'cocoapods', '~> 1.0'
gem 'cocoapods', '~> 1.1'
gem 'cocoapods', :git => 'https://github.com/CocoaPods/CocoaPods.git', :tag => '0.39-stable'
gem 'cocoapods', :git => 'https://github.com/CocoaPods/CocoaPods.git', :tag => '1-0-stable'
gem 'cocoapods', :git => 'https://github.com/CocoaPods/CocoaPods.git', :tag => '1-1-stable' |
Sure, I'm happy to do that as long as you stress that they are examples, you only use one of ^ in a Gemfile for example |
Oh yes, I just included all of them in this example to keep it concise. |
I'd like to be able to specify 0.39, 1.0 or 1.1 but so far I have not been able to make |
Hrm? Is that because of the active record issue? |
if so, add |
It appears related to |
Looks good. These Gemfiles now all work. source 'https://rubygems.org'
gem 'cocoapods', :git => 'https://github.com/CocoaPods/CocoaPods.git', :tag => '0.39-stable'
gem 'activesupport', '< 5' source 'https://rubygems.org'
gem 'cocoapods', :git => 'https://github.com/CocoaPods/CocoaPods.git', :tag => '1-0-stable'
gem 'activesupport', '< 5' source 'https://rubygems.org'
gem 'cocoapods', :git => 'https://github.com/CocoaPods/CocoaPods.git', :tag => '1-1-stable' |
These work as well which I prefer. source 'https://rubygems.org'
gem 'cocoapods', '~> 0.39.0'
gem 'activesupport', '< 5' source 'https://rubygems.org'
gem 'cocoapods', '~> 1.0.0'
gem 'activesupport', '< 5' |
I get an error with the following Gemfile currently. source 'https://rubygems.org'
gem 'cocoapods', '~> 1.1.0'
gem 'activesupport', '< 5' Below is the error.
|
I am guessing since 1.1 is a pre-release the 1.1.0 version is not yet available as a Gem, so the Git tag is still necessary. I can at least target past releases of CocoaPods which is helpful with keeping the team in sync. If there are breaking changes in CP 1.1 or later releases this could help prevent the need to troubleshoot problems with the Podfile. Is there a way to eliminate the need for setting the version for |
I don't get the need for the tags? but (and I think those are branches?) but we needed to change the dependency in Xcodeproj to handle the new rules on active support, since they don't support 2.0 anymore, which is system ruby - which most people are using. We did that after they made the change but that doesn't get backported |
I've documented Gemfiles which work for me. I believe I can use these Gemfile configurations to specify the version of CocoaPods I am using for each project. https://gist.github.com/brennanMKE/dff7b89836af5e51bcda0bda89967617 |
I am looking at adding a Gemfile to my project to make it easier for a team to use CocoaPods and keep versions in sync. But I get errors when I run
bundle install
.https://guides.cocoapods.org/using/a-gemfile.html
I am running a Mac with the latest El Capitan updates with Xcode 8.0. The version of Ruby is
2.0.0p648
. It has the minimal requirements for now and later I'd like to add more Ruby tools.Currently this results in the error shown below.
Eloy and Orta advised via Twitter to use an RC version.
This allows
bundle install
to work now. I've added additional gems which now install without errors.What is not clear to me from the Gemfile docs linked above is how the Gemfile helps with managing this dependency. I have used
gem install
to manually install these Ruby dependencies for CocoaPods for years. And since CocoaPods is the only reason I use Ruby my exposure to Ruby and Gems is limited. The docs explain to usebundle exec pod XX YY
in order to use the Gemfile.Would a Gemfile allow me to set up a project to use a version of CocoaPods which is different than what would be used without
bundle exec
being used? Can I set up a project to use version 0.39, 1.0 or 1.1 based on the needs for that project? How is this done?The text was updated successfully, but these errors were encountered: