gpt4 book ai didi

ruby-on-rails - 由于 libv8,Git 无法推送 Heroku Master

转载 作者:数据小太阳 更新时间:2023-10-29 07:16:14 27 4
gpt4 key购买 nike

当我运行 git push heroku master 我得到这个错误 ruby​​ 赛车安装正常,libv8 也安装好了 repo 到 heroku

doom@linux:~/rails_projects/first_app$ git push heroku master
Counting objects: 68, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (55/55), done.
Writing objects: 100% (68/68), 26.16 KiB, done.
Total 68 (delta 6), reused 0 (delta 0)

-----> Heroku receiving push
-----> Ruby/Rails app detected
-----> Installing dependencies using Bundler version 1.2.2
Running: bundle install --without development:test --path vendor/bundle --binstubs bin/ --deployment
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Installing rake (10.0.2)
Installing i18n (0.6.1)
Installing multi_json (1.5.0)
Installing activesupport (3.2.9)
Installing builder (3.0.4)
Installing activemodel (3.2.9)
Installing erubis (2.7.0)
Installing journey (1.0.4)
Installing rack (1.4.1)
Installing rack-cache (1.2)
Installing rack-test (0.6.2)
Installing hike (1.2.1)
Installing tilt (1.3.3)
Installing sprockets (2.2.2)
Installing actionpack (3.2.9)
Installing mime-types (1.19)
Installing polyglot (0.3.3)
Installing treetop (1.4.12)
Installing mail (2.4.4)
Installing actionmailer (3.2.9)
Installing arel (3.0.2)
Installing tzinfo (0.3.35)
Installing activerecord (3.2.9)
Installing activeresource (3.2.9)
Installing coffee-script-source (1.4.0)
Installing execjs (1.4.0)
Installing coffee-script (2.2.0)
Installing rack-ssl (1.3.2)
Installing json (1.7.5) with native extensions
Installing rdoc (3.12)
Installing thor (0.16.0)
Installing railties (3.2.9)
Installing coffee-rails (3.2.2)
Installing jquery-rails (2.0.2)
Using bundler (1.2.2)
Installing rails (3.2.9)
Installing ref (1.0.2)
Installing sass (3.2.3)
Installing sass-rails (3.2.5)
Installing therubyracer (0.11.0) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb
checking for main() in -lpthread... yes
checking for v8.h... no
*** 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=/usr/local/bin/ruby
--with-pthreadlib
--without-pthreadlib
--enable-debug
--disable-debug
--with-v8-dir
--without-v8-dir
--with-v8-include
--without-v8-include=${v8-dir}/include
--with-v8-lib
--without-v8-lib=${v8-dir}/lib
/tmp/build_201rmwb3smm2n/vendor/bundle/ruby/1.9.1/gems/therubyracer-0.11.0/ext/v8/build.rb:42:in `build_with_system_libv8': unable to locate libv8. Please see output for details (RuntimeError)
from extconf.rb:22:in `<main>'
The Ruby Racer requires libv8 ~> 3.11.8
to be present on your system in order to compile
and link, but it could not be found.
In order to resolve this, you will either need to manually
install an appropriate libv8 and make sure that this
build process can find it. If you install it into the
standard system path, then it should just be picked up
automatically. Otherwise, you'll have to pass some extra
flags to the build process as a hint.
If you don't want to bother with all that, there is a
rubygem that will do all this for you. You can add
following line to your Gemfile:
gem 'libv8', '~> 3.11.8'
We hope that helps, and we apologize, but now we have
to push the eject button on this install.
thanks,
The Mgmt.
Gem files will remain installed in /tmp/build_201rmwb3smm2n/vendor/bundle/ruby/1.9.1/gems/therubyracer-0.11.0 for inspection.
Results logged to /tmp/build_201rmwb3smm2n/vendor/bundle/ruby/1.9.1/gems/therubyracer-0.11.0/ext/v8/gem_make.out
An error occurred while installing therubyracer (0.11.0), and Bundler cannot continue.
Make sure that `gem install therubyracer -v '0.11.0'` succeeds before bundling.
!
! Failed to install gems via Bundler.
!
! Heroku push rejected, failed to compile Ruby/rails app

