Rails does not work on Lion

osx-lion, ruby-on-rails-3.1, rvm

Solution

You need to install "Command Line Tools" from preferences in Xcode 4 for Lion.

Problem

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.

Original source

Related problems