Skip to content

Instantly share code, notes, and snippets.

@dinks
Last active December 26, 2015 11:09
Show Gist options
  • Select an option

  • Save dinks/7141533 to your computer and use it in GitHub Desktop.

Select an option

Save dinks/7141533 to your computer and use it in GitHub Desktop.
Rails with Mavericks
I tried doing a bundle install with rails and had immediate problems like
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/dineshvasudevan/.rvm/rubies/ruby-1.9.3-p392/bin/ruby extconf.rb
checking for random()... *** 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.
..
/Users/dineshvasudevan/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
I use rvm. And Mac Ports ... I tried to reinstall the ruby with
sudo rvm reinstall ruby
Password:
/Users/dineshvasudevan/.rvm/src/ruby-2.0.0-p247 has already been removed.
/Users/dineshvasudevan/.rvm/rubies/ruby-2.0.0-p247 has already been removed.
Searching for binary rubies, this might take some time.
Found remote file
No binary rubies available for: osx/10.9/x86_64/ruby-2.0.0-p247.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Installing requirements for osx.
Updating system..........................................
Installing required packages: libyaml, readline, libksba, curl-ca-bundle........
Error running 'requirements_osx_port_libs_install libyaml readline libksba curl-ca-bundle',
please read /Users/dineshvasudevan/.rvm/log/1382620677_ruby-2.0.0-p247/package_install_libyaml_readline_libksba_curl-ca-bundle.log
Requirements installation failed with status: 1.
http://trac.macports.org/wiki/MavericksProblems
The problem was that Macports did not work with Mavericks
So I had to reinstall .. http://trac.macports.org/wiki/Migration
After that we reinstall ruby (rvm list and then all the versions)
DOESNT WORK
Stared installing rbenv !
implode rvm
Installed rbenv and all the ruby versions
Problem with libv8 --> Used RUBYGEMS as RUBYOPTS
Added CC and RUBYOPTS to the `bash_login/bashrc`
therubyracer doesnt work. Does not find lib/ruby/gems/1.8/gems/libv8-3.3.10.4/lib/libv8/build/v8/libv8.a
Problem ? the gcc is not set properly.
https://github.com/cowboyd/libv8/issues/46
Run `scons arch=x64` on the v8 directory .. Doesnt work because of the gcc/g++ problem
Run it like `CC=gcc-4.4 CXX=g++-4.4 scons arch=x64` .. IT WILL WORK !
http://dean.io/setting-up-a-ruby-on-rails-development-environment-on-mavericks/
WORKS WORKS WORKS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment