Installing ruby on smartos plus
Question
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!
Solution
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.
OTHER TIPS
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>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow