unable to update to Ruby 2.1.4 - railstutorial.org

Currently running Yosemite and unable to update to ruby 2.1.4 , see below.
Guidos-MacBook-Pro:~ Guido$ rvm install 2.1.4
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.10/x86_64/ruby-2.1.4.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx_brew.
/usr/local/bin/brew: /usr/local/Library/brew.rb: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory
/usr/local/bin/brew: line 26: /usr/local/Library/brew.rb: Undefined error: 0
ERROR: '/bin' is not writable - it is required for Homebrew, try 'brew doctor' to fix it!
Requirements installation failed with status: 1.

So after I stepped away from the computer for a few hours and came back again, I figured out the issue was that Homebrew was broken after I updated OS to Yosemite. Here is the link http://ryantvenge.com/2014/09/ruby-homebrea-yosemite/ to the solution. If that is not working see commands below.
To fix Homebrew:
cd /System/Library/Frameworks/Ruby.framework/Versions
sudo ln -s Current 1.8
brew update
sudo rm 1.8
To update to ruby 2.1.4:
rvm install 2.1.4
rvm use 2.1.4

Related

OpenSSL#1.1 not getting linked with Homebrew - trying to install postgresql

My system is OS Mojave 10.14.6, when I try to install postgresql I have this error:
Error: An exception occurred within a child process:
RuntimeError: /usr/local/opt/openssl#1.1 not present or broken
Please reinstall openssl#1.1. Sorry :(
When I try to install openssl#1.1 I have this message:
brew install openssl#1.1
Running `brew update --preinstall`...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/cask).
==> Updated Casks
Updated 8 casks.
Warning: openssl#1.1 1.1.1n is already installed, it's just not linked.
To link this version, run:
brew link openssl#1.1
➜ / brew link openssl#1.1
Warning: Refusing to link macOS provided/shadowed software: openssl#1.1
If you need to have openssl#1.1 first in your PATH, run:
echo 'export PATH="/usr/local/opt/openssl#1.1/bin:$PATH"' >> ~/.zshrc
For compilers to find openssl#1.1 you may need to set:
export LDFLAGS="-L/usr/local/opt/openssl#1.1/lib"
export CPPFLAGS="-I/usr/local/opt/openssl#1.1/include"
For pkg-config to find openssl#1.1 you may need to set:
export PKG_CONFIG_PATH="/usr/local/opt/openssl#1.1/lib/pkgconfig"
And then when I try to force hombrew link openssl, I get this message
Warning: Refusing to link macOS provided/shadowed software: openssl#1.1
If you need to have openssl#1.1 first in your PATH, run:
echo 'export PATH="/usr/local/opt/openssl#1.1/bin:$PATH"' >> ~/.zshrc
For compilers to find openssl#1.1 you may need to set:
export LDFLAGS="-L/usr/local/opt/openssl#1.1/lib"
export CPPFLAGS="-I/usr/local/opt/openssl#1.1/include"
For pkg-config to find openssl#1.1 you may need to set:
export PKG_CONFIG_PATH="/usr/local/opt/openssl#1.1/lib/pkgconfig"
I added the lines to .zshrc file like suggested:
export PATH="/usr/local/opt/openssl#1.1/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/openssl#1.1/lib"
export CPPFLAGS="-I/usr/local/opt/openssl#1.1/include"
export PKG_CONFIG_PATH="/usr/local/opt/openssl#1.1/lib/pkgconfig"
But I kept on having the message when retrying to intall postgresql
Error: An exception occurred within a child process:
RuntimeError: /usr/local/opt/openssl#1.1 not present or broken
I have read and try everything I found on the net regarding this question. I don't find any solution, any help would be very useful thanks!
UPDATE:
I got homebrew from this command :
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
and The pg version in my rails gemfile is
gem "pg", "1.3.5"
but I just tried brew install pg,
and bundle install fails also
UPDATE 2
when trying to
brew reinstall openssl
openssl#3 is installed and I get this message:
openssl#3 is keg-only, which means it was not symlinked into /usr/local,
because macOS provides LibreSSL.
and then when I try to
brew install postgresql
I have the same error:
Error: An exception occurred within a child process:
RuntimeError: /usr/local/opt/openssl#1.1 not present or broken
Please reinstall openssl#1.1.
I am having this same issue and did much of what cecileRx did as well to no avail. I am getting this issue as part of the 'brew install px4-sim-jmavsim' step in this PX4-Autopilot setup.
https://docs.px4.io/master/en/dev_setup/dev_env_mac.html
UPDATE: I think I got around this by uninstalling openssl and then installing openssl#1.1
brew uninstall openssl
brew install openssl#1.1
Running those two commands resolved the errors I was getting that matched those described in the questions.

