ruby bundle exec

eqqqjvef  于 2021-09-29  发布在  Java
关注(0)|答案(1)|浏览(385)

在构建一个rails应用程序时,在过去的几周里,一切都正常工作,使用RubyonRails和react应用程序。
我打错了 bundle exec rails s 以\为例 bundle exec rails s\ 终端识别出它是一个新行,我只是从中控制c,在按下git后,我使用上面的命令在本地再次运行程序,返回错误如下。
我试过了 rails s 同样的错误伴随着 bundle exec rails c 我尝试使用--force和npm包重新安装ruby gems。
我甚至不知道从哪里开始这个错误。
我对ruby和rails相当陌生。我不明白这个错误是怎么开始的,也不知道是从哪里开始的,之前一切都很好。

=> Run `bin/rails server --help` for more startup options
Exiting
Traceback (most recent call last):
        56: from bin/rails:4:in `<main>'
        55: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
        54: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
        53: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
        52: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
        51: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
        50: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-6.1.3.2/lib/rails/commands.rb:18:in `<main>'
        49: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-6.1.3.2/lib/rails/command.rb:50:in `invoke'
        48: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-6.1.3.2/lib/rails/command/base.rb:69:in `perform'
        47: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/thor-1.1.0/lib/thor.rb:392:in `dispatch'
        46: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command'
        45: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/thor-1.1.0/lib/thor/command.rb:27:in `run'
        44: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-6.1.3.2/lib/rails/commands/server/server_command.rb:135:in `perform'
        43: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-6.1.3.2/lib/rails/commands/server/server_command.rb:135:in `tap'
        42: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-6.1.3.2/lib/rails/commands/server/server_command.rb:144:in `block in perform'
        41: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-6.1.3.2/lib/rails/commands/server/server_command.rb:37:in `start'
        40: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-6.1.3.2/lib/rails/commands/server/server_command.rb:77:in `log_to_stdout'
        39: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/server.rb:422:in `wrapped_app'
        38: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/server.rb:249:in `app'
        37: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/server.rb:349:in `build_app_and_options_from_config'
        36: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:66:in `parse_file'
        35: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:105:in `load_file'
        34: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in `new_from_string'
        33: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in `eval'
        32: from config.ru:3:in `block in <main>'
        31: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:53:in `require_relative'
        30: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/activesupport-6.1.3.2/lib/active_support/dependencies.rb:332:in `require'
        29: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/activesupport-6.1.3.2/lib/active_support/dependencies.rb:299:in `load_dependency'
        28: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/activesupport-6.1.3.2/lib/active_support/dependencies.rb:332:in `block in require'
        27: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in `require'
        26: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
        25: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
        24: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
        23: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
        22: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
        21: from /Users/machine5739/Desktop/greenroads-admin/config/environment.rb:5:in `<main>'
        20: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-6.1.3.2/lib/rails/application.rb:384:in `initialize!'
        19: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-6.1.3.2/lib/rails/initializable.rb:60:in `run_initializers'
        18: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/2.7.0/tsort.rb:205:in `tsort_each'
        17: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/2.7.0/tsort.rb:226:in `tsort_each'
        16: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/2.7.0/tsort.rb:347:in `each_strongly_connected_component'
        15: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/2.7.0/tsort.rb:347:in `call'
        14: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/2.7.0/tsort.rb:347:in `each'
        13: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/2.7.0/tsort.rb:349:in `block in each_strongly_connected_component'
        12: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/2.7.0/tsort.rb:431:in `each_strongly_connected_component_from'
        11: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/2.7.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
        10: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/2.7.0/tsort.rb:228:in `block in tsort_each'
         9: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-6.1.3.2/lib/rails/initializable.rb:61:in `block in run_initializers'
         8: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-6.1.3.2/lib/rails/initializable.rb:32:in `run'
         7: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/railties-6.1.3.2/lib/rails/initializable.rb:32:in `instance_exec'
         6: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/webpacker-5.4.0/lib/webpacker/railtie.rb:41:in `block in <class:Engine>'
         5: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/webpacker-5.4.0/lib/webpacker.rb:35:in `bootstrap'
         4: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/webpacker-5.4.0/lib/webpacker/commands.rb:47:in `bootstrap'
         3: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/webpacker-5.4.0/lib/webpacker/manifest.rb:18:in `refresh'
         2: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/webpacker-5.4.0/lib/webpacker/manifest.rb:84:in `load'
         1: from /Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/json-2.5.1/lib/json/common.rb:216:in `parse'
/Users/machine5739/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/json-2.5.1/lib/json/pure/parser.rb:121:in `parse': source is not valid JSON! (JSON::ParserError)
2ul0zpep

2ul0zpep1#

有可能是损坏的bootsnap缓存吗?
尝试删除 tmp/cache 在项目文件夹中(或您可以在中配置的任何其他路径中 config/boot.rb 对于bootsnap),也可以尝试使用 spring stop 以防在项目中运行它。

相关问题