gpt4 book ai didi

ruby-on-rails - rails : cannot load such file -- byebug/byebug (LoadError)

转载 作者:太空宇宙 更新时间:2023-11-03 16:59:17 25 4
gpt4 key购买 nike

有人遇到过类似的问题吗? .我有 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>'

Gemifile

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]

最佳答案

问题一定是 ruby​​/rails 的升级/降级太多了。我删除并重新安装,现在工作正常。

关于ruby-on-rails - rails : cannot load such file -- byebug/byebug (LoadError),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26868817/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com