1

所以我得到了 smartos 64 plus 机器(joyent)

它没有安装导轨,因为我有一个

Could not find gem 'rdoc (~> 3.4)', required by 'rails (= 3.0.9)', in any of the sources

尝试运行 rails 应用程序时出错(通过 rails s)

所以我通过

sudo gem install rails

我得到了一个错误:

make: gcc: Command not found

它还说(当我尝试下载源代码并手动编译时)

checking build system type... i386-pc-solaris2.11
checking host system type... i386-pc-solaris2.11
checking target system type... i386-pc-solaris2.11
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/apps/ruby-1.9.3-p125':
configure: error: no acceptable C compiler found in $PATH

顺便说一句,我也尝试了 smartos 打包器

pkgin in ruby19-rails-3.0.9

我有点困惑,因为 SmartOS plus 版本应该预装了大部分内容!

4

2 回答 2

3

要允许 Ruby Gems 构建本地二进制包,您需要安装 GCC 和 Make。默认情况下,GCC 似乎不在机器上。

pkgin install gcc47 gmake

gem install <your gem>
于 2012-10-16T21:13:53.983 回答
2

看起来您可能必须手动执行 gcc。这篇文章有一些关于它的信息。pkgin install gcc-compiler gcc-runtime gcc-tools-0是他们建议的命令。

于 2012-02-25T17:56:30.057 回答