1

So ive got a smartos 64 plus machine (joyent)

It DIDN'T have rails installed as i got a

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

Error trying to run a rails app (via rails s)

So I installed rails via

sudo gem install rails

And i got an error:

make: gcc: Command not found

It also said (when i tried to download the source and compile manually)

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

Btw i also tried the smartos packager

pkgin in ruby19-rails-3.0.9

Im a bit confused because the SmartOS plus version is supposed to have most of this preinstalled!

Tarang
  • 75,157
  • 39
  • 215
  • 276

2 Answers2

3

To allow Ruby Gems to build native binary packages you will need to install GCC and Make. It seems like GCC is not on the machine by default.

pkgin install gcc47 gmake

gem install <your gem>
xer0x
  • 12,970
  • 5
  • 32
  • 29
2

looks like you might have to do the gcc manually. This post has some information about it. pkgin install gcc-compiler gcc-runtime gcc-tools-0 is the command they suggest.

ScottJShea
  • 7,041
  • 11
  • 44
  • 67
  • just realized when i did gcc-v – Tarang Feb 25 '12 at 17:57
  • The notes for smartos in their wiki mention gcc being in /usr/sfw/bin, so i checked there and didnt find it! – Tarang Feb 25 '12 at 17:57
  • Interesting... I have not been into SmartOS yet but have been considering it so your question kind of niggled my brain a bit which was why I jumped in. At work the VMs I get are a Linux flavor that are supposed to have gcc by default but for some reason it is not on the VM – ScottJShea Feb 25 '12 at 18:00