Skip to content


Subversion checkout URL

You can clone with
Download ZIP


undefined method `namespace' #68

goyox86 opened this Issue · 18 comments

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:


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://', :branch => 'rake_compatibility'


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.


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)


@asafjaffi's suggestion worked for me.


@asafjaffi wins for me too.


Works for me I'm Ruby 1.9.2 & Rails 3.2.2
gem 'annotate', :git => '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://', :branch => 'rake_compatibility'
$ bundle exec annotate
Windows 7 64


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


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?


Works for me with gem 'annotate', :git => 'git://'

@ctran ctran closed this
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.