[英]How can I use a Ruby Gem file local to my project as opposed to a gem installed on the system?
I have the SASS gem installed on my system (v3.3.8), but I have a project that requires v3.2.19). 我的系统上安装了SASS gem(v3.3.8),但是我有一个需要v3.2.19的项目。 I also have a situation where there is a conflict on the system with v3.2.19 exsiting (Codekit won't compile SASS if any older versions of a gem are installed). 我还遇到了这样一个情况,即在存在v3.2.19的系统上存在冲突(如果安装了任何较旧版本的gem,Codekit将不会编译SASS)。
I used Bundler to install a copy of the required gems in a folder local to my project: 我使用Bundler在项目本地的文件夹中安装了所需gem的副本:
my_project/src/vendor/bundle/ruby/...
How can I force my project to use the ruby gems in the local folder for my grunt tasks, instead of those installed globally on my system? 如何强制我的项目使用本地文件夹中的ruby gem来执行我的grunt任务,而不是将它们全局安装在系统上?
# A sample Gemfile
source "https://rubygems.org"
gem 'autoprefixer-rails', ">=1.2.0.20140609"
gem 'breakpoint', ">=2.0.7"
gem 'compass', ">=0.12.6"
gem 'sass', ">=3.2.19"
gem 'singularitygs', ">=1.1.2"
bundle exec
是正确的命令。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.