ruby-on-rails – `无法修改冻结的数组(RuntimeError)`尝试更新
发布时间:2020-12-17 01:57:34 所属栏目:百科 来源:网络整理
导读:我正在将我的rails应用程序从5.0更新到5.1,当我启动应用程序时,它会抛出以下内容: ~/workspace/productswatcher ? rails s/files/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/react_on_rails-5.2.0/lib/react_on_rails/version.rb:3: warning: already
我正在将我的rails应用程序从5.0更新到5.1,当我启动应用程序时,它会抛出以下内容:
~/workspace/productswatcher ? rails s /files/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/react_on_rails-5.2.0/lib/react_on_rails/version.rb:3: warning: already initialized constant ReactOnRails::VERSION /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/react_on_rails-5.2.0/lib/react_on_rails/version.rb:3: warning: previous definition of VERSION was here DEPRECATION WARNING: ActionView::Template::Handlers::Erubis is deprecated and will be removed from Rails 5.2. Switch to ActionView::Template::Handlers::ERB::Erubi instead. (called from <module:Haml> at /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/haml-4.0.7/lib/haml/helpers/safe_erubis_template.rb:3) => Booting Puma => Rails 5.1.3 application starting in development on http://localhost:3000 => Run `rails server -h` for more startup options Exiting bin/rails:6: warning: already initialized constant APP_PATH /files/alter/workspace/productswatcher/bin/rails:6: warning: previous definition of APP_PATH was here The most common rails commands are: generate Generate new code (short-cut alias: "g") console Start the Rails console (short-cut alias: "c") server Start the Rails server (short-cut alias: "s") test Run tests except system tests (short-cut alias: "t") test:system Run system tests dbconsole Start a console for the database specified in config/database.yml (short-cut alias: "db") new Create a new Rails application. "rails new my_app" creates a new application called MyApp in "./my_app" All commands can be run with -h (or --help) for more information. In addition to those commands,there are: /files/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/railties-5.1.3/lib/rails/command.rb:18: warning: already initialized constant Rails::Command::HELP_MAPPINGS /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/railties-5.1.3/lib/rails/command.rb:18: warning: previous definition of HELP_MAPPINGS was here /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/actionpack-5.1.3/lib/action_dispatch/middleware/stack.rb:74:in `insert': can't modify frozen Array (RuntimeError) from /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/actionpack-5.1.3/lib/action_dispatch/middleware/stack.rb:74:in `insert' from /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/dragonfly-1.0.12/lib/dragonfly/railtie.rb:7:in `block in <class:Railtie>' from /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/railties-5.1.3/lib/rails/initializable.rb:30:in `instance_exec' from /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/railties-5.1.3/lib/rails/initializable.rb:30:in `run' from /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/railties-5.1.3/lib/rails/initializable.rb:59:in `block in run_initializers' from /files/alter/.rvm/rubies/ruby-2.2.5/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each' from /files/alter/.rvm/rubies/ruby-2.2.5/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component' from /files/alter/.rvm/rubies/ruby-2.2.5/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from' from /files/alter/.rvm/rubies/ruby-2.2.5/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component' from /files/alter/.rvm/rubies/ruby-2.2.5/lib/ruby/2.2.0/tsort.rb:345:in `each' from /files/alter/.rvm/rubies/ruby-2.2.5/lib/ruby/2.2.0/tsort.rb:345:in `call' from /files/alter/.rvm/rubies/ruby-2.2.5/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component' from /files/alter/.rvm/rubies/ruby-2.2.5/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each' from /files/alter/.rvm/rubies/ruby-2.2.5/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each' from /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/railties-5.1.3/lib/rails/initializable.rb:58:in `run_initializers' from /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/railties-5.1.3/lib/rails/application.rb:353:in `initialize!' from /files/alter/workspace/productswatcher/config/environment.rb:5:in `<top (required)>' from /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/activesupport-5.1.3/lib/active_support/dependencies.rb:292:in `require' from /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/activesupport-5.1.3/lib/active_support/dependencies.rb:292:in `block in require' from /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/activesupport-5.1.3/lib/active_support/dependencies.rb:258:in `load_dependency' from /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/activesupport-5.1.3/lib/active_support/dependencies.rb:292:in `require' from /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/railties-5.1.3/lib/rails/application.rb:329:in `require_environment!' from /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/railties-5.1.3/lib/rails/command/actions.rb:16:in `require_application_and_environment!' from /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/railties-5.1.3/lib/rails/commands/rake/rake_command.rb:31:in `rake_tasks' from /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/railties-5.1.3/lib/rails/commands/rake/rake_command.rb:40:in `formatted_rake_tasks' from /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/railties-5.1.3/lib/rails/commands/rake/rake_command.rb:10:in `printing_commands' from /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/railties-5.1.3/lib/rails/command.rb:91:in `each' from /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/railties-5.1.3/lib/rails/command.rb:91:in `flat_map' from /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/railties-5.1.3/lib/rails/command.rb:91:in `block in sorted_groups' from /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/activesupport-5.1.3/lib/active_support/core_ext/hash/transform_values.rb:26:in `block in transform_values!' from /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/activesupport-5.1.3/lib/active_support/core_ext/hash/transform_values.rb:25:in `each' from /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/activesupport-5.1.3/lib/active_support/core_ext/hash/transform_values.rb:25:in `transform_values!' from /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/railties-5.1.3/lib/rails/command.rb:91:in `sorted_groups' from /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/railties-5.1.3/lib/rails/command.rb:84:in `print_commands' from /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/railties-5.1.3/lib/rails/commands/help/help_command.rb:9:in `help' from /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/thor-0.19.1/lib/thor/command.rb:27:in `run' from /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command' from /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch' from /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/railties-5.1.3/lib/rails/command/base.rb:63:in `perform' from /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/railties-5.1.3/lib/rails/command.rb:44:in `invoke' from /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/railties-5.1.3/lib/rails/commands.rb:16:in `<top (required)>' from /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/activesupport-5.1.3/lib/active_support/dependencies.rb:292:in `require' from /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/activesupport-5.1.3/lib/active_support/dependencies.rb:292:in `block in require' from /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/activesupport-5.1.3/lib/active_support/dependencies.rb:258:in `load_dependency' from /home/alter/.rvm/gems/ruby-2.2.5@productwatcher/gems/activesupport-5.1.3/lib/active_support/dependencies.rb:292:in `require' from bin/rails:8:in `<main>' 可能有什么问题? 解决方法
它看起来我有一个不兼容的子弹版本(5.1.0),我修复它只是更新到上一个当前版本(5.6.1):
bundle update bullet (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |