Trouble Installing Ruby on Mac OSX 10.6.8 Snow Leopard - ruby-on-rails

I just installed Ruby Version Manager 1.10.2 and attempted to install Ruby 1.9.2 and I get the following error:
ayman-al-abdullahs-macbook:~ Terminal$ rvm install 1.9.2
Fetching yaml-0.1.4.tar.gz to /Users/Terminal/.rvm/archives
Extracting yaml-0.1.4.tar.gz to /Users/Terminal/.rvm/src
Configuring yaml in /Users/Terminal/.rvm/src/yaml-0.1.4.
Error running ' ./configure --prefix="/Users/Terminal/.rvm/usr" ', please read /Users/Terminal/.rvm/log/ruby-1.9.2-p290/yaml/configure.log
Compiling yaml in /Users/Terminal/.rvm/src/yaml-0.1.4.
Error running 'make ', please read /Users/Terminal/.rvm/log/ruby-1.9.2- p290/yaml/make.log
Database file /Users/Terminal/.rvm/config/packages does not exist.
Installing Ruby from source to: /Users/Terminal/.rvm/rubies/ruby-1.9.2-p290, this may take a while depending on your cpu(s)...
ruby-1.9.2-p290 - #fetching
ruby-1.9.2-p290 - #extracting ruby-1.9.2-p290 to /Users/Terminal/.rvm/src/ruby-1.9.2- p290
ruby-1.9.2-p290 - #extracted to /Users/Terminal/.rvm/src/ruby-1.9.2-p290
ruby-1.9.2-p290 - #configuring
Error running ' ./configure --prefix=/Users/Terminal/.rvm/rubies/ruby-1.9.2-p290 -- enable-shared --disable-install-doc --with-libyaml --with-opt-dir=/Users/Terminal/.rvm/usr ', please read /Users/Terminal/.rvm/log/ruby-1.9.2-p290/configure.log
There has been an error while running configure. Halting the installation.
I opened the .rvm/log/ruby-1.9.2-p290/configure.log I received the following error:
[2012-02-10 21:14:02] ./configure --prefix=/Users/Terminal/.rvm/rubies/ruby-1.9.2-p290 --enable-shared --disable-install-doc --with-libyaml --with-opt-dir=/Users/Terminal/.rvm/usr
configure: WARNING: unrecognized options: --with-libyaml
checking build system type... i386-apple-darwin10.8.0
checking host system type... i386-apple-darwin10.8.0
checking target system type... i386-apple-darwin10.8.0
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/Users/Terminal/.rvm/src/ruby-1.9.2-p290':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
I tried rm the file and reinstalling it, and I still get the same error.
Does anyone have any clue what this could be?
Thank you!
UPDATE UPDATE
Fixed it!
Downloading xcode from Apple requires you to be a developer ($99) or pay $5 for version 10.7 (which requires Lion).
I was able to procure an older version of XCode made specifically for Snow Leapard (4.0.2). After downloading, and installing Ruby version 1.9.3 it ran perfectly.
Thank you all for your help!
Let me know if anyone else runs into this same issue and I'll be happy to walk you through my terminal steps (saved the terminal log).

It seems you don't have gcc. Install Apple Developer Tools.

I fixed it!
Downloading xcode from Apple requires you to be a developer ($99) or pay $5 for version 10.7 (which requires Lion).
I was able to procure an older version of XCode made specifically for Snow Leapard (4.0.2). After downloading, and installing Ruby version 1.9.3 it ran perfectly.
Thank you all for your help!
Let me know if anyone else runs into this same issue and I'll be happy to walk you through my terminal steps (saved the terminal log).

Related

zendesk app tools ZAT Installation errorFailed to build gem native extension

