2016-03-07 64 views

回答

0

我希望你熟悉rvm,并且必须使用它。 如果你想运行一个特定的项目。转到您的项目目录并点击rails s

如果您想一次运行多个项目的服务器,则还要让端口也运行服务器。 e.g:

rails s -p 3001 
rails s -p 3002 
0

在终端找到您的项目

$ cd projects_folder 
$ cd project_A 
$ rails s 

的文件夹中,您将看到此消息

=> Booting Thin 
=> Rails 4.2.5 application starting in development on http://localhost:3000 
=> Run `rails server -h` for more startup options 
=> Ctrl-C to shutdown server 
Thin web server (v1.6.4 codename Gob Bluth) 
Maximum connections set to 1024 
Listening on localhost:3000, CTRL+C to stop 

最小化你在你喜欢的浏览器端和开放http://localhost:3000

当你想改变项目的最大终端和

按CTRL + C停止进程

找到在其他文件夹中

$ cd .. 
$ cd project_B 
$ rails s 

我建议你阅读this to learn how to navigate in terminal