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

undefined method `namespace' #68

goyox86 opened this Issue Jan 13, 2012 · 18 comments


None yet

goyox86 commented Jan 13, 2012

Hello all!

I'm using Ruby 1.9.2 ruby 1.9.2p180 (2011-02-18) [x86_64-darwin10.6.0] and Rails 3.1.3

I'm trying to annotate my models and I'm getting this:



ctran commented Jan 19, 2012

Have you tried the version from github?

I get the same thing.

ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]
rails 3.1.0

.../gems/activerecord-3.1.0/lib/active_record/railties/databases.rake:3:in <top (required)>': undefined methodnamespace' for main:Object (NoMethodError)

as @ctran mentioned, you may want to pull the github version.. this worked for me. In your Gemfile:
gem 'annotate', :git => 'git://github.com/jeremyolliver/annotate_models.git', :branch => 'rake_compatibility'

hale commented Feb 19, 2012

I have the same problem with annotate 2.4.0 installed from rubygems, using ruby 1.9.3p0.

Fixed by doing both the suggestions above, using the version from github on the rake-compatability branch and launching annotate through bundle.

I had the same issue with a Windows 7 setup and the above mention suggestions worked for me.

Can someone please have this "rake_compatibility" branch merged in. I confirm it worked for me on Ruby 1.9.2 and Rails 3.1.3.

pcerioli commented May 3, 2012

what @megalithic suggested worked for me
i am using rails '3.2.3' and ruby 1.9.3p0

gem 'annotate', '~> 2.4.1.beta' worked for me (took it off Michael Hartel's rails book, listing 6.4)

bambery commented May 8, 2012

@asafjaffi's suggestion worked for me.

firedev commented May 27, 2012

@asafjaffi wins for me too.

Works for me I'm Ruby 1.9.2 & Rails 3.2.2
gem 'annotate', :git => 'git://github.com/jeremyolliver/annotate_models.git', :branch => 'rake_compatibility'
$ bundle exec annotate

Ingem 'annotate', '~> 2.4.1.beta'

Worked for me too!

Works for me I'm Ruby 1.9.2 & Rails 3.2.6
gem 'annotate', :git => 'git://github.com/jeremyolliver/annotate_models.git', :branch => 'rake_compatibility'
$ bundle exec annotate
Windows 7 64

dreki commented Jul 10, 2012

Using megalithic's fix worked for me. This should be fixed in the "main" annotate gem, though.


alexch commented Jul 26, 2012

I think this is fixed in master now; could someone please confirm this is fixed in version 2.5.0.pre3 so I can close this bug?


sguha00 commented Jul 28, 2012

Works for me with gem 'annotate', :git => 'git://github.com/ctran/annotate_models.git'

@ctran ctran closed this Aug 15, 2013

@ctran ctran added the released label Dec 17, 2016

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