Deploy ROR application to a machine without internet access

ε祈祈猫儿з 提交于 2019-12-23 15:15:27

问题


I complete a simple Ror hello world application. The problem for me now is how i can deploy it another Window machine which is physically off to the Internet. I can copy files and application by USB. But how can i install gem to that machine? Does anyone have similar experience?


回答1:


You can do bundle package to package the gems (in a machine with internet) and copy over.

You can then install local gems using bundler:

bundle install --local

Not that you could get bundle gem itself by doing:

gem install --local bundle.gem

where bundle.gem is obtained using gem fetch bundler.




回答2:


If you're talking about your application's dependencies, take a look at the bundle package command, which will download all of the dependencies to ./vendor/cache. You can then copy the vendor along with your application and Bundler will it instead of fetching the gems off the internet.



来源:https://stackoverflow.com/questions/27909232/deploy-ror-application-to-a-machine-without-internet-access

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!