ruby-on-rails - Rails 在我的 mac 上安装 fcgi

标签 ruby-on-rails fastcgi

我正在使用 Rails 3.2 和 ruby​​ 1.9.2。我已将 gem 'fcgi' (fastcgi) 添加到我的 Gemfile 中,但是当我运行捆绑安装时,它在 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 安装:

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

有什么想法吗?

最佳答案

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

关于ruby-on-rails - Rails 在我的 mac 上安装 fcgi,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15094936/

相关文章:

ruby-on-rails - 在 Ruby 中 Active Record 搜索特定文本模式

javascript - 限制 javascript 数据表中允许选择的复选框数量 (Ruby on Rails)

c - FCGX_Accept_r 在 C 上的简单 FastCGI 应用程序中运行两次

c++ - 如何在 C++ 中使用 FastCGI (nginx) 创建 cookie

php - 托管转移后 ExpressionEngine 无法正常运行

python - 如何停止超过配置的请求超时的 FastCGI 进程

ruby-on-rails - 将样式类添加到 select_country 字段

ruby-on-rails - 带有数组的 simple_form 中的禁用单选按钮

ruby-on-rails - 如何在生产模式下抑制erb中的调试消息

perl - 如何强制 FastCGI 将表单数据编码为 UTF-8,因为 CGI.pm 有选项?