我正在使用Mina将Rails应用程序部署到我的服务器。一切正常,但我也希望能够在部署时自动启动Rails服务器。在:launch内部,我运行rails s命令,但是在部署时遇到错误,提示“ rails:command not found!”。错误:部署失败。'
on :launch do
in_path(fetch(:current_path)) do
command %{mkdir -p tmp/}
command %{touch tmp/restart.txt}
command %{rails s -p myport -b myserver -e production -d}
end
end
我如何获得Mina来自动启动服务器?
答案 0 :(得分:0)
您是否在服务器上安装了滑轨? 您是否使用rvm或rbenv设置ruby?正确安装后,您需要 请遵循以下指南:https://github.com/mina-deploy/mina/blob/master/docs/getting_started.md。然后运行以下命令
mina setup
内部:on :launch do
in_path(fetch(:current_path)) do
invoke :'puma:start'
end
end
它将自动启动您的应用。