Ruby on Rails的:如何自动启动WEBrick服务器在Windows上的背景是什么? [英] Ruby on Rails: How to start the WEBrick server automatically on Windows in background?
问题描述
为了运行在Windows XP上我的Rails应用程序我打开命令行,cd到应用程序的目录,然后运行护栏服务器
。
In order to run the my Rails application on Windows XP I open a command line, cd to application's directory, and then run rails server
.
我想自动化这个,这样每次我打开我的电脑时,所有我需要做的就是键入本地主机:在浏览器3000
。
I would like to automate this, such that every time I turn on my computer, all I'll have to do is to type localhost:3000
in a browser.
我怎么能这样做呢?
推荐答案
在简单的方法是创建你给的命令提示符下什么样的
The simpler way is to create a batch file with the instruction what you give in the command prompt like
D:
光盘项目\\ MyApp的
cd projects\myapp
Ruby脚本\\服务器
ruby script\server
然后删除该文件的副本到Windows开始 - >所有程序 - >启动文件夹
and then drop a copy of the file to Windows Start -> All Programs -> start up folder.
这篇关于Ruby on Rails的:如何自动启动WEBrick服务器在Windows上的背景是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!