Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

OSX 10.10 Yosemite gem install fails: You have to install development tools first #304

Closed
PhilCoggins opened this issue Jun 23, 2014 · 46 comments

Comments

@PhilCoggins
Copy link

Note: this may not be an issue with therubyracer. I have checked #301 and this seems to be unrelated to my issue.

I just installed yosemite 10.10, using XCode 6 command line tools (set from XCode).

$ gem install therubyracer
Fetching: libv8-3.16.14.3-x86_64-darwin-13.gem (100%)
Successfully installed libv8-3.16.14.3-x86_64-darwin-13
Fetching: therubyracer-0.12.1.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing therubyracer:
    ERROR: Failed to build gem native extension.

    /Users/philcoggins/.rbenv/versions/2.1.2/bin/ruby extconf.rb
checking for main() in -lpthread... *** 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.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/Users/philcoggins/.rbenv/versions/2.1.2/bin/ruby
    --with-pthreadlib
    --without-pthreadlib
/Users/philcoggins/.rbenv/versions/2.1.2/lib/ruby/2.1.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
    from /Users/philcoggins/.rbenv/versions/2.1.2/lib/ruby/2.1.0/mkmf.rb:541:in `try_link0'
    from /Users/philcoggins/.rbenv/versions/2.1.2/lib/ruby/2.1.0/mkmf.rb:556:in `try_link'
    from /Users/philcoggins/.rbenv/versions/2.1.2/lib/ruby/2.1.0/mkmf.rb:742:in `try_func'
    from /Users/philcoggins/.rbenv/versions/2.1.2/lib/ruby/2.1.0/mkmf.rb:973:in `block in have_library'
    from /Users/philcoggins/.rbenv/versions/2.1.2/lib/ruby/2.1.0/mkmf.rb:918:in `block in checking_for'
    from /Users/philcoggins/.rbenv/versions/2.1.2/lib/ruby/2.1.0/mkmf.rb:351:in `block (2 levels) in postpone'
    from /Users/philcoggins/.rbenv/versions/2.1.2/lib/ruby/2.1.0/mkmf.rb:321:in `open'
    from /Users/philcoggins/.rbenv/versions/2.1.2/lib/ruby/2.1.0/mkmf.rb:351:in `block in postpone'
    from /Users/philcoggins/.rbenv/versions/2.1.2/lib/ruby/2.1.0/mkmf.rb:321:in `open'
    from /Users/philcoggins/.rbenv/versions/2.1.2/lib/ruby/2.1.0/mkmf.rb:347:in `postpone'
    from /Users/philcoggins/.rbenv/versions/2.1.2/lib/ruby/2.1.0/mkmf.rb:917:in `checking_for'
    from /Users/philcoggins/.rbenv/versions/2.1.2/lib/ruby/2.1.0/mkmf.rb:968:in `have_library'
    from extconf.rb:3:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in /Users/philcoggins/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/therubyracer-0.12.1 for inspection.
Results logged to /Users/philcoggins/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-13/2.1.0-static/therubyracer-0.12.1/gem_make.out
$ gcc -v
Configured with: --prefix=/Applications/Xcode6-Beta2.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.0 (clang-600.0.34.4) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.0.0
Thread model: posix
$ which gcc
/usr/bin/gcc
$ xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates

Thoughts?

@PhilCoggins
Copy link
Author

Checked software updates for my OS and I haven't yet installed update 1.0 for 10.10. It is installing now, will update to see if this fixes the problem.

EDIT 1: This did not resolve the issue.

@ignisf
Copy link
Collaborator

ignisf commented Jun 23, 2014

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.

What does the mkmf.log file say?

@PhilCoggins
Copy link
Author

$ cat ./ruby/gems/2.1.0/extensions/x86_64-darwin-13/2.1.0-static/therubyracer-0.11.4/mkmf.log
"gcc-4.2 -o conftest -I/Users/philcoggins/.rbenv/versions/2.1.2/include/ruby-2.1.0/x86_64-darwin13.0 -I/Users/philcoggins/.rbenv/versions/2.1.2/include/ruby-2.1.0/ruby/backward -I/Users/philcoggins/.rbenv/versions/2.1.2/include/ruby-2.1.0 -I. -I/Users/philcoggins/.rbenv/versions/2.1.2/include  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -O3 -Wno-error=shorten-64-to-32  -pipe conftest.c  -L. -L/Users/philcoggins/.rbenv/versions/2.1.2/lib -L. -L/Users/philcoggins/.rbenv/versions/2.1.2/lib  -fstack-protector -L/usr/local/lib     -lruby-static -framework CoreFoundation  -lpthread -lgmp -ldl -lobjc "
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: int main(int argc, char **argv)
4: {
5:   return 0;
6: }
/* end */
$ which gcc-4.2
gcc-4.2 not found