I am trying to install "ZAT" the Zendesk app tools following the documentation, but receiving this error: \
Building native extensions. This could take a while...
ERROR: Error installing zendesk_apps_tools:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.6.0/gems/eventmachine-1.2.7/ext
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20220105-47488-6pwgmm.rb extconf.rb
checking for -lcrypto... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
ruby version => ruby 2.6.3p62 (2019-04-16 revision 67580)
xcode-select => xcode-select version 2384.
macOs : BIg Sur version 11.6.2
any idea what is the issue?
Installation via rvm resolves this issue.
I had the same problem on my Mac Big Sur 11.6 with M1 chip. None of the suggested solutions helps me (I tried to reinstall Xcode, updating/reinstalling command line tools, deal with the installation of thin separately, etc.). One thing that really helps me it's changing the ruby version to 2.6.9 with rbenv (https://gorails.com/setup/osx/11-big-sur - check Installing Ruby . Follow this instruction, but choose another ruby version). After change ruby version, make sure the correct version of ruby is currently selected with ruby -v and then try execute gem install zendesk_apps_tools again. I tried several versions of ruby before it worked for me, but in the end everything was fine on 2.6.9 version

Unable to install Ruby with RVM

I'm having trouble installing Ruby with RVM, and this one has me stumped. I'm running on OS Mavericks, with the latest XCode and xcode command line tools. I have a (to my knowledge) identical set up on another machine with no problems.
RVM appeared to install with no problems.
Upon an attempt to rvm install 2.1, I received the following error message:
ruby-2.1.1 - #removing src/ruby-2.1.1..
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.9/x86_64/ruby-2.1.1.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Certificates in '/usr/local/etc/openssl/cert.pem' already are up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/user/.rvm/rubies/ruby-2.1.1, this may take a while depending on your cpu(s)...
ruby-2.1.1 - #downloading ruby-2.1.1, this may take a while depending on your connection...
ruby-2.1.1 - #extracting ruby-2.1.1 to /Users/user/.rvm/src/ruby-2.1.1...
ruby-2.1.1 - #applying patch /Users/user/.rvm/patches/ruby/changeset_r45225.diff.
ruby-2.1.1 - #applying patch /Users/user/.rvm/patches/ruby/changeset_r45240.diff.
ruby-2.1.1 - #configuring.
Error running './configure --prefix=/Users/user/.rvm/rubies/ruby-2.1.1 --with-opt-dir=/usr/local/opt/libyaml:/usr/local/opt/readline:/usr/local/opt/libksba:/usr/local/opt/openssl --enable-shared',
showing last 15 lines of /Users/user/.rvm/log/1394918736_ruby-2.1.1/configure.log
[2014-03-15 21:25:55] ./configure
current path: /Users/user/.rvm/src/ruby-2.1.1
PATH=/usr/local/opt/pkg-config/bin:/usr/local/opt/libtool/bin:/usr/local/opt/automake/bin:/usr/local/opt/autoconf/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/user/.rvm/bin
command(4): ./configure --prefix=/Users/user/.rvm/rubies/ruby-2.1.1 --with-opt-dir=/usr/local/opt/libyaml:/usr/local/opt/readline:/usr/local/opt/libksba:/usr/local/opt/openssl --enable-shared
checking build system type... x86_64-apple-darwin13.1.0
checking host system type... x86_64-apple-darwin13.1.0
checking target system type... x86_64-apple-darwin13.1.0
<stdin>:2:3: error: #error premature clang
#error premature clang
^
1 error generated.
configure: error: clang version 3.0 or later is required
There has been an error while running configure. Halting the installation.
My first thought was to run RVM requirements, which resulted in another error message
Checking requirements for osx.
Installing requirements for osx.
Updating system....
Installing required packages: gcc46.....
Error running 'requirements_osx_brew_libs_install gcc46',
showing last 15 lines of /Users/user/.rvm/log/1394919146/package_install_gcc46.log
+ case "$1" in
+ [[ -t 1 ]]
+ return 1
+ printf %b 'There were package installation errors, make sure to read the log.
Try `brew tap --repair` and make sure `brew doctor` looks reasonable.
Check Homebrew requirements https://github.com/mxcl/homebrew/wiki/Installation\n'
There were package installation errors, make sure to read the log.
Try `brew tap --repair` and make sure `brew doctor` looks reasonable.
Check Homebrew requirements https://github.com/mxcl/homebrew/wiki/Installation
+ case "$_system_version" in
+ return 1
Requirements installation failed with status: 1.
I followed the advice here, and have spent hours now looking online, but no solution yet has worked for me. Any thoughts and ideas are most welcome - this one has me stumped.
Once you have gcc46 insall you need to set it as the default compiler. You can find information on different ways to do that here: Setting GCC 4.2 as the default compiler on Mac OS X Leopard
Then as that output says, use brew tap --repair and brew doctor which gives you more info.

