0
votes

I am using Rails 2.3.14 problem is i want to update rails version to 3.2.x

1. sudo gem update rails

-Updating installed gems -Nothing to update

2.when i used sudo apt-get update rails

-The update command takes no arguments

3.when i tried to install Rails sudo gem install rails --version=3.2.3

-Fetching: activesupport-3.2.3.gem (100%) Fetching: builder-3.0.4.gem (100%) Fetching: activemodel-3.2.3.gem (100%) Fetching: rack-1.4.4.gem (100%) Fetching: sprockets-2.1.3.gem (100%) Fetching: actionpack-3.2.3.gem (100%) Fetching: activerecord-3.2.3.gem (100%) Fetching: activeresource-3.2.3.gem (100%) Fetching: mail-2.4.4.gem (100%) Fetching: actionmailer-3.2.3.gem (100%) Fetching: thor-0.14.6.gem (100%) 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/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require': cannot load such file -- mkmf (LoadError) from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:inrequire' from extconf.rb:1:in `'

Gem files will remain installed in /usr/lib/ruby/gems/1.9.1/gems/json-1.7.6 for inspection. Results logged to /usr/lib/ruby/gems/1.9.1/gems/json-1.7.6/ext/json/ext/generator/gem_make.out

Can anybody suggest me how can i overcome this issue.

1

1 Answers

0
votes

first install

sudo aptitude install ruby1.9.1-dev

will solve your problem