Can someone throw me a bone

Hi all,
Struggling to learn Ruby and can't even upgrade from 1.8 to 1.9. I have
read everything I can find for three days but must be missing something
very fundamental.

I am using Lion and operating at terminal mode. Understand easiest way
is with rvm, but when I try to install and insert the code below after
bash-3.2$ :

$ bash -s stable < <(curl -s
https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)

i get a
bash: $: command not found

I feel like a dork can someone tell me what I am missing. Hopefully,
once i get rvm running, upgrading will be a cinch :slight_smile: Also, it is clear
I need to learn how to operate in the terminal/shell mode, can someone
recommend a tutorial?
Thanks
Bob

···

--
Posted via http://www.ruby-forum.com/.

I would keep looking through the RVM docs, it's a very well documented
project.

I recommend that people follow http://ruby.learncodethehardway.com If they
are a complete beginner. It covers the basics in enough detail that they
wont roadblock you when you go onto other issues.

···

On Mon, Apr 2, 2012 at 5:22 PM, Bob Baird <lists@ruby-forum.com> wrote:

Hi all,
Struggling to learn Ruby and can't even upgrade from 1.8 to 1.9. I have
read everything I can find for three days but must be missing something
very fundamental.

--
http://richardconroy.blogspot.com | http://twitter.com/RichardConroy

Steve,
That makes sense but I get a different error now. Hey, at least I am
making progress :slight_smile:
I put in bash -s stable < <(curl -s on one line and get a prompt >

Then, I paste in the URL and I get a "No such file or director" error.
???

Richard,
I will check that out THANKS!

Bob

P.S. Dwayne, love the video. Kind of like learning to use chopsticks
:slight_smile:

···

--
Posted via http://www.ruby-forum.com/.

Steve,
I feel like an idiot. I put in the ) you had at the end. Left it off
and I got another prompt >

Not exactly sure what to do now.

I did pick up a Unix book at the library and went to the site that
Richard mentioned above and downloaded the PDF.
Bob

···

--
Posted via http://www.ruby-forum.com/.

Hassan (et al),
Thank you. I figured a lot of it out (trial and error)and was able to
eventually download and install RVM. I then was able to download and
attempted to install Ruby 1.9.3 using RVM but got some errors below and
therefore it failed to install.

I am a UNIX beginner (like 4 hours a go :slight_smile: but it seems to me that
things didn't' go in the right place according to the error for the
configure.log and the error for the make.log. It says to read them but
I am such a newbie I don't yet know how to do that. Is there something
simple I should have done to prevent the errors before I attempted the
Ruby install?
Bob

···

======================

ROBERTs-iMac:~ bobbaird001$ rvm install ruby 1.9.3
Fetching yaml-0.1.4.tar.gz to /Users/bobbaird001/.rvm/archives
  % Total % Received % Xferd Average Speed Time Time Time
Current
                                 Dload Upload Total Spent Left
Speed
100 460k 100 460k 0 0 167k 0 0:00:02 0:00:02 --:--:--
284k
Extracting yaml-0.1.4.tar.gz to /Users/bobbaird001/.rvm/src
Configuring yaml in /Users/bobbaird001/.rvm/src/yaml-0.1.4.
Error running ' ./configure --prefix="/Users/bobbaird001/.rvm/usr" ',
please read
/Users/bobbaird001/.rvm/log/ruby-1.9.3-p125/yaml/configure.log
Compiling yaml in /Users/bobbaird001/.rvm/src/yaml-0.1.4.
Error running 'make ', please read
/Users/bobbaird001/.rvm/log/ruby-1.9.3-p125/yaml/make.log

Database file /Users/bobbaird001/.rvm/config/packages does not exist.

/Users/bobbaird001/.rvm/scripts/functions/build: line 28: --version:
command not found
Installing Ruby from source to:
/Users/bobbaird001/.rvm/rubies/ruby-1.9.3-p125, this may take a while
depending on your cpu(s)...

ruby-1.9.3-p125 - #fetching
ruby-1.9.3-p125 - #downloading ruby-1.9.3-p125, this may take a while
depending on your connection...
  % Total % Received % Xferd Average Speed Time Time Time
Current
                                 Dload Upload Total Spent Left
Speed
100 9505k 100 9505k 0 0 82982 0 0:01:57 0:01:57 --:--:--
81732
ruby-1.9.3-p125 - #extracting ruby-1.9.3-p125 to
/Users/bobbaird001/.rvm/src/ruby-1.9.3-p125
ruby-1.9.3-p125 - #extracted to
/Users/bobbaird001/.rvm/src/ruby-1.9.3-p125
Applying patch 'xcode-debugopt-fix-r34840' (located at
/Users/bobbaird001/.rvm/patches/ruby/1.9.3/p125/xcode-debugopt-fix-r34840.diff)
rvm requires autoreconf to install the selected ruby interpreter however
autoreconf was not found in the PATH.
ROBERTs-iMac:~ bobbaird001$ ruby -v
ruby 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin11.0]
ROBERTs-iMac:~ bobbaird001$