Update ruby version on MAC

I'm trying to update ma ruby version.
I'm with ruby 1.8.7 and I would like to install 2.1.0.
I just installed rvm, rbenv, brew and gem.
But when I try to do
$ rbenv install 2.1.0.
I get an error about clang. I don't get the point between clang and ruby
Could you please help me?
Error:
$ rbenv install 2.1.0
Downloading ruby-2.1.0.tar.gz...
Installing ruby-2.1.0...
BUILD FAILED
...
Last 10 log lines:
...
checking build system type... x86_64-apple-darwin12.3.0
checking host system type... x86_64-apple-darwin12.3.0
checking target system type... x86_64-apple-darwin12.3.0
checking for gcc-4.2... no
checking for clang... no
checking for gcc... no
checking for cc... no
./configure: line 3390: -E: command not found
configure: error: clang version 3.0 or later is required
You need to install the Developer Tools command-line tools in order to build Ruby. As one option, you can install Xcode from the App Store, and Xcode will let you install the command line tools if they aren't automatically installed with your version.
You can install developer command line tools without installing Xcode. Just type the following in the terminal:
xcode-select --install

Updating ror 1.8.7 to 1.9.3

I'm a beginner ror programmer with a macbook air. i've just managed to upgrade my leopard to Lion. Downloaded codex 10.7 and macport and also RVM. The thing i'm trying to do now is to update my ruby from 1.8.7 to 1.9.3 but this is what i got:
I typed out: 'rvm install ruby-1.9.2-p318"
Annie-Tungs-MacBook-Air:~ annietung$ rvm install ruby-1.9.2-p318 Fetching yaml-0.1.4.tar.gz to /Users/annietung/.rvm/archives Extracting yaml-0.1.4.tar.gz to /Users/annietung/.rvm/src Configuring yaml in /Users/annietung/.rvm/src/yaml-0.1.4. Error running ' ./configure --prefix="/Users/annietung/.rvm/usr" ', please read /Users/annietung/.rvm/log/ruby-1.9.2-p318/yaml/configure.log Compiling yaml in /Users/annietung/.rvm/src/yaml-0.1.4. Error running 'make ', please read /Users/annietung/.rvm/log/ruby-1.9.2-p318/yaml/make.log
Database file /Users/annietung/.rvm/config/packages does not exist.
Installing Ruby from source to: /Users/annietung/.rvm/rubies/ruby-1.9.2-p318, this may take a while depending on your cpu(s)...
ruby-1.9.2-p318 - #fetching ruby-1.9.2-p318 - #extracted to /Users/annietung/.rvm/src/ruby-1.9.2-p318 (already extracted) ruby-1.9.2-p318 - #configuring Error running ' ./configure --prefix=/Users/annietung/.rvm/rubies/ruby-1.9.2-p318 --enable-shared --disable-install-doc --with-libyaml --with-opt-dir=/Users/annietung/.rvm/usr ', please read /Users/annietung/.rvm/log/ruby-1.9.2-p318/configure.log There has been an error while running configure. Halting the installation. ls: /Users/annietung/.rvm/rubies/*/bin/ruby: No such file or directory Annie-Tungs-MacBook-Air:~ annietung$
Looks like you need to download and install Apple's Command Line Tools for OSX Lion so that you can build Ruby properly.

Having difficulty installing rvm 1.9.3 with xcode 4.3.2

