Upgrading to Ruby 2.1.3 on Mac OSx 10.9.5
So the solution, which resolved the issue is to run the following:
$ brew rm cloog; brew install cloog
Ta-Ta. It all worked all of the sudden!
$ ruby -v
ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-darwin13.0]
Brew Update not working after mac 10.9
This fixed it for me
cd `brew --prefix`/Homebrew
git fetch origin
git reset --hard origin/master
brew update worked fine after that
Homebrew OSX 10.9.3: /usr/local/Library/brew.rb:37:in `main': uninitialized constant OS (NameError)
The solution I found for solving this was to completely uninstall Homebrew from the system and start from scratch.
I used the code provided in this Github Gist to uninstall homebrew.
Error to install Nokogiri on OSX 10.9 Maverick?
I found this log and saw that gcc-4.2 was not found:
package configuration for libxslt
cflags: -I/usr/local/Cellar/libxslt/1.1.28/include -I/usr/local/Cellar/libxml2/2.9.1/include/libxml2
ldflags: -L/usr/local/Cellar/libxslt/1.1.28/lib -L/usr/local/Cellar/libxml2/2.9.1/lib
libs: -lxslt -lxml2 -lz -lpthread -liconv -lm -lxml2
package configuration for libxml-2.0
cflags: -I/usr/local/Cellar/libxml2/2.9.1/include/libxml2
ldflags: -L/usr/local/Cellar/libxml2/2.9.1/lib
libs: -lxml2
package configuration for libiconv is not found
"/usr/bin/gcc-4.2 -o conftest -I/Users/ericcamalionte/.rvm/rubies/ruby-1.9.2-p320/include/ruby-1.9.1/x86_64-darwin11.4.0 -I/Users/ericcamalionte/.rvm/rubies/ruby-1.9.2-p320/include/ruby-1.9.1/ruby/backward -I/Users/ericcamalionte/.rvm/rubies/ruby-1.9.2-p320/include/ruby-1.9.1 -I. -I/usr/local/Cellar/libxslt/1.1.28/include -I/usr/local/Cellar/libxml2/2.9.1/include/libxml2 -I/usr/local/Cellar/libiconv/1.14/include -I/Users/ericcamalionte/.rvm/gems/ruby-1.9.2-p320@dns-panel/gems/nokogiri-1.6.0/ports/x86_64-apple-darwin13.0.0/libxml2/2.8.0/include -I/Users/ericcamalionte/.rvm/gems/ruby-1.9.2-p320@dns-panel/gems/nokogiri-1.6.0/ports/x86_64-apple-darwin13.0.0/libxslt/1.1.26/include -I/Users/ericcamalionte/.rvm/usr/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wshorten-64-to-32 -Wno-long-long -fno-common -pipe -g -DXP_UNIX -O3 -Wall -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline -DNOKOGIRI_USE_PACKAGED_LIBRARIES -DNOKOGIRI_LIBXML2_PATH='"/Users/ericcamalionte/.rvm/gems/ruby-1.9.2-p320@dns-panel/gems/nokogiri-1.6.0/ports/x86_64-apple-darwin13.0.0/libxml2/2.8.0"' -DNOKOGIRI_LIBXSLT_PATH='"/Users/ericcamalionte/.rvm/gems/ruby-1.9.2-p320@dns-panel/gems/nokogiri-1.6.0/ports/x86_64-apple-darwin13.0.0/libxslt/1.1.26"' -I/usr/local/Cellar/libxslt/1.1.28/include -I/usr/local/Cellar/libxml2/2.9.1/include/libxml2 -I/usr/local/Cellar/libxml2/2.9.1/include/libxml2 conftest.c -L. -L/Users/ericcamalionte/.rvm/rubies/ruby-1.9.2-p320/lib -L/usr/local/Cellar/libxslt/1.1.28/lib -L/usr/local/Cellar/libxml2/2.9.1/lib -L/usr/local/Cellar/libiconv/1.14/lib -L/Users/ericcamalionte/.rvm/gems/ruby-1.9.2-p320@dns-panel/gems/nokogiri-1.6.0/ports/x86_64-apple-darwin13.0.0/libxml2/2.8.0/lib -L/Users/ericcamalionte/.rvm/gems/ruby-1.9.2-p320@dns-panel/gems/nokogiri-1.6.0/ports/x86_64-apple-darwin13.0.0/libxslt/1.1.26/lib -L/Users/ericcamalionte/.rvm/usr/lib -L. -Wl,-rpath,/Users/ericcamalionte/.rvm/gems/ruby-1.9.2-p320@dns-panel/gems/nokogiri-1.6.0/ports/x86_64-apple-darwin13.0.0/libxml2/2.8.0/lib -Wl,-rpath,/Users/ericcamalionte/.rvm/gems/ruby-1.9.2-p320@dns-panel/gems/nokogiri-1.6.0/ports/x86_64-apple-darwin13.0.0/libxslt/1.1.26/lib -L/usr/local/Cellar/libxslt/1.1.28/lib -L/usr/local/Cellar/libxml2/2.9.1/lib -L/usr/local/Cellar/libxml2/2.9.1/lib -lxslt -lxml2 -lz -lpthread -liconv -lm -lxml2 -lxml2 -lruby.1.9.1-static -lpthread -ldl -lobjc "
sh: /usr/bin/gcc-4.2: No such file or directory
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main() {return 0;}
/* end */
To solve this problem I intalled apple-gcc42 using homebrew brew install apple-gcc42
and created a symlink to my /usr/bin :
sudo ln -s /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 /usr/bin/gcc-4.2
Error installing Rails on Macbook Air OS 10.9
I followed the steps in the blog post below and I finally got rails working on my 2012 MacBook Air running Maverick(10.9.4).
http://www.createdbypete.com/articles/ruby-on-rails-development-setup-for-mac-osx/
Though probably overkill, I reloaded Terminal after I entered each line.
Now when I type:
$gem -v
I get
2.0.3
and if I type
$ruby -v
I get
ruby 2.0.0p451 (2014-02-24 revision 45167) [universal.x86_64-darwin13]
And finally, when I type
$rails -v
I get
Rails 4.1.4
:)
Installing Homebrew on OS X Mavericks gives SSL Error 9806
This was a curious case but this is how I managed to get it to work.
Thanks to katezaps for the lead.
When installing homebrew, you need XCodes CLI. Homebrews site gives you a terminal command where it will prompt you to install XCodes CLI if you don't have it yet. After you dl and install CLI, you can go back to the terminal and continue installing homebrew by hitting return.
However, the curious part was that in my case, it seemed that CLI didn't install properly through homebrews command -- and therefore, homebrew hit that SSL error. I had to download XCode and do the xcode install command again for the CLI. That just safeguards that you installed CLI properly.
Now, if you try and run homebrews install command again, it will tell you that you have homebrew already, and that you need to uninstall. However, if you run that uninstall command, nothing happens since it can't find homebrew.
To wipe homebrew again, I used this command:
sudo rm -rf /usr/local/.git
<Password Prompt here>
chown <your_username> /usr/local
and tried the install again.
Now it installed without a hitch.
Ruby version not identified on Mac
This issue is quite probably that you're still using the ruby version that ships with MacOS (the one under /usr/bin/ruby
) rather than the one installed by homebrew (which is under /usr/local/bin/ruby
.
First, check which version you're actually using by executing the following command in the terminal:
which ruby
If this says /usr/bin/ruby
instead of /usr/local/bin/ruby
, you can add the following at the end of your .bashrc
or .zshrc
to allow the terminal to use the executables from /usr/local/bin
over /usr/bin
:
export PATH="/usr/local/bin:$PATH"
Now if you open a new terminal window, which ruby
should point to the one installed by homebrew
Opencv install on os x 10.9 fails
You can try to install opencv from homebrew, I met the same problem with cmake in my 10.9 and finally I found the solution from Chris Muktar. Here are the steps:
- Make sure xcode-select --install Xcode command line tools 5.0.1 are installed.
- Install python using brew - brew install python.
- pip update
- pip install numpy
- brew linkapps
- Add export PYTHONPATH=/usr/local/Cellar/opencv/2.4.6.1/lib/python2.7/site-packages:$PYTHONPATH to .bash_profile
- brew install opencv
In the last step I came across the Error: No available formula for opencv. In this case, you should first run the command brew tap homebrew/science.
Good Luck
Error Installing Jekyll on Mac OS Mavericks (10.9.2)
Your problem appeared with Xcode 5.1. In order to avoid many problems related to MacOS' ruby version (this one and many others), you really should use RVM.
If you don't already have it, install Homebrew first: (it is not absolutely necessary, but allows us to install ruby and its dependencies without a looong compilation)
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
Then, the following command will install RVM and the last version of Ruby:
\curl -L https://get.rvm.io | bash -s stable --ruby
Check everything is OK:
ruby --version
You can now install Jekyll:
gem install jekyll
Now, if you really don't want to use RVM, you can execute:
sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install jekyll
But I bet further problems would come.
Related Topics
You Don't Have Write Permissions into the /Var/Lib/Gems/1.9.1 Directory
Scraping/Parsing Google Search Results in Ruby
Write Array of Radix-2 Numeric Strings to Binary File in Ruby
How to Change Passenger Ruby Version Without Recompiling
Rake Db:Migrate Is Being Aborted Due to Rake Version Difference
Alphabetize Arabic and Japanese Text That Is in Unicode
Parsing Date from Text Using Ruby
Why Would You Use a !! Operator
Error - "Gem Install Rails" - Libxml2 Is Missing
Ruby Incorrectly Parses 2 Digit Year
Using Activemodel::Serializer in Rails - JSON Data Differs Between JSON and Index Response
How to Convert a Scientific Notation String to Decimal Notation
How to Delete a Range of Values from an Array
Exec': String Contains Null Byte (Argumenterror)