惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
A
About on SuperTechFans
IT之家
IT之家
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Blog — PlanetScale
Blog — PlanetScale
aimingoo的专栏
aimingoo的专栏
云风的 BLOG
云风的 BLOG
The GitHub Blog
The GitHub Blog
Vercel News
Vercel News
G
Google Developers Blog
J
Java Code Geeks
宝玉的分享
宝玉的分享
T
Tailwind CSS Blog
Cloudbric
Cloudbric
L
LINUX DO - 最新话题
MyScale Blog
MyScale Blog
H
Heimdal Security Blog
PCI Perspectives
PCI Perspectives
Attack and Defense Labs
Attack and Defense Labs
S
Security @ Cisco Blogs
Latest news
Latest news
I
Intezer
L
Lohrmann on Cybersecurity
C
CXSECURITY Database RSS Feed - CXSecurity.com
月光博客
月光博客
T
Threatpost
博客园 - 【当耐特】
S
Schneier on Security
P
Privacy International News Feed
G
GRAHAM CLULEY
T
Tenable Blog
AWS News Blog
AWS News Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
雷峰网
雷峰网
博客园 - Franky
Engineering at Meta
Engineering at Meta
美团技术团队
S
Secure Thoughts
T
Troy Hunt's Blog
Microsoft Security Blog
Microsoft Security Blog
SecWiki News
SecWiki News
V
Visual Studio Blog
人人都是产品经理
人人都是产品经理
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Cisco Talos Blog
Cisco Talos Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Martin Fowler
Martin Fowler
Webroot Blog
Webroot Blog
Google DeepMind News
Google DeepMind News
H
Hackread – Cybersecurity News, Data Breaches, AI and More

Vagrant

2022 年还有开发者/公司在用 Vagrant 吗 - V2EX 真的有用 vagrant 的老哥吗? 说说干了啥? - V2EX Vagrant 官网上的老旧镜像,试了好几个都下载不了呀 - V2EX Vagrant 是否有可能使用局域网里的另外一台 Linux 服务器来作为 provider 运行虚拟机呢? - V2EX ubuntu/bionic64 镜像的问题 - V2EX 一直用 mamp 对 vagrant 不了解,现在学习安装.想找个师傅教教..有红包 - V2EX vagrant 打包 box 文件很大是什么原因? - V2EX 有人知道 Vagrant 运行 PHP 特别慢的原因吗? - V2EX vagrant 问题 - V2EX 请教一下 vagrant laravel Homestead 怎么切换 PHP 版本呀? - V2EX 求指导, vagrant 命令必须加虚拟机 ID 怎么破? - V2EX 使用 vagrant 如何创建一个名称为 ubuntu 的 box, 而不是默认的 default? - V2EX 帮忙下载一下 vagrant box 的镜像 - V2EX 镜像 atlas.hashicorp.com 上的 box 有没有搞头? - V2EX vagrant 修改 synced_folder 中文件的归属 - V2EX 安装 vagrant 后,无法修改 virtualbox 网络配置。 - V2EX Vagrant 在提供者使用 docker 的时候,修改 vagrantfile 如何更新 docker container? - V2EX vagrant 的共享目录是单向的吗? - V2EX 一图流 对比 Docker vs. Vagrant - V2EX vagrant up 时一直停在 ssh auth method: private key - V2EX vagrant 下通过部署了 nginx 的 web 目录,当 windows 下共享该目录时, web 目录会失效? - V2EX 这算是下载 VagrantBox 比较好的思路了(毕竟撰写官方指南的人又不知道中国的网络情况, 反正从官方在线即时下载这种方式,我是放弃了的) - V2EX VagrantBox 有比较好的国内下载源吗(挂 SS 下载国外的官网还是镜像站都很慢,经常断掉, Google 国内镜像站,没有理想结果, 有民间分享的?) (常用的即可,如 Ubuntu 的) (我已经放弃从官网下载的念头了) - V2EX vagrant 搭建的虚拟机下访问外网十分缓慢,求大神分析? - V2EX 帮忙下载个 VagrantBox,网路太烂了 - V2EX vagrant 映射外部端口后访问显示"protocol mismatch"是哪里出了问题 - V2EX Vagrant 虚拟机中的 ubuntu14.04 如何重新启动? - V2EX default: Warning: Connection timeout. Retrying... - V2EX 问一个关于 vagrant 的问题,求各位解答. - V2EX vagrant 下 flask 运行后本地不能打开 - V2EX 俺也作了个 Vagrant 脚本,用来自动初始化出一个装好了 Apache (With SSL) + PHP (With XDebug) + PostgreSQL + Memcached 的虚拟机。 - V2EX 请教一下 vagrant 创建的虚拟机中 dns 解析异常的问题 - V2EX 国内 vagrant box 下载源推荐? - V2EX 有什么办法可以让 vagrant up 生成的虚拟机目录名称有意义一些呢? - V2EX vagrant 主机关闭后,global-status 显示状态怎么还是 running? - V2EX Vagrant 对部署在阿里云的项目有什么帮助 - V2EX vagrant up 报错,不得已来此请教。 - V2EX vagrant 可以建快照吗? - V2EX Vagrant 1.7 新功能, vagrant push 部署代码 - V2EX vagrant 上搭建的开发环境怎么又不见了? - V2EX 才接触 vagrant,请问有什么办法我能将当前 vagrant 虚拟机的状态‘锁’住,以便以后恢复到该状态吗? - V2EX Vagrant 作为测试服务器,网页加载时间增加了 5s 以上 - V2EX vagrant up 报错请帮忙 - V2EX 大家会考虑用 CoreOS 吗? - V2EX Vagrant 在团队里应该怎么用? - V2EX 请教关于 Vagrant 出现重复镜像的问题 - V2EX 你们是怎么把 vrgant cloud 上的 box 下载到本地来的 - V2EX 关于 Vagrantfile 使用的一个小建议 - V2EX 用 btsync 代替 vboxsf - V2EX
那么,为什么用为什么这样启动在 PuPHPet 构建的 vagrant 虚拟机,然后失败了? - V2EX
raincious · 2015-04-18 · via Vagrant

