newbie mysteries

T

Tom Cloyd

Good morning!

I'm on a WinXP SP-2 box, and have installed Ruby, Gems, Mondrian editor.

I'm trying to use Gems to install Rails, and getting nowhere.

I'm confused by the apparent lack of an interpreter in Ruby. I thought =20
there was one, but passed by the reference a while back and haven't found=
=20
it again. Can you enlighten
me on this?

I played around with the Scite editor and seemed only to execute programs=
=20
Mondrian, however, seems able to execute whatever's in the focused window=
=20
What's going on here?

Now, rails, working in Mondrian...

The page at http://download.rubyonrails.com/ advises executing this, afte=
r =20
install of gems ...

gem install rails --include-dependencies

But I can't seem to pull this off.

In Mondrian, still, I get this output:

Executing 'ruby -C "C:/Documents and Settings/TC/My Documents/Ruby =20
projects - Toms" "railsinstall.rb"'
railsinstall.rb:1: warning: parenthesize argument(s) for future version
railsinstall.rb:1: warning: parenthesize argument(s) for future version
railsinstall.rb:1: undefined method `-@' for Object:Class (NoMethodError)
Execution completed with exit code 1.

As a test, I then run this:

gem (install rails) #--include-dependencies

And get this output:

Executing 'ruby -C "C:/Documents and Settings/TC/My Documents/Ruby =20
projects - Toms" "railsinstall.rb"'
railsinstall.rb:1: undefined local variable or method `rails' for =20
main:Object (NameError)
Execution completed with exit code 1.

Can someone tell me what's happening, and what I need to do to get it to =
=20
work?

-- t.

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
Tom Cloyd
Bellingham, Washington, U.S.A: (360) 920-1226
<< BestMindHealth.com / (e-mail address removed) >>
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D

Using Opera's revolutionary e-mail client (program): =20
http://www.opera.com/mail/
 
N

Nicholas Van Weerdenburg

Good morning!
=20
I'm on a WinXP SP-2 box, and have installed Ruby, Gems, Mondrian editor.
=20
I'm trying to use Gems to install Rails, and getting nowhere.
=20
I'm confused by the apparent lack of an interpreter in Ruby. I thought
there was one, but passed by the reference a while back and haven't found
it again. Can you enlighten
me on this?
=20
I played around with the Scite editor and seemed only to execute programs=
 
D

Dirk Meijer

------=_Part_1887_12464714.1126445449687
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

i've actually got the same problem,
i used to be able to start ruby, irb or gems just by typing it, but that=20
doesn't work anymore (windows xp, cmd.exe)
it's really weird, i'm going to try to reinstall ruby, and see if it works=
=20
then..
 
W

Wayne Vucenic

------=_Part_9488_29535703.1126459636795
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

As Nicholas said, this does sound like a path problem. Typing "path" at a
command prompt will show your path:
C:\>path
PATH=3Dc:\ruby\bin;C:\WINDOWS\system32;C:\WINDOWS; <etc...>
c:\ruby\bin should appear somewhere in the path (not necessarily as the
first item), if you installed Ruby in the usual c:\Ruby location.
You can also look in your c:\ruby\bin directory, to see that it contains=
=20
ruby.exe,
but I can't imagine why it wouldn't be there.
What happens when you try to run ruby from the command prompt?
Wayne Vucenic
No Bugs Software
Ruby and C++ Agile Contract Programming in Silicon Valley

------=_Part_9488_29535703.1126459636795--
 
D

Dirk Meijer

------=_Part_2574_29575142.1126460937264
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

i found a way around it by creating a bat file (my first actual useful=20
batfile :p) like this:
@echo off
cd c:\ruby\
doskey rdoc=3Dc:\ruby\bin\rdoc.bat $*
doskey rails=3Dc:\ruby\bin\rails.cmd $*
doskey irb=3Dc:\ruby\bin\irb.bat $*
doskey gem=3Dc:\ruby\bin\gem.cmd $*
doskey fxri=3Dc:\ruby\bin\fxri.cmd $*
doskey rubyw=3Dc:\ruby\bin\rubyw.exe $*
doskey ruby=3Dc:\ruby\bin\ruby.exe $*
doskey freeride=3Dc:\ruby\freeride\freeride.rb $*
doskey scite=3Dc:\ruby\scite\scite.exe $*
so i could run all my stuff just by typing in the commands.
also, in the registry, you could change=20
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor\AutoRun" to run th=
e=20
bat file when cmd.exe is executed, so you don't have to open it yourself=20
every time.
i can't believe i've actually programmed something useful.. i feel so smart=
=20
:p
=20

2005/9/11 said:
=20
As Nicholas said, this does sound like a path problem. Typing "path" at a
command prompt will show your path:
C:\>path
PATH=3Dc:\ruby\bin;C:\WINDOWS\system32;C:\WINDOWS; <etc...>
c:\ruby\bin should appear somewhere in the path (not necessarily as the
first item), if you installed Ruby in the usual c:\Ruby location.
You can also look in your c:\ruby\bin directory, to see that it contains
ruby.exe,
but I can't imagine why it wouldn't be there.
What happens when you try to run ruby from the command prompt?
Wayne Vucenic
No Bugs Software
Ruby and C++ Agile Contract Programming in Silicon Valley
=20

------=_Part_2574_29575142.1126460937264--
 
T

Tom Cloyd

