问题
Im trying to integrate prosody xmpp server with my rails application. I need to create some users in a database upon registration so I can lateron use them inside the prosody server.
What would be the best way to run shell commands in rails and output any info logs ?
prosodyctl adduser User.username
回答1:
i usually run with system(command)
,or with backtick command
,other way you can refer here
来源:https://stackoverflow.com/questions/12299231/execute-shell-script-from-ruby-on-rails-with-passing-variable