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
Fix 'rails generate' with path corrections #24
Conversation
rails generate is unable to find the generators unless they are placed into the lib subdirectory.
The last commit allows all three generators to work in rails 3.2.11 |
The build seems to fail with these changes: https://travis-ci.org/saulabs/reportable/builds/4117262. Can you fix that? |
The master branch has these failures as well without my changes, it looks like the spec is out of date or broken. I updated the spec where my changes were concerned (any new failures). /y$ git clone git://github.com/saulabs/reportable.git Failures:
[ snip ] Finished in 3.63 seconds Failed examples: rspec ./spec/classes/report_spec.rb:81 # Saulabs::Reportable::Report#run for grouping :hour optimized querying with contiguously cached data should be optimized with specified end_date Tasks: TOP => spec (See full trace by running task with --trace) |
Bumping this issue. Running
For what it's worth, @hmoore-r7 's set of commits generated the expected migrations on my machines after pointing to his latest commit on this pull request in my Gemfile. |
With Rails 3.2 fresh install, I'm seeing Could not find "/path/to//gems/reportable-1.2.0/generators/reportable_migration/templates/migration.rb" in any of your source paths. Please invoke ReportableMigrationGenerator.source_root(PATH) with the PATH containing your templates. Currently you have no source paths. |
+1 bump |
The 'rails generate reportable_migration' command was looking in lib, but the actual requires were looking in the top-level directory. This moves generators back to lib and fixes the require path in railties.rb.
Prior to this, none of the generators would be available under Rails 3.2.11.
Afterwards: