i want to execute my ruby script as executable file and also i should execute at /usr/bin/ directory. I know it is possible like this.
#!/usr/bin/ruby
puts "hello"
And
chmod +x hello
But I also want to require some ruby file.
For example if I add
require './other_ruby_script'
into my codes and I move the Ruby executable file to /usr/bin/, it gives me error for:
cannot load such file 'other_ruby_script'
I want to execute the Ruby file at /usr/bin directory.
So maybe I should compile it? But I couldn't compile because i didn't understand when google searches "How to compile?".
How can i create executable ruby code as suitable format for my codes. (require './other_file'). And i don't have to execute like this ./hello my executable file. Just i should execute as hello