2013-06-29 59 views
0

當我創建使用RVM 1.21.3鋼軌4.0.0新應用時,我收到以下錯誤JSON錯誤創造導軌一個Rails應用程序4.0.0

$rails_projects MacBook$ rails new rails4app 

create 
create README.rdoc 
create Rakefile 
create config.ru 
create .gitignore 
create Gemfile 
create app 
create app/assets/javascripts/application.js 
create app/assets/stylesheets/application.css 
create app/controllers/application_controller.rb 
create app/helpers/application_helper.rb 
create app/views/layouts/application.html.erb 
create app/assets/images/.keep 
create app/mailers/.keep 
create app/models/.keep 
create app/controllers/concerns/.keep 
create app/models/concerns/.keep 
create bin 
create bin/bundle 
create bin/rails 
create bin/rake 
create config 
create config/routes.rb 
create config/application.rb 
create config/environment.rb 
create config/environments 
create config/environments/development.rb 
create config/environments/production.rb 
create config/environments/test.rb 
create config/initializers 
create config/initializers/backtrace_silencers.rb 
create config/initializers/filter_parameter_logging.rb 
create config/initializers/inflections.rb 
create config/initializers/mime_types.rb 
create config/initializers/secret_token.rb 
create config/initializers/session_store.rb 
create config/initializers/wrap_parameters.rb 
create config/locales 
create config/locales/en.yml 
create config/boot.rb 
create config/database.yml 
create db 
create db/seeds.rb 
create lib 
create lib/tasks 
create lib/tasks/.keep 
create lib/assets 
create lib/assets/.keep 
create log 
create log/.keep 
create public 
create public/404.html 
create public/422.html 
create public/500.html 
create public/favicon.ico 
create public/robots.txt 
create test/fixtures 
create test/fixtures/.keep 
create test/controllers 
create test/controllers/.keep 
create test/mailers 
create test/mailers/.keep 
create test/models 
create test/models/.keep 
create test/helpers 
create test/helpers/.keep 
create test/integration 
create test/integration/.keep 
create test/test_helper.rb 
create tmp/cache 
create tmp/cache/assets 
create vendor/assets/javascripts 
create vendor/assets/javascripts/.keep 
create vendor/assets/stylesheets 
create vendor/assets/stylesheets/.keep 
    run bundle install 
Fetching gem metadata from https://rubygems.org/.......... 
Fetching gem metadata from https://rubygems.org/.. 
Resolving dependencies... 
Using rake (10.1.0) 
Using i18n (0.6.4) 
Installing minitest (4.7.5) 
Using multi_json (1.7.7) 
Using atomic (1.1.10) 
Using thread_safe (0.1.0) 
Using tzinfo (0.3.37) 
Using activesupport (4.0.0) 
Using builder (3.1.4) 
Using erubis (2.7.0) 
Using rack (1.5.2) 
Using rack-test (0.6.2) 
Using actionpack (4.0.0) 
Using mime-types (1.23) 
Using polyglot (0.3.3) 
Using treetop (1.4.14) 
Using mail (2.5.4) 
Using actionmailer (4.0.0) 
Using activemodel (4.0.0) 
Using activerecord-deprecated_finders (1.0.3) 
Using arel (4.0.0) 
Using activerecord (4.0.0) 
Using bundler (1.3.5) 
Installing coffee-script-source (1.6.2) 
Installing execjs (1.4.0) 
Installing coffee-script (2.2.0) 
Using thor (0.18.1) 
Using railties (4.0.0) 
Installing coffee-rails (4.0.0) 
Using hike (1.2.3) 
Installing jbuilder (1.4.2) 
Installing jquery-rails (3.0.1) 
Installing json (1.8.0) 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. 

Users/MacBook/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb 
creating Makefile 
make 
compiling generator.c 
linking shared-object json/ext/generator.bundle 
make install 
/usr/bin/install -c -m 0755 generator.bundle /Users/MacBook/.rvm/gems/ruby-2.0.0-p247/gems/json-1.8.0/lib/Users/MacBook/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/x86_64-darwin11.4.2/json/ext 
install: /Users/MacBook/.rvm/gems/ruby-2.0.0-p247/gems/json-1.8.0/lib/Users/MacBook/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/x86_64-darwin11.4.2/json/ext: No such file or directory 
make: *** [install-so] Error 71 
Gem files will remain installed in /Users/MacBook/.rvm/gems/ruby-2.0.0-p247/gems/json-1.8.0 for inspection. 

Results logged to /Users/MacBook/.rvm/gems/ruby-2.0.0-p247/gems/json-1.8.0/ext/json/ext/generator/gem_make.out 
An error occurred while installing json (1.8.0), and Bundler cannot continue. 
Make sure that `gem install json -v '1.8.0'` succeeds before bundling. 
+0

您是否安裝了[Xcode命令行工具] [1]? [1]:http://stackoverflow.com/questions/9329243/xcode-4-4-command-line-tools –

回答

0

你嘗試「捆綁安裝'。它會安裝所有缺失的寶石。錯誤發生的原因主要是因爲缺少一些寶石:)

+1

AFAIK,'導軌new'自動運行'束install' –

+0

是,但當它列出'某某'寶石丟失時,它指出它在捆綁包中錯過了或者有一些版本不兼容。將該寶石添加到您的gem文件並再次運行'捆綁安裝'。 –

+0

我不得不卸載,然後重新安裝整個rvm和rails 4.0.0。這解決了我的問題。 –

相關問題