This is the mkmf.log file that shows when the ERRORS For gcc and extconf are generated when I am trying to install Rails. 'sudo gem install rails'. I have not seen an answer that gets to the response about the mkmf.log and provides a solution.
I have installed Homebrew, RVM, Ruby, gcc, Xcode Tools, etc. These Errors are thrown during the rails install. I get some understanding about this and how I can complete the Rails 5 installation?
mkmf.log file: "gcc -o conftest -I/Users/fulbriw/.rvm/rubies/ruby- 2.2.2/include/ruby-2.2.0/x86_64-darwin14 -I/Users/fulbriw/.rvm/rubies/ruby-2.2.2/include/ruby-2.2.0/ruby/b$ ld: warning: directory not found for option '-L/Users/haven/.sm/pkg/active/lib' ld: warning: ignoring file /usr/local/lib/libz.dylib, file was built for i386 which is not the architecture being linked (x86_64): /usr/local/lib/libz.dylib checked program was: /* begin */ 1: #include "ruby.h" 2: 3: int main(int argc, char **argv) 4: { 5: return 0; 6: } /* end */
"gcc -I/Users/fulbriw/.rvm/rubies/ruby-2.2.2/include/ruby-2.2.0/x86_64-darwin14 -I/Users/fulbriw/.rvm/rubies/ruby-2.2.2/include/ruby-2.2.0/ruby/backward -I/U$
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main() {return 0;}
/* end */
Thank you, I have been working to resolve this since this morning. Any help will be so appreciated.
Never do
let bundler install rails for you.
1) make sure the version of Rails you need is in your Gemfile.
2) run
bundle installfrom the command line in your project.If you get an error for not having bundler you may need to run
gem install bundlerfirst3) ensure you are using the correct version of Rvm
run
rvm listand ensure that your current version matches what is specified in the gem file.