# One click install for XP, not admin, no gems

**URL:** <https://www.ruby-forum.com/t/one-click-install-for-xp-not-admin-no-gems/119666>\
**Category:** Ruby\
**Created:** [November 9, 2007, 1:12am UTC](https://www.ruby-forum.com/t/one-click-install-for-xp-not-admin-no-gems/119666 "2007-11-09T01:12:08Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thufir](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ee7513/32.png) [@Thufir](https://www.ruby-forum.com/u/Thufir)\
**Post date:** [November 9, 2007, 1:12am UTC](https://www.ruby-forum.com/t/one-click-install-for-xp-not-admin-no-gems/119666/1 "2007-11-09T01:12:08Z")

</div>

I notice this alert when installing Ruby:

Please review the ReadMe and License below.

- You must install as administrator on Windows NT,  
2000, and XP in order for path and environment  
variable settings to take effect.

I’m in XP and would like gems, but do not have Administrator  
privileges. I can run ruby programs by typing the filename, foo.rb,  
at the command prompt but, of course, I don’t have a ruby command and  
so no gems ☹

-Thufir

---

<div class="post-metadata">

**Author:** ![Thufir](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ee7513/32.png) [@Thufir](https://www.ruby-forum.com/u/Thufir)\
**Post date:** [November 9, 2007, 2:12am UTC](https://www.ruby-forum.com/t/one-click-install-for-xp-not-admin-no-gems/119666/2 "2007-11-09T02:12:53Z")

</div>

On Nov 8, 8:53 pm, Thufir [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> at the command prompt but, of course, I don’t have a ruby command and  
> so no gems ☹

The admin priviliges are required to change environment variable PATH  
and also include RUBYOPT=rubygems that autoamtically load RubyGems for  
you.

You can manually include the path doing:

SET PATH=%PATH%;C:\Ruby\bin

IN a command prompt. After that you should have ‘gem’, ‘rake’ and even  
ruby commands available.

You can wrap that sentence in a batch file, but I don’t have a Windows  
machine handy right now to give you the exact details 🙂

Maybe we should add a “Ruby Command Prompt” Icon in the Ruby programs  
folder that do this for you.

Please, feel free to add this as Feature Request in the Tracker:  
[http://rubyforge.org/tracker/?atid=718&group\_id=167&func=browse](http://rubyforge.org/tracker/?atid=718&group_id=167&func=browse)

---

<div class="post-metadata">

**Author:** ![Thufir](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ee7513/32.png) [@Thufir](https://www.ruby-forum.com/u/Thufir)\
**Post date:** [November 9, 2007, 5:03am UTC](https://www.ruby-forum.com/t/one-click-install-for-xp-not-admin-no-gems/119666/3 "2007-11-09T05:03:08Z")

</div>

On Nov 8, 5:10 pm, Luis L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:  
[…]

> You can manually include the path doing:
> 
> SET PATH=%PATH%;C:\Ruby\bin

My results:

C:\ruby\bin\>  
C:\ruby\bin\>  
C:\ruby\bin\>ruby --version  
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]

C:\ruby\bin\>  
C:\ruby\bin\>cd c:\

C:\>  
C:\>ruby  
‘ruby’ is not recognized as an internal or external command,  
operable program or batch file.

C:\>  
C:\>SET PATH=%PATH%;C:\ruby\bin

C:\>  
C:\>ruby  
‘ruby’ is not recognized as an internal or external command,  
operable program or batch file.

C:\>  
C:\>

> IN a command prompt. After that you should have ‘gem’, ‘rake’ and even  
> ruby commands available.
> 
> You can wrap that sentence in a batch file, but I don’t have a Windows  
> machine handy right now to give you the exact details 🙂

Bah! 😉

> Maybe we should add a “Ruby Command Prompt” Icon in the Ruby programs  
> folder that do this for you.

Yes, pls. I’m often moving from computer to computer and may have to  
install ruby from the get go.

> Please, feel free to add this as Feature Request in the Tracker:[http://rubyforge.org/tracker/?atid=718&group\_id=167&func=browse](http://rubyforge.org/tracker/?atid=718&group_id=167&func=browse)

Will do 🙂

thanks,

Thufir

---

<div class="post-metadata">

**Author:** ![Thufir](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ee7513/32.png) [@Thufir](https://www.ruby-forum.com/u/Thufir)\
**Post date:** [November 9, 2007, 1:26pm UTC](https://www.ruby-forum.com/t/one-click-install-for-xp-not-admin-no-gems/119666/4 "2007-11-09T13:26:13Z")

</div>

On Nov 9, 1:00 am, Thufir [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> […]

Ok, Adding Ruby to your PATH without administrative privileges:

Control Panel, System.  
Go to Advanced and locate Environment Variables button lower in the  
tab.

Under “User variables for …” click New and fill with this  
information:

Variable name: PATH  
Variable value: C:\Ruby\bin

Click OK. Then OK again for Environment Variables dialog.

In a new Command Prompt window PATH should include now C:\Ruby\bin at  
the end of the string.

> > Maybe we should add a “Ruby Command Prompt” Icon in the Ruby programs  
> > folder that do this for you.
> 
> Yes, pls. I’m often moving from computer to computer and may have to  
> install ruby from the get go.

Oh, ruby on a stick! (RubyToGo! – USB Ruby) 😉

HTH,

Luis

---

<div class="post-metadata">

**Author:** ![Thufir](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ee7513/32.png) [@Thufir](https://www.ruby-forum.com/u/Thufir)\
**Post date:** [November 9, 2007, 12:55pm UTC](https://www.ruby-forum.com/t/one-click-install-for-xp-not-admin-no-gems/119666/5 "2007-11-09T12:55:48Z")

</div>

On Nov 9, 1:00 am, Thufir [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> ‘ruby’ is not recognized as an internal or external command,  
> operable program or batch file.

Weird that setting PATH manually didn’t work…

Tried reproduce that locally and worked without problems…

Please don’t tell me that you’re using Windows Vista? 😛

---

<div class="post-metadata">

**Author:** ![Thufir](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ee7513/32.png) [@Thufir](https://www.ruby-forum.com/u/Thufir)\
**Post date:** [November 13, 2007, 7:07am UTC](https://www.ruby-forum.com/t/one-click-install-for-xp-not-admin-no-gems/119666/6 "2007-11-13T07:07:13Z")

</div>

OCI==OP?

Haha, I’ll have to try ruby on Vista, that’d be “interesting”…

Creating a new variable from the System Properties tab did the  
trick 🙂

-Thufir

---

<div class="post-metadata">

**Author:** ![Thufir](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ee7513/32.png) [@Thufir](https://www.ruby-forum.com/u/Thufir)\
**Post date:** [November 13, 2007, 7:15am UTC](https://www.ruby-forum.com/t/one-click-install-for-xp-not-admin-no-gems/119666/7 "2007-11-13T07:15:59Z")

</div>

On Nov 12, 10:05 pm, Thufir [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> OCI==OP?  
> […]

One Click Installer, ok.

-Thufir

---

<div class="post-metadata">

**Author:** ![Thufir](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ee7513/32.png) [@Thufir](https://www.ruby-forum.com/u/Thufir)\
**Post date:** [November 9, 2007, 9:24pm UTC](https://www.ruby-forum.com/t/one-click-install-for-xp-not-admin-no-gems/119666/8 "2007-11-09T21:24:30Z")

</div>

> C:\>SET PATH=%PATH%;C:\ruby\bin
> 
> C:\>  
> C:\>ruby  
> ‘ruby’ is not recognized as an internal or external command,  
> operable program or batch file.

Looks like this happens if path isn’t already set to something (i.e. if  
it ends up looking like  
set  
path=%path%;c:\ruby\bin

Also maybe adding ‘non administrator’ path setting might be an  
interesting option for the OCI some time.  
-Roger