To git@heroku.com:still-tundra-4364.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:still-tundra-4364.git'

这是我的 Gemfile

    source 'https://rubygems.org'

gem 'rails', '3.2.9'

group :development do
gem 'sqlite3', '1.3.5'
gem 'libv8', '~> 3.11.8'
#gem 'libv8', '~> 3.11.8' # Update version number as needed
gem "execjs", "~> 1.4.0"
gem 'therubyracer', '~> 0.11.0beta5'
end


# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '3.2.5'
gem 'coffee-rails', '3.2.2'
#gem 'libv8', '~> 3.11.8'

gem 'uglifier', '1.2.3'
end

gem 'jquery-rails', '2.0.2'

group :production do
gem 'pg', '0.12.2'
end

还有我的 Gemlock 文件

GEM
remote: https://rubygems.org/
specs:
actionmailer (3.2.9)
actionpack (= 3.2.9)
mail (~> 2.4.4)
actionpack (3.2.9)
activemodel (= 3.2.9)
activesupport (= 3.2.9)
builder (~> 3.0.0)
erubis (~> 2.7.0)
journey (~> 1.0.4)
rack (~> 1.4.0)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.2.1)
activemodel (3.2.9)
activesupport (= 3.2.9)
builder (~> 3.0.0)
activerecord (3.2.9)
activemodel (= 3.2.9)
activesupport (= 3.2.9)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activeresource (3.2.9)
activemodel (= 3.2.9)
activesupport (= 3.2.9)
activesupport (3.2.9)
i18n (~> 0.6)
multi_json (~> 1.0)
arel (3.0.2)
builder (3.0.4)
coffee-rails (3.2.2)
coffee-script (>= 2.2.0)
railties (~> 3.2.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.4.0)
erubis (2.7.0)
execjs (1.4.0)
multi_json (~> 1.0)
hike (1.2.1)
i18n (0.6.1)
journey (1.0.4)
jquery-rails (2.0.2)
railties (>= 3.2.0, < 5.0)
thor (~> 0.14)
json (1.7.5)
libv8 (3.11.8.4)
mail (2.4.4)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.19)
multi_json (1.5.0)
pg (0.12.2)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.2)
rack (>= 0.4)
rack-ssl (1.3.2)
rack
rack-test (0.6.2)
rack (>= 1.0)
rails (3.2.9)
actionmailer (= 3.2.9)
actionpack (= 3.2.9)
activerecord (= 3.2.9)
activeresource (= 3.2.9)
activesupport (= 3.2.9)
bundler (~> 1.0)
railties (= 3.2.9)
railties (3.2.9)
actionpack (= 3.2.9)
activesupport (= 3.2.9)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (>= 0.14.6, < 2.0)
rake (10.0.2)
rdoc (3.12)
json (~> 1.4)
ref (1.0.2)
sass (3.2.3)
sass-rails (3.2.5)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
sprockets (2.2.2)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.5)
therubyracer (0.11.0)
ref
thor (0.16.0)
tilt (1.3.3)
treetop (1.4.12)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.35)
uglifier (1.2.3)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)

PLATFORMS
ruby

DEPENDENCIES
coffee-rails (= 3.2.2)
execjs (~> 1.4.0)
jquery-rails (= 2.0.2)
libv8 (~> 3.11.8)
pg (= 0.12.2)
rails (= 3.2.9)
sass-rails (= 3.2.5)
sqlite3 (= 1.3.5)
therubyracer (~> 0.11.0beta5)
uglifier (= 1.2.3)

看来现在有一个我知道的没有解决方法的已知问题

https://github.com/cowboyd/therubyracer/issues/215

最佳答案

我遇到了同样的问题并尝试了其中一个建议(使用已知有效的 therubyracer):

# Gemfile
gem 'therubyracer', '0.10.2', :platforms => :ruby

就是这样。我可以再次部署到 Heroku。

关于ruby-on-rails - 由于 libv8,Git 无法推送 Heroku Master,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13869650/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com