I've been doing quite a bit of research on this issue the last week or so but haven't found a solution that works for me, it's very frustrating. Hopefully somebody can point me in the right direction. Here's the error I recieve
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/Name/.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/Name/.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/Name/.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/Name/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/mkmf.rb:519:intry_link0' from /Users/Name/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/mkmf.rb:817:in try_run' from extconf.rb:24:in'
Gem files will remain installed in /Users/Name/.rvm/gems/ruby-2.0.0-p247#swi----ense/gems/atomic-1.1.12 for inspection. Results logged to /Users/Name/.rvm/gems/ruby-2.0.0-p247#sw-----nse/gems/atomic-1.1.12/ext/gem_make.out
An error occurred while installing atomic (1.1.12), and Bundler cannot continue. Make sure that gem install atomic -v '1.1.12' succeeds before bundling.
This should work:
gem install atomic -V
And then:
gem install rails -V
The -V is for Verbose. You'll see what happen.
It worked for me on a Linux box, when gem update didn't.
You also need to have the latest rubygem / bundler.
This happened to me because I didn't have the right version of XCode Developer Tools for OS X Mavericks. Then when I tried to update it, it said it wasn't available from the Software Update server. Details here.
Related
I am trying to run my rails server. When I first ran, I got an error like this
No timezone data source could be found. To resolve this, either install TZInfo:
I resolve the error by updating the x64 version of tzinfo-data in the gem file. After that when I ran bundle update, I am getting the following error
* 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=C:/Ruby24-x64/bin/$(RUBY_BASE_NAME)
--with-libxml2-config
--without-libxml2-config
--with-pkg-config
--without-pkg-config extconf.rb:29:in `': The "libxml2" package isn't available. (RuntimeError)
To see why this extension failed to compile, please check the mkmf.log
which can be found here:
C:/Ruby24-x64/lib/ruby/gems/2.4.0/extensions/x64-mingw32/2.4.0/ovirt-engine-sdk-4.3.0/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/ovirt-engine-sdk-4.3.0 for
inspection. Results logged to
C:/Ruby24-x64/lib/ruby/gems/2.4.0/extensions/x64-mingw32/2.4.0/ovirt-engine-sdk-4.3.0/gem_make.out
An error occurred while installing ovirt-engine-sdk (4.3.0), and
Bundler cannot continue. Make sure that gem install ovirt-engine-sdk
-v '4.3.0' --source 'https://rubygems.org/' succeeds before bundling.
In Gemfile: fog was resolved to 2.1.0, which depends on
fog-ovirt was resolved to 1.1.6, which depends on
ovirt-engine-sdk
What could have possibly gone wrong? How to resolve this in Windows machines?
I know this might not be a good answer for you, but running Ruby on Rails on windows is a pain, and going to be terrible experience, try to set a dual boot with Ubuntu, Debian or any other linux distribution along side with windows and then you can develop with RoR as it should.
When I try running the following command
gem install therubyracer -v '0.12.1'
I am getting the following error. I tried to install libv8, but was not successful then. Can someone please help me out here.
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing therubyracer:
ERROR: Failed to build gem native extension.
C:/software/ruby-1.9.3/bin/ruby.exe extconf.rb
checking for main() in -lpthread... no
checking for v8.h... no
*** 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=C:/software/ruby-1.9.3/bin/ruby
--with-pthreadlib
--without-pthreadlib
--enable-debug
--disable-debug
--with-v8-dir
--without-v8-dir
--with-v8-include
--without-v8-include=${v8-dir}/include
--with-v8-lib
--without-v8-lib=${v8-dir}/
C:/software/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/libv8-
3.16.14.3/ext/libv8/location.rb:50:in `configure': You have chosen to use
the version of V8 found on your system
(Libv8::Location::System::NotFoundError)
and *not* the one that is bundle with the libv8 rubygem. However,
it could not be located. please make sure you have a version of
v8 that is compatible with 3.16.14.3 installed. You may
need to special --with-v8-dir options if it is in a non-standard
location
thanks,
The Mgmt
from C:/software/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/libv8- 3.16.14.3/lib/libv8.rb:7:in `configure_makefile'
from extconf.rb:32:in `<main>'
Gem files will remain installed in C:/software/ruby- 1.9.3/lib/ruby/gems/1.9.1/gems/therubyracer-0.12.1 for inspection.
Results logged to C:/software/ruby- 1.9.3/lib/ruby/gems/1.9.1/gems/therubyracer-0.12.1/ext/v8/gem_make.out
I am new to ruby and therefore I am pretty confused what should be done here.
You can't install therubyracer on Windows, see this post.
Since therubyracer is only one of the javascript runtimes compatible with ExecJS, you may try anothers, say node.js for example.
As long as you're developing Ruby on Rails applications, sooner or later you will have to switch to Unix or Linux, so why not now?
I downloaded xcode, command line tools, home brew, rvm, and ruby, but when I use the command sudo gem install rails I get an error message. Not sure what to do any help would be great, I want to install rails on my new mac.
ERROR: While executing gem ... (Errno::EACCES)
Permission denied - /Users/cheatermoves/.rvm/gems/ruby-2.0.0-p247/gems/atomic-1.1.14/test/test_atomic.rb
marshalls-MacBook-Air:~ cheatermoves$ sudo gem install rails
Building native extensions. This could take a while...
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
/Users/cheatermoves/.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/cheatermoves/.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/cheatermoves/.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/cheatermoves/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/mkmf.rb:519:in `try_link0'
from /Users/cheatermoves/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/mkmf.rb:817:in `try_run'
from extconf.rb:26:in `<main>'
You probably don't want to be using sudo with RVM... Try just:
gem install rails
sudo gcc --version
When you have done this accept user agreement from xcode! (this is what fixed it for me.)
Newbie here. I've searched for other similar questions on the site but still wasn't able to solve the problem. I've installed Ruby 2.0.0 and RubyGem 2.0.3, but when I'm trying to install Rails 4.0.0 I got:
Building native extensions. This could take a while...
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
/Users/yuanhunglo/.rvm/rubies/ruby-2.0.0-p0/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
--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/yuanhunglo/.rvm/rubies/ruby-2.0.0-p0/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/yuanhunglo/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/mkmf.rb:431:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /Users/yuanhunglo/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/mkmf.rb:516:in `try_link0'
from /Users/yuanhunglo/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/mkmf.rb:814:in `try_run'
from extconf.rb:22:in `<main>'
Gem files will remain installed in /Users/yuanhunglo/.rvm/gems/ruby-2.0.0-p0/gems/atomic-1.1.10 for inspection.
Results logged to /Users/yuanhunglo/.rvm/gems/ruby-2.0.0-p0/gems/atomic-1.1.10/ext/gem_make.out
I tried to install Rails by
gem install rails --version 4.0.0
I'm not sure if there's something wrong with the set up or if I still need to install something. Thanks in advance for your help.
It seems you're using OSX.
This error happens when you can't compile some extensions, in this case due to the lack of a compiler ("You have to install development tools first"). Open App Store, download XCode and, after installing it, click on "XCode" on the menu, go to Preferences -> Downloads -> Components and download "Command Line Tools".
i've googled this error a couple of times and got instructions to install rMagick win-32 from their website. However the win32 versions looks depecrated and is made for Ruby 1.8.6 as for i have 1.9.3.
Can someone please help me install this gem? I really can't be arsed to do the imageMagick installing on my PC for this since the code will be moved to other PC's etc. a couple of times in the next few weeks (school assignment, you know how i goes). And with that it appears that imageMagick CAN be installed along with this gem(Which is by far the best option in my case). Nonetheless, i can't figure out this error since i'm a pretty big n00b when it comes to these things.
C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb
checking for Ruby version >= 1.8.5... yes
Ongeldige stationsspecificatie.
Unable to get ImageMagick version
*** 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=C:/RailsInstaller/Ruby1.9.3/bin/ruby
Gem files will remain installed in C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9
.1/gems/rmagick-2.13.1 for inspection.
Results logged to C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rmagick-2
.13.1/ext/RMagick/gem_make.out
An error occured while installing rmagick (2.13.1), and Bundler cannot continue.
Make sure that `gem install rmagick -v '2.13.1'` succeeds before bundling.
Here I faced the same problem. After search, I found solution from here
http://www.waydotnet.com/2010/02/12/rmagick-on-ruby-1-9-1-i386-mingw32-work-d/
http://phosphor-escence.blogspot.in/2010/12/if-you-fail-install-rmagick-on-mingw.html
You need to install dev packages:
sudo apt-get install libmagick++-dev
Hope this helps :)