# Rake goes crazy on me!

**URL:** <https://www.ruby-forum.com/t/rake-goes-crazy-on-me/163614>\
**Category:** Rails\
**Created:** [March 23, 2009, 7:06am UTC](https://www.ruby-forum.com/t/rake-goes-crazy-on-me/163614 "2009-03-23T07:06:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![arghx1](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/aca169/32.png) [@arghx1](https://www.ruby-forum.com/u/arghx1)\
**Post date:** [March 23, 2009, 7:06am UTC](https://www.ruby-forum.com/t/rake-goes-crazy-on-me/163614/1 "2009-03-23T07:06:03Z")

</div>

OK, so I used ./scripts/generate to generate a model, and then I entered  
the db/migrate/ and edit 001xxxx.rb so I can populated the database.  
After I entered some ruby code to have the file 001xxx.rb to generate  
some columns for table in db later, then I do rake1.9 db:migrate to  
generate table and columns.

Instead of getting the task to be carried out, rake complained:

rake1.9 db:migrate  
(in /home/powerone/My\_Rails\_01/myapplication)  
Missing the Rails 2.3.2 gem. Please `gem install -v=2.3.2 rails`, update  
your RAILS\_GEM\_VERSION setting in config/environment.rb for the Rails  
version you do have installed, or comment out RAILS\_GEM\_VERSION to use  
the latest version installed.

I went into config/environment.rb and saw that RAILS\_GEM\_VERSION is  
indeed has 2.3.2 as parameter.

I do rails -v and got Rails 2.3.2 at the prompt

Then I went to do sudo gem1.8 update --system and got response as  
nothing to be update.

I went back and do rake1.9 db:migrate, and I got the same error.

I even do rake1.9 -T and got the same error.

I did rake1.9 --help and it works by showing help commands.

Then I did rake1.9 -V and got back as “rake, version 0.8.0”

How do I get my rake right so I can do rake db:migrate and other rake’s  
tasks?

It seems that rake1.9 is misleading because when I did rake1.9 -V and I  
got back as rake version 0.8.0. Is this the real problem? And how do I  
fix it? Thanks…

---

<div class="post-metadata">

**Author:** ![arghx1](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/aca169/32.png) [@arghx1](https://www.ruby-forum.com/u/arghx1)\
**Post date:** [March 23, 2009, 7:48am UTC](https://www.ruby-forum.com/t/rake-goes-crazy-on-me/163614/2 "2009-03-23T07:48:46Z")

</div>

On Mar 23, 2009, at 2:19 AM, Power O. wrote:

> Power O. wrote:
> 
> > (in /home/powerone/My\_Rails\_01/myapplication)  
> > I do rails -v and got Rails 2.3.2 at the prompt  
> > Then I did rake1.9 -V and got back as “rake, version 0.8.0”
> > 
> > How do I get my rake right so I can do rake db:migrate and other  
> > rake’s  
> > tasks?
> > 
> > It seems that rake1.9 is misleading because when I did rake1.9 -V  
> > and I  
> > got back as rake version 0.8.0. Is this the real problem? And how  
> > do I  
> > fix it? Thanks…

You’re using two different versions of things. Try rake1.8 db:migrate  
or gem1.9 list

Or perhaps compare:  
gem1.8 env  
gem1.9 env  
Particularly the RUBY VERSION and the GEM PATHS and I think you’ll see  
the problem.

-Rob

Rob B. [http://agileconsultingllc.com](http://agileconsultingllc.com)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![arghx1](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/aca169/32.png) [@arghx1](https://www.ruby-forum.com/u/arghx1)\
**Post date:** [March 23, 2009, 7:19am UTC](https://www.ruby-forum.com/t/rake-goes-crazy-on-me/163614/3 "2009-03-23T07:19:09Z")

</div>

By the way when I googled for this, I got no answer. Maybe I’m just not  
good with googling for ruby :(. I’m pretty sure I got what I want from  
a genius “Google” for other stuffs though, but not this time around!

Any help will make my day! 🙂 Thanks…

Going to sleep for now, peace out! hehehe

Power O. wrote:

> OK, so I used ./scripts/generate to generate a model, and then I entered  
> the db/migrate/ and edit 001xxxx.rb so I can populated the database.  
> After I entered some ruby code to have the file 001xxx.rb to generate  
> some columns for table in db later, then I do rake1.9 db:migrate to  
> generate table and columns.
> 
> Instead of getting the task to be carried out, rake complained:
> 
> rake1.9 db:migrate  
> (in /home/powerone/My\_Rails\_01/myapplication)  
> Missing the Rails 2.3.2 gem. Please `gem install -v=2.3.2 rails`, update  
> your RAILS\_GEM\_VERSION setting in config/environment.rb for the Rails  
> version you do have installed, or comment out RAILS\_GEM\_VERSION to use  
> the latest version installed.
> 
> I went into config/environment.rb and saw that RAILS\_GEM\_VERSION is  
> indeed has 2.3.2 as parameter.
> 
> I do rails -v and got Rails 2.3.2 at the prompt
> 
> Then I went to do sudo gem1.8 update --system and got response as  
> nothing to be update.
> 
> I went back and do rake1.9 db:migrate, and I got the same error.
> 
> I even do rake1.9 -T and got the same error.
> 
> I did rake1.9 --help and it works by showing help commands.
> 
> Then I did rake1.9 -V and got back as “rake, version 0.8.0”
> 
> How do I get my rake right so I can do rake db:migrate and other rake’s  
> tasks?
> 
> It seems that rake1.9 is misleading because when I did rake1.9 -V and I  
> got back as rake version 0.8.0. Is this the real problem? And how do I  
> fix it? Thanks…
