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

Rails4.1.0rc1: Could not load generator "generators/paper_trail/install_generator". Error: uninitialized constant Thor::Actions::CreateFile #340

Closed
yuumi3 opened this issue Mar 7, 2014 · 4 comments

Comments

@yuumi3
Copy link

yuumi3 commented Mar 7, 2014

because Rails4.1.0rc1 not include gem 'thor'.

% rails generate paper_trail:install --with-changes  
[WARNING] Could not load generator "generators/paper_trail/install_generator". Error: uninitialized constant Thor::Actions::CreateFile.
/Users/yy/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.18.1/lib/thor/actions/create_link.rb:28:in `<module:Actions>'
/Users/yy/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.18.1/lib/thor/actions/create_link.rb:4:in `<class:Thor>'
/Users/yy/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.18.1/lib/thor/actions/create_link.rb:3:in `<top (required)>'
/Users/yy/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.18.1/lib/thor/actions.rb:5:in `<top (required)>'
/Users/yy/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.18.1/lib/thor/actions/empty_directory.rb:2:in `<class:Thor>'
/Users/yy/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.18.1/lib/thor/actions/empty_directory.rb:1:in `<top (required)>'
/Users/yy/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.18.1/lib/thor/actions/create_file.rb:1:in `<top (required)>'
/Users/yy/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.0.rc1/lib/rails/generators/actions/create_migration.rb:1:in `<top (required)>'
/Users/yy/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.0.rc1/lib/rails/generators/migration.rb:2:in `<top (required)>'
/Users/yy/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/paper_trail-3.0.0/lib/generators/paper_trail/install_generator.rb:2:in `<top (required)>'
/Users/yy/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.0.rc1/lib/rails/generators.rb:281:in `block (2 levels) in lookup'
/Users/yy/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.0.rc1/lib/rails/generators.rb:277:in `each'
/Users/yy/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.0.rc1/lib/rails/generators.rb:277:in `block in lookup'
/Users/yy/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.0.rc1/lib/rails/generators.rb:276:in `each'
/Users/yy/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.0.rc1/lib/rails/generators.rb:276:in `lookup'
/Users/yy/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.0.rc1/lib/rails/generators.rb:138:in `find_by_namespace'
/Users/yy/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.0.rc1/lib/rails/generators.rb:155:in `invoke'
/Users/yy/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.0.rc1/lib/rails/commands/generate.rb:11:in `<top (required)>'
/Users/yy/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.0.rc1/lib/rails/commands/commands_tasks.rb:135:in `generate_or_destroy'
/Users/yy/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.0.rc1/lib/rails/commands/commands_tasks.rb:51:in `generate'
/Users/yy/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.0.rc1/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
/Users/yy/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.0.rc1/lib/rails/commands.rb:17:in `<top (required)>'
/Users/yy/tmp/rails_admin_test/bin/rails:8:in `<top (required)>'
/Users/yy/.rbenv/versions/2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/Users/yy/.rbenv/versions/2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
-e:1:in `<main>'
Could not find generator paper_trail:install.
@batter
Copy link
Collaborator

batter commented Mar 7, 2014

Are you sure? You can see that thor 0.18.1 is being utilized right there in the stack trace. Do we actually know what the issue is here?

@batter
Copy link
Collaborator

batter commented Mar 7, 2014

Just created a brand new app with Rails 4.1.0.rc1, then bundled PaperTrail 3.0.0, and then ran rails g paper_trail:install --with-changes, and it worked fine for me. And btw, Thor 0.18.1 gets bundled in with 4.1.0.rc1 out of the box. At any rate, I'm not sure what this issue you're seeing is, but I don't think it's something wrong with PaperTrail.

@batter
Copy link
Collaborator

batter commented Mar 7, 2014

Filed rails/rails#14319 demonstrating the issue here. The good news is I think I have figured out that we can remove a require statement and prevent this from happening without rails being fixed..

@batter batter closed this as completed in 72f5215 Mar 7, 2014
@yuumi3
Copy link
Author

yuumi3 commented Mar 8, 2014

Thanks!

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

2 participants