当我试图执行rails时,它说' missing_extensions?'

时间:2016-09-13 11:11:08

标签: ruby-on-rails ruby-on-rails-4 rubygems ruby-on-rails-3.2

C:\Sites>rails new the_blog
      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  bin/setup
      create  config
      create  config/routes.rb
      create  config/application.rb
      create  config/environment.rb
      create  config/secrets.yml
      create  config/environments
      create  config/environments/development.rb
      create  config/environments/production.rb
      create  config/environments/test.rb
      create  config/initializers
      create  config/initializers/assets.rb
      create  config/initializers/backtrace_silencers.rb
      create  config/initializers/cookies_serializer.rb
      create  config/initializers/filter_parameter_logging.rb
      create  config/initializers/inflections.rb
      create  config/initializers/mime_types.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
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.13.0/lib/bundler/
rubygems_ext.rb:23:in `source': uninitialized constant Gem::Source::Installed (N
ameError)
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.13.0
/lib/bundler/rubygems_ext.rb:65:in `extension_dir'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/specification.r
b:1782:in `gem_build_complete_path'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/specification.r
b:1996:in `missing_extensions?'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/basic_specifica
tion.rb:67:in `contains_requirable_file?'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/specification.r
b:949:in `block in find_in_unresolved'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/specification.r
b:949:in `each'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/specification.r
b:949:in `find_all'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/specification.r
b:949:in `find_in_unresolved'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel
_require.rb:74:in `require'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/source.rb:228:i
n `<top (required)>'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.13.0
/lib/bundler/rubygems_ext.rb:23:in `source'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.13.0
/lib/bundler/rubygems_ext.rb:65:in `extension_dir'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/specification.r
b:1782:in `gem_build_complete_path'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/specification.r
b:1996:in `missing_extensions?'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/basic_specifica
tion.rb:67:in `contains_requirable_file?'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/specification.r
b:949:in `block in find_in_unresolved'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/specification.r
b:949:in `each'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/specification.r
b:949:in `find_all'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/specification.r
b:949:in `find_in_unresolved'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel
_require.rb:74:in `require'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.13.0
/lib/bundler/rubygems_integration.rb:4:in `<top (required)>'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel
_require.rb:69:in `require'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel
_require.rb:69:in `require'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.13.0
/lib/bundler.rb:11:in `<top (required)>'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel
_require.rb:128:in `require'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel
_require.rb:128:in `rescue in require'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel
_require.rb:39:in `require'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.5
.1/lib/rails/generators/app_base.rb:330:in `bundle_command'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.5
.1/lib/rails/generators/app_base.rb:346:in `run_bundle'
        from (eval):1:in `run_bundle'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.19.1/li
b/thor/command.rb:27:in `run'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.19.1/li
b/thor/invocation.rb:126:in `invoke_command'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.19.1/li
b/thor/invocation.rb:133:in `block in invoke_all'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.19.1/li
b/thor/invocation.rb:133:in `each'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.19.1/li
b/thor/invocation.rb:133:in `map'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.19.1/li
b/thor/invocation.rb:133:in `invoke_all'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.19.1/li
b/thor/group.rb:232:in `dispatch'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.19.1/li
b/thor/base.rb:440:in `start'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.5
.1/lib/rails/commands/application.rb:17:in `<top (required)>'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel
_require.rb:69:in `require'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel
_require.rb:69:in `require'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.5
.1/lib/rails/cli.rb:14:in `<top (required)>'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel
_require.rb:69:in `require'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel
_require.rb:69:in `require'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.5
.1/bin/rails:9:in `<top (required)>'
        from C:/RailsInstaller/Ruby2.2.0/bin/rails:23:in `load'
        from C:/RailsInstaller/Ruby2.2.0/bin/rails:23:in `<main>'

C:\Sites>ls
the_blog

C:\Sites>cd the_blog

C:\Sites\the_blog>rails server
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.13.0/lib/bundler/
runtime.rb:94:in `rescue in block (2 levels) in require': There was an error whi
le trying to load the gem 'uglifier'. (Bundler::GemRequireError)
Gem Load Error is: Could not find a JavaScript runtime. See https://github.com/r
ails/execjs for a list of available runtimes.
Backtrace for gem load error is:
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/execjs-2.7.0/lib/execjs/run
times.rb:58:in `autodetect'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/execjs-2.7.0/lib/execjs.rb:
5:in `<module:ExecJS>'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/execjs-2.7.0/lib/execjs.rb:
4:in `<top (required)>'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/uglifier-3.0.2/lib/uglifier
.rb:5:in `require'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/uglifier-3.0.2/lib/uglifier
.rb:5:in `<top (required)>'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.13.0/lib/bundler/
runtime.rb:91:in `require'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.13.0/lib/bundler/
runtime.rb:91:in `block (2 levels) in require'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.13.0/lib/bundler/
runtime.rb:86:in `each'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.13.0/lib/bundler/
runtime.rb:86:in `block in require'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.13.0/lib/bundler/
runtime.rb:75:in `each'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.13.0/lib/bundler/
runtime.rb:75:in `require'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.13.0/lib/bundler.
rb:106:in `require'
C:/Sites/the_blog/config/application.rb:7:in `<top (required)>'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.5.1/lib/rails/
commands/commands_tasks.rb:78:in `require'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.5.1/lib/rails/
commands/commands_tasks.rb:78:in `block in server'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.5.1/lib/rails/
commands/commands_tasks.rb:75:in `tap'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.5.1/lib/rails/
commands/commands_tasks.rb:75:in `server'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.5.1/lib/rails/
commands/commands_tasks.rb:39:in `run_command!'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.5.1/lib/rails/
commands.rb:17:in `<top (required)>'
bin/rails:4:in `require'
bin/rails:4:in `<main>'
Bundler Error Backtrace:
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.13.0
/lib/bundler/runtime.rb:90:in `block (2 levels) in require'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.13.0
/lib/bundler/runtime.rb:86:in `each'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.13.0
/lib/bundler/runtime.rb:86:in `block in require'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.13.0
/lib/bundler/runtime.rb:75:in `each'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.13.0
/lib/bundler/runtime.rb:75:in `require'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.13.0
/lib/bundler.rb:106:in `require'
        from C:/Sites/the_blog/config/application.rb:7:in `<top (required)>'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.5
.1/lib/rails/commands/commands_tasks.rb:78:in `require'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.5
.1/lib/rails/commands/commands_tasks.rb:78:in `block in server'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.5
.1/lib/rails/commands/commands_tasks.rb:75:in `tap'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.5
.1/lib/rails/commands/commands_tasks.rb:75:in `server'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.5
.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.5
.1/lib/rails/commands.rb:17:in `<top (required)>'
        from bin/rails:4:in `require'
        from bin/rails:4:in `<main>'

C:\Sites\the_blog>

1 个答案:

答案 0 :(得分:0)

您是否尝试更新所有宝石?

gem update bundle && gem update --system