cannot link libpq on Mac M1

I've been trying to run the Rust Diesel crate on my Macbook M1 and it doesn't work. The final part of the compilation gets broken by the following error:
= note: ld: warning: ignoring file /usr/local/Cellar/libpq/14.1/lib/libpq.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
Undefined symbols for architecture arm64:
When I get the info for libpq I get the following:
maxwellflitton#Maxwells-MacBook-Pro vanguard % brew info libpq
libpq: stable 14.1 (bottled) [keg-only]
Postgres C API library
https://www.postgresql.org/docs/14/libpq.html
/usr/local/Cellar/libpq/14.1 (2,335 files, 27.8MB)
Poured from bottle on 2022-01-09 at 00:14:32
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/libpq.rb
License: PostgreSQL
==> Dependencies
Required: krb5 ✔, openssl#1.1 ✔
==> Caveats
libpq is keg-only, which means it was not symlinked into /usr/local,
because conflicts with postgres formula.
If you need to have libpq first in your PATH, run:
echo 'export PATH="/usr/local/opt/libpq/bin:$PATH"' >> ~/.zshrc
For compilers to find libpq you may need to set:
export LDFLAGS="-L/usr/local/opt/libpq/lib"
export CPPFLAGS="-I/usr/local/opt/libpq/include"
I've tried installing with the following command:
RUSTFLAGS='-L /usr/local/Cellar/libpq/14.1/lib' cargo install diesel_cli --no-default-features --features postgres --force
But I still get the same error. Will it just be easier to wipe the whole thing and start again and if so how would I do this? Other people on the internet using the M1 seem to be able to get round the problem with a simple brew install libpq. Never had any issues with my previous intel mac. My ~/.cargo/config.toml has the following configuration:
[target.aarch64-apple-darwin]
rustflags = '-L /usr/local/Cellar/libpq/14.1/lib -L /opt/homebrew/lib'
Surprisingly this worked
brew install postgresql libpq
cargo clean
cargo build
cargo install diesel_cli --no-default-features --features postgres
I think it had to do with installing diesel-cli before installing the necessary dependencies. Cleaning the cargo dependencies and reinstalling worked for me
on my M1 mac, I installed the postgresql client and library with brew:
brew install postgresql libpq
and attempted to install diesel_cli again, this time it worked fine:
cargo install diesel_cli --no-default-features --features postgres
for some reason, simply installing libpq was not enough to install diesel_cli, i had to install the postgres library and the client.
Encountered a similar problem, and the issue was coming from my brew config (I restored my filesystem from my mac Intel) :
❯ brew config
...
macOS: 12.6-x86_64
...
Therefore, brew was downloading packages built for intel processors. I uninstalled and reinstalled brew following their website and now brew config is correct:
❯ brew config
...
macOS: 12.6-arm64
...
Hope this helps!
I have a Mac M1 and installed both postgresql and libpq with brew
I eventually succeeded in installing diesel_cli with these lines in my ~/.cargo/config.toml file
[target.aarch64-apple-darwin]
rustflags = '-L /opt/homebrew/opt/libpq/lib -L /opt/homebrew/lib'
source was https://github.com/diesel-rs/diesel/issues/2605

Getting an error on Ubuntu 21.04 after recent upgrade when running gdalinfo

~ $ gdalinfo --version
gdalinfo: symbol lookup error: /lib/libgdal.so.28: undefined symbol: proj_crs_get_datum_ensemble
Recently upgraded to Ubuntu 21.04 and things stopped working, tried removing all gdal, qgis installation and reinstall again and this is the latest. Previous error was https://gist.github.com/adoug/f551c96ae49bcf0dd4905cfb3ed1c910. Installing qgis from gui also comes up with an error Unable to install QGIS Desktop: Error while installing package: installed qgis-providers package post-installation script subprocess returned error exit status 127
~ $ pip3 install gdal
Requirement already satisfied: gdal in /usr/lib/python3/dist-packages (3.2.2)
~ $ pip3 uninstall gdal
Found existing installation: GDAL 3.2.2
Not uninstalling gdal at /usr/lib/python3/dist-packages, outside environment /usr
Can't uninstall 'GDAL'. No files were found to uninstall.
The whole install seems to be broken, is there a way to clean all and resinstall or somehow recover from this?
Not really for a fix for current issue, but used fresh anaconda install as a workaround to get gdal working again
conda update --all
conda install -c conda-forge gdal