--
Posted via http://www.ruby-forum.com/.

MIke,
I took a look but it is all greek to me. Not sure what Xcode 4.3 is or
many of the other programs discussed in the blog.

Per the error message I received when the install failed, I have
attempted to read the two logs (configure and make) by pasting the
following in bash:

/Users/bobbaird001/.rvm/log/ruby-1.9.3-p125/yaml/configure.log

However, it tells me I don't have permissions (heck it is my mac and I
am bobbaird001 :slight_smile:

I tried going through GUI to find the file in that directory, but .rvm
doesn't appear (I assume it is hidden and don't have a clue as to how to
unhide). I am learning UNIX in parallel but haven't found anything yet
that will help me out of this mess.

So, I am kind of at a real loss here. I had no idea (especially on a
Mac) that upgrading an application would be this problematic.

BTW, any advice as to where I should start on this journey given that I
clearly don't have the knowledge to even begin. I have taught myself
PHP, MySQL, ASP and VB script so I am not a dummy but Unix and Ruby are
new.

Bob

···

--
Posted via http://www.ruby-forum.com/.

MIke,
Thanks. I have little experience with the command line other than an
awareness that it has always been there (e.g. DOS, etc.). I never
devoted the time to learn it. That said, I work in the IT field but I
am not a programmer (but would like to learn). Clearly though, I
bypassed a critical step in the learning process (e.g. UNIX).

So, I am beginning with Unix (Bash tutorials) to get comfortable with
it. Then, I thought ruby and last rails. Would that be your
recommendation?

My only concern right now, is that if I read the documentation on Rails
correctly, it really wants Ruby 1.9.x installed to work with the latest
version of Rails. So, my inability to get that accomplished is kind of
a major roadblock at this point.
Bob

···

--
Posted via http://www.ruby-forum.com/.

You don't copy the $.

bash -s stable < <(curl -s
https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)

The idea is that the $ shows you're typing it into the terminal

The entire command goes on one line, just like the RVM site shows
(other than the leading '$' indicating it's a terminal prompt).

···

On Mon, Apr 2, 2012 at 2:44 PM, Bob Baird <lists@ruby-forum.com> wrote:

Not exactly sure what to do now.

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com

twitter: @hassan

If you are using Xcode 4.3 then you might want to look at this page:

http://jfire.io/blog/2012/03/02/xcode-4-dot-3-homebrew-and-ruby/

It saved me a lot of grief! If you are using homebrew (http://mxcl.github.com/homebrew/\) the apple command line tools then

brew install autoconf automake

will get you the tools you need.

Hope this helps,

Mike

···

On 2012-04-02, at 6:14 PM, Bob Baird wrote:

Hassan (et al),
Thank you. I figured a lot of it out (trial and error)and was able to
eventually download and install RVM. I then was able to download and
attempted to install Ruby 1.9.3 using RVM but got some errors below and
therefore it failed to install.

I am a UNIX beginner (like 4 hours a go :slight_smile: but it seems to me that
things didn't' go in the right place according to the error for the
configure.log and the error for the make.log. It says to read them but
I am such a newbie I don't yet know how to do that. Is there something
simple I should have done to prevent the errors before I attempted the
Ruby install?
Bob

ROBERTs-iMac:~ bobbaird001$ rvm install ruby 1.9.3
Fetching yaml-0.1.4.tar.gz to /Users/bobbaird001/.rvm/archives
% Total % Received % Xferd Average Speed Time Time Time
Current
                                Dload Upload Total Spent Left
Speed
100 460k 100 460k 0 0 167k 0 0:00:02 0:00:02 --:--:--
284k
Extracting yaml-0.1.4.tar.gz to /Users/bobbaird001/.rvm/src
Configuring yaml in /Users/bobbaird001/.rvm/src/yaml-0.1.4.
Error running ' ./configure --prefix="/Users/bobbaird001/.rvm/usr" ',
please read
/Users/bobbaird001/.rvm/log/ruby-1.9.3-p125/yaml/configure.log
Compiling yaml in /Users/bobbaird001/.rvm/src/yaml-0.1.4.
Error running 'make ', please read
/Users/bobbaird001/.rvm/log/ruby-1.9.3-p125/yaml/make.log

Database file /Users/bobbaird001/.rvm/config/packages does not exist.

/Users/bobbaird001/.rvm/scripts/functions/build: line 28: --version:
command not found
Installing Ruby from source to:
/Users/bobbaird001/.rvm/rubies/ruby-1.9.3-p125, this may take a while
depending on your cpu(s)...

ruby-1.9.3-p125 - #fetching
ruby-1.9.3-p125 - #downloading ruby-1.9.3-p125, this may take a while
depending on your connection...
% Total % Received % Xferd Average Speed Time Time Time
Current
                                Dload Upload Total Spent Left
Speed
100 9505k 100 9505k 0 0 82982 0 0:01:57 0:01:57 --:--:--
81732
ruby-1.9.3-p125 - #extracting ruby-1.9.3-p125 to
/Users/bobbaird001/.rvm/src/ruby-1.9.3-p125
ruby-1.9.3-p125 - #extracted to
/Users/bobbaird001/.rvm/src/ruby-1.9.3-p125
Applying patch 'xcode-debugopt-fix-r34840' (located at
/Users/bobbaird001/.rvm/patches/ruby/1.9.3/p125/xcode-debugopt-fix-r34840.diff)
rvm requires autoreconf to install the selected ruby interpreter however
autoreconf was not found in the PATH.
ROBERTs-iMac:~ bobbaird001$ ruby -v
ruby 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin11.0]
ROBERTs-iMac:~ bobbaird001$

--
Posted via http://www.ruby-forum.com/\.

--

Mike Stok <mike@stok.ca>
http://www.stok.ca/~mike/

The "`Stok' disclaimers" apply.

Hi Bob,

You could give the one-click installer for OSX a try..
http://rubyosx.rubyforge.org/

Per the error message I received when the install failed, I have
attempted to read the two logs (configure and make) by pasting the
following in bash:

/Users/bobbaird001/.rvm/log/ruby-1.9.3-p125/yaml/configure.log

However, it tells me I don't have permissions (heck it is my mac and I
am bobbaird001 :slight_smile:

You need to specify a text editor before that line, for example (using vi) -
otherwise the systems thinks that you are trying to execute that file (which
may not have executable permissions)

vi /Users/bobbaird001/.rvm/log/ruby-1.9.3-p125/yaml/configure.log

hope it helps!
saji

···

--

Saji N Hameed,
ARC-ENV, Center for Advanced Information Science and Technology,
University of Aizu, Tsuruga, Ikki-machi,
Aizuwakamatsu-shi, Fukushima 965-8580,
Japan

Tel: +81242 37-2736
Fax:+81242 37-2760
email: saji@u-aizu.ac.jp
url: http://www.u-aizu.ac.jp
bib: Web of Science

MIke,
I took a look but it is all greek to me. Not sure what Xcode 4.3 is or
many of the other programs discussed in the blog.

Xcode 4.3 is a 2+ GB download so that you can make Mac and iOS apps using the Objective-C programming language. But because it is overkill for people who only need to play with Ruby Apple now provides an installer that will give you just the command line tools based on the one created by Kenneth Reitz. Homebrew is needed to get some additional tools before you can run rvm.

So, I am kind of at a real loss here. I had no idea (especially on a
Mac) that upgrading an application would be this problematic.

Yes, it is humorously called yak shaving. Whole ecosystems have formed as a result of a group of programmers trying to make it easy for other programmers to do something.

BTW, any advice as to where I should start on this journey given that I
clearly don't have the knowledge to even begin. I have taught myself
PHP, MySQL, ASP and VB script so I am not a dummy but Unix and Ruby are
new.

What's your previous experience with the command line? Did you use Windows and its Command Prompt before?

···

On Tue Apr 3 17:10:54 2012, Bob Baird wrote:

Bob

Ruby 1.8 is still very powerful and useful, as well as being very similar in many ways to 1.9. I would suggest you start out playing around with the command line and Ruby as is. Writing and running some Ruby programs from the command line will get you more comfortable with both.

When you *need* to do something more than what you can do with the built-in bits, then start installing things. Installing Unix tools can be a hair-pulling nightmare, as you might have noticed. I will also heartily agree with some other people's comment that, whenever possible, use Homebrew to install stuff from the command line, instead of RPM, github, curl, Fink, or whatever else might float past. It has been so much less horrible than any of the other ways I've installed stuff. . . well, I ilke it lots.

It's fairly likely that at some point you will need to install all or part of the XCode development system. You may well have an installer DVD that can do this; you should check the discs that came with the Mac. If not, then go to developer.apple.com, and find the link for downloading it. As mentioned, it's gigantic, so it'll probably be an overnight download.

···

On Apr 4, 2012, at 17:03 , Bob Baird wrote:

So, I am beginning with Unix (Bash tutorials) to get comfortable with
it. Then, I thought ruby and last rails. Would that be your
recommendation?

How to Play Bones with Dom Flemons
<http://www.youtube.com/watch?v=iMokBr9cTxM&gt;

···

On Mon, Apr 2, 2012 at 6:43 PM, Steve Klabnik <steve@steveklabnik.com>wrote:

You don't copy the $.

bash -s stable < <(curl -s
https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer\)

The idea is that the $ shows you're typing it into the terminal