2

I have implemented what edebill suggested in his answer to this question.

If I point to the gem in the usual way, with it installed in my environment

gem 'activerecord_datawarehouse'

rake -T does not show my rake tasks, but if I point directly to the gem source code, like

gem 'activerecord_datawarehouse', :path => "/home/acras/code/activerecord_datawarehouse"

It shows and rake tasks work perfectly.

What could I be missing here? I did double checked and the installed gem is the same that I have in the source code.

Community
  • 1
  • 1
Ricardo Acras
  • 35,784
  • 16
  • 71
  • 112

1 Answers1

6

Fixed it on my end. In the gemspec, you need to include the rake tasks files as well, not just the lib files:

Instead of:

  s.files = Dir['lib/**/*.rb']

Use:

  s.files = Dir['lib/**/*.rb'] + Dir['tasks/*.rake']
platforms
  • 2,666
  • 1
  • 18
  • 23