help needed - undefined method `reenable' for <Rake::Task db:schema:dump => [environment]>:Rake::Task

23 views
Skip to first unread message

RubyonRails_newbie

unread,
Dec 29, 2009, 11:23:30 AM12/29/09
to Ruby on Rails: Talk
Hello,

I am trying to deploy my app at the moment, and each time I do, I get
the following error when i run a trace on it:


rake db:migrate --trace

(in /srv/some area/someplaceelse...)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
** Invoke db:schema:dump (first_time)
** Invoke environment
** Execute db:schema:dump
rake aborted!

undefined method `reenable' for <Rake::Task db:schema:dump =>
[environment]>:Rake::Task

/var/lib/gems/1.8/gems/rails-2.3.3/lib/tasks/databases.rake:253
/usr/lib/ruby/1.8/rake.rb:546:in `call'
/usr/lib/ruby/1.8/rake.rb:546:in `execute'
/usr/lib/ruby/1.8/rake.rb:541:in `each'
/usr/lib/ruby/1.8/rake.rb:541:in `execute'
/usr/lib/ruby/1.8/rake.rb:508:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/rake.rb:501:in `synchronize'
/usr/lib/ruby/1.8/rake.rb:501:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/rake.rb:494:in `invoke'
/var/lib/gems/1.8/gems/rails-2.3.3/lib/tasks/databases.rake:117
/usr/lib/ruby/1.8/rake.rb:546:in `call'
/usr/lib/ruby/1.8/rake.rb:546:in `execute'
/usr/lib/ruby/1.8/rake.rb:541:in `each'
/usr/lib/ruby/1.8/rake.rb:541:in `execute'
/usr/lib/ruby/1.8/rake.rb:508:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/rake.rb:501:in `synchronize'
/usr/lib/ruby/1.8/rake.rb:501:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/rake.rb:494:in `invoke'
/usr/lib/ruby/1.8/rake.rb:1931:in `invoke_task'
/usr/lib/ruby/1.8/rake.rb:1909:in `top_level'
/usr/lib/ruby/1.8/rake.rb:1909:in `each'
/usr/lib/ruby/1.8/rake.rb:1909:in `top_level'
/usr/lib/ruby/1.8/rake.rb:1948:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:1903:in `top_level'
/usr/lib/ruby/1.8/rake.rb:1881:in `run'
/usr/lib/ruby/1.8/rake.rb:1948:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:1878:in `run'
/usr/bin/rake:28

Does anyone know how to resolve this?

Many Thanks

RubyonRails_newbie

unread,
Dec 29, 2009, 12:31:39 PM12/29/09
to Ruby on Rails: Talk
Update - I have also tried this, but with no luck: http://antono.info/en/138
(which explains to do this: sudo aptitude remove rake
sudo gem install rake

Im at a bit of a loss now..

ANy thoughts?

On 29 Dec, 16:23, RubyonRails_newbie <craigwest...@googlemail.com>
wrote:

Johan De Klerk

unread,
Dec 29, 2009, 4:15:14 PM12/29/09
to rubyonra...@googlegroups.com
Are you on Linux?

--

You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.



RubyonRails_newbie

unread,
Dec 29, 2009, 4:37:47 PM12/29/09
to Ruby on Rails: Talk
Hello Johan

> Are you on Linux?

Yes I am I believe. I've uninstalled rake several times and the error
is still the same.


undefined method `reenable' for <Rake::Task db:schema:dump =>
[environment]>:Rake::Task

I've spent all day looking over this....but now i'm a bit lost.

> > rubyonrails-ta...@googlegroups.com<rubyonrails-talk%2Bunsubscrib e...@googlegroups.com>

Johan De Klerk

unread,
Dec 29, 2009, 4:44:21 PM12/29/09
to rubyonra...@googlegroups.com
Do you have ssh access?

Run this from the command line:

lsb_release -a

I've had this problem before but found it's very OS and distro specific...

To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.

RubyonRails_newbie

unread,
Dec 29, 2009, 5:00:36 PM12/29/09
to Ruby on Rails: Talk
Hi Johan,

> Do you have ssh access? - yes i have ssh access...

> lsb_release -a - do i run this from root?

What does this do?

Many Thanks

> > > > rubyonrails-ta...@googlegroups.com<rubyonrails-talk%2Bunsubscrib e...@googlegroups.com><rubyonrails-talk%2Bunsubscrib

Johan De Klerk

unread,
Dec 29, 2009, 5:05:27 PM12/29/09
to rubyonra...@googlegroups.com
It just outputs a bit of info about your system... I dont think root access is needed

To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.

RubyonRails_newbie

unread,
Dec 29, 2009, 5:13:29 PM12/29/09
to Ruby on Rails: Talk
it says command not found

Hmmm...

RubyonRails_newbie

unread,
Dec 30, 2009, 5:13:38 AM12/30/09
to Ruby on Rails: Talk
hello

can anyone think of a solution to my issue from yesterday?

