Reputation: 1338
I'm investigating using Ruby on rails to develop web apps. So far it does look like an extremely well thought out framework which ultimately takes a lot of laborious tasks out of the development process. However I have a doubt:
I can only seem to get to see the ROR web app in development when I am developing on PC 'A' and visiting localhost:3000 from PC 'A'. However, I want to host my web app on a Raspberry Pi web server which is always on in my home. Therefore I see 2 possible options:
1) Develop the web app on PC 'A' then copy the ROR web app into the /var/www directory of the Raspberry Pi web server (with a standard Apache2 config) -> Will this work? For a ROR web app to work must you use the rails web server?
2) Develop directly on the Raspberry Pi using a remote connection from PC 'A' -> This doesn't seem to be so easy. I have installed the necessary software on the Raspberry Pi and configured my router to forward any requests received on port 3000 to the Raspberry Pi server on port 3000. Even so when I access my external IP on port 3000, there is an error saying that the external IP cannot be accessed.
Can anybody give me any advise?
Upvotes: 0
Views: 764
Reputation: 1338
Both suggestions and links from Neelp22:
There is a module for Apache called Phusion Passenger (a.k.a mod_rails) that will manage the back end for you.
Check out this existing SO thread for a really great description of how Passenger works and what it does.
...and from Rodrigo Zurek:
or deploy for free to heroku with this guide:
https://devcenter.heroku.com/articles/getting-started-with-rails4
...are valid. I'm not entirely sure that the complications around deploying a RoR web don't entirely negate the simplifie development process for me personally but thats probably due to the fact that I'm a hobbyist rather than a pro. Nonetheless, thanks for the tips.
Upvotes: 0
Reputation: 4575
You can watch this railscasts, it explains how to deploy to a vps:
vps:
https://www.youtube.com/watch?v=JV636bzlO_s
or deploy for free to heroku with this guide:
https://devcenter.heroku.com/articles/getting-started-with-rails4
Upvotes: 1
Reputation: 82
Of the two options, I think that the first would be significantly easier.
There is a module for Apache called Phusion Passenger (a.k.a mod_rails) that will manage the back end for you.
Check out this existing SO thread for a really great description of how Passenger works and what it does.
Upvotes: 1