Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing rake task: acts_as_taggable_on_engine:install:migrations #466

Closed
JakeTheSnake3p0 opened this issue Jan 22, 2014 · 7 comments
Closed

Comments

@JakeTheSnake3p0
Copy link

My app structure is as follows:

  • test_app
    • gem 'custom_engine' (mountable engine, mounted at root)
      • add_dependency 'acts-as-taggable-on', '~> 2.4.0'

Bundler shows 2.4.1 is installed in test_app, but rake -T doesn't list the rake task like it does with my custom engine. Calling the install migrations task fails. I cannot continue forward beyond this point if I can't migrate my db.

Using Ruby 64-bit 2.0.0p353, Rails 4.0.2, on Windows x64 OS.

Quick summary: I'm mounting your engine within my engine within an app. Rake task to install migration files is missing and fails.

EDIT: Poor choice of words - I'm not mounting your engine, I'm including the gem.

@seuros
Copy link
Collaborator

seuros commented Jan 22, 2014

' I'm mounting your engine within my engine' acts-as-taggable-on is not a moutable engine.

You have to require it in your engine.

@JakeTheSnake3p0
Copy link
Author

I already have it in there. I edited my original comment to state that I was not in fact mounting your engine, but including it as a gem.

manager.gemspec contains:
s.add_dependency 'acts-as-taggable-on', '~> 2.4.0'

lib/manager/engine.rb contains:
require 'acts-as-taggable-on'

@seuros
Copy link
Collaborator

seuros commented Jan 22, 2014

did you copy the migrations to your engine ? i don't think that rake check for recursive task.
i will look at it and report back.

@JakeTheSnake3p0
Copy link
Author

I have now tested in the following environments:

  • 64-bit OS, 64-bit Ruby 2.0 install, rake -T in engine directory and in app directory - no rake task
  • 64-bit OS, 32-bit Ruby 2.0 install, rake -T in engine directory and in app directory - no rake task
  • 32-bit OS, 32-bit Ruby 2.0 install, rake -T in app directory - no rake task

@seuros
Copy link
Collaborator

seuros commented Jan 22, 2014

A workaround is to require it in your app too in your Gemfile.

@bf4
Copy link
Collaborator

bf4 commented Jan 22, 2014

Does it make a difference if you also require

https://github.com/mbleigh/acts-as-taggable-on/blob/master/lib/acts_as_taggable_on/engine.rb

That would be where the rake task is usually loaded from.

@JakeTheSnake3p0
Copy link
Author

Sorry, my bad; It was using v 2.4.1 and I was running the wrong command :/

bundle exec rails g migration acts_as_taggable_on:migration

worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants