3

有没有人见过类似的问题?. 我有 Windows 8。每次执行任何“生成脚手架”时,都会出现以下错误。

我在我的大多数项目中都遇到了这个错误,通常是在不同的步骤中,但总是伴随着 byebug。

C:\Ruby200-x64\rail_projects\bookmarks>rails generate scaffold
DL is deprecated, please use Fiddle
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/byebug-3.5.1/lib/byebug/core.rb:1:in `re
quire': cannot load such file -- byebug/byebug (LoadError)
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/byebug-3.5.1/lib/byebug/cor
e.rb:1:in `<top (required)>'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/byebug-3.5.1/lib/byebug.rb:
1:in `require'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/byebug-3.5.1/lib/byebug.rb:
1:in `<top (required)>'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.7.5/lib/bundler/r
untime.rb:76:in `require'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.7.5/lib/bundler/r
untime.rb:76:in `block (2 levels) in require'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.7.5/lib/bundler/r
untime.rb:72:in `each'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.7.5/lib/bundler/r
untime.rb:72:in `block in require'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.7.5/lib/bundler/r
untime.rb:61:in `each'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.7.5/lib/bundler/r
untime.rb:61:in `require'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.7.5/lib/bundler.r
b:133:in `require'
        from C:/Ruby200-x64/rail_projects/bookmarks/config/application.rb:15:in
`<top (required)>'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.2.0.beta4/lib/ra
ils/commands/commands_tasks.rb:141:in `require'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.2.0.beta4/lib/ra
ils/commands/commands_tasks.rb:141:in `require_application_and_environment!'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.2.0.beta4/lib/ra
ils/commands/commands_tasks.rb:128:in `generate_or_destroy'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.2.0.beta4/lib/ra
ils/commands/commands_tasks.rb:50:in `generate'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.2.0.beta4/lib/ra
ils/commands/commands_tasks.rb:39:in `run_command!'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.2.0.beta4/lib/ra
ils/commands.rb:17:in `<top (required)>'
        from bin/rails:4:in `require'
        from bin/rails:4:in `<main>'

杰米文件

source 'https://rubygems.org'


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.0.beta4'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0.0.beta1'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use jQuery as the JavaScript library
gem 'jquery-rails', '~> 4.0.0.beta2'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc

# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use Unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug'

  # Access an IRB console on exception pages or by using <%= console %> in views
  gem 'web-console', '~> 2.0.0.beta4'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
4

1 回答 1

-2

问题一定是因为 ruby​​/rails 升级/降级太多。我擦拭并重新安装,现在工作正常。

于 2014-11-11T23:00:11.143 回答