Search code examples
ruby-on-railsmacosboot

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?

I followed the answer of that link until the need to create start.sh

Don't know how to put rails s in start.sh properly

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)

Help need or any other solution. I also tried the passenger but already out dated no longer support in this El Capitan

Thanks


Solution

  • I tried both answers.

    1. Using pow server would cost me for their tools to let public access my server.

    2. The $PATH could be my problem. 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