error = undefined method `reenable' for <Rake::Task db:schema:dump =>
[environment]>:Rake::Task

i've searched all over. sites suggest deleting rake, but this hasn't
helped
they have also suggested adding rake to the PATH directory, but unsure
how to carry this out..

any other ideas?

many thanks

On 29 Dec, 22:13, RubyonRails_newbie <craigwest...@googlemail.com>
wrote:

Frederick Cheung

unread,
Dec 30, 2009, 6:30:07 AM12/30/09
to Ruby on Rails: Talk

On Dec 30, 10:13 am, RubyonRails_newbie <craigwest...@googlemail.com>
wrote:


> hello
>
> can anyone think of a solution to my issue from yesterday?
>
> error = undefined method `reenable' for <Rake::Task db:schema:dump =>
> [environment]>:Rake::Task
>

What version of rake do you have? Looking on github suggests that the
reenable method was added here
http://github.com/jimweirich/rake/commit/a48c35b92e587b0d4eee68d69d7ecbb426f67aba
which suggests you need 0.8.1.5 or higher

Fred

RubyonRails_newbie

unread,
Dec 30, 2009, 7:35:58 AM12/30/09
to Ruby on Rails: Talk

Hi.
When I do rake --version it says 0.8.1.
However, when I do gem list --remote or --local it says I have 0.8.7

Either way I'm on linux and need to find a way to get the correct
version so I can see my app and not this dreadful error... :)

Day 2 of the error and its getting a bit of a tough cookie to crack...

Cheers

On Dec 30, 11:30 am, Frederick Cheung <frederick.che...@gmail.com>
wrote:


> On Dec 30, 10:13 am, RubyonRails_newbie <craigwest...@googlemail.com>
> wrote:> hello
>
> > can anyone think of a solution to my issue from yesterday?
>
> > error = undefined method `reenable' for <Rake::Task db:schema:dump =>
> > [environment]>:Rake::Task
>
> What version of rake do you have?  Looking on github suggests that the

> reenable method was added herehttp://github.com/jimweirich/rake/commit/a48c35b92e587b0d4eee68d69d7e...

Frederick Cheung

unread,
Dec 30, 2009, 8:09:45 AM12/30/09
to Ruby on Rails: Talk

On Dec 30, 12:35 pm, RubyonRails_newbie <craigwest...@googlemail.com>
wrote:


> Hi.
> When I do rake --version it says 0.8.1.
> However, when I do gem list --remote or --local it says I have 0.8.7
>
> Either way I'm on linux and need to find a way to get the correct
> version so I can see my app and not this dreadful error... :)
>
> Day 2 of the error and its getting a bit of a tough cookie to crack...
>

At a guess, do you have one version of rake installed via your
distro's package manager and another installed via rubygems ?

Fred

RubyonRails_newbie

unread,
Dec 30, 2009, 12:59:30 PM12/30/09
to Ruby on Rails: Talk
Yes possibly. How wold I check this and if there are multiples, which
one needs removing and how is it best achieved?

Thanks again.

On Dec 30, 1:09 pm, Frederick Cheung <frederick.che...@gmail.com>

Frederick Cheung

unread,
Dec 30, 2009, 4:00:42 PM12/30/09
to Ruby on Rails: Talk

On Dec 30, 5:59 pm, RubyonRails_newbie <craigwest...@googlemail.com>
wrote:


> Yes possibly. How wold I check this and if there are multiples, which
> one needs removing and how is it best achieved?
>
> Thanks again.

Well sounds like you've done the checking. You'd want to remove the
one installed by your distro (in general distro provided stuff lags
quite a bit behind whats available via rubygems. I also seem to recall
that on some distros the distro provided rubygems is hobbled a bt in
order to make it work nicer with the package management system - some
people thus recommend installing rubygems separately (I don't use
linux myself though so not sure whether this is still current etc))

Fred

RubyonRails_newbie

unread,
Dec 30, 2009, 4:16:58 PM12/30/09
to Ruby on Rails: Talk
Hi there,

Still trying to resolve this...
Looking on gem list --remote i have this:
rake (0.8.7)

LIkewise when I do gem list --local i get:
rake (0.8.7)

If I do: apt-get autoremove rake and then run rake --version, it says
''ERROR: While executing gem ... (RuntimeError) Unknown command
db:migrate''

So - I tried to unistall it all again and reinstall rake and the gem
at root level

I'm still getting the same error, so was wondering if anyone had any
suggestions?

Many Thanks


On 30 Dec, 17:59, RubyonRails_newbie <craigwest...@googlemail.com>
wrote:

Frederick Cheung

unread,
Dec 31, 2009, 5:22:05 AM12/31/09
to Ruby on Rails: Talk

On Dec 30, 9:16 pm, RubyonRails_newbie <craigwest...@googlemail.com>
wrote:


> Hi there,
>
> Still trying to resolve this...
> Looking on  gem list --remote i have this:
> rake (0.8.7)
>
> LIkewise when I do gem list --local i get:
> rake (0.8.7)
>
> If I do: apt-get autoremove rake and then run rake --version, it says
> ''ERROR:  While executing gem ... (RuntimeError)     Unknown command
> db:migrate''
>

that's weird - that would only make sense if you'd typed gem
db:migrate!

> So - I tried to unistall it all again and reinstall rake and the gem
> at root level

Well you definitely don't want to reinstall rate from apt - you only
want the gem version. I really don't know enough about installing ruby
on a linux machine to comment any further though - you've got yourself
into some weird state

Fred

Reply all
Reply to author
Forward
0 new messages