[英]Starting a rails server in Rails 3
I have created a new rails project with the command: 我用命令创建了一个新的rails项目:
rails project_name
but now in that project if I run: 但是现在在那个项目中如果我跑:
rails server
I just creates a new project call server, it doesn't start webrick. 我只是创建了一个新的项目调用服务器,它没有启动webrick。
How do I start the server and get rails running? 如何启动服务器并运行rails?
You're mixing Rails 2 and Rails 3 commands. 你正在混合Rails 2和Rails 3命令。 By the looks of it, you're using Rails 2, which means starting the server would be
script/server
, not rails server
从它的外观来看,你正在使用Rails 2,这意味着启动服务器将是
script/server
,而不是rails server
Step by Step rails server Installation : Step by Step rails服务器安装:
yeah, nothing to do more... :) 是的,没什么可做的...... :)
I had this problem on Ubuntu and found that I had rails 3 installed with gem and rails 2 installed with apt. 我在Ubuntu上遇到这个问题,发现我安装了带有gem的rails 3和使用apt安装的rails 2。 Removing the apt version solved the issue:
删除apt版本解决了这个问题:
sudo apt-get remove rails
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.