What does the above few lines do?
Version:
> Ruby: 1.9.2-p180
> Ruby on Rails: 2.3.5
/usr/bin/env is just a portable way to find the program specified in the first parameter in your environment. This is Ruby Interpreter. If the Ruby interpreter is in your PATH, env will find it and use the rest of the file as input to run it.
You may not have a program named ruby19 in your PATH, so you You will receive an error message. You have a program called ruby, so that works.
I couldn’t run it before./script/console because of my script console The file contains #! /usr/bin/env ruby19, so it used to throw an error. After clicking and trying out, I used #! /usr/bin/env rubyReplace#! /usr/bin/env ruby19 to fix this error.
What does the above few lines do?
Version:
> Ruby: 1.9.2-p180
> Ruby on Rails: 2.3.5
#! (hash bang) in the first line of the text file tells the program loader in most *nix systems to call the next specified program (/usr/bin/env in this case), and provide any params (in this In this case, ruby).
/usr/bin/env is just a portable way to find the program specified in the first parameter in your environment. This is Ruby Interpreter. If the Ruby interpreter is in your PATH, env will find it and use the rest of the file as input to run it.
You may not have a program named ruby19 in your PATH, so you You will receive an error message. You have a program called ruby, so that works.