Installation error
Opened this issue · 2 comments
I'm on Mavericks trying to use the installer and got a prompt asking to raise and issue here.
I tried using the console command: gem install rails too but that failed with:
Fetching: i18n-0.6.9.gem (100%)
Successfully installed i18n-0.6.9
Fetching: multi_json-1.8.2.gem (100%)
Successfully installed multi_json-1.8.2
Fetching: tzinfo-0.3.38.gem (100%)
Successfully installed tzinfo-0.3.38
Fetching: atomic-1.1.14.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
/usr/local/Cellar/ruby/2.0.0-p195/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=/usr/local/Cellar/ruby/2.0.0-p195/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}/
/usr/local/Cellar/ruby/2.0.0-p195/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 /usr/local/Cellar/ruby/2.0.0-p195/lib/ruby/2.0.0/mkmf.rb:516:in `try_link0'
from /usr/local/Cellar/ruby/2.0.0-p195/lib/ruby/2.0.0/mkmf.rb:814:in `try_run'
from extconf.rb:26:in `<main>'
Gem files will remain installed in /usr/local/Cellar/ruby/2.0.0-p195/lib/ruby/gems/2.0.0/gems/atomic-1.1.14 for inspection.
Results logged to /usr/local/Cellar/ruby/2.0.0-p195/lib/ruby/gems/2.0.0/gems/atomic-1.1.14/ext/gem_make.out
The last parts of my console contents (the log was too big for GitHub) are:
configure: WARNING: unrecognized options: --with-libyaml-dir
CC = gcc
LD = ld
LDSHARED = gcc -dynamiclib
CFLAGS = -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=shorten-64-to-32 -Werror=implicit-function-declaration -fno-common -pipe
XCFLAGS = -include ruby/config.h -include ruby/missing.h -fvisibility=hidden -DRUBY_EXPORT
CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I. -I.ext/include/x86_64-darwin13.0.0 -I./include -I.
DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace -install_name @executable_path/../lib/libruby.1.9.1.dylib -current_version 1.9.1 -compatibility_version 1.9.1 -Wl,-unexported_symbol,_Init_* -Wl,-unexported_symbol,*_threadptr_* -Wl,-u,_objc_msgSend
SOLIBS =
compiling main.c
compiling dmydln.c
compiling dmyencoding.c
compiling version.c
compiling dmyversion.c
compiling miniprelude.c
compiling array.c
compiling bignum.c
bignum.c:2729:26: warning: while loop has empty body [-Wempty-body]
while (--ny && !zds[ny]); ++ny;
^
bignum.c:2729:26: note: put the semicolon on a separate line to silence this warning
1 warning generated.
compiling class.c
compiling compar.c
compiling complex.c
compiling dir.c
compiling dln_find.c
compiling enum.c
compiling enumerator.c
compiling error.c
compiling eval.c
compiling load.c
compiling proc.c
compiling file.c
compiling gc.c
compiling hash.c
compiling inits.c
compiling io.c
compiling marshal.c
compiling math.c
compiling node.c
compiling numeric.c
numeric.c:1409:10: warning: 'finite' is deprecated: first deprecated in OS X 10.9 [-Wdeprecated-declarations]
if (!finite(value))
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/math.h:718:12: note: 'finite' declared here
extern int finite(double) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_9, __IPHONE_NA, __IPHONE_NA);
^
1 warning generated.
compiling object.c
compiling pack.c
compiling parse.c
compiling process.c
compiling random.c
compiling range.c
compiling rational.c
compiling re.c
compiling regcomp.c
compiling regenc.c
compiling regerror.c
compiling regexec.c
compiling regparse.c
regparse.c:582:15: error: implicit conversion loses integer precision: 'st_index_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
return t->num_entries;
~~~~~~ ~~~^~~~~~~~~~~
1 error generated.
make: *** [regparse.o] Error 1
On Mavericks you shouldn't need RailsOneClick.
From the site:
Update: if you are using OS X Mavericks or later, Rails One Click is no longer needed. Simply install Rails with:
gem install rails
I think something is screwy with my machine. I tried gem install rails
but I get the error You have to install development tools first.
So I do that by downloading from Apple, or by xcode-select --install
as suggested in the docs, but not joy. I'm pretty sure it's my setup. If I find out how to do it I'll post back.