learningtech
learningtech

Reputation: 33715

what shebang line to use after installing ruby full?

I did this in ubuntu

sudo apt-get install ruby-full
ruby -v

which gave the result

ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]

When I write my first ruby script, how do I determine what path I should use for the shebang line?

I tried #!/usr/bin/ruby1.9.3 but that doesn't exist.

Upvotes: 1

Views: 658

Answers (1)

mipadi
mipadi

Reputation: 410942

You can figure out where ruby is installed by running which ruby and using that path. Or, you can use

#!/usr/bin/env ruby

Upvotes: 2

Related Questions