installing ruby 1.9.3 in michael hartl's ruby on rails tutorial

I'm working on Michael Hartl's ruby on rails tutorial http://ruby.railstutorial.org/ruby-on-rails-tutorial-book#sec-development_tools.
I installed Git, updated my OS to 10.8.2 and downloaded XCode 4.5.2.
when I type in
rvm install 1.9.3
this long thing comes up...
Ruby (and needed base gems) for your selection will be installed shortly.
Before it happens, please read and execute the instructions below.
Please use a separate terminal to execute any additional commands.
Notes for Mac OS X 10.8.2, Xcode 4.5.2.
For JRuby: Install the JDK. See http://developer.apple.com/java/download/ # Current Java version "1.6.0_26"
For IronRuby: Install Mono >= 2.6
For Ruby 1.9.3: Install libksba # If using Homebrew, 'brew install libksba'
For Opal: Install Nodejs with NPM. See http://nodejs.org/download/
To use an RVM installed Ruby as default, instead of the system ruby:
rvm install 1.8.7 # installs patch 357: closest supported version
rvm system ; rvm gemset export system.gems ; rvm 1.8.7 ; rvm gemset import system.gems # migrate your gems
rvm alias create default 1.8.7
And reopen your terminal windows.
Xcode and gcc:
Right now Ruby requires gcc to compile, but Xcode 4.2 and later no longer ship with gcc. Instead they ship with llvm-gcc (to which gcc is a symlink) and clang, neither of which are supported for building Ruby. Xcode 4.1 was the last version to ship gcc, which was /usr/bin/gcc-4.2.
Xcode 4.1 and earlier:
- Ruby will build fine.
Xcode 4.2 and later (including Command Line Tools for Xcode):
- If you have gcc-4.2 (and friends) from an earlier Xcode version, Ruby will build fine.
- If you don't have gcc-4.2, you have two options to get it:
* Install apple-gcc42 from Homebrew
* Install osx-gcc-installer
Homebrew:
If you are using Homebrew, you can install the apple-gcc42 and required libraries from homebrew/dupes:
brew update
brew tap homebrew/dupes
brew install autoconf automake apple-gcc42
rvm pkg install openssl
Xcode 4.2+ install or/and Command Line Tools for Xcode is required to provide make and other tools.
osx-gcc-installer:
If you don't use Homebrew, you can download and install osx-gcc-installer: https://github.com/kennethreitz/osx-gcc-installer.
Warning: Installing osx-gcc-installer on top of a recent Xcode is known to cause problems, so you must uninstall Xcode before installing osx-gcc-installer. Afterwards you may install Xcode 4.2+ or Command Line Tools for Xcode if you desire.
** NOTE: Currently, Node.js is having issues building with osx-gcc-installer. The only fix is to install Xcode over osx-gcc-installer.
Press 'q' to continue.
~
(END)
Originally I had to get homebrew and
brew install libksba
but I did that already and it works. That leads to "Xcode and gcc:" and everything below it.
So, I have homebrew, and the following three commands work:
brew update
brew tap homebrew/dupes
brew install autoconf automake apple-gcc42
But when I try
rvm pkg install openssl
this is what happens
Fetching openssl-1.0.1c.tar.gz to /Users/adamzerner/.rvm/archives
Extracting openssl to /Users/adamzerner/.rvm/src/openssl-1.0.1c
Configuring openssl in /Users/adamzerner/.rvm/src/openssl-1.0.1c.
Compiling openssl in /Users/adamzerner/.rvm/src/openssl-1.0.1c.
Error running 'make', please read /Users/adamzerner/.rvm/log/openssl/make.log
Please note that it's required to reinstall all rubies:
rvm reinstall all --force
Updating openssl certificates
Error running 'update_openssl_certs', please read /Users/adamzerner/.rvm/log/openssl.certs.log
And this is what happens when I try what it says...
Adam-Zerners-MacBook-Pro:~ adamzerner$ rvm reinstall all --force
Adam-Zerners-MacBook-Pro:~ adamzerner$
some other information...
I don't see a .rvm folder under adamzerner, so I can't read what it tells me to (not that I would understand what I'd be reading anyway).
It seems that I have 1.8.7 installed:
Adam-Zerners-MacBook-Pro:~ adamzerner$ ruby -v
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
So... to summarize... when I try to run
rvm install 1.9.3
I get the gcc/Xcode problem. To fix that it says to download apple-gcc42 from Homebrew. When I do that, I get a problem after doing
rvm pkg install openssl
The problem being that I need to reinstall all rubies. When I do that:
rvm reinstall all --force
it seems that nothing happens.
Thanks in advance to anyone willing to help me with this problem!
EDIT: I forgot to say this before. For the "long thing" up above, when I press q to continue, this is what happens...
Searching for binary rubies, this might take some time.
https://rvm.io/binaries/osx/10.8/x86_64/ruby-1.9.3-p327.tar.bz2 - #configure
ruby-1.9.3-p327 - #download
ruby-1.9.3-p327 - #extract
ruby-1.9.3-p327 - #validate
Libraries missing for ruby-1.9.3-p327: env. Refer to your system manual for installing libraries
Mounting remote ruby failed, trying to compile.
Fetching yaml-0.1.4.tar.gz to /Users/adamzerner/.rvm/archives
Extracting yaml to /Users/adamzerner/.rvm/src/yaml-0.1.4
Configuring yaml in /Users/adamzerner/.rvm/src/yaml-0.1.4.
Error running './configure --prefix=/Users/adamzerner/.rvm/usr', please read /Users/adamzerner/.rvm/log/ruby-1.9.3-p327/yaml/configure.log
Compiling yaml in /Users/adamzerner/.rvm/src/yaml-0.1.4.
Error running 'make', please read /Users/adamzerner/.rvm/log/ruby-1.9.3-p327/yaml/make.log
Installing Ruby from source to: /Users/adamzerner/.rvm/rubies/ruby-1.9.3-p327, this may take a while depending on your cpu(s)...
ruby-1.9.3-p327 - #downloading ruby-1.9.3-p327, this may take a while depending on your connection...
ruby-1.9.3-p327 - #extracted to /Users/adamzerner/.rvm/src/ruby-1.9.3-p327 (already extracted)
ruby-1.9.3-p327 - #configuring
Error running './configure --enable-shared --disable-install-doc --prefix=/Users/adamzerner/.rvm/rubies/ruby-1.9.3-p327 --with-opt-dir=/Users/adamzerner/.rvm/usr', please read /Users/adamzerner/.rvm/log/ruby-1.9.3-p327/configure.log
There has been an error while running configure. Halting the installation.
EDIT: What happens when I follow the github link OliverAtkinson posted
Last login: Wed Dec 26 15:55:12 on ttys000
Adam-Zerners-MacBook-Pro:~ adamzerner$ brew update
Updated Homebrew from 751a0d6e to c67c126c.
==> New Formulae
ume
==> Updated Formulae
akka global markdown ruby slrn
basex gnuplot mu ruby-build ttytter
casperjs gradle qt shiboken vice
cassandra groonga qt5 shocco wine
discount jenkins rakudo-star signing-party xvid
Adam-Zerners-MacBook-Pro:~ adamzerner$ brew tap homebrew/dupes
Error: Already tapped!
Adam-Zerners-MacBook-Pro:~ adamzerner$ brew install autoconf automake apple-gcc42
Error: autoconf-2.69 already installed
Error: automake-1.12.6 already installed
Error: apple-gcc42-4.2.1-5666.3 already installed
Adam-Zerners-MacBook-Pro:~ adamzerner$ brew remove autoconf automake apple-gcc42
Uninstalling /usr/local/Cellar/autoconf/2.69...
Uninstalling /usr/local/Cellar/automake/1.12.6...
Uninstalling /usr/local/Cellar/apple-gcc42/4.2.1-5666.3...
Adam-Zerners-MacBook-Pro:~ adamzerner$ brew install autoconf automake apple-gcc42
==> Downloading http://ftpmirror.gnu.org/autoconf/autoconf-2.69.tar.gz
Already downloaded: /Library/Caches/Homebrew/autoconf-2.69.tar.gz
==> Patching
patching file bin/autoreconf.in
==> ./configure --prefix=/usr/local/Cellar/autoconf/2.69
==> make install
/usr/local/Cellar/autoconf/2.69: 69 files, 2.0M, built in 13 seconds
==> Downloading http://ftpmirror.gnu.org/automake/automake-1.12.6.tar.gz
Already downloaded: /Library/Caches/Homebrew/automake-1.12.6.tar.gz
==> ./configure --prefix=/usr/local/Cellar/automake/1.12.6
==> make install
/usr/local/Cellar/automake/1.12.6: 130 files, 2.1M, built in 16 seconds
==> Downloading http://r.research.att.com/tools/gcc-42-5666.3-darwin11.pkg
Already downloaded: /Library/Caches/Homebrew/apple-gcc42-4.2.1-5666.3.pkg
==> Caveats
NOTE:
This formula provides components that were removed from XCode in the 4.2
release. There is no reason to install this formula if you are using a
version of XCode prior to 4.2.
This formula contains compilers built from Apple's GCC sources, build
5666.3, available from:
http://opensource.apple.com/tarballs/gcc
All compilers have a `-4.2` suffix. A GFortran compiler is also included.
==> Summary
/usr/local/Cellar/apple-gcc42/4.2.1-5666.3: 104 files, 75M, built in 5 seconds
Adam-Zerners-MacBook-Pro:~ adamzerner$ rvm pkg install openssl
Fetching openssl-1.0.1c.tar.gz to /Users/adamzerner/.rvm/archives
Extracting openssl to /Users/adamzerner/.rvm/src/openssl-1.0.1c
Configuring openssl in /Users/adamzerner/.rvm/src/openssl-1.0.1c.
Compiling openssl in /Users/adamzerner/.rvm/src/openssl-1.0.1c.
Error running 'make', please read /Users/adamzerner/.rvm/log/openssl/make.log
Please note that it's required to reinstall all rubies:
rvm reinstall all --force
Updating openssl certificates
Error running 'update_openssl_certs', please read /Users/adamzerner/.rvm/log/openssl.certs.log
Adam-Zerners-MacBook-Pro:~ adamzerner$ CC=/usr/local/bin/gcc-4.2 rvm reinstall 1.9.3 --patch falcon --force-autoconf -j 3
Removing /Users/adamzerner/.rvm/src/ruby-1.9.3-p327...
/Users/adamzerner/.rvm/rubies/ruby-1.9.3-p327 has already been removed.
Fetching yaml-0.1.4.tar.gz to /Users/adamzerner/.rvm/archives
Extracting yaml to /Users/adamzerner/.rvm/src/yaml-0.1.4
Configuring yaml in /Users/adamzerner/.rvm/src/yaml-0.1.4.
Error running './configure --prefix=/Users/adamzerner/.rvm/usr', please read /Users/adamzerner/.rvm/log/ruby-1.9.3-p327/yaml/configure.log
Compiling yaml in /Users/adamzerner/.rvm/src/yaml-0.1.4.
Error running 'make -j3', please read /Users/adamzerner/.rvm/log/ruby-1.9.3-p327/yaml/make.log
Installing Ruby from source to: /Users/adamzerner/.rvm/rubies/ruby-1.9.3-p327, this may take a while depending on your cpu(s)...
ruby-1.9.3-p327 - #downloading ruby-1.9.3-p327, this may take a while depending on your connection...
ruby-1.9.3-p327 - #extracting ruby-1.9.3-p327 to /Users/adamzerner/.rvm/src/ruby-1.9.3-p327
ruby-1.9.3-p327 - #extracted to /Users/adamzerner/.rvm/src/ruby-1.9.3-p327
Applying patch /Users/adamzerner/.rvm/patches/ruby/1.9.3/p327/falcon.diff
ruby-1.9.3-p327 - #autoreconf-f
ruby-1.9.3-p327 - #configuring
Error running './configure --enable-shared --disable-install-doc --prefix=/Users/adamzerner/.rvm/rubies/ruby-1.9.3-p327 --with-opt-dir=/Users/adamzerner/.rvm/usr', please read /Users/adamzerner/.rvm/log/ruby-1.9.3-p327/configure.log
There has been an error while running configure. Halting the installation.
Adam-Zerners-MacBook-Pro:~ adamzerner$ ruby -v
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
Adam-Zerners-MacBook-Pro:~ adamzerner$
I've successfully downloaded Ruby 1.9.3 now!
I think the problem was that I hadn't downloaded Command Line Tools from XCode. See http://robots.thoughtbot.com/post/27985816073/the-hitchhikers-guide-to-riding-a-mountain-lion
note that for whoami, it's using the backtick key, which is right above the tab key. It is NOT using quotes.
After I downloaded Command Line Tools, I then typed in rvm install 1.9.3. I got the same "long thing" as before, but at that point I had everything I needed, so I just pressed q to continue, and ruby 1.9.3 was successfully installed!
note: although it was successfully installed, when I typed ruby -v, it still said it was 1.8.7 even though it wasn't. However, after closing and reopening the terminal, it then said that the version was indeed 1.9.3.

installing home brew for rails 3.2

I am trying to install homebrew according to the guidelines described in here.
I have curl and rvm, and want to install rails 1.9.3 on my lion 1.7.4 with Xcode 4.3.2 and with developer command line tools installed.
It seems I will need libksba, which requires me to use to command brew install libksba.
So I will need Home Brew.
I follow the instructions and use
/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
which outputs the following:
$ /usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
==> This script will install:
/usr/local/bin/brew
/usr/local/Library/Formula/...
/usr/local/Library/Homebrew/...
Press enter to continue
==> Downloading and Installing Homebrew...
==> Installation successful!
You should run `brew doctor' *before* you install anything.
Now type: brew help
[~]$
[~]$
[~]$ brew doctor
/usr/local/Library/Homebrew/tab.rb:1:in `require': no such file to load -- ostruct `(LoadError)`
from /usr/local/Library/Homebrew/tab.rb:1
from /usr/local/Library/Homebrew/bottles.rb:1:in `require'
from /usr/local/Library/Homebrew/bottles.rb:1
from /usr/local/Library/Homebrew/extend/pathname.rb:2:in `require'
from /usr/local/Library/Homebrew/extend/pathname.rb:2
from /usr/local/Library/Homebrew/global.rb:1:in `require'
from /usr/local/Library/Homebrew/global.rb:1
from /usr/local/bin/brew:10:in `require'
from /usr/local/bin/brew:10
[~]$
So this means basically that brew was not installed right. Do I have to change the path at which it is looking for? I used to have MacPorts in, which I completely erased so there should be no conflicts there. Please help!!! Thanks a lot! It's an awesome community.
UPDATE:
I time machined back a year because I thought I did something critically wrong. Now I still have an issue installing, but it seems a bit more common.
I installed homebrew using
/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
Any command of "brew" gives me this error:
[~]$ brew
/usr/local/bin/brew:6:in `require': no such file to load -- pathname (LoadError)
from /usr/local/bin/brew:6
Any suggestions? Thank you all!
I had the same problem as mentioned in my comment above. To resolve it I ended up having to restore my default system ruby. I am on SnowLeopard - OSX 10.6.8, so your resources may vary, but what I did was:
uninstall xcode: sudo /Developer/Library/uninstall-devtools --mode=all
rsync or copy /System/Library/Frameworks/Ruby.framework from another machine running 10.6.8
You also need the ruby executables in /usr/bin to point to the system Ruby: /usr/bin/{erb,gem,irb,rdoc,ri,ruby,testrb}
these are just symlinks to /System/Library/Frameworks/Ruby.framework
erb -> ../../System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/erb
so I re-symlinked them, for example from /usr/bin: sudo ln -s ../../System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/erb ./erb
the brew executable currently uses /usr/bin/ruby so that needs to be there in the least
I hear future versions of brew will point directly at the system ruby on the /System/Library/Frameworks/Ruby.framework path, so symlinking ruby to a custom install is a bad idea
At this point brew commands worked again and ostruct (part of ruby standard lib) was again found. I went ahead and added xcode back in and worked through some minor 'brew doctor' errors.
I have now replaced all my old macports packages with homebrew packages and its such an improvement!