Topic: Problem installing rails

I'm new to ruby, but I've done similar things before.

I'm on WinXP + xampp and I'm trying to install ruby, I've followed http://pandazen.wordpress.com/2009/10/2 … orld-ruby/
So this is what I've done:
1. xampp was already installed and working at D:\xampp
2. downloaded & install http://files.rubyforge.vm.bytemark.co.u … 1-p429.exe at D:\xampp\ruby
3. downloaded http://files.rubyforge.vm.bytemark.co.u … -1.3.7.tgz
4. executed 'D:\xampp\ruby\rubygems-1.3.7\setup.rb'
5. ruby gem install rails -include-dependencies
(in this stage I've encountered a 'ERROR:  While executing gem ... (Errno::ENOENT) No such file or directory - C:/Documents and Settings/...' error, solved it according to http://www.ruby-forum.com/topic/207694#905476 by 'set HOMEPATH=' right before 'ruby gem install ...')
6. now I should have done

create a rails application
i create it at C:\xampp\htdocs\FirstProject, so run
rails -d mysql C:/xampp/htdocs/FirstProject

But as you can in my logs (starting from step 5)  something went wrong...

D:\xampp\ruby\bin>ruby gem update
Updating installed gems
Nothing to update

D:\xampp\ruby\bin>ruby gem install rails -include-dependencies
ERROR:  While executing gem ... (Errno::ENOENT)
    No such file or directory - C:/Documents and Settings/user

D:\xampp\ruby\bin>ruby gem install rails -include-dependencies
D:/xampp/ruby/lib/ruby/1.9.1/optparse.rb:1262: warning: regexp match /.../n against to IBM862 string
D:/xampp/ruby/lib/ruby/1.9.1/optparse.rb:1278: warning: regexp match /.../n against to IBM862 string
ERROR:  While executing gem ... (Errno::ENOENT)
    No such file or directory - C:/Documents and Settings/user

D:\xampp\ruby\bin>set HOMEPATH=

D:\xampp\ruby\bin>ruby gem install rails -include-dependencies
Successfully installed rake-0.8.7
Successfully installed activesupport-2.3.8
Successfully installed activerecord-2.3.8
Successfully installed rack-1.1.0
Successfully installed actionpack-2.3.8
Successfully installed actionmailer-2.3.8
Successfully installed activeresource-2.3.8
Successfully installed rails-2.3.8
8 gems installed
Installing ri documentation for rake-0.8.7...
Installing ri documentation for activesupport-2.3.8...
Installing ri documentation for activerecord-2.3.8...
Installing ri documentation for rack-1.1.0...
Installing ri documentation for actionpack-2.3.8...
Installing ri documentation for actionmailer-2.3.8...
Installing ri documentation for activeresource-2.3.8...
Installing ri documentation for rails-2.3.8...
Updating class cache with 0 classes...
Installing RDoc documentation for rake-0.8.7...
Installing RDoc documentation for activesupport-2.3.8...
Installing RDoc documentation for activerecord-2.3.8...
Installing RDoc documentation for rack-1.1.0...
Installing RDoc documentation for actionpack-2.3.8...
Installing RDoc documentation for actionmailer-2.3.8...
Installing RDoc documentation for activeresource-2.3.8...
Installing RDoc documentation for rails-2.3.8...

D:\xampp\ruby\bin>rails
'rails' is not recognized as an internal or external command,
operable program or batch file.

D:\xampp\ruby\bin>ruby rails
ruby: No such file or directory -- rails (LoadError)

D:\xampp\ruby\bin> cd nclude-dependencies\bin

D:\xampp\ruby\bin\nclude-dependencies\bin>rails
D:/xampp/ruby/lib/ruby/site_ruby/1.9.1/rubygems.rb:779:in `report_activate_error': Could not find RubyGem rails (>= 0) (Gem::LoadError)
        from D:/xampp/ruby/lib/ruby/site_ruby/1.9.1/rubygems.rb:214:in `activate'
        from D:/xampp/ruby/lib/ruby/site_ruby/1.9.1/rubygems.rb:1082:in `gem'
        from <internal:gem_prelude>:274:in `push_gem_version_on_load_path'
        from <internal:gem_prelude>:14:in `gem'
        from D:/xampp/ruby/bin/nclude-dependencies/bin/rails:18:in `<main>'

D:\xampp\ruby\bin\nclude-dependencies\bin> cd ../..

D:\xampp\ruby\bin>ruby gem list --local

*** LOCAL GEMS ***



D:\xampp\ruby\bin>ruby gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.7
  - RUBY VERSION: 1.9.1 (2010-07-02 patchlevel 429) [i386-mingw32]
  - INSTALLATION DIRECTORY: D:/xampp/ruby/lib/ruby/gems/1.9.1
  - RUBY EXECUTABLE: D:/xampp/ruby/bin/ruby.exe
  - EXECUTABLE DIRECTORY: D:/xampp/ruby/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-mingw32
  - GEM PATHS:
     - D:/xampp/ruby/lib/ruby/gems/1.9.1
     - C:/.gem/ruby/1.9.1
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://rubygems.org/

D:\xampp\ruby\bin>ruby gem server
ERROR:  While executing gem ... (ArgumentError)
    D:/xampp/ruby/lib/ruby/gems/1.9.1 does not appear to be a gem repository

D:\xampp\ruby\bin>

UPDATE:
I've edit the 'PATH' environment variable to include the ruby bin and gem bin directories. The result is still the same except I can type 'gem ...' instead of 'ruby gem ...'

Last edited by dvb (2010-07-29 07:48:53)