@PhilCoggins
Copy link
Author

So clearly ruby is trying to use gcc-4.2, which doesn't exist in my path.

I could easily symlink gcc to gcc-4.2 and be done with it, but that wouldn't feel right.

Somewhere along the way, someone is deciding to use gcc-4.2 instead of the gcc used by command line tools. Who do I need to be bugging to fix this? Would the apple developer forums be the right place to go?

@jasdeepsingh
Copy link

Having the exact same issue..

➜ ~ which gcc
/usr/bin/gcc
➜ ~ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc48/4.8.3/libexec/gcc/x86_64-apple-darwin14.0.0/4.8.3/lto-wrapper
Target: x86_64-apple-darwin14.0.0
Configured with: ../configure --build=x86_64-apple-darwin14.0.0 --prefix=/usr/local/Cellar/gcc48/4.8.3 --enable-languages=c,c++,objc,obj-c++ --program-suffix=-4.8 --with-gmp=/usr/local/opt/gmp4 --with-mpfr=/usr/local/opt/mpfr2 --with-mpc=/usr/local/opt/libmpc08 --with-cloog=/usr/local/opt/cloog018 --with-isl=/usr/local/opt/isl011 --with-system-zlib --enable-version-specific-runtime-libs --enable-libstdcxx-time=yes --enable-stage1-checking --enable-checking=release --enable-lto --disable-werror --with-pkgversion='Homebrew gcc48 4.8.3' --with-bugurl=https://github.com/Homebrew/homebrew-versions/issues --enable-plugin --disable-nls --enable-multilib
Thread model: posix
gcc version 4.8.3 (Homebrew gcc48 4.8.3)
➜ ~ xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates

@skandragon
Copy link

I had trouble with the rbzmq gem, and fixed this by ensuring I did not have gcc-4.2 in my path and then re-installing ruby via "rbenv install 2.1.2"

I had gcc-4.2 in my path, probably from a bad idea (or a previous OS X install) so I had to fist remove gcc. I put them in a directory called "disabled-sma" so if needed, I could recover them.

This "fixed" it ; you might want to see if this also fixes this gem.

@jasdeepsingh
Copy link

@skandragon what version of gcc you did had in your path, after you removed gcc-4.2 ? Also, are you able to install 1.9.3?

@skandragon
Copy link

I may have spoken too soon; I cannot build the libv8 gem, but it might be that something else needs to be built first. brew is probably half-ancient by now, so I should nuke and reinstall I suspect.

$ gcc -v
Configured with: --prefix=/Applications/Xcode6-Beta.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode6-Beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/c++/4.2.1
Apple LLVM version 6.0 (clang-600.0.34.4) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.0.0
Thread model: posix

@shanbhardwaj
Copy link

I have been able to install libv8 with

  • rbenv
  • ruby 2.1.2
  • gcc 4.2.1
    with the following command

gem install libv8 -v 3.16.14.3 -- --with-system-v8

@renatorozas
Copy link

Any updates on this? :-/

@PhilCoggins
Copy link
Author

Do you have apple command line tools installed through brew? brew install apple-gcc42

@renatorozas
Copy link

@PhilCoggins Yes I do. I tried exporting CC=/path/to/gcc-4.2 but it didn't work either.

@krazyjakee
Copy link

@PhilCoggins did you open a thread on the apple developer forums?

Is anyone any further with getting this working? I'm trying to install it as part of therubyracer and am unable to.

👍

@renatorozas
Copy link

I just tried installing the gem using gcc49, still getting the same error.

On Aug 4, 2014, at 6:46 PM, Jake Cattrall notifications@github.com wrote:

@PhilCoggins https://github.com/PhilCoggins did you open a thread on the apple developer forums?

Is anyone any further with getting this working? I'm trying to install it as part of therubyracer and am unable to.


Reply to this email directly or view it on GitHub #304 (comment).

@skandragon
Copy link

