Saads-Mac-Pro:~ SMD$ gem install rails
Building native extensions. This could take a while...
/Users/SMD/.rvm/rubies/ruby-2.0.0- p247/lib/ruby/site_ruby/2.0.0/rubygems/ext/builder.rb:54: warning: Insecure world writable dir /usr in PATH, mode 040777
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
/Users/SMD/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/SMD/.rvm/rubies/ruby-2.0.0-p247/bin/ruby
--with-atomic_reference-dir
--without-atomic_reference-dir
--with-atomic_reference-include
--without-atomic_reference-include=${atomic_reference-dir}/include
--with-atomic_reference-lib
--without-atomic_reference-lib=${atomic_reference-dir}/
/Users/SMD/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/mkmf.rb:434:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /Users/SMD/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/mkmf.rb:519:in `try_link0'
from /Users/SMD/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/mkmf.rb:817:in `try_run'
from extconf.rb:24:in `<main>'
Gem files will remain installed in /Users/SMD/.rvm/gems/ruby-2.0.0-p247/gems/atomic-1.1.13 for inspection.
Results logged to /Users/SMD/.rvm/gems/ruby-2.0.0-p247/gems/atomic-1.1.13/ext/gem_make.out
This is the output when i run this command gem install rails
. What am i doing wrong?
Thanks in Advance
EDIT:
Output of gem env
:
Saads-Mac-Pro:~ SMD$ gem env
RubyGems Environment:
- RUBYGEMS VERSION: 2.0.7
- RUBY VERSION: 2.0.0 (2013-06-27 patchlevel 247) [x86_64-darwin12.3.0]
- INSTALLATION DIRECTORY: /Users/SMD/.rvm/gems/ruby-2.0.0-p247
- RUBY EXECUTABLE: /Users/SMD/.rvm/rubies/ruby-2.0.0-p247/bin/ruby
- EXECUTABLE DIRECTORY: /Users/SMD/.rvm/gems/ruby-2.0.0-p247/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-12
- GEM PATHS:
- /Users/SMD/.rvm/gems/ruby-2.0.0-p247
- /Users/SMD/.rvm/gems/ruby-2.0.0-p247@global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
Installed convmv 1.12-2 ( Ubuntu 12.04.3 ), to solve
got it Look into your error:--
`Gem files will remain installed in /Users/SMD/.rvm/gems/ruby-2.0.0-p247/gems/atomic-1.1.13
for inspection
. so it is for gem name as
atomicand you required
java jdk 8github.com/headius/ruby-atomic
last line stated as of
1.1.0,
JDK8 is required to build the atomic gem, since it attempts to use the new atomic`Please install JDK 8
It's rdoc gem problem i'll find this issue on github. Update rdoc gem and reinstall rails.
i figured it out after following various articles.
Follow are the Steps.
$rvm get head
$rvm --force 2.0.0
$gem update
$gem install rails
went through smoothly.
Following is the output:
Here's an answer that helped me: Ruby on Rails - unable to convert "\x89" from ASCII-8BIT to UTF-8 for xxx/xxxx/xxxx
You need to update / install a version of the rdoc gem that supports the conversion. Then these errors won't appear during generation of the documentation when you install rails or when you regenerate the documentation.
Then to regenerate the documentation
then do
gem update
andgem install rails
Also, make sure that rvm is a function
type rvm | head -1