From: Nicholas Van Weerdenburg Date: 2005-09-11T22:22:20+09:00 Subject: Re: newbie mysteries On 9/11/05, Tom Cloyd wrote: > 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 > there was one, but passed by the reference a while back and haven't found > it again. Can you enlighten > me on this? > > I played around with the Scite editor and seemed only to execute programs. > Mondrian, however, seems able to execute whatever's in the focused window. > What's going on here? > > Now, rails, working in Mondrian... > > The page at http://download.rubyonrails.com/ advises executing this, after > 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 > 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 > projects - Toms" "railsinstall.rb"' > railsinstall.rb:1: undefined local variable or method `rails' for > 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 > work? > > -- t. > > ====================================================== > Tom Cloyd > Bellingham, Washington, U.S.A: (360) 920-1226 > << BestMindHealth.com / tc@bestmindhealth.com >> > ====================================================== > > Using Opera's revolutionary e-mail client (program): > http://www.opera.com/mail/ > > Did you use the Window's one-click installer to install ruby? If so, gems would have been installed with ruby. If you open a command prompt, typing "ruby" runs the ruby interpreter. "irb" runs an interactive ruby interpreter. If Ruby Gems is installed, running "gem" runs Ruby gems. So, after running the one-click installer for windows: gem install rails --include-dependencies should work from any command prompt. If not, there is a path issue. Ruby is usually installed to C:\ruby by the installer- check your path. Never used Mondrian, but some editors allow execution of an arbitrary buffer or code selection, and others want a saved file (the only definition of a ruby program I can think of ), so maybe that's the difference. Regards, Nick --- Nicholas Van Weerdenburg