List and Wayne,
As Nicholas said, this does sound like a path problem.

For some reason, Nicholas' email came to me with only the text to which h=
e =20
was replying. It was empty, otherwise, so I never got his email, in effec=
t.

About the hypothesis that I'm having a path problem - I thought this too,=
=20
and so moved my one line program to "C:\ruby\rubygems-0.8.11\bin", so =20
that "gem" could be in the root and thus be found. It was...but the error=
=20
message remained the same:

---
C:/ruby/rubygems-0.8.11/bin/railsinstall.rb:1: warning: parenthesize =20
argument(s) for future version
C:/ruby/rubygems-0.8.11/bin/railsinstall.rb:1: warning: parenthesize =20
argument(s) for future version
C:/ruby/rubygems-0.8.11/bin/railsinstall.rb:1: undefined method `-@' for =
=20
Object:Class (NoMethodError)
Execution completed with exit code 1.
---

QUESTION: Where I can find out what these warnings are saying?

Clearly, these is no path problem at this point. Rather, something seems =
=20
wrong with the statement I'm trying to execute -

gem install rails --include-dependencies

As I said earlier, this is taken exactly as I found it on the Rail web =20
site - exactly.

QUESTIONS
---------

1. HOW can I tell what module is kicking out those warnings, and the =20
"undefined method" message? Is there some default assumption about origin=
=20
of error messages which I should know about?

2. Is there some documentation source for the error messages?

3. On the assumptions that it was gem which was having a problem, I =20
scoured the unzipped source folders, etc. for meaningful documentation, =20
and amazed to find nothing - except a reference to the rubygems website. =
=20
There, I found a " Command reference" for a version of gem which is FOUR=
=20
versions older than the current one. There was NO comment about whether =20
this was to be trusted, no mention of when it might be updated, or if thi=
s =20
was needed. How helpful is THIS supposed to be? Sounds like documentation=
=20
hell to me.
The "RubyGems User Guide" contains a link to the "gem Command =20
Reference" - which is the same apparently severely out of date page =20
mentioned in the previous paragraph.

CONCLUSION
----------

I'm left with the presumption, at thie point, that the latest version of =
=20
gem has some command line requirements which are documented nowhere, and =
=20
not recognized by the Rails site.

I'm completely stuck at this point.

All suggestions welcome.

-- t.

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
Tom Cloyd, MS MA, LMHC
Private practice Psychotherapist
Bellingham, Washington, U.S.A: (360) 920-1226
<< BestMindHealth.com / (e-mail address removed) >>
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D

Using Opera's revolutionary e-mail client (program): =20
http://www.opera.com/mail/
 
P

Pit Capitain

Tom said:
List and Wayne,



For some reason, Nicholas' email came to me with only the text to which
he was replying. It was empty, otherwise, so I never got his email, in
effect.

About the hypothesis that I'm having a path problem - I thought this
too, and so moved my one line program to
"C:\ruby\rubygems-0.8.11\bin", so that "gem" could be in the root and
thus be found. It was...but the error message remained the same:

---
C:/ruby/rubygems-0.8.11/bin/railsinstall.rb:1: warning: parenthesize
argument(s) for future version
C:/ruby/rubygems-0.8.11/bin/railsinstall.rb:1: warning: parenthesize
argument(s) for future version
C:/ruby/rubygems-0.8.11/bin/railsinstall.rb:1: undefined method `-@'
for Object:Class (NoMethodError)
Execution completed with exit code 1.

Hi Tom,

you can't put the line into a Ruby script because it's not Ruby code.
You're supposed to enter it in the DOS shell or put it into a DOS script.

HTH

Regards,
Pit
 
T

Tom Cloyd

Pit:

[snip]
you can't put the line into a Ruby script because it's not Ruby code. =20
You're supposed to enter it in the DOS shell or put it into a DOS scrip=
t.

Nuts. How right you are.

I'm learning Ruby as fast as possible, and I got really muddled on this =20
one.

Rails is now installed nicely, and I'm moving forward.

Thanks!

-- t.

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
Tom Cloyd
Bellingham, Washington, U.S.A: (360) 920-1226
<< BestMindHealth.com / (e-mail address removed) >>
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D

Using Opera's revolutionary e-mail client (program): =20
http://www.opera.com/mail/
 
W

Wayne Vucenic

------=_Part_9736_28816032.1126468282795
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Glad you got it working.
It does seem to me that http://download.rubyonrails.com/ would be=20
clearer on this point if they said "Run the following from a command=20
prompt:"
Wayne

------=_Part_9736_28816032.1126468282795--
 
T

Tom Cloyd

Yeah. As a newbie, I note in ruby documentation a variable neglect of =20
Windows folk. for what it's worth, I'm writing up what I did and will =20
submit it to whoever (need to figute that out) as a possible amendment. =20
People shouldn't have to go through what I just went through to get this =
=20
thing going.

Onward...

-t

Glad you got it working.
It does seem to me that http://download.rubyonrails.com/ would be
clearer on this point if they said "Run the following from a command
prompt:"
Wayne



--=20

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
Tom Cloyd, MS MA, LMHC
Private practice Psychotherapist
Bellingham, Washington, U.S.A: (360) 920-1226
<< BestMindHealth.com / (e-mail address removed) >>
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D

Using Opera's revolutionary e-mail client (program): =20
http://www.opera.com/mail/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top