If I type xcodebuild -version it recognises that I have xcode installed:
Xcode 4.3.2
Build version 4E2002
But then when I try to check rvm requirements I get the following:
Notes for Mac OS X 10.7.3, No Xcode.
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'
You can use & download osx-gcc-installer: https://github.com/kennethreitz/osx-gcc- installer
** NOTE: Currently, Node.js is having issues building with osx-gcc-installer. The only fix is to install Xcode over osx-gcc-installer.
We had reports of http://hpc.sourceforge.net/ making things work, but it looks like not easiest/safest to setup.
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 4.2:
* is only supported by ruby 1.9.3+ using command line flag: --with-gcc=clang
* it breaks gems with native extensions, especially DB drivers.
It seems that it is not recognising my xcode and when I try to install rvm 1.9.3 I get:
Fetching yaml-0.1.4.tar.gz to /Users/sikandarshukla/.rvm/archives
Extracting yaml-0.1.4.tar.gz to /Users/sikandarshukla/.rvm/src
Configuring yaml in /Users/sikandarshukla/.rvm/src/yaml-0.1.4.
Error running ' ./configure --prefix="/Users/sikandarshukla/.rvm/usr" ', please read /Users/sikandarshukla/.rvm/log/ruby-1.9.3-p125/yaml/configure.log
Compiling yaml in /Users/sikandarshukla/.rvm/src/yaml-0.1.4.
Error running 'make ', please read /Users/sikandarshukla/.rvm/log/ruby-1.9.3- p125/yaml/make.log
Database file /Users/sikandarshukla/.rvm/config/packages does not exist.
/Users/sikandarshukla/.rvm/scripts/functions/build: line 28: --version: command not found
Installing Ruby from source to: /Users/sikandarshukla/.rvm/rubies/ruby-1.9.3-p125, this may take a while depending on your cpu(s)...
ruby-1.9.3-p125 - #fetching
ruby-1.9.3-p125 - #extracted to /Users/sikandarshukla/.rvm/src/ruby-1.9.3-p125 (already extracted)
ruby-1.9.3-p125 - #configuring
Error running ' ./configure --prefix=/Users/sikandarshukla/.rvm/rubies/ruby-1.9.3-p125 -- enable-shared --disable-install-doc --with-libyaml --with-opt- dir=/Users/sikandarshukla/.rvm/usr ', please read /Users/sikandarshukla/.rvm/log/ruby-1.9.3- p125/configure.log
There has been an error while running configure. Halting the installation.
Now if i read the log, the output of cat /Users/sikandarshukla/.rvm/log/ruby-1.9.3-p125/configure.log is the following:
./configure --prefix=/Users/sikandarshukla/.rvm/rubies/ruby-1.9.3-p125 --enable-shared -- disable-install-doc --with-libyaml --with-opt-dir=/Users/sikandarshukla/.rvm/usr
configure: WARNING: unrecognized options: --with-libyaml
checking build system type... i386-apple-darwin11.3.0
checking host system type... i386-apple-darwin11.3.0
checking target system type... i386-apple-darwin11.3.0
checking whether the C compiler works... no
configure: error: in `/Users/sikandarshukla/.rvm/src/ruby-1.9.3-p125':
configure: error: C compiler cannot create executables
See `config.log' for more details
and the output of cat /Users/sikandarshukla/.rvm/log/ruby-1.9.3-p125/yaml/configure.log is the following:
./configure --prefix="/Users/sikandarshukla/.rvm/usr"
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... config/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... no
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/Users/sikandarshukla/.rvm/src/yaml-0.1.4':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
Any ideas what to do, Thanks for your help
It's a bug in recognizing Xcode version, I have created a ticket and it should be solved shortly -> https://github.com/wayneeseguin/rvm/issues/846
All Xcode 4.2+ have the same issue:
4.2:
is only supported by ruby 1.9.3+ using command line flag: --with-gcc=clang
it breaks gems with native extensions, especially DB drivers.
To solve use osx-gcc-installer:
You can use & download osx-gcc-installer: https://github.com/kennethreitz/osx-gcc-installer

Resources