0

I recently installed ruby on rails using rails installer and the bitnami ruby stack for a local host environment. However, when i run the command rails new i get this error:

ERROR:  Error installing rails:
    ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
creating Makefile

make "DESTDIR="
compiling generator.c
linking shared-object json/ext/generator.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [generator.bundle] Error 1


Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/json-1.8.1 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/json-1.8.1/ext/json/ext/generator/gem_make.out

I've researched for an answer, but nothing has worked for me. Can someone help me please?

1 Answers1

1

Have you installed a database before installing rails? Rails works with many databases like MySQL, Oracle etc. If you are starting out you should install SQLite. The right steps for installing rails are as under

  1. Install RVM
  2. Install Ruby (Install 2.0.0 or above if you plan to use Rails 4.0.0 or above) using RVM
  3. Install Ruby Gems
  4. Install a database. If you are using MySQL install MySQL2 gem. No gems required if you are using SQLite. P.S. Sorry you need to install a gem for SQLite as well.
  5. Rails also needs JavaScript run time. So install Node.js
  6. Finally install Rails

Following these steps will ensure you will have no problem installing rails. You do not need to install a web server as Rails comes with Webrick web server which will serve well for development and testing.

Hope this helps.

Vikram Sharma
  • 526
  • 5
  • 14