0

尝试运行我的收据时出现错误:

并运行以下命令:

$> rails _3.2.8_ new demo_app -T

$> cd demo_app

$> rake rails:template LOCATION=https://raw.github.com/gist/3752746/a259f4307b65493f4b7043bd78f30efa3ba6191e/test.rb

收据在这里https://raw.github.com/gist/3752746/a259f4307b65493f4b7043bd78f30efa3ba6191e/test.rb

然后我收到以下错误

Could not find gem 'ffi (~> 1.0.0) ruby', 
which is required by gem 'libnotify (= 0.5.9) ruby', in any of the sources.

当我使用带有复制粘贴 gem 的手动安装并运行“捆绑安装”时,一切正常。
怎么了?

4

2 回答 2

1

尝试这个:

require 'bundler'

# do your template gem adding stuff...

Bundler.with_clean_env do
  run 'bundle install'
end

参考:https ://github.com/rails/rails/issues/3153

于 2013-05-29T03:49:25.880 回答
0

gem install ffi

然后再次运行。

于 2012-09-19T22:51:55.303 回答