6

我想使用测试驱动开发(TDD)创建一个rails应用程序,所以我写了

rails new myproject -T

然后我在 gemfile 中添加了这些代码行

group :test, :development do
    gem 'turn'
    gem 'rspec-rails'
    gem 'capybara'
    gem 'guard-rspec'
    gem 'growl_notify'
end 

所以我尝试安装捆绑包,但捆绑时出现此错误

Installing rb-appscript (0.6.1) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /usr/share/ruby-rvm/rubies/ruby-1.9.3-p125/bin/ruby extconf.rb 
extconf.rb:44: Use RbConfig instead of obsolete and deprecated Config.
create /var/lib/ruby-rvm/gems/ruby-1.9.3-p125/gems/rb-appscript-0.6.1/src/osx_ruby.h ...
create /var/lib/ruby-rvm/gems/ruby-1.9.3-p125/gems/rb-appscript-0.6.1/src/osx_intern.h ...
creating Makefile

make
Makefile:226: warning: overriding commands for target `/usr/share/ruby-rvm/gems/ruby-1.9.3-p125/gems/rb-appscript-0.6.1/lib'
Makefile:224: warning: ignoring old commands for target `/usr/share/ruby-rvm/gems/ruby-1.9.3-p125/gems/rb-appscript-0.6.1/lib'
compiling src/rbae.c
src/rbae.c:13:27: fatal error: Carbon/Carbon.h: No such file or directory
compilation terminated.
make: *** [rbae.o] Error 1


Gem files will remain installed in /usr/share/ruby-rvm/gems/ruby-1.9.3-p125/gems/rb-appscript-0.6.1 for inspection.
Results logged to /usr/share/ruby-rvm/gems/ruby-1.9.3-p125/gems/rb-appscript-0.6.1/./gem_make.out
An error occured while installing rb-appscript (0.6.1), and Bundler cannot continue.
Make sure that `gem install rb-appscript -v '0.6.1'` succeeds before bundling.

所以我尝试手动安装 gem

gem install rb-appscript -v '0.6.1'

我也遇到了类似的错误

Building native extensions.  This could take a while...
ERROR:  Error installing rb-appscript:
    ERROR: Failed to build gem native extension.

        /usr/share/ruby-rvm/rubies/ruby-1.9.3-p125/bin/ruby extconf.rb
extconf.rb:44: Use RbConfig instead of obsolete and deprecated Config.
create /var/lib/ruby-rvm/gems/ruby-1.9.3-p125/gems/rb-appscript-0.6.1/src/osx_ruby.h ...
create /var/lib/ruby-rvm/gems/ruby-1.9.3-p125/gems/rb-appscript-0.6.1/src/osx_intern.h ...
creating Makefile

make
Makefile:226: warning: overriding commands for target `/usr/share/ruby-rvm/gems/ruby-1.9.3-p125/gems/rb-appscript-0.6.1/lib'
Makefile:224: warning: ignoring old commands for target `/usr/share/ruby-rvm/gems/ruby-1.9.3-p125/gems/rb-appscript-0.6.1/lib'
compiling src/rbae.c
src/rbae.c:13:27: fatal error: Carbon/Carbon.h: No such file or directory
compilation terminated.
make: *** [rbae.o] Error 1

Gem files will remain installed in /usr/share/ruby-rvm/gems/ruby-1.9.3-p125/gems/rb-appscript-0.6.1 for inspection.
Results logged to /usr/share/ruby-rvm/gems/ruby-1.9.3-p125/gems/rb-appscript-0.6.1/./gem_make.out

所以有什么建议我现在能做什么?

4

1 回答 1

16

Growl 仅适用于 Mac OS X,而不是growl_notify您可能想要的:

gem 'libnotify'

Guard 自述文件中阅读更多内容。

于 2012-03-12T04:38:02.757 回答