Deploy ROR application to a machine without intern

2019-06-24 14:09发布

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?

2条回答
爱情/是我丢掉的垃圾
2楼-- · 2019-06-24 14:35

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.

查看更多
一纸荒年 Trace。
3楼-- · 2019-06-24 14:57

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.

查看更多
登录 后发表回答