简体   繁体   中英

Can't install Rails (Windows )

all day can not understand. There are many tips online, but I'm confused. maybe something wrong edited.

help me understand and find the error.

Ruby downloaded here: http://rubyforge.org/frs/?group_id=167&release_id=46722 was established.

then installed gem: http://rubygems.org/pages/download

then try install Rails,- wrote in concole: gem install rails

but have error! -

Error: While executing gem ...

Invalid argument - C:/Documents and Settings/Neo/C:

this is my concole :

C:\\Documents and Settings\\Neo>_ - Does not a long way?

maybe I must heve only: C:\\>_ ??? how I can do it?

my gem.bat:

@ECHO OFF
SET _HOMEDRIVE=%HOMEDRIVE%
SET _HOMEPATH=%HOMEPATH%
SET HOMEDRIVE=С:
SET HOMEPATH=/Ruby193
IF NOT "%~f0" == "~f0" GOTO :WinNT
@"ruby.exe" "С:/Ruby193/bin/gem" %1 %2 %3 %4 %5 %6 %7 %8 %9
GOTO :EOF
:WinNT
@"ruby.exe" "%~dpn0" %*
SET HOMEDRIVE=%_HOMEDRIVE%
SET HOMEPATH=%_HOMEPATH%

I either missed something or done something extra ... Thanks!!!

Installing RoR on Windows can be a real challenge when you try to install each piece individually. There is the Rails Installer which will install everything you need. However, if you decide to install everything by yourself you can follow this procedures:

  • Install the ruby language .

  • Check if the installation was successful by checking its version:

     ruby -v
  • Then you need to check if you can access gem command by checking its version:

     gem -v
  • Update the gem version:

     gem update --system
  • Having the ruby language and the updated gem, you can now instal the Rails:

     gem install rails
  • You can check the rails version:

     rails -v
  • Now you need the SQLite database:

     gem install sqlite3-ruby

I was facing error during rails installation in windows >

Solution :

Download Ruby+Devkit exe file Install Ruby+Devkit

> ruby -v 
> gem -v
> gem install rails 
> rails -v

All worked !!!!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM