Project

General

Profile

Actions

Defect #38819

closed

Could not load server "webrick". Maybe you need to the add it to the Gemfile?

Added by Javier Pastor about 1 year ago. Updated 9 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Issues
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

System Linux Gentoo, Ruby 3.1 and Redmine 5.

The first problem is that the service does not start like the previous versions, I show the executed command and the error:

#  bundle exec rails server webrick -e production
/usr/lib64/ruby/gems/3.1.0/gems/thor-1.2.2/lib/thor/base.rb:525:in `handle_argument_error': ERROR: "rails server" was called with arguments ["webrick"] (Thor::InvocationError)
Usage: "rails server -u [thin/puma/webrick] [options]" 
        from /usr/lib64/ruby/gems/3.1.0/gems/thor-1.2.2/lib/thor/command.rb:34:in `rescue in run'
        from /usr/lib64/ruby/gems/3.1.0/gems/thor-1.2.2/lib/thor/command.rb:20:in `run'
        from /usr/lib64/ruby/gems/3.1.0/gems/thor-1.2.2/lib/thor/invocation.rb:127:in `invoke_command'
        from /usr/lib64/ruby/gems/3.1.0/gems/thor-1.2.2/lib/thor.rb:392:in `dispatch'
        from /usr/lib64/ruby/gems/3.1.0/gems/railties-6.1.7.4/lib/rails/command/base.rb:69:in `perform'
        from /usr/lib64/ruby/gems/3.1.0/gems/railties-6.1.7.4/lib/rails/command.rb:48:in `invoke'
        from /usr/lib64/ruby/gems/3.1.0/gems/railties-6.1.7.4/lib/rails/commands.rb:18:in `<top (required)>'
        from bin/rails:4:in `require'
        from bin/rails:4:in `<main>'
/usr/lib64/ruby/gems/3.1.0/gems/railties-6.1.7.4/lib/rails/commands/server/server_command.rb:130:in `perform': wrong number of arguments (given 1, expected 0) (ArgumentError)
        from /usr/lib64/ruby/gems/3.1.0/gems/thor-1.2.2/lib/thor/command.rb:27:in `run'
        from /usr/lib64/ruby/gems/3.1.0/gems/thor-1.2.2/lib/thor/invocation.rb:127:in `invoke_command'
        from /usr/lib64/ruby/gems/3.1.0/gems/thor-1.2.2/lib/thor.rb:392:in `dispatch'
        from /usr/lib64/ruby/gems/3.1.0/gems/railties-6.1.7.4/lib/rails/command/base.rb:69:in `perform'
        from /usr/lib64/ruby/gems/3.1.0/gems/railties-6.1.7.4/lib/rails/command.rb:48:in `invoke'
        from /usr/lib64/ruby/gems/3.1.0/gems/railties-6.1.7.4/lib/rails/commands.rb:18:in `<top (required)>'
        from bin/rails:4:in `require'
        from bin/rails:4:in `<main>'

It solves adding "-u" in the command, but now we get another error:

# bundle exec rails server -u webrick -e production
Could not load server "webrick". Maybe you need to the add it to the Gemfile?

  gem "webrick" 

Run `bin/rails server --help` for more options.

Solution add gem "webrick" in Gemfile and update with bundle update. After this the server starts correctly.

Actions

Also available in: Atom PDF