# Rails problem on new installation

**URL:** <https://www.ruby-forum.com/t/rails-problem-on-new-installation/128489>\
**Category:** Rails\
**Created:** [February 8, 2008, 1:03am UTC](https://www.ruby-forum.com/t/rails-problem-on-new-installation/128489 "2008-02-08T01:03:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chadmichael](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/779978/32.png) [@chadmichael](https://www.ruby-forum.com/u/chadmichael)\
**Post date:** [February 8, 2008, 1:03am UTC](https://www.ruby-forum.com/t/rails-problem-on-new-installation/128489/1 "2008-02-08T01:03:32Z")

</div>

I’ve just installed my first batch of RoR.

I’ve got:

ruby version 1.8.5  
gems 1.0.1  
rails 2.0.2

When I try to build the skeleton app with:

rails myApp

I get the following errors:

/usr/bin/rails: line 9: require: command not found  
/usr/bin/rails: line 11: version: command not found  
/usr/bin/rails: line 13: syntax error near unexpected token `(' /usr/bin/rails: line 13:`if ARGV.first =~ /^_(.\*)_$/ and  
Gem::Version.correct? $1 then’

Do I have a compatability problem with some of my versions of ruby,  
gems, and rails?

---

<div class="post-metadata">

**Author:** ![chadmichael](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/779978/32.png) [@chadmichael](https://www.ruby-forum.com/u/chadmichael)\
**Post date:** [February 8, 2008, 9:54pm UTC](https://www.ruby-forum.com/t/rails-problem-on-new-installation/128489/2 "2008-02-08T21:54:28Z")

</div>

Okay. I figured this out myself, but incase someone else has the same  
problem, I’ll tell what happened.

First of all, I am using debian linux. One of the conventions of  
debian linux is to set environment variables that applications require  
with a wrapper script around the binary. In this case, I wrapped the  
ruby binary with a script that sets the RUBYOPT=rubygems, as suggested  
in the gems user manual, post installation section.

Something about this extra layer of indirection mucks up the  
execution. I’m not sure what it is, but its probably not that  
complicated. I’m just not that much of a scripter. I’ll repost when  
I find out so that others might learn.
