Programs that can run with any version of Ruby should be started with
#!/usr/bin/ruby. They must also specify a dependency on
ruby
. They may specify a dependency with versioned like
ruby (>= X.Y), ruby (<<
X.Y'), where Y' >= Y + 3.
If Y' < Y + 3, then you should reconsider that the
program is really version independent.
You're free to use #!/usr/bin/env ruby, if you'd like to give the user a chance to override the Debian Ruby package with a local version.
Programs which require a specific version of Ruby must start with
#!/usr/bin/rubyX.Y. They must also specify
a dependency on rubyX.Y
. Usually, you may
package only for default version of ruby, since program path name should not
contains ruby version. (FIXME: of course, you can alternatives or divert, but
we don't recommend to do that.)
Again, if you're using #!/usr/bin/env rubyX.Y, please be aware that a user might override the Debian Ruby package with a local version.
Debian Ruby Policy
version 0.0.1.4