Downloaded Ruby, where do I extract it to start?

The reason I ask this elementary question is because when I originally
installed ruby and rails, after the so-called installation was
completed, many of the required files were found to be missing from
the ‘install’ directory (/usr/local/lib/ruby) but existed in the
extract directory (/home/software), so something about the ‘install’
failed seemingly because I had not extracted the .tar.gz into a place
friendly to the install.

Thanks in advance for any help.
Fred

On Fri, Apr 29, 2011 at 12:17 PM, fredrated [email protected] wrote:

The reason I ask this elementary question is because when I originally
installed ruby and rails, after the so-called installation was
completed, many of the required files were found to be missing from
the ‘install’ directory (/usr/local/lib/ruby) but existed in the
extract directory (/home/software), so something about the ‘install’
failed seemingly because I had not extracted the .tar.gz into a place
friendly to the install.

You should give some more details on what you have done. First, what OS,
then what steps are you doing to install Ruby and Rails, and what makes
you
think something went wrong?

Thanks, I guess my question was rather tearse.
First problem: me, the webmaster and my boss have all been having a go
at trying to install ruby and rails on my OpenSUSE 10.2
Second problem: do install instructions (ruby and rails) exist? I
can’t seem to find them.

Anyway, we got something going, then tried to create/run the first
example in Agile Web D. with Rails, but the ruby code <%=
Time.now %> would not execute so I tried to run the ruby console to
see if I could figure out why. This gave me an error about ‘readline’
not being available. It was not in the directory ruby installed in
but I found it in the directory the ruby files were originally
extracted to, so I figured the extraction must have been done in the
wrong place. Also got other messages that lead me to believe the
extracted files were not being accessed. In addition, I found
directory name references to 3 versions of ruby: …/ruby/1.9.1, …/
ruby-1.8.7-p174 and …/ruby-1.9.2-p180 so I figured we had thrown
everything but the kitchen sink at the computer in the attempt to get
rails working, so I decided to uninstall/delete as much as I could in
an attempt to start over and do a better install job. However, in the
absence of install instructions I am back at square 1, or perhaps
square 0, and don’t know how to proceed to install Ruby and Rails.
Sadly, this reminds me of when I took computer science in college in
the days of terminals: just getting on to the system and getting it to
respond was always harder than actually programming and solving
problems. How little things have changed.
Thanks for your assistance to an old dog trying to learn a new trick.

Fred

On Fri, Apr 29, 2011 at 2:35 PM, fredrated [email protected] wrote:

not being available. It was not in the directory ruby installed in
square 0, and don’t know how to proceed to install Ruby and Rails.
Sadly, this reminds me of when I took computer science in college in
the days of terminals: just getting on to the system and getting it to
respond was always harder than actually programming and solving
problems. How little things have changed.
Thanks for your assistance to an old dog trying to learn a new trick.

First, I dont know SUSE, but have installed successfully many times on
mac
and ubuntu. Take that as a caveat. Is there a package manager for SUSE?
On
Ubuntu I use apt_get ruby or something of the like. Then, you say your
try
to run ruby from the command line — have your tried running irb there
(just type ‘irb’ as a command)?

As far as previous installs, that is kind of scary to me. I generally
try to
virtualize so I can go back when I screw something up inevitably. But if
you
can find a package manager to install ruby and get it running then you
are
on the path. Just an fyi, you might want to look at rvm for managing
multiple versions of ruby as well as being able to isolate rails
installs.

What I would do is start with Ruby Version Manager (rvm). After
installing that, you can do:

rvm install 1.9.2
rvm use 1.9.2 --default

and that should install Ruby.

Then:

gem install rails

and that should install Rails.

Hopefully. Good luck!

On Fri, Apr 29, 2011 at 3:20 PM, Paul [email protected] wrote:

What I would do is start with Ruby Version Manager (rvm).

See if this works… you do need ruby installed to install rvm though.
If
you can run irb in the terminal then you should be on your way. If not
you
have to find a way to get ruby installed successfully. But then
definitely
go with rvm.

What did you do so far? from your directories I see you’re on linux or
unix. So there shouldn’t be the need to download ruby. In most linux
it’s already there, or you can install it pretty easy with the packet
manage like apt on debian/ubuntu “sudo apt-get install ruby”. On Mac OS
X ruby version 1.8.7 is already installed.

If you want to install a specific ruby, the easiest way is to user RVM:
https://rvm.beginrescueend.com/

after you have successfully installed ruby. You can just use

[sudo] gem install rails

after that you should be all setup

This whole thing seems like some kind of nightmare to me.
I can’t install rvm without Ruby already installed. Then rvm is
useless because I don’t need more than 1 version of ruby.
l guess I should mention that I am a linux newbie hoping to abandon
Windos.

So back to the original question: since the extract saved files that
the ruby program wanted but couldn’t find, where do I extract the ruby
files so that ruby knows how to find what it needs?

Or is there some other way to tell ruby where to find the files it
needs that are already on the computer?

Thanks.

I completely sympathize with how hard it is to get linux
configurations straightened out. It can be a nightmare.

The rvm does have two uses beyond switching quickly between two
versions of ruby: It makes it trivial to upgrade your ruby when a new
version comes out, and it takes some of the configuration problems out
of linux, so it should make it easier to straighten out whatever
happened.

So, I’d say that working to get rvm installed will be less hassle in
the long run.

You say you’re just starting with linux. Does that mean you have a
fairly fresh machine? It might be easier to just start over with a
clean build of linux. And this time, write down every configuration
thing you do so you have a history.

Either way, if you type:

bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)

Then you can pursue any error messages you get. (You will definitely
have to install git first.)

If ruby is still not working you can follow my guides: they’re short and
specific tutorials to install Ruby + Rails + sqlite3 on Fedora 15 and
Ubuntu
11.04, but the process should be quite the same for every linux
distribution
since I install everything by the source code…

http://cicolin.blogspot.com/

Good luck! :wink:

On Tue, May 3, 2011 at 7:41 AM, fredrated [email protected] wrote:

So back to the original question: since the extract saved files that

What “extract”? You’ve never actually described what you did to try
to install ruby – “have all been having a go” is not too precise…

I’d say you’d be well off to take the previous advice of reinstalling
your
OS from scratch to get a known good starting point.

Then check whether ruby is, in fact, already installed. If not, use the
SuSE package manager to install it.

From that point, you should be able to proceed with or without using
rvm (though I would recommend it, since the packaged ruby version
you’ll get will almost certainly be out of date).

FWIW,

Hassan S. ------------------------ [email protected]
twitter: @hassan

On May 3, 2011, at 11:05 AM, Paul wrote:

The rvm does have two uses beyond switching quickly between two
versions of ruby: It makes it trivial to upgrade your ruby when a new
version comes out, and it takes some of the configuration problems out
of linux, so it should make it easier to straighten out whatever
happened.

One other thing I am freshly and painfully aware of (since I haven’t
set up rvm yet myself) is that when you go back to an older project,
and discover that Rails will no longer run at all because there’s some
newer Gem in you path and your configuration files aren’t specific
about versions, you kinda wish you had a gemset in the project, and
could step into the Wayback Machine and just get that little client
change made without endless refactoring and tail-chasing.

Walter