0

I'm getting error when try run my recept:

and run following commands:

$> rails _3.2.8_ new demo_app -T

$> cd demo_app

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

Recept is here https://raw.github.com/gist/3752746/a259f4307b65493f4b7043bd78f30efa3ba6191e/test.rb

Then i getting following error

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

When I use manual installation with copy-paste gems and running 'bundle install' everything works good.
What's wrong?

itsnikolay
  • 17,415
  • 4
  • 65
  • 64

2 Answers2

1

Try this:

require 'bundler'

# do your template gem adding stuff...

Bundler.with_clean_env do
  run 'bundle install'
end

Reference: https://github.com/rails/rails/issues/3153

Macario
  • 2,214
  • 2
  • 22
  • 40
0

gem install ffi

then run that again.

pjammer
  • 9,489
  • 5
  • 46
  • 56