I may be unpopular, but "install gcc 4.2" is not the same as "install apple developer tools." I have the latest dev tools installed, and the latest Xcode, and it does not build. I cannot install another version of gcc because of other reasons, but it should build and install with the latest Xcode + apple provided dev tools.

@aaronlifton3
Copy link

./rr.h:510:118: error: no type named 'AccessorInfo' in namespace 'v8'; did you mean 'Accessor'?
static v8::Handlev8::Value NamedPropertySetter(v8::Localv8::String property, v8::Localv8::Value value, const v8::AccessorInfo& info);
^~~~~~~~~~~~~~~~
Accessor
./rr.h:456:7: note: 'Accessor' declared here
class Accessor {
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [accessor.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/aaron/.rvm/gems/ruby-2.0.0-p247/gems/therubyracer-0.12.1 for inspection.
Results logged to /Users/aaron/.rvm/gems/ruby-2.0.0-p247/extensions/x86_64-darwin-14/2.0.0/therubyracer-0.12.1/gem_make.out
An error occurred while installing therubyracer (0.12.1), and Bundler cannot continue.
Make sure that gem install therubyracer -v '0.12.1' succeeds before bundling.

@ignisf
Copy link
Collaborator

ignisf commented Aug 7, 2014

@aaronlifton, what version of libv8 are you trying to link against?

@mattheworiordan
Copy link

I too have this issue on Yosemite beta, I have tried CC=/usr/local/Cellar/gcc/4.9.1_1/bin/gcc-4.9 gem install therubyracer and gem install therubyracer on Ruby versions 2.1.2 and 2.0.0-p353 and I consistently get the same error unfortunately:

Building native extensions.  This could take a while...
ERROR:  Error installing therubyracer:
    ERROR: Failed to build gem native extension.

    /Users/matthew/.rbenv/versions/2.1.2/bin/ruby extconf.rb
checking for main() in -lpthread... yes
checking for main() in -lobjc... yes
checking for v8.h... yes
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling accessor.cc
clang: warning: argument unused during compilation: '-rdynamic'
In file included from accessor.cc:1:
./rr.h:463:14: error: no type named 'AccessorGetter' in namespace 'v8'
  inline v8::AccessorGetter accessorGetter() {return &AccessorGetter;}
         ~~~~^
./rr.h:464:14: error: no type named 'AccessorSetter' in namespace 'v8'
  inline v8::AccessorSetter accessorSetter() {return RTEST(set) ? &AccessorSetter : 0;}
         ~~~~^
./rr.h:466:14: error: no type named 'NamedPropertyGetter' in namespace 'v8'
  inline v8::NamedPropertyGetter namedPropertyGetter() {return &NamedPropertyGetter;}
         ~~~~^
./rr.h:467:14: error: no type named 'NamedPropertySetter' in namespace 'v8'
  inline v8::NamedPropertySetter namedPropertySetter() {return RTEST(set) ? &NamedPropertySetter : 0;}
         ~~~~^
./rr.h:468:14: error: no type named 'NamedPropertyQuery' in namespace 'v8'
  inline v8::NamedPropertyQuery namedPropertyQuery() {return RTEST(query) ? &NamedPropertyQuery : 0;}
         ~~~~^
./rr.h:469:14: error: no type named 'NamedPropertyDeleter' in namespace 'v8'
  inline v8::NamedPropertyDeleter namedPropertyDeleter() {return RTEST(deleter) ? &NamedPropertyDeleter : 0;}
         ~~~~^
./rr.h:470:14: error: no type named 'NamedPropertyEnumerator' in namespace 'v8'
  inline v8::NamedPropertyEnumerator namedPropertyEnumerator() {return RTEST(enumerator) ? &NamedPropertyEnumerator : 0;}
         ~~~~^
./rr.h:472:14: error: no type named 'IndexedPropertyGetter' in namespace 'v8'
  inline v8::IndexedPropertyGetter indexedPropertyGetter() {return &IndexedPropertyGetter;}
         ~~~~^
./rr.h:473:14: error: no type named 'IndexedPropertySetter' in namespace 'v8'
  inline v8::IndexedPropertySetter indexedPropertySetter() {return RTEST(set) ? &IndexedPropertySetter : 0;}
         ~~~~^
./rr.h:474:14: error: no type named 'IndexedPropertyQuery' in namespace 'v8'
  inline v8::IndexedPropertyQuery indexedPropertyQuery() {return RTEST(query) ? &IndexedPropertyQuery : 0;}
         ~~~~^
./rr.h:475:14: error: no type named 'IndexedPropertyDeleter' in namespace 'v8'
  inline v8::IndexedPropertyDeleter indexedPropertyDeleter() {return RTEST(deleter) ? &IndexedPropertyDeleter : 0;}
         ~~~~^
./rr.h:476:14: error: no type named 'IndexedPropertyEnumerator' in namespace 'v8'
  inline v8::IndexedPropertyEnumerator indexedPropertyEnumerator() {return RTEST(enumerator) ? &IndexedPropertyEnumerator : 0;}
         ~~~~^
./rr.h:482:16: error: no type named 'AccessorInfo' in namespace 'v8'; did you mean 'Accessor'?
    Info(const v8::AccessorInfo& info);
               ^~~~~~~~~~~~~~~~
               Accessor
./rr.h:456:7: note: 'Accessor' declared here
class Accessor {
      ^
./rr.h:488:18: error: no type named 'AccessorInfo' in namespace 'v8'; did you mean 'Accessor'?
    inline const v8::AccessorInfo* operator->() {return this->info;}
                 ^~~~~~~~~~~~~~~~
                 Accessor
./rr.h:456:7: note: 'Accessor' declared here
class Accessor {
      ^
./rr.h:502:11: error: no type named 'AccessorInfo' in namespace 'v8'; did you mean 'Accessor'?
    const v8::AccessorInfo* info;
          ^~~~~~~~~~~~~~~~
          Accessor
./rr.h:456:7: note: 'Accessor' declared here
class Accessor {
      ^
./rr.h:506:85: error: no type named 'AccessorInfo' in namespace 'v8'; did you mean 'Accessor'?
  static v8::Handle<v8::Value> AccessorGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info);
                                                                                    ^~~~~~~~~~~~~~~~
                                                                                    Accessor
./rr.h:456:7: note: 'Accessor' declared here
class Accessor {
      ^
./rr.h:507:96: error: no type named 'AccessorInfo' in namespace 'v8'; did you mean 'Accessor'?
  static void AccessorSetter(v8::Local<v8::String> property, v8::Local<v8::Value> value, const v8::AccessorInfo& info);
                                                                                               ^~~~~~~~~~~~~~~~
                                                                                               Accessor
./rr.h:456:7: note: 'Accessor' declared here
class Accessor {
      ^
./rr.h:509:90: error: no type named 'AccessorInfo' in namespace 'v8'; did you mean 'Accessor'?
  static v8::Handle<v8::Value> NamedPropertyGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info);
                                                                                         ^~~~~~~~~~~~~~~~
                                                                                         Accessor
./rr.h:456:7: note: 'Accessor' declared here
class Accessor {
      ^
./rr.h:510:118: error: no type named 'AccessorInfo' in namespace 'v8'; did you mean 'Accessor'?
  static v8::Handle<v8::Value> NamedPropertySetter(v8::Local<v8::String> property, v8::Local<v8::Value> value, const v8::AccessorInfo& info);
                                                                                                                     ^~~~~~~~~~~~~~~~
                                                                                                                     Accessor
./rr.h:456:7: note: 'Accessor' declared here
class Accessor {
      ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [accessor.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/matthew/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/therubyracer-0.12.1 for inspection.
Results logged to /Users/matthew/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-14/2.1.0-static/therubyracer-0.12.1/gem_make.out

Has anyone else figured a workaround solution?

@patricksereno
Copy link

This worked for me (Running Yosemite Beta 1 with x-code command line utils and homebrew ruby 2.1.2p95), although it did throw errors

git clone https://github.com/cowboyd/libv8.git
cd libv8
bundle install
bundle exec rake clean build binary
gem install pkg/libv8-3.16.14.3.gem
gem install therubyracer

@mattheworiordan
Copy link

@patricksereno thanks, that worked a treat for me.

@cowboyd
Copy link
Collaborator

cowboyd commented Sep 9, 2014

You should be able to now use the released version of the libv8

gem install libv8 -v 3.16.4.4

@Nosajgames
Copy link

I am still getting the same error while trying to install libv8 using OS X 10.10 DP7

JeffMenos:iugport2 jeffreymenos$ git clone https://github.com/cowboyd/libv8.git
Cloning into 'libv8'...
remote: Counting objects: 1953, done.
remote: Compressing objects: 100% (35/35), done.
remote: Total 1953 (delta 10), reused 0 (delta 0)
Receiving objects: 100% (1953/1953), 1.53 MiB | 0 bytes/s, done.
Resolving deltas: 100% (834/834), done.
Checking connectivity... done
JeffMenos:iugport2 jeffreymenos$ cd libv8
JeffMenos:libv8 jeffreymenos$ bundle install
Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...
Using rake 10.3.2

Your user account isn't allowed to install to the system Rubygems.
You can cancel this installation and run:

bundle install --path vendor/bundle

to install the gems into ./vendor/bundle/, or you can enter your password
and install the bundled gems to Rubygems using sudo.

Password:
Installing addressable 2.3.6
Installing diff-lcs 1.2.5
Installing excon 0.39.5
Using multi_json 1.10.1
Installing heroku-api 0.3.19
Installing launchy 2.4.2
Installing netrc 0.7.7
Using mime-types 1.25.1

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20140910-11404-8uhmuz.rb extconf.rb 

creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling generator.c
clang: warning: -framework CrashReporterSupport: 'linker' input unused
linking shared-object json/ext/generator.bundle
ld: warning: directory not found for option '-F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.Internal.sdk/System/Library/PrivateFrameworks'
ld: framework not found CrashReporterSupport
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [generator.bundle] Error 1

make failed, exit code 2

Gem files will remain installed in /var/folders/m0/hvxtshys5m57n_j_8lpkf1_w0000gq/T/bundler20140910-11404-1o1es3g/json-1.8.1/gems/json-1.8.1 for inspection.
Results logged to /var/folders/m0/hvxtshys5m57n_j_8lpkf1_w0000gq/T/bundler20140910-11404-1o1es3g/json-1.8.1/extensions/universal-darwin-14/2.0.0/json-1.8.1/gem_make.out
An error occurred while installing json (1.8.1), and Bundler cannot continue.
Make sure that gem install json -v '1.8.1' succeeds before bundling.
JeffMenos:libv8 jeffreymenos$ bundle exec rake clean build binary
Could not find gem 'vulcan (>= 0) ruby' in the gems available on this machine.
Run bundle install to install missing gems.
JeffMenos:libv8 jeffreymenos$ bundle install
Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...
Using rake 10.3.2
Using addressable 2.3.6
Using diff-lcs 1.2.5
Using excon 0.39.5
Using multi_json 1.10.1
Using heroku-api 0.3.19
Using launchy 2.4.2
Using netrc 0.7.7
Using mime-types 1.25.1

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20140910-11519-1gr1cxe.rb extconf.rb 

creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling generator.c
clang: warning: -framework CrashReporterSupport: 'linker' input unused
linking shared-object json/ext/generator.bundle
ld: warning: directory not found for option '-F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.Internal.sdk/System/Library/PrivateFrameworks'
ld: framework not found CrashReporterSupport
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [generator.bundle] Error 1

make failed, exit code 2

Gem files will remain installed in /var/folders/m0/hvxtshys5m57n_j_8lpkf1_w0000gq/T/bundler20140910-11519-6mlbxr/json-1.8.1/gems/json-1.8.1 for inspection.
Results logged to /var/folders/m0/hvxtshys5m57n_j_8lpkf1_w0000gq/T/bundler20140910-11519-6mlbxr/json-1.8.1/extensions/universal-darwin-14/2.0.0/json-1.8.1/gem_make.out
An error occurred while installing json (1.8.1), and Bundler cannot continue.
Make sure that gem install json -v '1.8.1' succeeds before bundling.
JeffMenos:libv8 jeffreymenos$ gem install libv8 -v 3.16.4.4
ERROR: Could not find a valid gem 'libv8' (= 3.16.4.4) in any repository
ERROR: Possible alternatives: libv8
JeffMenos:libv8 jeffreymenos$

@mlavandero
Copy link

I am working with the latest 10.10 update and #304 (comment) worked for me.

thanks @shanbhardwaj

@brucemar10
Copy link

rvm reinstall ruby --disable-binary

worked for me

@ghost
Copy link

ghost commented Nov 6, 2014

I went into my Gemfile.lock and changed libv8 version from 3.16.14.3 to 3.16.14.7. therubyracer and libv8 installed fine after that with 'bundle install'.

OSX 10.10
rvm
ruby 2.1.4
gcc 4.2.1

@pmsaue0
Copy link

pmsaue0 commented Nov 17, 2014

I was having namespace 'v8' issues that prevented me from installing therubyracer. After deleting Gemfile.lock I was able to proceed.

@ghost
Copy link

ghost commented Nov 18, 2014

+1 for libv8 version 3.16.14.7

@cowboyd
Copy link
Collaborator

cowboyd commented Nov 18, 2014

@mgauthier-joist there is a binary Yosemite gem for 3.16.14.7 You can either run bundle update libv8 or if that still doesn't work, recompile ruby.

@podlech
Copy link

podlech commented Nov 27, 2014

Hey, this is working for me: https://gist.github.com/jpodlech/837c7e5103c4cf5cb9b1

@nhattan
Copy link

nhattan commented Dec 8, 2014

Yes, 👍
thanks @shanbhardwaj

@franzejr
Copy link

+1 for libv8 version 3.16.14.7

@johnfig
Copy link

johnfig commented Dec 31, 2014

I had the same issue and this worked for me. Looks like the new versions definitely fixed it.

$ gem install libv8 -v '3.16.14.7'
$ bundle

@ykwx
Copy link

ykwx commented Jan 23, 2015

I had the same issue of therubyracer failing. But first, I had libv8 -v '3.16.14.3' failing for me on the first run. I ran gem install libv8 -v '3.16.14.3' -- --with-system-v8 which worked.

Then therubyracer failed. I ran gem install libv8 -v '3.16.14.7' -- --with-system-v8 which worked, then gem install therubyracer and all was well.

@yogurt-island-331
Copy link

Downgrade the Command Line Tools to 6.2 via Apple's Developer Download Page worked for me.
http://stackoverflow.com/questions/29529455/missing-c-header-debug-after-updating-osx-command-line-tools-6-3

@barhamd
Copy link

barhamd commented May 14, 2015

+1 for @shanbhardwaj

@anayib
Copy link

anayib commented Jun 29, 2015

Guys, I fixed it out just running the command xcode-select --install which will install developers tools.

Then re-start the terminal/console and run gem install rails -v 4.2.1 or the rails version you want and that's it, it works !, cheers

@achempion
Copy link

had the same issue, gem install libv8 -v '3.16.14.11' -- --with-system-v8 works for me, thank you @jonathanfagan :)

@derekhubbard
Copy link

Running gem install libv8 -v '3.16.14.11' -- --with-system-v8 worked for me as well. Thanks!

@achempion
Copy link

if someone can't fix this issue, just update ruby version to latest, after this I resolved my problems and libv8 have been installed without any additional options

@jimbocooper
Copy link

gem install libv8 -v '3.16.14.11' -- --with-system-v8 Worked for me like magic! :) Thanks guys

@davidwparker
Copy link

I had to upgrade my ruby version for this to work, I was on ruby-2.0.0-p451 and upgraded to ruby-2.0.0-p576 and was fine.

@gguuss
Copy link

gguuss commented Nov 11, 2015

The following steps were necessary for me:

  1. Install XCode from app store
  2. Install command line tools for XCode - xcode-select --install
  3. brew install gcc

@sghiassy
Copy link

sghiassy commented Feb 3, 2016

@gguuss instructions worked for me. Thx!

@sohamdas
Copy link

Thanks @gguuss. +1

@ponyczek
Copy link

ponyczek commented Mar 3, 2016

Hello,

I had the same as @PhilCoggins
I have spent over 3 hours in order to fix this.

I tried tons of solutions:
@gguuss 's
@cmititiuc 's
@patricksereno 's

Nothing worked.

As it turned out my problem was related to the version of ruby itself.
My mac kept changing the version to 2.0.0... by default, even though the version specified in rbenv was 2.2.3

I had to make sure that my
ruby -v returns ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin15]
after that bundle install went smooth as ever.

I use Mac OS X Yosemite

@jhgorse
Copy link

jhgorse commented Jul 4, 2016

@ponyczek I have similar issues. For some reason bundler will not use the rvm'd version of ruby, even when selected. When I manually enter the debugger build directory under the rvm environment it bundles just fine.

The symptom is that it tries to use the system ruby which is immutable and the older 2.0.0. I do not know what causes this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests