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$ :
I feel like a dork can someone tell me what I am missing. Hopefully,
once i get rvm running, upgrading will be a cinch Also, it is clear
I need to learn how to operate in the terminal/shell mode, can someone
recommend a tutorial?
Thanks
Bob
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 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.
Steve,
That makes sense but I get a different error now. Hey, at least I am
making progress
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
simple I should have done to prevent the errors before I attempted the
100 460k 100 460k 0 0 167k 0 0:00:02 0:00:02 --:–:–
depending on your connection…
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$
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 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$
However, it tells me I don’t have permissions (heck it is my mac and I
am bobbaird001
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.
However, it tells me I don’t have permissions (heck it is my mac and I
am bobbaird001
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
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?
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
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?
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.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.