Problem upgrading to rails 2.0

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.

:slight_smile:

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

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. [email protected]

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

Hi,
"gem install rails --include-dependencies
Need to update 30 gems from 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. [email protected] 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

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”?

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.

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

:frowning:

On 25/02/2008, Mark B. [email protected] 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/.


Anas Marrawi
Visit me at: www.anasonline.net