首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >安装therubyracer heroku时出现问题

安装therubyracer heroku时出现问题
EN

Stack Overflow用户
提问于 2013-05-03 15:16:14
回答 1查看 730关注 0票数 1

问题

我无法运行middleman服务器,因为没有安装dependency therubyracer-heroku

我都试了些什么?

我尝试通过以下命令安装middleman

代码语言:javascript
运行
复制
gem install middleman

它成功了。当我使用默认配置启动中间服务器时:

代码语言:javascript
运行
复制
$ middleman server -p 3456 -e development

我得到了以下错误:

代码语言:javascript
运行
复制
$ middleman server -p 3456 -e development
Could not find libv8-3.11.8.13 in any of the sources
Run `bundle install` to install missing gems.
$ bundle install
src/bootstrapper.cc: In static member function 'static bool v8::internal::Genesis::CompileScriptCached(v8::internal::Vector<const char>, v8::internal::Handle<v8::internal::String>, v8::internal::SourceCodeCache*, v8::Extension*, v8::internal::Handle<v8::internal::Context>, bool)':
src/bootstrapper.cc:1002:18: error: variable 'result' set but not used [-Werror=unused-but-set-variable]
src/bootstrapper.cc: In member function 'bool v8::internal::Genesis::InstallNatives()':
src/bootstrapper.cc:1227:24: error: variable 'name' set but not used [-Werror=unused-but-set-variable]
cc1plus: all warnings being treated as errors
scons: *** [obj/release/bootstrapper.o] Error 1
scons: building terminated because of errors.
make: *** [build/v8/libv8.a] Error 2
*** 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=/home/praveen/.rvm/rubies/ruby-1.9.3-p286/bin/ruby
extconf.rb:9:in `<main>': Error compiling V8 (RuntimeError)


Gem files will remain installed in /home/praveen/.rvm/gems/ruby-1.9.3-p286/gems/therubyracer-heroku-0.8.1.pre3 for inspection.
Results logged to /home/praveen/.rvm/gems/ruby-1.9.3-p286/gems/therubyracer-heroku-0.8.1.pre3/ext/v8/gem_make.out

An error occurred while installing therubyracer-heroku (0.8.1.pre3), and Bundler cannot continue.
Make sure that `gem install therubyracer-heroku -v '0.8.1.pre3'` succeeds before bundling.
$ 

我尝试卸载并重新安装libv8。都不起作用。好吧,我试过的是:

代码语言:javascript
运行
复制
gem uninstall libv8
gem install therubyracer-heroku
gem install therubyracer-heroku -v '0.8.1.pre3'
gem install therubyracer-heroku-0.8.1.pre3 # psst: I know this is crazy.
gem install therubyracer # succeeded, but this is not what I need.
gem install bundler
gem install bundle
bundle install # crazy things I tried but no luck!

gem install therubyracer-heroku -v '0.8.1.pre3'的输出

代码语言:javascript
运行
复制
src/bootstrapper.cc:1002:18: error: variable 'result' set but not used [-Werror=unused-but-set-variable]
src/bootstrapper.cc: In member function 'bool v8::internal::Genesis::InstallNatives()':
src/bootstrapper.cc:1227:24: error: variable 'name' set but not used [-Werror=unused-but-set-variable]
cc1plus: all warnings being treated as errors
scons: *** [obj/release/bootstrapper.o] Error 1
scons: building terminated because of errors.
make: *** [build/v8/libv8.a] Error 2
*** 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=/home/praveen/.rvm/rubies/ruby-1.9.3-p286/bin/ruby
extconf.rb:9:in `<main>': Error compiling V8 (RuntimeError)


Gem files will remain installed in /home/praveen/.rvm/gems/ruby-1.9.3-p286/gems/therubyracer-heroku-0.8.1.pre3 for inspection.
Results logged to /home/praveen/.rvm/gems/ruby-1.9.3-p286/gems/therubyracer-heroku-0.8.1.pre3/ext/v8/gem_make.out

Gemfile内容供您参考!

代码语言:javascript
运行
复制
source 'https://rubygems.org'

gem "thin"
gem "rack-contrib"

gem "middleman"
gem "middleman-livereload", :git => "https://github.com/middleman/middleman-livereload.git"
gem "middleman-smusher", :git  => "https://github.com/middleman/middleman-smusher.git"
gem "middleman-favicon-maker", :git => "https://github.com/follmann/middleman-favicon-maker.git"


gem "slim"
gem "compass-rgbapng"
gem "sassy-buttons"

group :development do
  gem 'heroku'
  gem 'foreman'
  gem 'therubyracer-heroku', '0.8.1.pre3'
  gem 'oj'
end

group :production do
  gem 'therubyracer-heroku', '0.8.1.pre3'
  gem 'oj'
end

那么,有什么办法来解决这个问题吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-05-03 22:33:43

请使用当前版本的therubyracer (在撰写本文时为0.11.4),而不是therubyracer heroku。不再需要它,因为主gem与heroku兼容,并且不再维护。

普通的gem现在与heroku兼容,所以只需

代码语言:javascript
运行
复制
gem "therubyracer"

在你的Gemfile中应该可以做到这一点

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/16353635

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档