Is it possible to install an old version of Homebrew? - homebrew

Since https://github.com/Homebrew/brew/pull/6083 Homebrew requires Xcode 10.2.1. However some projects I work on require Xcode 9.
How can I install an older version of Homebrew to work around this?

Related

Cocoapods error after updating to Android Studio 2021.1.1

I updated yesterday to the new Android Studio 2021.1.1
Now i get the following error, when i run my app on the ios emulator:
Warning: CocoaPods is installed but broken. Skipping pod install.
You appear to have CocoaPods installed but it is not working.
This can happen if the version of Ruby that CocoaPods was installed with is different from the one being used to invoke it.
This can usually be fixed by re-installing CocoaPods. For more info, see https://github.com/flutter/flutter/issues/14293.
To re-install:
sudo gem install cocoapods
CocoaPods not installed or not in valid state.
I tried everything for many hours.
At the end i go back to Android Studio 2020 previous version and it works perfect.
Any ideas?
Update:
This works for me:
uninstall cocoapods then
reinstalling cocoapods via homebrew.
Afterwards I did an "pod repo update"

telling homebrew to use is own installed version of ruby#2.0

I have High Sierra Beta 6 Installed on my Mac Pro.
High sierra beta comes with Ruby 2.2 and brew doctor complains about it since it was tested only with ruby 2.0.
I can install ruby 2.0 with homebrew, is there a way to tell homebrew to actually use that version instead of the ruby version that comes with the OS ?
There’s no way to do that. High Sierra is still in beta so it’s normal it’s not fully supported by Homebrew.
Yes. You can change the ruby version used by homebrew. Just add these 2 lines to your .bash_profile
export HOMEBREW_DEVELOPER="yes"
export HOMEBREW_RUBY_PATH="/Users/USERNAME/.rbenv/shims/ruby"
Just updated to High Sierra. I experienced the same Ruby warnings after upgrade. What I did was:
1. brew doctor -- warnings shown
2. brew update
3. brew doctor -- no more warnings

OSX :Making CocoaPods compatible with older version install

I installed CocoaPods (cocoapods-0.37.2) but I need to make sure is backward­-compatible with version 0.35.0. My question for you is how can I do that?
Here is how installed:
sudo gem install cocoapods
I'll really appreciate your help
Since you install CocoaPods through rubygems you can use their infrastructure for this. In this case installing an old version is described here. Once you install an old version you'll have both the newer and older installed. This means when you run pod it will pick the new one. If you don't want to uninstall 0.37.2 then you'll have to specify which you want to use. That process is described here

Reinstalling Xcode on Mountain Lion after upgrading from Lion

I'm running OSX 10.8. My Mac had Snow Leopard when I got it, but I have since upgraded to Lion and then Mountain Lion. I'm trying to get my Ruby on Rails environment set up, and when I run Homebrew's "brew doctor" command, I get this:
Warning: You seem to have osx-gcc-installer installed.
Homebrew doesn't support osx-gcc-installer. It causes many builds to fail and
is an unlicensed distribution of really old Xcode files.
Please install the CLT or Xcode 5.0.1.
Warning: Your compilers are different from the standard versions for your Xcode.
If you have Xcode 4.3 or newer, you should install the Command Line Tools for
Xcode from within Xcode's Download preferences.
Otherwise, you should reinstall Xcode.
So I uninstalled and reinstalled Xcode (now have v 5.0.2) and the command line tools, and I'm still getting the same messages. I've tried doing:
sudo /Developer/Library/uninstall-devtools --mode=xcodedir
But I get this in response:
sudo: /Developer/Library/uninstall-devtools: command not found
Thanks in advance for any help.
Try which gcc to figure out which gcc you are using.
Then run which -a gcc to see all the gcc's that you have installed.
You'll probably find that you're using the osx version and that changing your path ordering in shell config, eg. bash.rc will fix this brew doctor error.

PhantomJS version 1.4.0 version issue

I installed PhantomJS today and got this error trying to use it:
PhantomJS version 1.4.0
is too old. You must use at least version 1.7.0
(Capybara::Poltergeist::PhantomJSTooOld)
How can I install the newer version?
I can get the newer version (1.7) at: http://phantomjs.org/download.html
Once I've downloaded it though how do I actually install it?
Are you using Linux or OS X? You'll need to either build from source or install an updated PhantomJS package. You can also download the binaries and install over the system installed PhantomJS. Type "which phantomjs" and it should show the location of PhantomJS.
If you're using homebrew, just:
brew upgrade phantomjs
I had to solve this problem yesterday, it required me updating brew, telling brew to uninstall phantomJS, then updating xcode, then installing the latest xcode command utilities, then using brew to re-install phantomjs. Finally that got it to pull in the latest version. You might try this (mac):
brew update
brew uninstall phantomjs
brew doctor (follow the fixes it recommends if any... Mine was updating xcode)
brew install phantomjs
At that point it should grab the latest.
Good luck!

Resources