首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Heroku上安装fcgi失败

在Heroku上安装fcgi失败
EN

Stack Overflow用户
提问于 2013-06-25 03:54:48
回答 1查看 502关注 0票数 0

我正在尝试将我的Rails项目推向Heroku。它给出了一些关于fcgi的错误。在我的机器上,我可以很好地安装fcgi。我可以在我的机器上执行gem install fcgi -v '0.8.8'而不会出错。

代码语言:javascript
复制
-----> Ruby/Rails app detected
-----> Using Ruby version: ruby-2.0.0
-----> Installing dependencies using Bundler version 1.3.2
   Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment
   Fetching gem metadata from http://rubygems.org/.........
   Fetching gem metadata from http://rubygems.org/..
   Installing rake (0.9.2.2)
   Installing abstract (1.0.0)
   Installing activesupport (3.0.11)
   Installing builder (2.1.2)
   Installing i18n (0.5.0)
   Installing activemodel (3.0.11)
   Installing erubis (2.6.6)
   Installing rack (1.4.0)
   Installing rack-mount (0.7.1)
   Installing rack-test (0.6.1)
   Installing tzinfo (0.3.33)
   Installing actionpack (3.0.11)
   Installing mime-types (1.16)
   Installing polyglot (0.3.1)
   Installing treetop (1.4.10)
   Installing mail (2.4.4)
   Installing actionmailer (3.0.11)
   Installing arel (2.0.9)
   Installing activerecord (3.0.11)
   Installing activeresource (3.0.11)
   Installing bigdecimal (1.1.0)
   Installing fcgi (0.8.8)
   Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
   /tmp/build_ljhotq40guh7/vendor/ruby-2.0.0/bin/ruby extconf.rb
   checking for fcgiapp.h... no
   checking for fastcgi/fcgiapp.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=/tmp/build_ljhotq40guh7/vendor/ruby-2.0.0/bin/ruby
   --with-fcgi-dir
   --without-fcgi-dir
   --with-fcgi-include
   --without-fcgi-include=${fcgi-dir}/include
   --with-fcgi-lib
   --without-fcgi-lib=${fcgi-dir}/
   Gem files will remain installed in /tmp/build_ljhotq40guh7/vendor/bundle/ruby/2.0.0/gems/fcgi-0.8.8 for inspection.
   Results logged to /tmp/build_ljhotq40guh7/vendor/bundle/ruby/2.0.0/gems/fcgi-0.8.8/ext/fcgi/gem_make.out
   An error occurred while installing fcgi (0.8.8), and Bundler cannot continue.
   Make sure that `gem install fcgi -v '0.8.8'` succeeds before bundling.

Gemfile:

代码语言:javascript
复制
source 'http://rubygems.org'

gem 'rails', '3.0.11'

#gem 'mysql2', '~> 0.2.17'

group :development, :test do
  gem 'sqlite3'
end

group :production do
  gem 'pg'
end

# Use unicorn as the web server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+)
# gem 'ruby-debug'
# gem 'ruby-debug19', :require => 'ruby-debug'

# Bundle the extra gems:
# gem 'bj'
# gem 'nokogiri'
# gem 'sqlite3-ruby', :require => 'sqlite3'
# gem 'aws-s3', :require => 'aws/s3'

# Bundle gems for the local environment. Make sure to
# put test-only gems in this group so their generators
# and rake tasks are available in development mode:
# group :development, :test do
#   gem 'webrat'
# end
gem 'fcgi'
gem 'minitest'
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-06-25 04:57:03

看起来你使用的是一个非常老的Rails版本。

Heroku最近更改了所有新的应用程序,默认使用Ruby2.0.0-我建议将

代码语言:javascript
复制
ruby '1.9.3'

在Gemfile的源码行下,将您的应用程序锁定到Ruby 1.9.3,因为您可能会遇到最新版本的Ruby和旧的Rails/gem等问题。

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

https://stackoverflow.com/questions/17283948

复制
相关文章

相似问题

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