• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
sharadchhetri

sharadchhetri

Tutorials On Linux, Unix & Open Source

  • Home
  • Linux Commands
  • Resources
    • Learn Linux
  • My WordPress plugins

Error installing rails

March 1, 2013 by Sharad Chhetri Leave a Comment

Error installing rails

Today I was installing the ruby and rails in my system and found two times this error.Hence I decided to post the how to install method of ruby and rails in CentOS 6.3 .
The CentOS 6.3 was minimal installed.

Follow the given below steps

Step 1: Install the gcc,gcc compiler and make

yum install gcc gcc-c++ make -y

Step 2: Install the ruby and gems.

yum install ruby ruby-devel rubygems ruby-irb ruby-ri -y

Step 3 : Update the gem

gem update –system

Step 4: Install the rails

gem install rails

Step 5: The rails is installed. Now check the status of ruby,gem and rails.

[root@localhost ~]# gem -v
2.0.0
[root@localhost ~]# rails -v
Rails 3.2.12
[root@localhost ~]# ruby -v
ruby 1.8.7 (2011-06-30 patchlevel 352) [i386-linux]
[root@localhost ~]#
[root@localhost ~]# gem list

*** LOCAL GEMS ***

actionmailer (3.2.12)
actionpack (3.2.12)
activemodel (3.2.12)
activerecord (3.2.12)
activeresource (3.2.12)
activesupport (3.2.12)
arel (3.0.2)
builder (3.0.4)
bundler (1.3.0)
erubis (2.7.0)
hike (1.2.1)
i18n (0.6.4)
journey (1.0.4)
json (1.7.7)
mail (2.4.4)
mime-types (1.21)
multi_json (1.6.1)
polyglot (0.3.3)
rack (1.4.5)
rack-cache (1.2)
rack-ssl (1.3.3)
rack-test (0.6.2)
rails (3.2.12)
railties (3.2.12)
rake (10.0.3)
rdoc (3.12.2)
rubygems-update (2.0.0)
sprockets (2.2.2)
thor (0.17.0)
tilt (1.3.4)
treetop (1.4.12)
tzinfo (0.3.35)
[root@localhost ~]#

These are the 2 errors which I got it while installation.

Error1 :

Building native extensions. This could take a while…
/usr/bin/ruby extconf.rb
mkmf.rb can’t find header files for ruby at /usr/lib/ruby/ruby.h
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.

Building has failed. See above output for more information on the failure.

Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/json-1.7.7 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/json-1.7.7/ext/json/ext/generator/gem_make.out
[root@localhost ~]#

Error 2:

Building native extensions. This could take a while…
/usr/bin/ruby extconf.rb
creating Makefile
make
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.

Building has failed. See above output for more information on the failure.

Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/json-1.7.7 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/json-1.7.7/ext/json/ext/generator/gem_make.out
[root@localhost ~]#

Share this:

  • Twitter
  • Facebook
  • More
  • Print
  • Email
  • LinkedIn
  • Reddit
  • Tumblr
  • Pinterest
  • Pocket
  • Telegram
  • WhatsApp
  • Mastodon

Related posts:

  1. Installing rails in verbose mode CentOS and Red Hat
  2. fatal error: error writing to /tmp/ccwAjc9Z.s: No space left on device
  3. make all command error while installing nagios
  4. How to configure ethernet in CentOS 6 after installing in Virtual Box
  5. error: The requested URL returned error: 403 Forbidden while accessing Github repo
  6. dlopen(): error loading libfuse.so.2 – Got Error On Ubuntu
  7. Installing Nagios-3.4 in CentOS 6.3
  8. Installing Nagios-3.4.4 in CentOS 6.3
  9. Installing owncloud in Ubuntu 13.04
  10. Installing Nagios-3.5.0 in CentOS 6.4 using yum

Filed Under: Linux, Tips And Tricks Tagged With: CentOS, rails

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Our Social Media Presence

  • Facebook
  • GitHub
  • Twitter

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Linux Commands

There are unfinished transactions remaining. You might consider running yum-complete-transaction

awk command to print columns from file

Jpeg Image Optimization / Compress on Linux

How To Get SSH Public Key Fingerprint Information

Linux : clear command and its keyboard shortcut

Command to create and delete group in Red Hat and CentOS linux

grep command to show lines after and before the keyword

Explore 70+ Articles On Linux Commands

Always Useful Tips And Tricks

sed: -e expression #1, char 24: Invalid range end

postgres database backup script using database user password inside

Yum Error database disk image is malformed

How to download package using apt-get command in ubuntu

Replace keyword with its filename without extension : bash script

Error: Could not stat() command file ‘/var/lib/nagios3/rw/nagios.cmd’!

How to reset forgot root password in CentOS 6.x and Redhat 6.x

Explore 90+ Article On "Linux Tips And Tricks"

You Might Like These Articles!

Internal External Command

What is Linux/Unix Internal And External Command

Linux basic command

Linux Basic Commands For Every Beginner

simplecodesyntax wordpress plugin

SimpleCodeSyntax : My Another WordPress Plugin

Install Nginx

How To Install Nginx On Ubuntu 22.04 LTS

Install Latest Git package in Ubuntu Operating System

How To Always Install Latest Git Package In Ubuntu Operating System

Bash script for installing VirtualBox on Ubuntu 22.04 LTS Desktop

Install VirtualBox On Ubuntu 22.04 LTS Desktop (Bash Script)

Copyright © 2023 ยท
The material in this site cannot be republished either online or offline, without our permission but Schools and Colleges can do in their Private Network
Proudly Blogging From Bharat.

  • Contact
  • About Me
  • My WordPress plugins
  • Privacy Policy