Closed karlentwistle closed 8 years ago
This helped me: http://stackoverflow.com/a/20145328/275058
brew tap homebrew/versions
brew install v8-315
brew link --force v8-315
gem install libv8 -- --with-system-v8
gem install therubyracer
brew install v8-315
Warning: You are using OS X 10.11.
We do not provide support for this pre-release version.
You may encounter build failures or other breakage.
==> Installing v8-315 from homebrew/homebrew-versions
==> Downloading https://github.com/v8/v8/archive/3.15.11.tar.gz
Already downloaded: /Library/Caches/Homebrew/v8-315-3.15.11.tar.gz
==> make dependencies
==> make native -j4 library=shared snapshot=on console=readline
ld: library not found for -lgcc_s.10.5
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [/private/tmp/v8-31520150716-53019-4u2nz3/v8-3.15.11/out/native/preparser] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [native] Error 2
READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/homebrew):
https://github.com/homebrew/homebrew-versions/issues
Warning: You are using OS X 10.11.
We do not provide support for this pre-release version.
You may encounter build failures or other breakage.
Newest versions of libv8 are already compatibly with el capitan, but therubyracer gem references an old version of libv8.
Reference: https://github.com/cowboyd/libv8/issues/180
@karlentwistle may I see the output of the gem list libv8
or respectively bundle exec gem list libv8
command on your system?
Sure thing
gem list libv8
*** LOCAL GEMS ***
libv8 (3.16.14.11)
Any more insights on how to resolve or work around this issue? Thanks,
I'm having the same problem.
I tried using only the gem
version, only the brew
version, tried v8-315
, tried letting therubyracer
install v8
, tried specifying the versions, tried building the gem from the repo… nothing worked.
I'm afraid I'll have to roll back to Yosemite to be able to work again :disappointed:
@rmasoni I was able to install the gem using v8-315
.
Did you follow @DeLaGuardo instructions?
@bpinto Yes. Then I was able to install via @sbenyaala's link (with apple-gcc42
).
Later I tried to run bundle
again and it stopped on libv8
because it's requesting the 3.16.14.7 version (I have 3.16.14.11 installed). This is a nightmare — but it's on my end now.
here's a binary I built while we wait for 3.16.14.12:
this worked for me (while seemingly nothing else did)
$ gem install libv8-3.16.14.11-x86_64-darwin-15.gem
$ gem install therubyracer
The @DeLaGuardo instructions? ended up working for me, but not directly. I had to uninstall all libv8 && v8 (brew and gem). Unfortunately, it was one of those 'try a billion paths and stop when one worked' sort of deals, and I didn't have a great record of what ended up working.
I am sorry, and a bit ashamed...
Still...thank you @DeLaGuardo for providing the path towards moving forward!! Dave
@DeLaGuardo instructions mostly worked for me (with El Capitan Public Beta 3, Xcode 7 Beta, Command Line Tools 7.0 beta), but instead of gem install therubyracer
I had to do gem install therubyracer -- --with-system-v8
. :tada:
So, I got a second bite at the apple with the release of Ruby 2.2.3. I installed 2.2.3 using rbenv
rbenv install 2.2.3
Then I switched the 'local' version of my ruby to use the new 2.2.3 install
rbenv local 2.2.3
Then installed bundler
gem install bundler
Then I using the binary @michaelglass built. Not that once you download the gem, you need to either run the gem install command from the directory that you downloaded it from or pass the path to the downloaded file.
gem install libv8-3.16.14.11-x86_64-darwin-15.gem
gem install therubyracer
From here I was able to do a regular bundle install for my projects and everything worked splendidly. Thank you @michaelglass! Nice work!
@DeLaGuardo Can you share the tar.gz file with me? I can't download it. https://github.com/Homebrew/homebrew/issues/44496
sigh Having trouble with El Capitan also. Here's a gist with the trouble, any ideas? https://gist.github.com/joshsz/300ca553bf3e4fe3ff2d
(The TL;DR is /Users/josh/.rvm/gems/ruby-2.0.0-p594/gems/json-1.8.3/lib/json/ext/parser.bundle: [BUG] Segmentation fault
)
@joshsz I noticed that the segmentation fault was in the JSON gem, not libv8 or the rubyracer.
Also, We recently released a binary that should be compatible with El Capitan. What happens if you remove all --with-system-v8
flags from your bundle / gem config.
$ gem uninstall libv8
$ bundle update libv8
Thanks so much, @cowboyd. Just found this thread when running into this problem, and the updated libv8 works just fine. (Ruby 2.2.3, fresh install of El Capitan)
@cowboyd Awesome, that seems to have fixed it, thanks!
@cowboyd Thanks from me too!
In hind sight I think trying to learn Ruby right after upgrading to El Capitan might have caused me a little bit of consternation (massive understatement!) -- does anyone know of a resource for reading about OSX updates -- especially concerning local development environments -- that I (we) may read to help decide whether the update is "worth it". I have a friend I respect greatly that never upgrades his OSX... okay, but this can't be good long-term? TIA
Again, Thanks to @cowboyd !!
This helped me : http://stackoverflow.com/a/20145328/1981328
I wasn't able to get any of the above solutions to work (or rather, everything I could get to work would have required the rest of my team to rebundle). After switching from rbenv to RVM, however, bundle install
ran without a hitch.
bump. Same problem. This gem is kind of broken on macs at this stage. Fresh OS X install and kaboom.
@itssasank , this won't work on El Capitan. the /usr/bin is locked at the kernel level so symlinks are not allowed.
Tried to install therubyracer with El Capitan. @DeLaGuardo's instructions fixed it for me with one tweak:
$ bundle config build.libv8 --with-system-v8
$ bundle install
This seems to be working for me, if you can change your Gemfile.lock on your project.
Change libv8 in Gemfile.lock to libv8 (3.16.14.11)
I also did brew unlink
for any system V8s that I installed.
Then run this:
gem uninstall therubyracer
gem uninstall libv8
bundle install
simply changing the Gemfile.lock as @afiedler proposed worked while using a older project with an older libv8 version ... thanks
Install issues on darwin 14 and 15 should be fixed now (by the release of libv8 3.16.14.14 and 3.16.14.15), I'm going to lock this issue to encourage opening new issues.