简体   繁体   English

在El Capitan中启动时的引导导轨

[英]Boot rails when start up in El Capitan

This is the question extended from the same Title here automatic rails app startup on server boot? 这是从同一标题扩展的问题,这里在服务器启动时自动启动Rails应用程序?

I followed the answer of that link until the need to create start.sh 我遵循了该链接的答案,直到需要创建start.sh为止

Don't know how to put rails s in start.sh properly 不知道如何将rails正确地放入start.sh

I tried 我试过了

cd /Users/MyUser/myapp
rails s

or 要么

/Users/MyUser/myapp/ rails s

After rebooted nothing happened (as expected to be able to brows localhost:3000) 重新启动后,没有任何反应(预期能够浏览localhost:3000)

Help need or any other solution. 帮助需要或任何其他解决方案。 I also tried the passenger but already out dated no longer support in this El Capitan 我也尝试过乘客,但已经过时了,不再支持El Capitan

Thanks 谢谢

确保脚本的$ PATH环境变量中提供了正确的版本(如果是Ruby)和相关的gems。

在Mac OS上,您可以使用电源服务器

I tried both answers. 我尝试了两个答案。

  1. Using pow server would cost me for their tools to let public access my server. 使用pow服务器会花费我大量时间才能使用他们的工具,让公众访问我的服务器。

  2. The $PATH could be my problem. $ PATH可能是我的问题。 However if I login and run script it work. 但是,如果我登录并运行脚本,它将起作用。

  3. I found an alternative solution which related Q with login my account and then set my Mac to auto login using Running script upon login mac 我找到了另一种解决方案,该解决方案将Q与登录我的帐户相关联,然后将Mac设置为在登录mac时使用运行脚本自动登录

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM