I changed my Mac OSX version to Lion. However I cannot create a Rails3 app.
I use rvm 1.9.2 and i choose ruby 1.9.2-p290 to create Rails 3 app.
Everything seems okey. When I start to create a new app
rails new new_my_app
I see this errors,
Installing json (1.6.6) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/ender/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb
creating Makefile
make
sh: make: command not found
Gem files will remain installed in /Users/ender/.rvm/gems/ruby-1.9.2-p290/gems/json-1.6.6 for inspection.
Results logged to /Users/ender/.rvm/gems/ruby-1.9.2-p290/gems/json-1.6.6/ext/json/ext/generator/gem_make.out
An error occured while installing json (1.6.6), and Bundler cannot continue.
Make sure that `gem install json -v '1.6.6'` succeeds before bundling.
When I try
gem install json -v '1.6.6'
I face this errors
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
/Users/ender/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb
creating Makefile
make
sh: make: command not found
Gem files will remain installed in /Users/ender/.rvm/gems/ruby-1.9.2-p290/gems/json-1.6.6 for inspection.
Results logged to /Users/ender/.rvm/gems/ruby-1.9.2-p290/gems/json-1.6.6/ext/json/ext/generator/gem_make.out
What should I do to fix this problem?
Thanks.
You need to install "Command Line Tools" from preferences in Xcode 4 for Lion.
You need to install osx-gcc-installer
If you migrated ruby from previoys system you need to reinstall ruby and gems:
rvm reinstall 1.9.2
rvm use 1.9.2
rvm gemset pristine
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With