rubygems – 安装rb-appscript gem时出错

前端之家收集整理的这篇文章主要介绍了rubygems – 安装rb-appscript gem时出错前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我想使用测试驱动开发(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 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

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

解决方法

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

阅读Guard readme中的更多内容.

原文链接:https://www.f2er.com/ruby/267432.html

猜你在找的Ruby相关文章