# Problem upgrading to rails 2.0

**URL:** <https://www.ruby-forum.com/t/problem-upgrading-to-rails-2-0/130096>\
**Category:** Rails\
**Created:** [February 25, 2008, 11:49am UTC](https://www.ruby-forum.com/t/problem-upgrading-to-rails-2-0/130096 "2008-02-25T11:49:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ANSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/d78d45/32.png) [@ANSS](https://www.ruby-forum.com/u/ANSS)\
**Post date:** [February 25, 2008, 11:49am UTC](https://www.ruby-forum.com/t/problem-upgrading-to-rails-2-0/130096/1 "2008-02-25T11:49:48Z")

</div>

Hi,  
I have a problem upgrading to rails 2.0, my current installation of  
rails is  
version 1.2.4 installed through the official Ubuntu repository (apt-get  
install rails), I installed rails through: gem install rails  
–include-dependencies and everything looked fine but the problem is  
that  
the old version of rails still running and I don’t know where to find  
the  
new version and how would I get a rails 2.0 application when I run  
:“rails  
MyApp”.

Your help is highly appreciated.

🙂

---

<div class="post-metadata">

**Author:** ![ANSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/d78d45/32.png) [@ANSS](https://www.ruby-forum.com/u/ANSS)\
**Post date:** [February 25, 2008, 12:27pm UTC](https://www.ruby-forum.com/t/problem-upgrading-to-rails-2-0/130096/2 "2008-02-25T12:27:00Z")

</div>

On 25 Feb 2008, at 10:49, AN@S wrote:

> Hi,  
> I have a problem upgrading to rails 2.0, my current installation of  
> rails is version 1.2.4 installed through the official Ubuntu  
> repository (apt-get install rails), I installed rails through: gem  
> install rails --include-dependencies and everything looked fine but  
> the problem is that the old version of rails still running and I  
> don’t know where to find the new version and how would I get a rails  
> 2.0 application when I run :“rails MyApp”.
> 
> Your help is highly appreciated.  
> There’s a line in environment.rb which locks the app to a specific  
> version of rails. Change that line and you should be good.

Fred

---

<div class="post-metadata">

**Author:** ![ANSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/d78d45/32.png) [@ANSS](https://www.ruby-forum.com/u/ANSS)\
**Post date:** [February 25, 2008, 1:55pm UTC](https://www.ruby-forum.com/t/problem-upgrading-to-rails-2-0/130096/3 "2008-02-25T13:55:45Z")

</div>

environment.rb is generated when you create a new rails app :“rails  
MyApp”, right? The problem is that I’m unable to create new rails app,  
I got:"Command ‘rails’ is available in ‘/usr/bin/rails’  
bash: rails: command not found  
" because I did a stupid thing I removed the old version thinking that  
it prevents rails 2.0 from working and now I’ve got nothing that  
works. Rails 2.0 is installed but I don’t know where, I just need to  
fire it up when i run rails MyApp.

Thanks

On Feb 25, 1:26 pm, Frederick C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![ANSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/d78d45/32.png) [@ANSS](https://www.ruby-forum.com/u/ANSS)\
**Post date:** [February 25, 2008, 2:17pm UTC](https://www.ruby-forum.com/t/problem-upgrading-to-rails-2-0/130096/4 "2008-02-25T14:17:48Z")

</div>

On 25 Feb 2008, at 12:55, AN@S wrote:

> environment.rb is generated when you create a new rails app :“rails  
> MyApp”, right? The problem is that I’m unable to create new rails app,  
> I got:"Command ‘rails’ is available in ‘/usr/bin/rails’  
> bash: rails: command not found  
> " because I did a stupid thing I removed the old version thinking that  
> it prevents rails 2.0 from working and now I’ve got nothing that  
> works. Rails 2.0 is installed but I don’t know where, I just need to  
> fire it up when i run rails MyApp.

Ah yes, the actual rails binary is just a thing that says ‘load up the  
rails gems and run x’. The easiest way is probably just to install the  
rails gems again.

Fred

---

<div class="post-metadata">

**Author:** ![ANSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/d78d45/32.png) [@ANSS](https://www.ruby-forum.com/u/ANSS)\
**Post date:** [February 25, 2008, 2:29pm UTC](https://www.ruby-forum.com/t/problem-upgrading-to-rails-2-0/130096/5 "2008-02-25T14:29:37Z")

</div>

Hi,  
"gem install rails --include-dependencies  
Need to update 30 gems from [http://gems.rubyforge.org](http://gems.rubyforge.org)  
…  
complete  
Successfully installed rails-2.0.2  
"

But still:

"rails myapp  
Command ‘rails’ is available in ‘/usr/bin/rails’  
bash: rails: command not found  
"

??

On 25/02/2008, Frederick C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > " because I did a stupid thing I removed the old version thinking that
> 
> > > > install rails --include-dependencies and everything looked fine but
> 
> >

–  
Anas Marrawi  
Visit me at: [www.anasonline.net](http://www.anasonline.net)

---

<div class="post-metadata">

**Author:** ![ANSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/d78d45/32.png) [@ANSS](https://www.ruby-forum.com/u/ANSS)\
**Post date:** [February 25, 2008, 2:51pm UTC](https://www.ruby-forum.com/t/problem-upgrading-to-rails-2-0/130096/6 "2008-02-25T14:51:35Z")

</div>

AN@S wrote:

> "rails myapp  
> Command ‘rails’ is available in ‘/usr/bin/rails’  
> bash: rails: command not found

Does the command:  
type rails  
confirm that you are finding rails in /usr/bin/rails?

If it says something else, then try running:  
hash rails

Can you run:

rails --version  
?  
If not, how about:  
/usr/bin/rails --version  
?

If not, what’s the first line of /usr/bin/rails? rails should be a  
script and the first line should refer to your ruby executable.  
Something like one of these:

#!/usr/bin/ruby

#!/usr/bin/env ruby

If the first, can you run the command directly by the path specified (so  
/usr/bin/ruby in my example)? If the second, can you run ruby as  
“ruby”?

---

<div class="post-metadata">

**Author:** ![ANSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/d78d45/32.png) [@ANSS](https://www.ruby-forum.com/u/ANSS)\
**Post date:** [February 25, 2008, 5:08pm UTC](https://www.ruby-forum.com/t/problem-upgrading-to-rails-2-0/130096/7 "2008-02-25T17:08:24Z")

</div>

AN@S wrote:

> type rails and hash rails gives a message that rails is not found.  
> The rails version check tells me that “No such file or directory” !  
> So I don’t have a rails file at all in /usr/bin although gems insists  
> that  
> Rails 2.0 is installed and i don’t know where it is !!!

It sounds like you need to update gems. Try:

gem update --system

Then install rails again.

---

<div class="post-metadata">

**Author:** ![ANSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/d78d45/32.png) [@ANSS](https://www.ruby-forum.com/u/ANSS)\
**Post date:** [February 25, 2008, 5:02pm UTC](https://www.ruby-forum.com/t/problem-upgrading-to-rails-2-0/130096/8 "2008-02-25T17:02:25Z")

</div>

Hi,  
type rails and hash rails gives a message that rails is not found.  
The rails version check tells me that “No such file or directory” !  
So I don’t have a rails file at all in /usr/bin although gems insists  
that  
Rails 2.0 is installed and i don’t know where it is !!!

I don’t have problem with ruby, I can run ruby as ruby

☹

On 25/02/2008, Mark B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> confirm that you are finding rails in /usr/bin/rails?  
> ?  
> /usr/bin/ruby in my example)? If the second, can you run ruby as  
> “ruby”?
> 
> –  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> >

–  
Anas Marrawi  
Visit me at: [www.anasonline.net](http://www.anasonline.net)
