【问题标题】:Rails Install fcgi on my macRails 在我的 Mac 上安装 fcgi
【发布时间】:2013-02-12 05:56:21
【问题描述】:

我正在使用 Rails 3.2 和 ruby​​ 1.9.2。我已将 gem 'fcgi' (fastcgi) 添加到我的 Gemfile 中,但是当我运行 bundle install 时,它在 fcgi 上失败了。

输出:

Installing fcgi (0.9.1) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /Users/johndcowan/.rvm/rubies/ruby-1.9.2-p318/bin/ruby extconf.rb 
checking for fcgiapp.h... no
checking for fastcgi/fcgiapp.h... no

make
make: *** No targets.  Stop.


Gem files will remain installed in /Users/johndcowan/.rvm/gems/ruby-1.9.2-p318/gems/fcgi- 0.9.1 for inspection.
Results logged to /Users/johndcowan/.rvm/gems/ruby-1.9.2-p318/gems/fcgi-0.9.1/ext/fcgi/gem_make.out
An error occured while installing fcgi (0.9.1), and Bundler cannot continue.
Make sure that `gem install fcgi -v '0.9.1'` succeeds before bundling.
Installing fcgi (0.9.1) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

/Users/johndcowan/.rvm/rubies/ruby-1.9.2-p318/bin/ruby extconf.rb 
checking for fcgiapp.h... no
checking for fastcgi/fcgiapp.h... no

make
make: *** No targets.  Stop.


Gem files will remain installed in /Users/johndcowan/.rvm/gems/ruby-1.9.2-p318/gems/fcgi-0.9.1 for inspection.
Results logged to /Users/johndcowan/.rvm/gems/ruby-1.9.2-p318/gems/fcgi-0.9.1/ext/fcgi/gem_make.out
An error occured while installing fcgi (0.9.1), and Bundler cannot continue.
Make sure that `gem install fcgi -v '0.9.1'` succeeds before bundling.

然后,我按照建议运行 gem install:

johns-MacBook-Pro:drywall johndcowan$ sudo gem install fcgi -v '0.9.1'
Fetching: fcgi-0.9.1.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing fcgi:
ERROR: Failed to build gem native extension.

/Users/johndcowan/.rvm/rubies/ruby-1.9.2-p318/bin/ruby extconf.rb
checking for fcgiapp.h... no
checking for fastcgi/fcgiapp.h... no

make
make: *** No targets.  Stop.

Gem files will remain installed in /Users/johndcowan/.rvm/rubies/ruby-1.9.2-p318/lib/ruby/gems/1.9.1/gems/fcgi-0.9.1 for inspection.
Results logged to /Users/johndcowan/.rvm/rubies/ruby-1.9.2-p318/lib/ruby/gems/1.9.1/gems/fcgi-0.9.1/ext/fcgi/gem_make.out
johns-MacBook-Pro:drywall johndcowan$

我发现一个用户有同样的问题,他/她使用 yum 安装了 fcgi_devel,这解决了他/她的 fcgi 问题。我尝试使用端口安装,但它不起作用。同一个网站说我不需要 yum。

sudo port install fcgi-devel
Error: Port fcgi-devel not found

有什么想法吗?

【问题讨论】:

    标签: ruby-on-rails fastcgi


    【解决方案1】:

    如果使用 Homebrew,请先尝试 brew install fastcgi

    【讨论】:

      猜你喜欢
      • 2019-10-13
      • 2014-05-04
      • 2014-06-06
      • 2017-12-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-11-10
      • 1970-01-01
      相关资源
      最近更新 更多