rake db:migrate 与 bundle exec rake db:migrate 的区别(copy)
【说明:资料来自http://blog.csdn.net/lihuan974683978/article/details/8715414】
之前一直没弄明白rake db:migrate 与 bundle exec rake db:migrate有区别,用的过程中也没出意外。最近无意中弄明白了现在也说下吧:
rake db:migrate 其实 rake 本身是就是一个gem; 所以你可能有多个项目,用到了相同的gem,但版本不同。哪怎么确定每个项目使用的是哪个版本呢?
哪就要用到 bundle 了。
哪么bundle 是什么呢?
bundle其实是一种管理 项目中gems的工具。每个项目所要使用的gem版本信息都在Gemfile文件中有体现。但如果你直接使用rake 命令时,默认是使用系统中最新的rake 而不是项目中使用的版本,这样就可能会出错。哪执行 bundle exec 这个命令就会去寻找项目中的版 本来使用。
rake db:migrate 与 bundle exec rake db:migrate 的区别(copy)的更多相关文章
- 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 ...
- java.util.MissingResourceException: Can't find resource for bundle oracle.sysman.db.rsc.LoginResourc
http://blog.itpub.net/197458/viewspace-1055358/ oracle 10.2.0.4 windows 2003 X64 平台 系统安装EMCA正常.第一次 ...
- Mongo DB Study: first face with mongo DB
Mongo DB Study: first face with mongo DB 1. study methods: 1. Translate: I am the mongo DB organiz ...
- Rails 4.0 bundle exec rspec spec/requests/xxx 测试失败的解决
rails项目没有使用默认的单元测试包,而是使用了rspec-rails来测试. 按照文档说明首先生成对应的测试文件: rails generate integration_test xxx invo ...
- Redis 配置连接池,redisTemplate 操作多个db数据库,切换多个db,解决JedisConnectionFactory的设置连接方法过时问题。(转)
环境 springmvc jdk1.8 maven redis.properties配置文件 #redis setting redis.host=localhost redis.port=6379 r ...
- 正则表达式中的exec和match方法的区别
正则表达式中的exec和match方法的区别 字符串的正则方法有:match().replace().search().split() 正则对象的方法有:exec().test() 1.match m ...
- Rails--bundle exec rake db:migrate
--新建表: def up create_table :[TABLE_NAME] do |t| t.column :[NUM], :integer t.column :[NAME], :string ...
- 浅析数据库(DB)、操作数据存储(ODS)和数据仓库(DW)的区别与联系
文章背景: 相信大部分刚接触上面三个概念的同学,都多多少少会有些迷惑,现在我就给大家简单分析下这三者的关系,希望大家对这三者的概念理解有所帮助吧. 本文主要从下面两类关系来叙述上面三者的关系: 数据库 ...
- sql存储过程exec执行字符串select 的区别
USE [GuangHong]GO/****** Object: StoredProcedure [dbo].[st_MES_SelInspctDetail] Script Date: 11/23/2 ...
随机推荐
- 跳石头(codevs 4768)
题目描述 Description 一年一度的“跳石头”比赛又要开始了! 这项比赛将在一条笔直的河道中进行,河道中分布着一些巨大岩石.组委会已经选择好了两块岩石作为比赛起点和终点.在起点和终点之间,有N ...
- Java重写equals方法和hashCode方法
package com.ddy; public class User { private Integer id; private String name; private St ...
- 禁用Bootstrap点击空白,modal自动关闭
手动触发modal: $('#myModal').modal(): 禁用点击空白,modal自动关闭:$('#myModal').modal({backdrop: 'static', ke ...
- DTRACE FOR MYSQL PHP
Using DTrace to troubleshoot Apache DTrace for MySQL , Inspecting MySQL with DTrace , MySQL DTrace P ...
- ZXing 二维码解析生成工具类
原文:http://www.open-open.com/code/view/1455848023292 import com.google.zxing.*; import com.google.zxi ...
- Linux集群的总结和思考
前言:在涉及到对外项目,经手许多小中型网站的架构,F5.LVS及Nginx都比较多,我想一种比较通俗易懂的语气跟大家说明下何谓负载均衡,何谓Linux集群,帮助大家走出这个误区,真正意义上来理解它们. ...
- [TypeScript] Query Properties with keyof and Lookup Types in TypeScript
The keyof operator produces a union type of all known, public property names of a given type. You ca ...
- springMVC4(16)拦截器解析与登陆拦截模拟
在SpringMVC中,我们会常常使用到拦截器,尽管SpringAOP也能帮我们实现强大的拦截器功能,但在Web资源供给上.却没有SpringMVC来得方便快捷. 使用SpringMVC拦截器的核心应 ...
- ZOJ 3632 Watermelon Full of Water (线段树 区间更新 + dp)
题目大意: 让每天都能吃到西瓜. 最少须要花多少钱. 思路分析: dp[pos] 就表示 要让 前i天每天都有西瓜吃.最少须要花多少钱. 那么假设你买这个西瓜的话. 那么这个西瓜能吃的持续时间都要更 ...
- 【转载】TCP和TCP/IP的区别
TCP/IP协议(Transmission Control Protocol/Internet Protocol)叫做传输控制/网际协议, 又叫网络通讯协议,这个协议是Internet国际互联网络的基 ...