问题描述
我想通过下载任何所需的文件并将它们带到另一台没有互联网连接的机器来安装指南针。我已经下载了指南针的源码包,当我在未连接的机器上运行gem时,它抱怨缺少依赖关系。任何解决方案?
这正是我遇到的问题。
搜索了一段时间后,使用Bundler工作的解决方案
- 创建一个名为Gemfile的文件夹。
- 编写一个源文件和您想要将依赖文件保存到的文件
- Bsp:
- 在此文件夹中打开命令行执行:捆绑安装 >这应该下载并安装所有Dependencys
- 执行命令捆绑列表如果您想查看它
- 执行命令捆绑软件包
- Thi应该创建目录结构供应商/缓存
- 缓存内部目录现在是您需要的所有Dependencys您的宝石
在没有互联网连接的机器上安装Gem:
I want to install compass by downloading any required file and taking them to another machine without internet connection. I have downloaded the source package for compass and when I run gem on it in the non connected machine it complains about missing dependencies. Any solution?
Thats exactly the problem I had.
After searching around a while I found a Solution who works using Bundler http://gembundler.com/
Getting Gem with Dependencies:
- Create a new Folder with a File named Gemfile in it.
- Write a Source and the Gem you want to have the dependencys for into the File
- Bsp:
- Open a Commandline at this Folder an Execute: bundle install
- This should download and install all Dependencys
- Execute the Command bundle list if you wanna see it
- Execute the Command bundle package
- This should create the Directory Structure vendor/cache
- Inside the cache Directory are now all the Dependencys you need for your gem
Install Gem on Machine without internet connection:
- Copy the cache Folder to the Machine
- Open a Commandline inside the Cache Folder and execute gem install --local Gemname.gem
- Bsp:
这篇关于下载所有宝石依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!