![](/img/trans.png)
[英]How can I pull in the Rails action or controller names into my Ruby Gem for use in a log file?
[英]How can I use a Ruby Gem file local to my project as opposed to a gem installed on the system?
我的系統上安裝了SASS gem(v3.3.8),但是我有一個需要v3.2.19的項目。 我還遇到了這樣一個情況,即在存在v3.2.19的系統上存在沖突(如果安裝了任何較舊版本的gem,Codekit將不會編譯SASS)。
我使用Bundler在項目本地的文件夾中安裝了所需gem的副本:
my_project/src/vendor/bundle/ruby/...
如何強制我的項目使用本地文件夾中的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.