问题
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