How to reproduce this:
$ rails new testapp
$ cd ./testapp
$ rails g generator somegen
Then change generator to this:
class SomegenGenerator < Rails::Generators::Base
source_root File.expand_path('../templates', __FILE__)
def install
gem "unicorn"
run "bundle install"
end
end
And then run generator:
This will generate output:
gemfile unicorn
run bundle install
Could not find gem 'unicorn (>= 0)' in any of the gem sources listed in your Gemfile.
Run `bundle install` to install missing gems.
I'm using ruby 1.9.2, Rails 3.1, RVM, Ubuntu
How to reproduce this:
Then change generator to this:
And then run generator:
This will generate output:
I'm using ruby 1.9.2, Rails 3.1, RVM, Ubuntu