Forum: Ruby on Rails newbie question - script/server doesn't run without explicit

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Steven McNeel (Guest)
on 2006-05-11 01:22
(Received via mailing list)
Hi,

This one is probably an easy one, but is very troubling to me.  I can't
just
say:

script/server

and watch WEBrick start.  I have to say:

ruby script/server


The first line in the server script is:

#!/usr/bin/env ruby

which invokes ruby just fine on the command line.  For fun, I changed
the
line to point directly to my executable:

#!/usr/local/bin/ruby

But still, same result.  I just get my prompt back.  But invoking the
script
explicitly with ruby in front of it actually starts WEBrick.

This may seem minor, but none of the online examples I see for UNIX uses
the
explicit ruby command.  #! should work fine, right?
I happen to be experiencing other problems (with FastCGI and Typo), and
I'm
wondering if they might be related.

Ruby 1.8.4
Rails 0.14.4
Linux Fedora Core 4

Thanks,
Steve

P.S.  Same goes for other scripts, like script/process/spawner.  So the
problem is global.
Ray B. (Guest)
on 2006-05-11 01:41
(Received via mailing list)
Steven McNeel wrote:

> The first line in the server script is:
>
> This may seem minor, but none of the online examples I see for UNIX uses
> the explicit ruby command.  #! should work fine, right?

Are your scripts executable?

chmod a+x script/server.

--

Ray
Steven McNeel (Guest)
on 2006-05-11 02:02
(Received via mailing list)
> This one is probably an easy one, but is very troubling to me.  I can't

> >
> > This may seem minor, but none of the online examples I see for UNIX uses
> > the explicit ruby command.  #! should work fine, right?
>
> Are your scripts executable?
>
> chmod a+x script/server.
>
> --
>
> Ray



Yes, all of my scripts are all executable.  In fact, I ran chmod -R
777 *over the whole hierarchy, to eliminate any potential permission
issues.

Thanks,
Steve
This topic is locked and can not be replied to.