An error occurred while installing libv8 (8.4.255.0) - ruby-on-rails

I've been struggling with this error for quite some time, hope someone can please assist.
This is the error I run into when I run bundle.
Fetching libv8 8.4.255.0
Installing libv8 8.4.255.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/ext/libv8
/Users/buddha/.rbenv/versions/2.7.2/bin/ruby -I /Users/buddha/.rbenv/versions/2.7.2/lib/ruby/2.7.0 -r
./siteconf20220813-30612-hzinfo.rb extconf.rb --with-system-v8
creating Makefile
WARNING: Your metrics.cfg file was invalid or nonexistent. A new one will be created.
________ running 'arch -arch arm64 git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress
https://chromium.googlesource.com/v8/v8.git /Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/_gclient_v8_wtvu8iij' in
'/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor'
arch: posix_spawnp: git: Bad CPU type in executable
1>WARNING: subprocess '"arch" "-arch" "arm64" "git" "-c" "core.deltaBaseCacheLimit=2g" "clone" "--no-checkout" "--progress"
"https://chromium.googlesource.com/v8/v8.git" "/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/_gclient_v8_wtvu8iij"'
in /Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor failed; will retry after a short nap...
________ running 'arch -arch arm64 git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress
https://chromium.googlesource.com/v8/v8.git /Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/_gclient_v8_wtvu8iij' in
'/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor' attempt 2 / 4
arch: posix_spawnp: git: Bad CPU type in executable
1>WARNING: subprocess '"arch" "-arch" "arm64" "git" "-c" "core.deltaBaseCacheLimit=2g" "clone" "--no-checkout" "--progress"
"https://chromium.googlesource.com/v8/v8.git" "/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/_gclient_v8_wtvu8iij"'
in /Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor failed; will retry after a short nap...
________ running 'arch -arch arm64 git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress
https://chromium.googlesource.com/v8/v8.git /Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/_gclient_v8_wtvu8iij' in
'/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor' attempt 3 / 4
arch: posix_spawnp: git: Bad CPU type in executable
1>WARNING: subprocess '"arch" "-arch" "arm64" "git" "-c" "core.deltaBaseCacheLimit=2g" "clone" "--no-checkout" "--progress"
"https://chromium.googlesource.com/v8/v8.git" "/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/_gclient_v8_wtvu8iij"'
in /Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor failed; will retry after a short nap...
________ running 'arch -arch arm64 git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress
https://chromium.googlesource.com/v8/v8.git /Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/_gclient_v8_wtvu8iij' in
'/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor' attempt 4 / 4
arch: posix_spawnp: git: Bad CPU type in executable
1>WARNING: subprocess '"arch" "-arch" "arm64" "git" "-c" "core.deltaBaseCacheLimit=2g" "clone" "--no-checkout" "--progress"
"https://chromium.googlesource.com/v8/v8.git" "/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/_gclient_v8_wtvu8iij"'
in /Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor failed; will retry after a short nap...
v8 (ERROR)
----------------------------------------
[0:00:00] Started.
[0:00:00]
Traceback (most recent call last):
File "/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/depot_tools/gclient_scm.py", line 1041, in _Clone
self._Run(clone_cmd, options, cwd=self._root_dir, retry=True,
File "/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/depot_tools/gclient_scm.py", line 1401, in _Run
gclient_utils.CheckCallAndFilter(cmd, env=env, **kwargs)
File "/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/depot_tools/gclient_utils.py", line 654, in CheckCallAndFilter
raise subprocess2.CalledProcessError(
subprocess2.CalledProcessError: Command 'arch -arch arm64 git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress
https://chromium.googlesource.com/v8/v8.git /Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/_gclient_v8_wtvu8iij'
returned non-zero exit status 1 in /Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor
[0:00:07] _____ Conflicting directory found in /Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/v8. Moving to
/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/_bad_scm/v8rteogvxs.
----------------------------------------
Warnings:
Conflicting directory /Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/v8 moved to
/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/_bad_scm/v8rteogvxs.
Traceback (most recent call last):
File "/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/depot_tools/gclient_scm.py", line 545, in update
self._Clone(revision, url, options)
File "/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/depot_tools/gclient_scm.py", line 1041, in _Clone
self._Run(clone_cmd, options, cwd=self._root_dir, retry=True,
File "/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/depot_tools/gclient_scm.py", line 1401, in _Run
gclient_utils.CheckCallAndFilter(cmd, env=env, **kwargs)
File "/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/depot_tools/gclient_utils.py", line 654, in CheckCallAndFilter
raise subprocess2.CalledProcessError(
subprocess2.CalledProcessError: Command 'arch -arch arm64 git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress
https://chromium.googlesource.com/v8/v8.git /Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/_gclient_v8_wtvu8iij'
returned non-zero exit status 1 in /Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/buddha/.vpython-root/54d2e4/lib/python3.8/shutil.py", line 780, in move
os.rename(src, real_dst)
FileNotFoundError: [Errno 2] No such file or directory: '/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/v8' ->
'/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/_bad_scm/v8rteogvxs/v8'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/depot_tools/metrics.py", line 267, in print_notice_and_exit
yield
File "/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/depot_tools/gclient.py", line 3196, in <module>
sys.exit(main(sys.argv[1:]))
File "/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/depot_tools/gclient.py", line 3182, in main
return dispatcher.execute(OptionParser(), argv)
File "/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/depot_tools/subcommand.py", line 252, in execute
return command(parser, args[1:])
File "/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/depot_tools/gclient.py", line 2738, in CMDsync
ret = client.RunOnDeps('update', args)
File "/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/depot_tools/gclient.py", line 1780, in RunOnDeps
work_queue.flush(revision_overrides, command, args, options=self._options,
File "/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/depot_tools/gclient_utils.py", line 947, in flush
reraise(e[0], e[1], e[2])
File "/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/depot_tools/gclient_utils.py", line 66, in reraise
raise value
File "/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/depot_tools/gclient_utils.py", line 1024, in run
self.item.run(*self.args, **self.kwargs)
File "/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/depot_tools/gclient.py", line 926, in run
self._got_revision = self._used_scm.RunCommand(command, options, args,
File "/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/depot_tools/gclient_scm.py", line 132, in RunCommand
return getattr(self, command)(options, args, file_list)
File "/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/depot_tools/gclient_scm.py", line 547, in update
self._DeleteOrMove(options.force)
File "/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/depot_tools/gclient_scm.py", line 207, in _DeleteOrMove
shutil.move(self.checkout_path, dest_path)
File "/Users/buddha/.vpython-root/54d2e4/lib/python3.8/shutil.py", line 794, in move
copy_function(src, real_dst)
File "/Users/buddha/.vpython-root/54d2e4/lib/python3.8/shutil.py", line 426, in copy2
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "/Users/buddha/.vpython-root/54d2e4/lib/python3.8/shutil.py", line 259, in copyfile
with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/v8'
Running: gclient root
Running: gclient config --spec 'solutions = [
{
"name": "v8",
"url": "https://chromium.googlesource.com/v8/v8.git",
"deps_file": "DEPS",
"managed": False,
"custom_deps": {},
},
]
'
Running: gclient sync --with_branch_heads
Subprocess failed with return code 1.
/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/ext/libv8/builder.rb:83:in `block in setup_build_deps!': unable to fetch v8
source (RuntimeError)
from /Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/ext/libv8/builder.rb:81:in `chdir'
from /Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/ext/libv8/builder.rb:81:in `setup_build_deps!'
from /Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/ext/libv8/builder.rb:40:in `build_libv8!'
from /Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/ext/libv8/location.rb:24:in `install!'
from extconf.rb:7:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in /Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0 for inspection.
Results logged to /Users/buddha/.gem/ruby/2.6.0/extensions/x86_64-darwin-21/2.7.0/libv8-8.4.255.0/gem_make.out
An error occurred while installing libv8 (8.4.255.0), and Bundler cannot continue.
Make sure that `gem install libv8 -v '8.4.255.0' --source 'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
mini_racer was resolved to 0.3.1, which depends on
libv8
This is my Gemfile:
source 'https://rubygems.org'
git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
"https://github.com/#{repo_name}.git"
end
gem 'bitfields', "~> 0.8.0"
gem 'bootstrap', '~> 4.0.0.beta'
gem 'braintree', "~> 2.70.0"
gem 'ckeditor', "~> 4.2.4"
gem 'coffee-rails', '~> 4.2.2'
gem 'devise', "~> 4.6.2"
gem 'devise_masquerade', "~> 0.6.5"
gem 'dragonfly', "~> 1.1.3"
gem 'dragonfly-s3_data_store', "~> 1.3.0"
gem 'exception_notification', "~> 4.2.2"
gem 'execjs', "~> 2.7.0"
gem 'figaro', "~> 1.1.1"
gem 'icalendar', "~> 2.4.1"
gem 'jbuilder', '~> 2.7.0'
gem 'jquery-rails', "~> 4.3.1"
gem 'listen', '~> 3.0.8'
gem 'mandrill_dm'
gem 'meta-tags', "~> 2.6.0"
gem 'mysql2', "~> 0.4.9"
gem 'omniauth-facebook', "~> 5.0.0"
gem 'omniauth-google-oauth2', "~> 0.5.2"
gem 'phony', "~> 2.15.48"
gem 'popper_js', "~> 1.11.1"
gem 'pundit', "~> 1.1.0"
gem 'rails', '~> 5.0.6'
gem 'rails_engine_decorators', git: 'https://github.com/HelloThisIsMartha/rails_engine_decorators'
gem 'react-rails', "~> 2.4.7"
gem 'redis-rails', "~> 5.0.2"
gem 'request_store', "~> 1.3.2"
gem 'rinku', "~> 2.0.3"
gem 'roman-numerals', "~> 0.3.0"
gem 'sass-rails', '~> 5.0.6'
gem 'sidekiq', "~> 5.0.4"
gem 'textris', "~> 0.4.4"
gem 'mini_racer', "~> 0.3.0"
gem 'thredded', '~> 0.9.4'
gem "timecop", "~> 0.9.4"
gem 'twilio-ruby', "~> 5.2.3"
gem 'uglifier', '~> 3.2.0'
gem 'websocket-driver', "~> 0.6.5"
gem 'whenever', "~> 0.9.7", :require => false
# Boostrap 4 alpha requires assets tether
source 'https://rails-assets.org' do
gem 'rails-assets-tether', '~> 1.4.0'
end
group :staging, :production, :devasprod do
gem 'puma', '~> 3.12.6'
gem 'puma_worker_killer', "~> 0.1.0"
end
group :staging, :production do
gem 'newrelic_rpm', "~> 4.0.0.332"
end
group :development, :test, :staging do
gem 'byebug', "~> 9.1.0", platform: :mri
gem 'pry-rails', "~> 0.3.6"
gem 'pry-byebug', "~> 3.5.0"
gem 'rspec-rails', '~> 3.6.1'
end
group :development do
gem 'mailcatcher', "~> 0.2.4"
gem 'pry-rescue', "~> 1.4.5"
gem 'pry-stack_explorer', "~> 0.4.9.2"
gem 'rubocop-rails', "~> 2.3.2"
gem 'spring', "~> 2.0.2"
gem 'spring-watcher-listen', '~> 2.0.1'
gem 'web-console', '~> 3.5.1'
end
group :test do
gem 'database_cleaner', "~> 1.6.1"
gem 'factory_girl_rails', "~> 4.8.0"
end
group :development do
gem 'flamegraph', "~> 0.9.5"
gem 'memory_profiler', "~> 0.9.8"
gem 'rack-mini-profiler', "~> 0.10.5"
gem 'stackprof', "~> 0.2.10"
end
I've already tried the solutions mentioned here such as gem install libv8 -v '8.4.255.0' -- --with-system-v8 but no luck...
FYI, I'm trying to run my app on the M1 chip.
Also not sure if this is related but when I run rails -v I see this error:
Ignoring nokogiri-1.10.2 because its extensions are not built. Try: gem pristine nokogiri --version 1.10.2
Ignoring racc-1.6.0 because its extensions are not built. Try: gem pristine racc --version 1.6.0
Ignoring nokogiri-1.10.2 because its extensions are not built. Try: gem pristine nokogiri --version 1.10.2
Ignoring racc-1.6.0 because its extensions are not built. Try: gem pristine racc --version 1.6.0
Rails 7 requires Ruby 2.7.0 or newer.
You're running
ruby 2.6.8p205 (2021-07-07 revision 67951) [universal.arm64e-darwin21]
Please upgrade to Ruby 2.7.0 or newer to continue.
But ruby -v shows:
ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-darwin21]
EDIT: based on the comment suggestion I added ruby '2.7.2' to my gemfile and got this output:
Fetching libv8 8.4.255.0
Installing libv8 8.4.255.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/ext/libv8
/Users/buddha/.rbenv/versions/2.7.2/bin/ruby -I
/Users/buddha/.rbenv/versions/2.7.2/lib/ruby/2.7.0 -r
./siteconf20220814-45422-13e9aha.rb extconf.rb --with-system-v8
creating Makefile
WARNING: Your metrics.cfg file was invalid or nonexistent. A new one will be
created.
________ running 'arch -arch arm64 git -c core.deltaBaseCacheLimit=2g clone
--no-checkout --progress https://chromium.googlesource.com/v8/v8.git
/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/_gclient_v8__hvcpq_i'
in '/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor'
arch: posix_spawnp: git: Bad CPU type in executable
1>WARNING: subprocess '"arch" "-arch" "arm64" "git" "-c"
"core.deltaBaseCacheLimit=2g" "clone" "--no-checkout" "--progress"
"https://chromium.googlesource.com/v8/v8.git"
"/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/_gclient_v8__hvcpq_i"'
in /Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor failed; will retry
after a short nap...
________ running 'arch -arch arm64 git -c core.deltaBaseCacheLimit=2g clone
--no-checkout --progress https://chromium.googlesource.com/v8/v8.git
/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/_gclient_v8__hvcpq_i'
in '/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor' attempt 2 / 4
arch: posix_spawnp: git: Bad CPU type in executable
1>WARNING: subprocess '"arch" "-arch" "arm64" "git" "-c"
"core.deltaBaseCacheLimit=2g" "clone" "--no-checkout" "--progress"
"https://chromium.googlesource.com/v8/v8.git"
"/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/_gclient_v8__hvcpq_i"'
in /Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor failed; will retry
after a short nap...
________ running 'arch -arch arm64 git -c core.deltaBaseCacheLimit=2g clone
--no-checkout --progress https://chromium.googlesource.com/v8/v8.git
/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/_gclient_v8__hvcpq_i'
in '/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor' attempt 3 / 4
arch: posix_spawnp: git: Bad CPU type in executable
1>WARNING: subprocess '"arch" "-arch" "arm64" "git" "-c"
"core.deltaBaseCacheLimit=2g" "clone" "--no-checkout" "--progress"
"https://chromium.googlesource.com/v8/v8.git"
"/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/_gclient_v8__hvcpq_i"'
in /Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor failed; will retry
after a short nap...
________ running 'arch -arch arm64 git -c core.deltaBaseCacheLimit=2g clone
--no-checkout --progress https://chromium.googlesource.com/v8/v8.git
/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/_gclient_v8__hvcpq_i'
in '/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor' attempt 4 / 4
arch: posix_spawnp: git: Bad CPU type in executable
1>WARNING: subprocess '"arch" "-arch" "arm64" "git" "-c"
"core.deltaBaseCacheLimit=2g" "clone" "--no-checkout" "--progress"
"https://chromium.googlesource.com/v8/v8.git"
"/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/_gclient_v8__hvcpq_i"'
in /Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor failed; will retry
after a short nap...
v8 (ERROR)
----------------------------------------
[0:00:00] Started.
[0:00:00]
Traceback (most recent call last):
File
"/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/depot_tools/gclient_scm.py",
line 1041, in _Clone
self._Run(clone_cmd, options, cwd=self._root_dir, retry=True,
File
"/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/depot_tools/gclient_scm.py",
line 1401, in _Run
gclient_utils.CheckCallAndFilter(cmd, env=env, **kwargs)
File
"/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/depot_tools/gclient_utils.py",
line 654, in CheckCallAndFilter
raise subprocess2.CalledProcessError(
subprocess2.CalledProcessError: Command 'arch -arch arm64 git -c
core.deltaBaseCacheLimit=2g clone --no-checkout --progress
https://chromium.googlesource.com/v8/v8.git
/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/_gclient_v8__hvcpq_i'
returned non-zero exit status 1 in
/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor
[0:00:07] _____ Conflicting directory found in
/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/v8. Moving to
/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/_bad_scm/v8at5c_u2j.
----------------------------------------
Warnings:
Conflicting directory
/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/v8 moved to
/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/_bad_scm/v8at5c_u2j.
Traceback (most recent call last):
File
"/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/depot_tools/gclient_scm.py",
line 545, in update
self._Clone(revision, url, options)
File
"/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/depot_tools/gclient_scm.py",
line 1041, in _Clone
self._Run(clone_cmd, options, cwd=self._root_dir, retry=True,
File
"/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/depot_tools/gclient_scm.py",
line 1401, in _Run
gclient_utils.CheckCallAndFilter(cmd, env=env, **kwargs)
File
"/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/depot_tools/gclient_utils.py",
line 654, in CheckCallAndFilter
raise subprocess2.CalledProcessError(
subprocess2.CalledProcessError: Command 'arch -arch arm64 git -c
core.deltaBaseCacheLimit=2g clone --no-checkout --progress
https://chromium.googlesource.com/v8/v8.git
/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/_gclient_v8__hvcpq_i'
returned non-zero exit status 1 in
/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/buddha/.vpython-root/54d2e4/lib/python3.8/shutil.py", line 780,
in move
os.rename(src, real_dst)
FileNotFoundError: [Errno 2] No such file or directory:
'/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/v8' ->
'/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/_bad_scm/v8at5c_u2j/v8'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File
"/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/depot_tools/metrics.py",
line 267, in print_notice_and_exit
yield
File
"/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/depot_tools/gclient.py",
line 3196, in <module>
sys.exit(main(sys.argv[1:]))
File
"/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/depot_tools/gclient.py",
line 3182, in main
return dispatcher.execute(OptionParser(), argv)
File
"/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/depot_tools/subcommand.py",
line 252, in execute
return command(parser, args[1:])
File
"/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/depot_tools/gclient.py",
line 2738, in CMDsync
ret = client.RunOnDeps('update', args)
File
"/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/depot_tools/gclient.py",
line 1780, in RunOnDeps
work_queue.flush(revision_overrides, command, args, options=self._options,
File
"/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/depot_tools/gclient_utils.py",
line 947, in flush
reraise(e[0], e[1], e[2])
File
"/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/depot_tools/gclient_utils.py",
line 66, in reraise
raise value
File
"/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/depot_tools/gclient_utils.py",
line 1024, in run
self.item.run(*self.args, **self.kwargs)
File
"/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/depot_tools/gclient.py",
line 926, in run
self._got_revision = self._used_scm.RunCommand(command, options, args,
File
"/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/depot_tools/gclient_scm.py",
line 132, in RunCommand
return getattr(self, command)(options, args, file_list)
File
"/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/depot_tools/gclient_scm.py",
line 547, in update
self._DeleteOrMove(options.force)
File
"/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/depot_tools/gclient_scm.py",
line 207, in _DeleteOrMove
shutil.move(self.checkout_path, dest_path)
File "/Users/buddha/.vpython-root/54d2e4/lib/python3.8/shutil.py", line 794,
in move
copy_function(src, real_dst)
File "/Users/buddha/.vpython-root/54d2e4/lib/python3.8/shutil.py", line 426,
in copy2
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "/Users/buddha/.vpython-root/54d2e4/lib/python3.8/shutil.py", line 259,
in copyfile
with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory:
'/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/vendor/v8'
Running: gclient root
Running: gclient config --spec 'solutions = [
{
"name": "v8",
"url": "https://chromium.googlesource.com/v8/v8.git",
"deps_file": "DEPS",
"managed": False,
"custom_deps": {},
},
]
'
Running: gclient sync --with_branch_heads
Subprocess failed with return code 1.
/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/ext/libv8/builder.rb:83:in
`block in setup_build_deps!': unable to fetch v8 source (RuntimeError)
from
/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/ext/libv8/builder.rb:81:in
`chdir'
from
/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/ext/libv8/builder.rb:81:in
`setup_build_deps!'
from
/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/ext/libv8/builder.rb:40:in
`build_libv8!'
from
/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0/ext/libv8/location.rb:24:in
`install!'
from extconf.rb:7:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in
/Users/buddha/.gem/ruby/2.6.0/gems/libv8-8.4.255.0 for inspection.
Results logged to
/Users/buddha/.gem/ruby/2.6.0/extensions/x86_64-darwin-21/2.7.0/libv8-8.4.255.0/gem_make.out
An error occurred while installing libv8 (8.4.255.0), and Bundler
cannot continue.
Make sure that `gem install libv8 -v '8.4.255.0' --source
'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
mini_racer was resolved to 0.3.1, which depends on
libv8

Specify in your gemfile version of ruby you want to use
ruby '2.7.0'
#or you if want to '2.7.2'
source 'https://rubygems.org'
Show the input after that.
If I think correctly, bundle gemfile will have some default ruby version, if not specifying specific one

Related

Rails Dockerfile no longer building, unable to install racc

I have been working with the same Dockerfile for months on a rails api and suddenly it will no longer build. I am getting an error everytime it tries to install racc :
#11 7.201 Installing racc 1.6.0 with native extensions
#11 7.598 Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
#11 7.598
#11 7.598 current directory: /usr/local/bundle/gems/racc-1.6.0/ext/racc/cparse
#11 7.598 /usr/local/bin/ruby -I /usr/local/lib/ruby/2.7.0 -r
#11 7.598 ./siteconf20211027-1-1m7t8pg.rb extconf.rb
#11 7.598 checking for rb_block_call()... *** extconf.rb failed ***
#11 7.598 Could not create Makefile due to some reason, probably lack of necessary
#11 7.598 libraries and/or headers. Check the mkmf.log file for more details. You may
#11 7.598 need configuration options.
It's so strange that it was working fine until this afternoon. Here's my dockerfile:
FROM ruby:2.7.4-alpine
ENV APP_PATH /api
ENV RAILS_PORT 3000
# install dependencies for application these are specific to alpine
RUN apk -U add --no-cache --update \
build-base \
git \
vim \
postgresql-dev \
postgresql-client \
ruby-diff-lcs \
libxml2-dev \
libxslt-dev \
linux-headers \
nodejs \
yarn \
imagemagick \
tzdata \
less \
ruby-nokogiri \
&& rm -rf /var/cache/apk/* \
&& mkdir -p $APP_PATH
# navigate to app directory
WORKDIR $APP_PATH
COPY Gemfile ${APP_PATH}/Gemfile
COPY Gemfile.lock ${APP_PATH}/Gemfile.lock
RUN mkdir -p ${APP_PATH}/log && touch ${APP_PATH}/log/development.log
RUN bundle install
COPY . $APP_PATH
RUN gem install foreman
and my Gemfile
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.7.4'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails', branch: 'main'
gem 'rails', '~> 6.1.4', '>= 6.1.4.1'
# Use postgresql as the database for Active Record
gem 'pg', '~> 1.1'
# Use Puma as the app server
gem 'puma', '~> 5.0'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
# gem 'jbuilder', '~> 2.7'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
# Use Active Model has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use Active Storage variant
# gem 'image_processing', '~> 1.2'
# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.4.4', require: false
# Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin AJAX possible
gem 'rack-cors'
# Devise and Json Web Token deps
gem 'devise'
gem 'devise-jwt'
gem 'fast_jsonapi'
# QR Code Generator
gem "rqrcode", "~> 2.0"
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
gem 'faker'
gem 'rspec-rails'
# testing stuff
gem 'factory_bot_rails'
gem 'shoulda-matchers'
gem 'database_cleaner'
end
group :development do
gem 'listen', '~> 3.3'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
Any help or suggestions appreciated. Thank you!

can't push app to heroku, even though app updated to ruby 2.5.1

I get the following error when I do git push heroku master for my ruby app.
remote: -----> Compiling Ruby/Rails
remote: Command: 'set -o pipefail; curl -L --fail --retry 5
--retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-
external-1.amazonaws.com/heroku-buildpack-ruby/heroku-18/ruby-
2.3.8.tgz -s -o - | tar zxf - ' failed on attempt 1 of 3.
remote: Command: 'set -o pipefail; curl -L --fail --retry 5
--retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-
external-1.amazonaws.com/heroku-buildpack-ruby/heroku-18/ruby-
2.3.8.tgz -s -o - | tar zxf - ' failed on attempt 2 of 3.
remote:
remote: !
remote: ! An error occurred while installing ruby-2.3.8
remote: !
remote: ! This version of Ruby is not available on Heroku-18.
The minimum supported version
remote: ! of Ruby on the Heroku-18 stack can found at:
remote: !
remote: ! https://devcenter.heroku.com/articles/ruby-
support#supported-runtimes
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: Verifying deploy...
I've updated my ruby version and have set ruby 2.5.1 to default
rvm list
=* ruby-2.5.1 [ x86_64 ]
'=>' - current
'=*' - current && default
'*' - default
I am on the most recent ruby version
ruby -v
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin17]
My gemfile is also up-to-date
source 'https://rubygems.org'
ruby '2.5.1'
gem 'rails', '5.1.6'
gem 'bcrypt', '3.1.12'
gem 'faker', '1.7.3'
gem 'will_paginate', '3.1.6'
gem 'bootstrap-will_paginate', '1.0.0'
gem 'bootstrap-sass', '3.3.7'
gem 'puma', '3.9.1'
gem 'sass-rails', '5.0.6'
gem 'uglifier', '3.2.0'
gem 'coffee-rails', '4.2.2'
gem 'jquery-rails', '4.3.1'
gem 'turbolinks', '5.0.1'
gem 'jbuilder', '2.7.0'
...
Got it to work. The problem was that I hadn't successfully added and committed my changes even though I've updated my app to 2.5.1
Have to:
git add -A
git commit -m "random message about updating app to 2.5.1"
git push heroku master

passenger error 'cannot load such file: ... union_station_hooks_core'

I get the following error on my rails app:
Web application could not be started
cannot load such file -- /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bundler/gems/passenger-e139c4cd3ebd/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core (LoadError)
/u/sf/netmon/.rbenv/versions/2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/u/sf/netmon/.rbenv/versions/2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bundler/gems/passenger-e139c4cd3ebd/src/ruby_supportlib/phusion_passenger.rb:235:in `require_passenger_lib'
/opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bundler/gems/passenger-e139c4cd3ebd/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:232:in `before_loading_app_code_step1'
/opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bundler/gems/passenger-e139c4cd3ebd/src/helper-scripts/rack-preloader.rb:99:in `preload_app'
/opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bundler/gems/passenger-e139c4cd3ebd/src/helper-scripts/rack-preloader.rb:156:in `<module:App>'
/opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bundler/gems/passenger-e139c4cd3ebd/src/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
/opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bundler/gems/passenger-e139c4cd3ebd/src/helper-scripts/rack-preloader.rb:29:in `<main>'
Error ID
28518bd5
Looking at the file system:
-bash-4.1$ pwd
/opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bundler/gems/passenger-e139c4cd3ebd/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core
-bash-4.1$ tree
.
0 directories, 0 files
So obviously there is indeed no such file... how should i fix this?
My Gemfile:
source 'https://rubygems.org'
gem 'rails', git: 'https://github.com/rails/rails', branch: '4-2-stable'
gem 'actionpack-action_caching'
gem 'pg'
gem 'redis'
gem 'rubytree'
gem 'turbolinks'
gem 'jquery-rails'
gem 'jquery-datatables-rails', git: 'https://github.com/rweng/jquery-datatables-rails'
gem 'rails-timeago'
gem 'dygraphs-rails'
gem 'underscore-rails'
gem 'd3_rails'
gem 'twitter-bootstrap-rails', '= 2.2.8'
gem 'less-rails'
gem 'coffee-rails', git: 'https://github.com/rails/coffee-rails'
gem 'coffeebeans'
gem 'jquery-ui-rails'
group :assets do
gem 'sass-rails', git: 'https://github.com/rails/sass-rails', branch: '5-0-stable'
gem 'therubyracer', platforms: :ruby
gem 'uglifier', '>= 1.0.3'
end
gem 'jbuilder', '~> 1.0.1'
gem 'passenger', git: 'https://github.com/FooBarWidget/passenger', branch: 'stable-5.0'
gem 'rack-webauth'
gem 'bunny'
Installed ruby 2.3.0 via ruby-build and passenger's apache module reported no errors:
$ ./passenger-install-apache2-module
...
Validating installation...
* Checking whether this Passenger install is in PATH... (!)
Please add /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bundler/gems/passenger-e139c4cd3ebd/bin to PATH.
Otherwise you will get "command not found" errors upon running
any Passenger commands.
Learn more at about PATH at:
https://www.phusionpassenger.com/library/indepth/environment_variables.html#the-path-environment-variable
* Checking whether there are no other Passenger installations... ✓
* Checking whether Apache is installed... ✓
* Checking whether the Passenger module is correctly configured in Apache... ✓
Detected 0 error(s), 1 warning(s).
Press ENTER to continue.
seems like a quick search through the passenger github helped...
union_station_hooks_core and union_station_hooks_rails are both git submodules on the main passenger git repo. so modifying my gemfile to include submodules: true will pull in the required files.
gem 'passenger', \
git: 'https://github.com/FooBarWidget/passenger', \
branch: 'stable-5.0', \
submodules: true
I has same problem. It is because you passenger is not full.
Full passenger will be via make.
just download needed version like this
wget http://s3.amazonaws.com/phusion-passenger/releases/passenger-5.0.26.tar.gz
And extract to /opt/passenger
Then rerun passenger-install-nginx-module and add it to PATH -
echo 'PATH=/opt/passenger/bin:$PATH' >>etc/profile
PATH=/opt/passenger/bin:$PATH
export PATH
passenger-config validate-install
And not forget correct in http section
http {
...
passenger_root /opt/passenger;
passenger_ruby /usr/bin/ruby;
...
}

Issue upgrading application to rails 4.2.1 with libv8 & devise & therubyracer

My application was working all fine with the following gemfile:
source 'https://rubygems.org'
#ruby version
ruby "2.1.5"
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.10'
# Use sqlite3 as the database for Active Record
gem 'pg'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
gem 'jquery-ui-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
#add bootstrap css
gem "twitter-bootstrap-rails"
gem "therubyracer"
gem "less-rails"
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring', group: :development
#Add paperclip for image uploading - requires imagemagick - need rmagick for heroku?
gem "paperclip", :git => "git://github.com/thoughtbot/paperclip.git"
gem 'rmagick'
#aws-sdk for s3 capability production only
gem 'aws-sdk', group: :production
gem "rake", '10.4.2'
#Adding geoip for our lookup location services
gem 'geoip', '~> 1.4.0'
#Adding a exception notifier for debugging on heroku
gem 'exception_notification'
#annotate model game so models get details of the database contents added as comments to the top of their files
gem 'annotate', '~> 2.6.5'
#for oauth authentication with Stripe api
gem 'omniauth-stripe-connect'
#for stripe checkout
gem 'stripe', :git => 'https://github.com/stripe/stripe-ruby'
#for user management
gem 'devise'
#for devise facebook omni auth
gem 'omniauth-facebook'
#for storing my custom settings
gem 'rails_config'
#HTTParty for easily consuming external web services in the ruby app - used for GDistance class in services
gem 'httparty'
#i need the latest version of fontawesome - the one in bootstrap is too old!
gem "font-awesome-rails"
#google analytics - for production only
gem 'rack-google_analytics', group: :production
#ahoy is for on site analytics - trying it out
gem 'ahoy_matey'
#using socialization gem for user follows
gem 'socialization'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]
I want to update my application to use Rails 4.2.1, so I update this line in my gemfile:
gem 'rails', '4.2.1'
When I then run bundle update I get the following error:
Using less 2.6.0
Using less-rails 2.7.0 (was 2.6.0)
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/Users/andyarmstrong/.rbenv/versions/2.1.5/bin/ruby -r ./siteconf20150701-17291-17o68o1.rb extconf.rb
creating Makefile
Compiling v8 for x64
Using python 2.7.6
Using compiler: /usr/bin/c++ (clang version 6.1.0)
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/atomicops_internals_x86_gcc.o has no symbols
In file included from ../src/accessors.cc:28:
In file included from ../src/v8.h:60:
In file included from ../src/objects-inl.h:38:
In file included from ../src/elements.h:33:
In file included from ../src/heap.h:35:
In file included from ../src/incremental-marking.h:33:
In file included from ../src/mark-compact.h:32:
../src/spaces.h:896:26: error: 'this' pointer cannot be null in well-defined C++ code; comparison may be assumed to always evaluate to true [-Werror,-Wtautological-undefined-compare]
bool exists() { return this != NULL && code_range_ != NULL; }
^~~~ ~~~~
../src/spaces.h:898:9: error: 'this' pointer cannot be null in well-defined C++ code; comparison may be assumed to always evaluate to false [-Werror,-Wtautological-undefined-compare]
if (this == NULL || code_range_ == NULL) return false;
^~~~ ~~~~
2 errors generated.
make[1]: *** [/Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/v8_base/src/accessors.o] Error 1
make: *** [x64.release] Error 2
/Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/ext/libv8/location.rb:36:in `block in verify_installation!': libv8 did not install properly, expected binary v8 archive '/Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/tools/gyp/libv8_base.a'to exist, but it was not found (Libv8::Location::Vendor::ArchiveNotFound)
from /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/ext/libv8/location.rb:35:in `each'
from /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/ext/libv8/location.rb:35:in `verify_installation!'
from /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/ext/libv8/location.rb:26:in `install!'
from extconf.rb:7:in `<main>'
GYP_GENERATORS=make \
build/gyp/gyp --generator-output="out" build/all.gyp \
-Ibuild/standalone.gypi --depth=. \
-Dv8_target_arch=x64 \
-S.x64 -Dv8_enable_backtrace=1 -Dv8_can_use_vfp2_instructions=true -Darm_fpu=vfpv2 -Dv8_can_use_vfp3_instructions=true -Darm_fpu=vfpv3 -Dwerror=''
CXX(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/allocation.o
CXX(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/atomicops_internals_x86_gcc.o
CXX(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/bignum.o
CXX(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/bignum-dtoa.o
CXX(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/cached-powers.o
CXX(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/conversions.o
CXX(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/diy-fp.o
CXX(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/dtoa.o
CXX(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/fast-dtoa.o
CXX(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/fixed-dtoa.o
CXX(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/once.o
CXX(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/preparse-data.o
CXX(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/preparser.o
CXX(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/preparser-api.o
CXX(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/scanner.o
CXX(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/strtod.o
CXX(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/token.o
CXX(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/unicode.o
CXX(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/utils.o
LIBTOOL-STATIC /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/libpreparser_lib.a
CXX(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/preparser/preparser/preparser-process.o
LINK(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/preparser
CXX(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/v8_base/src/accessors.o
extconf failed, exit code 1
Gem files will remain installed in /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8 for inspection.
Results logged to /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-14/2.1.0-static/libv8-3.16.14.8/gem_make.out
An error occurred while installing libv8 (3.16.14.8), and Bundler cannot continue.
Make sure that `gem install libv8 -v '3.16.14.8'` succeeds before bundling.
So I then try the command the error suggests:
gem install libv8 -v '3.16.14.8'
This command fails with this error:
Andys-MacBook-Pro:andyhelloworldruby andyarmstrong$ gem install libv8 -v '3.16.14.8'
Building native extensions. This could take a while...
ERROR: Error installing libv8:
ERROR: Failed to build gem native extension.
/Users/andyarmstrong/.rbenv/versions/2.1.5/bin/ruby -r ./siteconf20150701-18322-ri2u8p.rb extconf.rb
creating Makefile
Compiling v8 for x64
Using python 2.7.6
Using compiler: /usr/bin/c++ (clang version 6.1.0)
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/atomicops_internals_x86_gcc.o has no symbols
In file included from ../src/accessors.cc:28:
In file included from ../src/v8.h:60:
In file included from ../src/objects-inl.h:38:
In file included from ../src/elements.h:33:
In file included from ../src/heap.h:35:
In file included from ../src/incremental-marking.h:33:
In file included from ../src/mark-compact.h:32:
../src/spaces.h:896:26: error: 'this' pointer cannot be null in well-defined C++ code; comparison may be assumed to always evaluate to true [-Werror,-Wtautological-undefined-compare]
bool exists() { return this != NULL && code_range_ != NULL; }
^~~~ ~~~~
../src/spaces.h:898:9: error: 'this' pointer cannot be null in well-defined C++ code; comparison may be assumed to always evaluate to false [-Werror,-Wtautological-undefined-compare]
if (this == NULL || code_range_ == NULL) return false;
^~~~ ~~~~
2 errors generated.
make[1]: *** [/Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/v8_base/src/accessors.o] Error 1
make: *** [x64.release] Error 2
/Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/ext/libv8/location.rb:36:in `block in verify_installation!': libv8 did not install properly, expected binary v8 archive '/Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/tools/gyp/libv8_base.a'to exist, but it was not found (Libv8::Location::Vendor::ArchiveNotFound)
from /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/ext/libv8/location.rb:35:in `each'
from /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/ext/libv8/location.rb:35:in `verify_installation!'
from /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/ext/libv8/location.rb:26:in `install!'
from extconf.rb:7:in `<main>'
GYP_GENERATORS=make \
build/gyp/gyp --generator-output="out" build/all.gyp \
-Ibuild/standalone.gypi --depth=. \
-Dv8_target_arch=x64 \
-S.x64 -Dv8_enable_backtrace=1 -Dv8_can_use_vfp2_instructions=true -Darm_fpu=vfpv2 -Dv8_can_use_vfp3_instructions=true -Darm_fpu=vfpv3 -Dwerror=''
CXX(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/allocation.o
CXX(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/atomicops_internals_x86_gcc.o
CXX(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/bignum.o
CXX(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/bignum-dtoa.o
CXX(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/cached-powers.o
CXX(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/conversions.o
CXX(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/diy-fp.o
CXX(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/dtoa.o
CXX(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/fast-dtoa.o
CXX(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/fixed-dtoa.o
CXX(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/once.o
CXX(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/preparse-data.o
CXX(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/preparser.o
CXX(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/preparser-api.o
CXX(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/scanner.o
CXX(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/strtod.o
CXX(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/token.o
CXX(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/unicode.o
CXX(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/utils.o
LIBTOOL-STATIC /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/libpreparser_lib.a
CXX(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/preparser/preparser/preparser-process.o
LINK(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/preparser
CXX(target) /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8/vendor/v8/out/x64.release/obj.target/v8_base/src/accessors.o
extconf failed, exit code 1
Gem files will remain installed in /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.8 for inspection.
Results logged to /Users/andyarmstrong/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-14/2.1.0-static/libv8-3.16.14.8/gem_make.out
Doing some searching I tried the following command:
gem install libv8 -v '3.16.14.8' -- --with-system-v8 - which succeeds, but then when I try bundle update again, therubyracer fails to resolve v8 as I don't think the system has a v8 installed.
How can I resolve this libv8 issue?
The problem was because of a problem in the libv8 source : https://github.com/cowboyd/libv8/issues/174
It was fixed by installing '3.16.14.7' like this:
gem install libv8 -v '3.16.14.7'
And that passed, so then adding this to the gemfile:
gem 'libv8', '3.16.14.7'

SSHKit::Runner::ExecuteError: Exception while executing on host <ip>: bundle exit status: 18

These are the error i get in the console
INFO[1bc8ff9e] Running /usr/bin/env sudo /usr/bin/monit unmonitor sidekiq_app_production0 on <ip>
DEBUG[1bc8ff9e] Command: /usr/bin/env sudo /usr/bin/monit unmonitor sidekiq_app_production0
DEBUG[1bc8ff9e] sudo: no tty present and no askpass program specified
UG[1bc8ff9e] sudo: no tty present and no askpass program specified
I am using the following capistrano gems
gem 'capistrano', '~> 3.1.0'
gem 'capistrano-bundler', '~> 1.1.2'
gem 'capistrano-rails', '~> 1.1.1'
Please check if you have the privileges to do sudo at server and check the user exists!

Resources