iron-io/iron_worker_ruby — Issue #33: Iron Worker Rails Generator not finding template
Author: HighgrooveDan
Created: 2012-03-09 16:03:10+00:00
State: open

When I try to run the Rails generator with the latest 2.3.13 Gem, the generator says it can not find the template Erb file.

Gemfile:
```ruby
gem 'iron_worker', "2.3.13"
```

```bash
Daniels-MacBook-Pro:mailchimp-salesforce danielrice$ rails g iron_worker ProvisioningWorker -p
IronWorker initialized.
Could not find "template_worker.erb" in any of your source paths. Your current source paths are:
/Users/danielrice/.rvm/gems/ruby-1.9.2-p290@mailchimp-sfdc/gems/iron_worker-2.3.13/lib/generators/iron_worker/templates
Daniels-MacBook-Pro:mailchimp-salesforce danielrice$ ls -al /Users/danielrice/.rvm/gems/ruby-1.9.2-p290@mailchimp-sfdc/gems/iron_worker-2.3.13/lib/generators/iron_worker/templates
ls: /Users/danielrice/.rvm/gems/ruby-1.9.2-p290@mailchimp-sfdc/gems/iron_worker-2.3.13/lib/generators/iron_worker/templates: No such file or directory
```

I can only work around this by manually making a worker (not Railsy) or by fetching the Git repo directly in my Gemfile.

New Gemfile:
```ruby
gem 'iron_worker', :git => 'https://github.com/iron-io/iron_worker_ruby.git'
```

Then it works using the latest version straight from Github and not Rubygems

```bash
Daniels-MacBook-Pro:mailchimp-salesforce danielrice$ rails g iron_worker ProvisioningWorker -p
IronWorker initialized.
create app/workers/provisioning_worker.rb
```

So It looks like the packaged Gem is missing the lib/generators/iron_worker/templates directory.