这个是由于被墙了的原因,提供一个不用翻墙解决的方法

淘宝做了一个gem镜像,地址是http://ruby.taobao.org/ 

为什么有这个?

由于国内网络原因(你懂的),导致 rubygems.org 存放在 Amazon S3 上面的资源文件间歇性连接失败。所以你会与遇到 gem install rackbundle install的时候半天没有响应,具体可以用 gem install rails -V 来查看执行过程。

这是一个完整 rubygems.org 镜像,你可以用此代替官方版本,同步频率目前为15分钟一次以保证尽量与官方服务同步。

如何使用?
$ gem sources --remove https://rubygems.org/
$ gem sources -a https://ruby.taobao.org/
$ gem sources -l
*** CURRENT SOURCES *** https://ruby.taobao.org
# 请确保只有 ruby.taobao.org
$ gem install rails
如果你使用 Gemfile 和 Bundle (例如:Rails 项目)

你可以用bundle的gem源代码镜像命令

$ bundle config mirror.https://rubygems.org https://ruby.taobao.org

这样你不用改你的 Gemfile 的 source。

source 'https://rubygems.org/'
gem 'rails', '4.1.0'
...
$bundle install
Ruby 源代码镜像

Ruby 源代码下载镜像

本镜像来源于 cache.ruby-lang.org 用于改善国内 Ruby 安装的速度。

修改 RVM ,改用本站作为下载源, 提高安装速度。

FOR MAC
$ sed -i .bak 's!cache.ruby-lang.org/pub/ruby!ruby.taobao.org/mirrors/ruby!' $rvm_path/config/db
FOR LINUX
$ sed -i 's!cache.ruby-lang.org/pub/ruby!ruby.taobao.org/mirrors/ruby!' $rvm_path/config/db

.

bundle install rake-10.4.2的更多相关文章

  1. rake aborted! You have already activated rake 10.1.0, but your Gemfile requires rake 10.0.3. Using bundle exec may solve this.

    问题: wyy@wyy:~/moumentei-master$ rake db:createrake aborted!You have already activated rake 10.1.0, b ...

  2. 关于bundle install 的一点补充

    在第一次运行bundle install之后,生成了Gemfile.lock文件,里面记录gem的具体版本号,按照官方文档说明,以后运行bundle install就不会再依据Gemfile,而是根据 ...

  3. rake :You have already activated rake 10.1.0

    rake aborted! You have already activated rake 10.1.0, but your Gemfile requires rake 10.0.3. Using b ...

  4. [转载]提高rails new时bundle install运行速度

    最近在新建rails项目时,rails new老是卡在bundle install那里,少则五分钟,多则几十分.这是因为rails new时自动会运行bundle install,而bundle in ...

  5. 【RoR win32】提高rails new时bundle install运行速度

    在新建rails项目时,rails new老是卡在bundle install那里,少则五分钟,多则几十分.这是因为rails new时自动会运行bundle install,而bundle inst ...

  6. bundle install 出现 'gem install mysql2 -v '0.3.15' succeeds before bunding '

    bundle install 出现  'gem install mysql2 -v '0.3.15' succeeds before bunding ' 解决:sudo apt-get install ...

  7. install MariaDB 10.2 on Ubuntu 18

    Here are the commands to run to install MariaDB 10.2 from the MariaDB repository on your Ubuntu syst ...

  8. bundle install 安装的 gem 提示 cannot load such file

    /usr/local/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load ...

  9. bundle install 老是中断,可以在gemfile里面把source换成taobao源,可以自动安装

    bundle install 老是中断,可以在gemfile里面把source换成taobao源,可以自动安装

随机推荐

  1. 怎样用delphi关闭并重新启动 explorer.exe进程

    uses Tlhelp32; function KillTask(ExeFileName:string):integer; const PROCESS_TERMINATE = $0001; var C ...

  2. android 设置控件的颜色,字体

    1.用代码设置控件的颜色:    int b =  getResources().getColor(R.drawable.blue);//得到配置文件里的颜色    mButton.setTextCo ...

  3. poj -2010 Moo University - Financial Aid (优先队列)

    http://poj.org/problem?id=2010 "Moo U"大学有一种非常严格的入学考试(CSAT) ,每头小牛都会有一个得分.然而,"Moo U&quo ...

  4. PHP文件上传代码和逻辑详解

    文件上传的逐步完善------ [简单的上传:]   <form action="upload.php"  method="post"  enctype= ...

  5. tomcat下jndi的三种配置方式

    jndi(Java Naming and Directory Interface,Java命名和目录接口)是一组在Java应用中访问命名和目录服务的API.命名服务将名称和对象联系起来,使得我们可以用 ...

  6. QQ邮箱附件发送

    一.先造一个邮件发送的窗体 二.编辑邮件发送的代码(包括附件) ①附件添加对话框 string file; private void button6_Click(object sender, Even ...

  7. POJ 2369 Permutations

    傻逼图论. #include<iostream> #include<cstdio> #include<cstring> #include<algorithm& ...

  8. UVALive 5713 Qin Shi Huang's National Road System秦始皇修路(MST,最小瓶颈路)

    题意: 秦始皇要在n个城市之间修路,而徐福声可以用法术位秦始皇免费修1条路,每个城市还有人口数,现要求徐福声所修之路的两城市的人口数之和A尽量大,而使n个城市互通需要修的路长B尽量短,从而使得A/B最 ...

  9. 【英语】Bingo口语笔记(60) - 口语中的浊化发音

  10. C# Math.Round中国式的四舍五入法

    double dou = 1.255; //这种是错误的 double dou_result = Math.Round(dou, 2); //结果: 1.25 dou_result = Math.Ro ...