0

我正在通过http://gettingstartedwithdjango.com/en/lessons/introduction-and-launch/上的视频教程工作

我正在开发 win7 并为我的终端使用 git-bash。我已经安装了最新的 virtualbox - 4.2.12 和最新的 vagrant - 1.22。

我尝试运行 vagrant 并得到:错误:无法构建 gem 原生扩展。

          /usr/bin/ruby1.8 extconf.rb
  creating Makefile      

  make
  sh: 1: make: not found    

jtimberman 给出的答案之一是:

The basebox you're using does not have the "build-essential" package installed by default, and it has a "[shell provisioner][1]" that installs the Chef gem into the default Ruby environment. Chef has a dependency on the JSON RubyGem, which itself has C extensions that must be compiled. This is what is looking for `make`.    
To resolve this issue, I'd recommend using Opscode's "omnibus" [full stack installer for Chef][2]. This can be used by changing the shell provisioner line to:    
    config.vm.provision :shell, :inline => "curl -L https://opscode.com/chef/install.sh | bash"    
The `[install.sh][3]` script simply inspects the VM to determine what its platform is so it can retrieve the proper URL from an S3 bucket. If you prefer you can use the constructed URL to download the .deb file directly:

https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/11.04/x86_64/chef_11.4.4-2.ubuntu.11.04_amd64.deb

And then install it:

dpkg -i chef_11.4.4-2.ubuntu.11.04_amd64.deb

我无法使第一种方法起作用,并想尝试第二种方法。将:

 dpkg -i chef_11.4.4-2.ubuntu.11.04_amd64.deb 

在win7上工作。如果不是,我如何让它在 Windows 中工作?

4

2 回答 2

0

塞斯瓦戈的补充。除了 Ruby DevKit,您还需要本地软件的客户端库。例如,为了编译/安装 ruby​​-oci8 gem,您还应该在您的计算机上安装 Oracle 客户端。

于 2014-01-20T03:42:27.397 回答
0

为了在 Windows 中编译本机扩展,您必须安装Ruby DevKit。Joshua 的回答对基于 Debian 的系统有效。

于 2013-12-31T23:40:19.927 回答