问题描述
我安装了两个gem版本的基础框架。
我想在创建项目之前指定框架的版本。
i have two gem versions of foundation framework installed.i want to specify version of framework before create project.
compass create <project-name> -r zurb-foundation --using foundation
我现在只能使用当前框架版本创建。
i can create only with current framework version now.
推荐答案
您可以运行多个版本的Foundation。
You can run multiple versions of foundation. There is some documentation on how to do that at:
在运行多个版本下
我想拥有Foundation 3的最新版本以及最新版本的Foundation3。您可以在此处查看可用的版本:
I wanted to have the latest version of Foundation 3 as well as the most current version of 4. You can check the available versions here:
我看到3.2.5是最新版本。您可以通过运行gem来安装它。
I saw that 3.2.5 was the latest version. You can install it by running gem.
gem install zurb-foundation --version 3.2.5
现在,如果您运行宝石列表
您将看到一些内容例如 zurb-foundation(4.0.3,4.0.2,3.2.5)
you will see something like zurb-foundation (4.0.3, 4.0.2, 3.2.5)
at the end
现在,如果您运行罗盘,它将自动使用最新版本,因此我们将需要使用捆绑器。创建新目录并创建Gemfile。
Now, if you run compass it will automatically use the latest version so we will need to use bundler instead. Create a new directory and create a Gemfile.
mkdir myApp
cd myApp
touch Gemfile
然后使用您选择的编辑器编辑Gemfile,如下所示:
then edit the Gemfile with your editor of choice so it looks like this:
source "https://rubygems.org"
# Replace 4.0.3 with the version of Foundation you want to use
gem "zurb-foundation", "3.2.5"
gem "compass"
然后运行捆绑程序exec罗盘:
then run bundler to exec compass:
捆绑exec罗盘create。 -r zurb-foundation --using foundation
这将像指南针一样构建所有内容,但是使用您指定的特定版本。
this will build out everything just as compass does normally, but with the specific version you specify.
这篇关于如何在罗盘创建中指定框架版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!