How to make a ruby file executable
In the ruby file:
#!/usr/bin/env ruby
puts 'Hello world'At the command line:
chmod +x ruby.rbThen you can execute it like this:
./ruby.rbIn the ruby file:
#!/usr/bin/env ruby
puts 'Hello world'At the command line:
chmod +x ruby.rbThen you can execute it like this:
./ruby.rb