我正在部署我的rails应用程序到引擎场。
到目前为止,我拥有的是: 1.创建SSH嘿2.将公钥安装到Engine应用程序中。3.ssh deploy@my.server.ip.address
我被安置在家里/部署处,这不是执行git拉的合适地方。
我需要以这种方式进行部署的原因是,我的应用程序使用的是nmatrix gem,需要使用c++编译器手动安装。自动绑定器在获取宝石时出错,并停止。
更新:我想我的问题应该是,如何将nmatrix安装到EngineYard。这是我从调用获得的错误消息:
Building native extensions. This could take a while...
ERROR: Error installing nmatrix:
ERROR: Failed to build gem native extension.
/usr/bin/ruby21 extconf.rb
checking for main() in -llapack... no
checking for main() in -lcblas... yes
checking for main() in -latlas... no
checking for clapack.h... no
checking for cblas.h... yes
checking for cblas.h... yes
checking for clapack_dgetrf() in cblas.h,clapack.h... no
checking for clapack_dgetri() in cblas.h,clapack.h... no
checking for dgesvd_() in clapack.h... no
checking for cblas_dgemm() in cblas.h... yes
using C++ standard... c++0x
g++ reports version... Hardened
creating nmatrix_config.h
creating Makefile
make "DESTDIR="
compiling nmatrix.cpp
In file included from nmatrix.cpp:331:0:
ruby_nmatrix.c: In function ‘VALUE nm_mset(int, VALUE*, VALUE)’:
ruby_nmatrix.c:1378:108: warning: format ‘%u’ expects type ‘unsigned int’, but argument 4 has type ‘size_t’
ruby_nmatrix.c: In function ‘VALUE nm_xslice(int, VALUE*, void* (*)(const STORAGE*, SLICE*), void (*)(NMATRIX*), VALUE)’:
ruby_nmatrix.c:1556:91: warning: format ‘%u’ expects type ‘unsigned int’, but argument 4 has type ‘size_t’
ruby_nmatrix.c: In function ‘SLICE* get_slice(size_t, int, VALUE*, size_t*)’:
ruby_nmatrix.c:1903:104: warning: format ‘%u’ expects type ‘unsigned int’, but argument 3 has type ‘size_t’
ruby_nmatrix.c:1903:104: warning: format ‘%u’ expects type ‘unsigned int’, but argument 4 has type ‘size_t’
compiling ruby_constants.cpp
compiling data/data.cpp
compiling util/io.cpp
compiling math.cpp
In file included from math.cpp:140:0:
math/rot.h: In function ‘void nm::math::rot(int, DType*, int, DType*, int, CSDType, CSDType) [with DType = nm::Complex<float>, CSDType = float]’:
math/rot.h:123:40: error: ‘cblas_csrot’ was not declared in this scope
math/rot.h: In function ‘void nm::math::rot(int, DType*, int, DType*, int, CSDType, CSDType) [with DType = nm::Complex<double>, CSDType = double]’:
math/rot.h:128:40: error: ‘cblas_zdrot’ was not declared in this scope
In file included from math.cpp:141:0:
math/rotg.h: In function ‘void nm::math::rotg(DType*, DType*, DType*, DType*) [with DType = nm::Complex<float>]’:
math/rotg.h:99:125: error: ‘cblas_crotg’ was not declared in this scope
math/rotg.h: In function ‘void nm::math::rotg(DType*, DType*, DType*, DType*) [with DType = nm::Complex<double>]’:
math/rotg.h:104:125: error: ‘cblas_zrotg’ was not declared in this scope
make: *** [math.o] Error 1
Gem files will remain installed in /home/deploy/.gem/ruby/2.1.0/gems/nmatrix-0.0.9 for inspection.
Results logged to /home/deploy/.gem/ruby/2.1.0/gems/nmatrix-0.0.9/ext/nmatrix/gem_make.out安装nmatrix的先决条件之一是让gcc > v4.7,但是EngineYard只有v4.5.4。有人知道如何升级gcc吗?我想我在运行Gentoo。
发布于 2014-05-27 18:55:52
这个问题应该包括你想要拉的东西。
当您在ssh中时,您将被放入/ home /deploy (这是您的主目录)。
应用程序的Git副本位于app上的/data/APPNAME/shared/cache-copy/中
您可以在一个实例上拥有多个应用程序,每个应用程序都可以有不同的部署密钥,因此您可以使用GIT_SSH包装器。
GIT_SSH=/data/APPNAME/shared/config/pulse-ssh-wrapper git pull(在上述所有命令中,请记住将APPNAME替换为应用程序的名称)
如果您想要找到捆绑的宝石的实际位置,可以查看
/data/APPNAME/shared/bundled_gems/ruby/2.0.0/gems (版本将取决于Ruby )
如果您的Gemfile使用:git,请记住,只有一个部署键可以用于应用程序克隆和绑定阶段,您不能在每个gem中选择不同的键。
最有可能的问题是安装nmatrix gem的问题是ATLAS库尚未安装,而这些库将与系统的包管理器一起安装(针对Gentoo和Apt用于Ubuntu)。您可以通过用户界面上的“编辑Unix软件包”添加它们,只需选择sci-libs/blas-atlas和sci-libs/lapack atlas。目前,这将失败,因为EC2实例是Xeon处理器,库还没有在这些基础上构建。
您可以在Linux实例上看到带有"cat /proc/cpuinfo“的CPU类型,并将看到以下内容
model name :Intel(R) Xeon(R) CPU E5-2650 0 @ 2.00GHzhttps://stackoverflow.com/questions/23888319
复制相似问题