# sudo gem install rails
Building native extensions. This could take a while...
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from extconf.rb:1:in `<main>'
# ruby -v
ruby 1.9.3p385 (2013-02-06 revision 39114) [x86_64-linux]
# sudo apt-get install ruby1.9.1-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
ruby1.9.1-dev
0 upgraded, 1 newly installed, 0 to remove and 26 not upgraded.
Need to get 1,218 kB of archives.
After this operation, 4,119 kB of additional disk space will be used.
Fetched 1,218 kB in 2s (456 kB/s)
Selecting previously unselected package ruby1.9.1-dev.
(Reading database ... 277339 files and directories currently installed.)
Unpacking ruby1.9.1-dev (from .../ruby1.9.1-dev_1.9.3.194-1ubuntu1.3_amd64.deb) ...
Setting up ruby1.9.1-dev (1.9.3.194-1ubuntu1.3) ...
razimi@Dell-NSeries:~$ sudo gem install rails
Building native extensions. This could take a while...
Fetching: rdoc-3.12.2.gem (100%)
Depending on your version of ruby, you may need to install ruby rdoc/ri data:
<= 1.8.6 : unsupported
= 1.8.7 : gem install rdoc-data; rdoc-data --install
= 1.9.1 : gem install rdoc-data; rdoc-data --install
>= 1.9.2 : nothing to do! Yay!
Fetching: railties-3.2.13.gem (100%)
Fetching: rails-3.2.13.gem (100%)
Successfully installed json-1.7.7
Successfully installed rdoc-3.12.2
Successfully installed railties-3.2.13
Successfully installed rails-3.2.13
4 gems installed
Installing ri documentation for json-1.7.7...
Installing ri documentation for rdoc-3.12.2...
Installing ri documentation for railties-3.2.13...
Installing ri documentation for rails-3.2.13...
Installing RDoc documentation for json-1.7.7...
Installing RDoc documentation for rdoc-3.12.2...
Installing RDoc documentation for railties-3.2.13...
Installing RDoc documentation for rails-3.2.13...
# sudo gem install rails
Building native extensions. This could take a while...
Fetching: rdoc-3.12.2.gem (100%)
Depending on your version of ruby, you may need to install ruby rdoc/ri data:
<= 1.8.6 : unsupported
= 1.8.7 : gem install rdoc-data; rdoc-data --install
= 1.9.1 : gem install rdoc-data; rdoc-data --install
>= 1.9.2 : nothing to do! Yay!
Fetching: railties-3.2.13.gem (100%)
Fetching: rails-3.2.13.gem (100%)
Successfully installed json-1.7.7
Successfully installed rdoc-3.12.2
Successfully installed railties-3.2.13
Successfully installed rails-3.2.13
4 gems installed
Installing ri documentation for json-1.7.7...
Installing ri documentation for rdoc-3.12.2...
Installing ri documentation for railties-3.2.13...
Installing ri documentation for rails-3.2.13...
Installing RDoc documentation for json-1.7.7...
Installing RDoc documentation for rdoc-3.12.2...
Installing RDoc documentation for railties-3.2.13...
Installing RDoc documentation for rails-3.2.13...
# ruby -v
ruby 1.9.3p385 (2013-02-06 revision 39114) [x86_64-linux]
DONE