Rails在我的mac上安装fcgi

时间:2013-02-26 17:01:08

标签: ruby-on-rails fastcgi

我正在使用Rails 3.2和ruby 1.9.2。我已经在我的Gemfile中添加了gem'fcgi'(fastcgi),但是当我运行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的问题。我尝试使用端口安装,但它不起作用。同一个网站说我不需要百胜。

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

有什么想法吗?

1 个答案:

答案 0 :(得分:1)

如果使用自制软件,请先尝试brew install fastcgi