You can put them in a Gemfile and use bundler ( bundle install ).
Alternatively, you can specify the commands in the file:
gem install pg gem install sqlite3
and use something like cat <filename> | xargs sudo cat <filename> | xargs sudo to execute them.
** Consider using RVM to manage your gems in a gemset, rather than installing them globally with sudo.
DanS
source share