When I did the following in the Ruby on Rails app, the server did not start up in the development environment (AWS Cloud9).
When I looked into the error message, I couldn't find a clue and couldn't solve it.
I would be most grateful if you could give me some advice on the possibility of a problem.
Thank you for your cooperation
Update each version to the following
AWS Cloud 9
The following error message occurs when the server does not start up in the development environment.
error messages:
Traceback (most recent call last):
24:from bin/rails:9:in`<main>'
23:from bin/rails:9:in `require'
22:from/home/ubuntu/application name/vendor/bundle/ruby/2.5.0/gems/rails-4.2.8/lib/rails/commands.rb:17:in`<top(required)>'
21:from/home/ubuntu/application name/vendor/bundle/ruby/2.5.0/gems/rails-4.2.8/lib/rails/commands/commands_tasks.rb:39:in`run_command!'
20:from/home/ubuntu/application name/vendor/bundle/ruby/2.5.0/gems/rails-4.2.8/lib/rails/commands/commands_tasks.rb:75:in`server'
19:from/home/ubuntu/app name/vendor/bundle/ruby/2.5.0/gems/rails-4.2.8/lib/rails/commands_tasks.rb:75:in`tap'
18:from/home/ubuntu/application name/vendor/bundle/ruby/2.5.0/gems/rails-4.2.8/lib/rails/commands/commands_tasks.rb:80:in`block in server'
17:from/home/ubuntu/application name/vendor/bundle/ruby/2.5.0/gems/rails-4.2.8/lib/rails/commands/server.rb:78:in `start'
16:from/home/ubuntu/application name/vendor/bundle/ruby/2.5.0/gems/rails-4.2.8/lib/rails/commands/server.rb:139:in`log_to_stdout'
15:from/home/ubuntu/app name/vendor/bundle/ruby/2.5.0/gems/rack-1.6.13/lib/rack/server.rb:337:in`wrapped_app'
14:from/home/ubuntu/app name/vendor/bundle/ruby/2.5.0/gems/rails-4.2.8/lib/rails/commands/server.rb:61:in`app'
13:from/home/ubuntu/app name/vendor/bundle/ruby/2.5.0/gems/rack-1.6.13/lib/rack/server.rb:209:in `app'
12:from/home/ubuntu/app name/vendor/bundle/ruby/2.5.0/gems/rack-1.6.13/lib/rack/server.rb:300:in`build_app_and_options_from_config'
11:from/home/ubuntu/app name/vendor/bundle/ruby/2.5.0/gems/rack-1.6.13/lib/rack/builder.rb:40:in`parse_file'
10:from/home/ubuntu/application name/vendor/bundle/ruby/2.5.0/gems/rack-1.6.13/lib/rack/builder.rb:49:in`new_from_string'
9:from/home/ubuntu/app name/vendor/bundle/ruby/2.5.0/gems/rack-1.6.13/lib/rack/builder.rb:49:in `eval'
8: from /home/ubuntu/environment/application name/config.ru:in`<main>'
7: from /home/ubuntu/environment/app name/config.ru:in `new'
6:from/home/ubuntu/app name/vendor/bundle/ruby/2.5.0/gems/rack-1.6.13/lib/rack/builder.rb:55:in `initialize'
5:from/home/ubuntu/app name/vendor/bundle/ruby/2.5.0/gems/rack-1.6.13/lib/rack/builder.rb:55:in `instance_eval'
4:from/home/ubuntu/environment/application name/config.ru:6:in`block in<main>'
3:from/home/ubuntu/app name/vendor/bundle/ruby/2.5.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:274:in `require'
2:from/home/ubuntu/app name/vendor/bundle/ruby/2.5.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:240:in`load_dependency'
1:from/home/ubuntu/app name/vendor/bundle/ruby/2.5.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:274:in`block in require'
/home/ubuntu/application name/vendor/bundle/ruby/2.5.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:274:in `require': no explicit conversion from nil to integer (TypeError)
config.ru:
#This file is used by Rack-based servers to start the application.
require::File.expand_path('../config/environment',__FILE__)
run Rails.application
require 'gctools/oobgc'
if defined? (Unicorn::HttpRequest)
use GC::OOB::UnicornMiddleware
end
https://github.com/tmm1/gctools/issues/16
This issue seems to be helpful.
Basically, the author of 'gctools/oobgc' seems to say, "Ruby 2.5 has changed the way GC works, so you can delete this gem."
config.ru
Why don't you delete the last four lines?
I solved myself.
The rails version seems to have been too low for the ruby version
© 2024 OneMinuteCode. All rights reserved.