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

Already on GitHub? Sign in to your account

Uninitialized constant Thor::Group when running thor commands #22

Closed
mhfs opened this Issue Feb 5, 2010 · 8 comments

Comments

Projects
None yet
7 participants

mhfs commented Feb 5, 2010

Hi,

Just installed Thor and when I try "thor list" or "thor installed" I get the following error:

/Users/mhfs/.rvm/gems/ruby-1.8.7-p248/gems/thor-0.13.0/lib/thor/runner.rb:258:in `display_klasses': uninitialized constant Thor::Group (NameError)
from /Users/mhfs/.rvm/gems/ruby-1.8.7-p248/gems/thor-0.13.0/lib/thor/runner.rb:147:in `list'
from /Users/mhfs/.rvm/gems/ruby-1.8.7-p248/gems/thor-0.13.0/lib/thor/task.rb:32:in `send'
from /Users/mhfs/.rvm/gems/ruby-1.8.7-p248/gems/thor-0.13.0/lib/thor/task.rb:32:in `run'
from /Users/mhfs/.rvm/gems/ruby-1.8.7-p248/gems/thor-0.13.0/lib/thor/invocation.rb:108
from /Users/mhfs/.rvm/gems/ruby-1.8.7-p248/gems/thor-0.13.0/lib/thor/invocation.rb:115:in `call'
from /Users/mhfs/.rvm/gems/ruby-1.8.7-p248/gems/thor-0.13.0/lib/thor/invocation.rb:115:in `invoke'
from /Users/mhfs/.rvm/gems/ruby-1.8.7-p248/gems/thor-0.13.0/lib/thor.rb:137:in `start'
from /Users/mhfs/.rvm/gems/ruby-1.8.7-p248/gems/thor-0.13.0/lib/thor/base.rb:369:in `start'
from /Users/mhfs/.rvm/gems/ruby-1.8.7-p248/gems/thor-0.13.0/lib/thor.rb:124:in `start'
from /Users/mhfs/.rvm/gems/ruby-1.8.7-p248/gems/thor-0.13.0/bin/thor:8
from /Users/mhfs/.rvm/gems/ruby-1.8.7-p248/bin/thor:19:in `load'
from /Users/mhfs/.rvm/gems/ruby-1.8.7-p248/bin/thor:19

Thanks,
Marcelo

DAddYE commented Feb 6, 2010

I think now is necessary require 'thor/group'

batzooh commented Feb 6, 2010

I have the same problem !

$ thor list

uninitialized constant Thor::Group (NameError)

Contributor

britto commented Feb 8, 2010

Same here. Running:

  • Ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0]
  • RubyGems 1.3.5
  • thor-0.13.0

The 0.12.3 version still works fine.

just installed via sudo gem install thor. running thor -T results in
"/opt/local/lib/ruby/gems/1.8/gems/thor-0.13.0/lib/thor/runner.rb:257:in `display_klasses': uninitialized constant Thor::Group (NameError)"

any progress on this?

I got the same error, but turned out I had named the file with a .rb extension.
Must be .thor.

Fx app.thor and amazing.thor

kristian-mandrups-macbook-pro:thor_projects kristianconsult$ thor amazing:hello
could not find Thor class or task 'amazing:hello'
kristian-mandrups-macbook-pro:thor_projects kristianconsult$ thor amazing:hello
Hello
kristian-mandrups-macbook-pro:thor_projects kristianconsult$ thor app:install myname --force
I was forced :(
I am doing the job!
kristian-mandrups-macbook-pro:thor_projects kristianconsult$ thor -T

amazing

thor amazing:describe NAME # say that someone is amazing
thor amazing:hello # say hello

app

thor app:install APP_NAME # install one of the available apps
thor app:list [SEARCH] # list all of the available apps, limited by SEARCH

i ended up just uninstalling 0.13.0 with 'sudo gem uninstall thor -v 0.13.0' then reinstalling with 'sudo gem install thor -v 0.12.3'.

I created a nice Thor project at http://github.com/kristianmandrup/rubyproject
Works just fine with Thor 0.13.0 :)
Just had to name it .thor and require 'thor/group' at the top.

Contributor

josevalim commented Feb 11, 2010

Sorry guys, for some reason Github did not notify me of this issue. I pushed a fix now and released a new version.

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment