Install Ruby 1.9.2 and rails

I tried everything to install this version of ruby and rails 3 in my
s.o. All the the tutorials that I found don't work.
Sb know how to install this version of RoR in my S.O. I'm using
Debian.
Thx ;D

I strongly suggest you use rvm. See http://beginrescueend.com/

HTH
John

I already tried it. But the "ruby -v" only works in non-root mode and
"rails -v" doesn't work in any mode ;/

You'll have to give a bit more information than that if you want any useful help.

Do you have rvm installed and working? Does your installation pass the "type rvm | head -1" test?

How then did you install ruby? And rails? What do you see when you type "ruby -v"? And "rails -v"?

What do you mean by "S.O."?

John

yeah, I already type "rvm | head -1", and everything works good.
I installed ruby using rvm. "rvm install 1.9.2".
It works well but when I type "ruby -v" in console, if I'm on sudo
mode it shows me a message telling me that this command does not find.
Otherwise if I'm not on sudo mode it works well.
I tried again something of one blog and "rails -v" now works in any
mode, but "ruby -v" problem continues.
That's the first time that I'm using rvm, so all the time that I need
to use "rake db:migrate" or "rails -s", I need to type "rvm rake
db:migrate" and "rvm rails -s"?

Sorry by the word "S.O", I'm brazilian guy. And here "operating system
= O.S" is equals to "S.O".

Thx :smiley:

Now it works!
I follow again some steps of one blog and it works!
all the time that I need to use "rake db:migrate" I type "rvm rake
db:migrate" isn't it?
"ruby -v" doesn't appears in root mode, but if it works is not a
problem :stuck_out_tongue:
thx for the help
:smiley:

No -- just `rake db:migrate` will work.

I believe that normally rvm would not be used in root mode, that is
part of the point I think. It allows ruby and gems to be installed on
a per-user basis.

Colin

yeah, I already type "rvm | head -1", and everything works good.
I installed ruby using rvm. "rvm install 1.9.2".
It works well but when I type "ruby -v" in console, if I'm on sudo
mode it shows me a message telling me that this command does not find.
Otherwise if I'm not on sudo mode it works well.

The whole point of rvm is that it installs your own private environment. You don't need to use su or sudo at all.

I tried again something of one blog and "rails -v" now works in any
mode, but "ruby -v" problem continues.
That's the first time that I'm using rvm, so all the time that I need
to use "rake db:migrate" or "rails -s", I need to type "rvm rake
db:migrate" and "rvm rails -s"?

No. Simply type:

rvm use 1.9.2

and then for the rest of your session you'll have the environment which you need. You just type:

rake db:migrate

or:

rails server

or whatever you want.

Cheers,
John

rvm is the best way to install ruby

follow this blog

http://mazi-bakhar.blogspot.com/

There i have written a blog, which contains a shell script at then end, which will solve your all the doubt.

Thx for the help guys!
I will read more about rvm and try to follow the steps of rahul's
blog
:smiley: