简体   繁体   English

在服务器上运行Ruby on Rails应用

[英]Running Ruby on Rails app on server

I am using Aptana Studio 3 for development of ROR apps. 我正在使用Aptana Studio 3进行ROR应用程序的开发。 I used run server command and it showed you can access your app on {http//0.0.0.0:3000/}, but when I try to access this URL, it tells me to check your Internet connection. 我使用了运行服务器命令,它显示您可以在{http // 0.0.0.0:3000 /}上访问您的应用程序,但是当我尝试访问此URL时,它告诉我检查您的Internet连接。 I tried several other ports also but it is not working. 我也尝试了其他几个端口,但是它不起作用。 I have created/modified the files necessary and migrated the database successfully too. 我已经创建/修改了必要的文件,并且也成功地迁移了数据库。 Appreciate any help in running the app over the browser. 感谢通过浏览器运行应用程序的任何帮助。 I am currently using WeBrick Server. 我目前正在使用WeBrick服务器。

so, in your title you say "on server". 因此,您在标题中说“在服务器上”。 what does that mean? 这意味着什么? when you are running it on a different machine than your own, you need to use the address of that machine or it's domain name. 当您在不同于自己的计算机上运行该计算机时,需要使用该计算机的地址或域名。 keep in mind that firewall rules might prevent any connection to that server. 请记住,防火墙规则可能会阻止与该服务器的任何连接。

when you are ON the machine, via ssh for example, you can try calling the then "local" rails instance with curl http://localhost:3000/ to verify that it is running. 当您在计算机上时,例如通过ssh,您可以尝试使用curl http://localhost:3000/调用当时的“本地” rails实例,以验证其是否正在运行。

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

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