好吧,已经知道Ruby的rubygems.org在大陆很慢很慢很慢了,所以替换成了淘宝家的ruby.taobao.org。

具体就是在puphpet/shell/install-ruby.sh里,修改原先的:

if [[ -f /.puphpet-stuff/install-ruby-1.9.3-p551 ]]; then
    exit 0
fi

if [[ -f /.puphpet-stuff/install-ruby-1.9.3-p551 ]]; then
    gem sources --remove https://rubygems.org/

    gem sources -a https://ruby.taobao.org/

    exit 0
fi

为了安全,我还在

/usr/local/rvm/bin/rvm cleanup all

下面加上了

gem sources --remove https://rubygems.org/

gem sources -a https://ruby.taobao.org/

但是他们看起来并没有被执行。

然后我就欢快的vagrant up了,box下载过程很顺利(事实上我两个box的下载都很顺利,但都up不起来,包括这个:(

具体提示的问题如下:

==> default: stdin: is not a tty
==> default: https://rubygems.org/ removed from sources
==> default: https://ruby.taobao.org/ added to sources
==> default: Running provisioner: shell...
default: Running: /tmp/vagrant-shell20150418-18582-urskzp.sh
==> default: stdin: is not a tty
==> default: ERROR: Could not find a valid gem 'deep_merge' (>= 0), here is why:
==> default: Unable to download data from https://ruby.taobao.org/ - no such name (https://ruby.taobao.org/specs.4.8.gz)
==> default: ERROR: Could not find a valid gem 'activesupport' (>= 0), here is why:
==> default: Unable to download data from https://ruby.taobao.org/ - no such name (https://ruby.taobao.org/specs.4.8.gz)
==> default: ERROR: Could not find a valid gem 'vine' (>= 0), here is why:
==> default: Unable to download data from https://ruby.taobao.org/ - no such name (https://ruby.taobao.org/specs.4.8.gz)
==> default: Running provisioner: puppet...
==> default: Running Puppet with site.pp...
==> default: stdin: is not a tty
==> default: Info: Loading facts in /tmp/vagrant-puppet/modules-0dbc21df9f28d2dcc14f24b7bc2688e7/concat/lib/facter/concat_basedir.rb

后面不用看了……而且大家也都知道如果Ruby这套装不好的话,虚拟机里是什么都没有的。

然后我vagrant ssh进了虚拟机,gem source -l看了下,虚拟机里的还是rubygems.org的源。

然后:
- 操作系统Fedora 21,虚拟机是 puphpet/ubuntu1404-x64
- 虚拟机启动之后,网路是通的,我能用ssh进去wget。
- 我换成了rubygems.org(也就是不改)之后,出现了一样的错误
- Ruby 版本 1.9.3-p551
- VirtualBox 4.3.26 r98988

那么问题来了,为什么会这样且如何正确安装它呢?