Heroku 无法安装Rubyracer,错误
我正在尝试将therubyracer/therubyracer heroku安装到我的应用程序中,因为它在heroku服务器中无法工作,因为我没有javascript运行时环境。 当我试图安装这些gems时,它写道:Heroku 无法安装Rubyracer,错误,heroku,ruby-on-rails-3.1,ruby-1.9.2,javascript,Heroku,Ruby On Rails 3.1,Ruby 1.9.2,Javascript,我正在尝试将therubyracer/therubyracer heroku安装到我的应用程序中,因为它在heroku服务器中无法工作,因为我没有javascript运行时环境。 当我试图安装这些gems时,它写道: Installing therubyracer-heroku (0.8.1.pre3) with native extensions C:/RailsInsta ller/Ruby1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/installer.r
Installing therubyracer-heroku (0.8.1.pre3) with native extensions C:/RailsInsta
ller/Ruby1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:533:in `rescue in
block in build_extensions': ERROR: Failed to build gem native extension. (Gem::I
nstaller::ExtensionBuildError)
C:/RailsInstaller/Ruby1.9.2/bin/ruby.exe extconf.rb
rm -rf build
mkdir -p build
cp -r scons build
mkdir -p build/scons/install
python build/scons/setup.py install --prefix=install
make: python: Command not found
make: *** [build/scons/install/bin/scons] Error 127
*** 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=C:/RailsInstaller/Ruby1.9.2/bin/ruby
extconf.rb:9:in `<main>': Error compiling V8 (RuntimeError)
Compiling V8
Gem files will remain installed in C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9
.1/gems/therubyracer-heroku-0.8.1.pre3 for inspection.
Results logged to C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/therubyra
cer-heroku-0.8.1.pre3/ext/v8/gem_make.out
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/insta
ller.rb:511:in `block in build_extensions'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/insta
ller.rb:486:in `each'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/insta
ller.rb:486:in `build_extensions'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/insta
ller.rb:159:in `install'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.18
/lib/bundler/source.rb:101:in `block in install'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.18
/lib/bundler/rubygems_integration.rb:78:in `preserve_paths'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.18
/lib/bundler/source.rb:91:in `install'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.18
/lib/bundler/installer.rb:58:in `block (2 levels) in run'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.18
/lib/bundler/rubygems_integration.rb:93:in `with_build_args'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.18
/lib/bundler/installer.rb:57:in `block in run'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.18
/lib/bundler/installer.rb:49:in `run'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.18
/lib/bundler/installer.rb:8:in `install'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.18
/lib/bundler/cli.rb:220:in `install'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.18
/lib/bundler/vendor/thor/task.rb:22:in `run'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.18
/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.18
/lib/bundler/vendor/thor.rb:263:in `dispatch'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.18
/lib/bundler/vendor/thor/base.rb:386:in `start'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.18
/bin/bundle:13:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.2/bin/bundle:19:in `load'
from C:/RailsInstaller/Ruby1.9.2/bin/bundle:19:in `<main>'
提前感谢据我所知,therubyracer heroku根本无法在Windows上工作。但是Windows有自己的JavaScript引擎,execjs应该能够找到它。因此,这应该适用于您在Windows上的开发 要在Heroku上提供应用程序,您可以添加therubyracer Heroku gem,如下所示:
gem 'therubyracer-heroku', '~> 0.8.1.pre3', :platform => :ruby
:platform=>:ruby将在C ruby MRI或Rubinius上使用它,但不会在Windows上使用
此外,请参阅Heroku的文档以了解相关信息
如果您以前使用过therubyracer或therubyracer heroku,则不再需要这些宝石,并且强烈反对使用这些宝石,因为这些宝石占用大量内存
据我所知,therubyracer heroku根本无法在Windows上工作。但是Windows有自己的JavaScript引擎,execjs应该能够找到它。因此,这应该适用于您在Windows上的开发 要在Heroku上提供应用程序,您可以添加therubyracer Heroku gem,如下所示:
gem 'therubyracer-heroku', '~> 0.8.1.pre3', :platform => :ruby
:platform=>:ruby将在C ruby MRI或Rubinius上使用它,但不会在Windows上使用
此外,请参阅Heroku的文档以了解相关信息
如果您以前使用过therubyracer或therubyracer heroku,则不再需要这些宝石,并且强烈反对使用这些宝石,因为这些宝石占用大量内存
副本的副本