Ruby on web

J

João Mello

Hi all!
When I use rubt on web I need to put '#!/usr/bin/ruby' in header, if
wiil use in my computer will be different, how can I use this
dynamically?
 
P

Paul

I'm not sure if I've understood your question, but if you are asking
about what to do if the path to ruby might be different, you can try:
#!env ruby
 
J

João Mello

Paul said:
I'm not sure if I've understood your question, but if you are asking
about what to do if the path to ruby might be different, you can try:
#!env ruby

Yes, if I change the place where I execute ruby, the path maybe be
different...
but "#!env ruby" give me internal error at Apache.
 
J

Josh Cheek

2010/10/1 Jo=E3o Mello said:
Yes, if I change the place where I execute ruby, the path maybe be
different...
but "#!env ruby" give me internal error at Apache.
try
#!/usr/bin/env ruby

if that doesn't work, type "whereis env" and let us know if env is in the
same location on both computers.
 
J

João Mello

Josh said:
try
#!/usr/bin/env ruby

if that doesn't work, type "whereis env" and let us know if env is in
the
same location on both computers.

I know it's appear confusing, but when I use in my computer (Windows
running apache) I use "#!c:/ruby/bin/ruby.exe" in host I will need use
"#!/usr/bin/env ruby"

But if I use any diffenrt path in my computer I get this error:
Internal Server Error

The server encountered an internal error or misconfiguration and was
unable to complete your request.

I just want I way that I won't need to change this all the time... (I
came form PHP/ASP.net :p)

Thanks a lot for helping!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,145
Messages
2,570,824
Members
47,370
Latest member
desertedtyro29

Latest Threads

Top