Back

rails - windows 附件 - 自启动 脚本 auto start with command line~

发布时间: 2017-10-06 07:44:00

1. this is the shortcut details for "start command line prompt with ruby" : 

先创建这个快捷方式:(可以参考安装好ruby之后自带的)

C:\Windows\System32\cmd.exe /E:ON /K d:\Ruby22-x64\bin\setrbvars.bat

设置基本路径

set the default location to your rails project folder, e.g.    d:\workspace\las_analyser 

2. open  d:\Ruby22-x64\bin\setrbvars.bat, 

REM Display Ruby version
ruby.exe -v

# add this line: 
bundle exec rails server

then double click the icon, rails will start as normal. 

3. 如果要带上名字的话,需要在快捷方式 -> 常规中,填写名字。例如:请不要关闭-这是皇后镇打印机驱动程序-保持后台运行

4. 对于win10, 这个“启动文件夹”不好找,可以直接 win + r ,  然后输入:

shell:startup

就可以打开启动文件夹了,然后把快捷方式复制进去就可以。

Back