Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

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

Closed
yuumi3 opened this Issue · 4 comments

2 participants

@yuumi3

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
Collaborator

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
Collaborator

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
Collaborator

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 in 72f5215
@yuumi3

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.