1

When I enter 'rails server' on the command line, I get the following error -

redmine@Debian:/opt/redmine$ bundle exec rails server webrick -e production
Traceback (most recent call last):
        8: from bin/rails:4:in `<main>'
        7: from bin/rails:4:in `require'
        6: from /opt/redmine/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6/lib/rails/commands.rb:18:in `<top (required)>'
        5: from /opt/redmine/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6/lib/rails/command.rb:48:in `invoke'
        4: from /opt/redmine/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6/lib/rails/command/base.rb:69:in `perform'
        3: from /opt/redmine/vendor/bundle/ruby/2.7.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
        2: from /opt/redmine/vendor/bundle/ruby/2.7.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
        1: from /opt/redmine/vendor/bundle/ruby/2.7.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6/lib/rails/commands/server/server_command.rb:130:in `perform': wrong number of arguments (given 1, expected 0) (ArgumentError)
        9: from bin/rails:4:in `<main>'
        8: from bin/rails:4:in `require'
        7: from /opt/redmine/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6/lib/rails/commands.rb:18:in `<top (required)>'
        6: from /opt/redmine/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6/lib/rails/command.rb:48:in `invoke'
        5: from /opt/redmine/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6/lib/rails/command/base.rb:69:in `perform'
        4: from /opt/redmine/vendor/bundle/ruby/2.7.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
        3: from /opt/redmine/vendor/bundle/ruby/2.7.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
        2: from /opt/redmine/vendor/bundle/ruby/2.7.0/gems/thor-1.2.1/lib/thor/command.rb:20:in `run'
        1: from /opt/redmine/vendor/bundle/ruby/2.7.0/gems/thor-1.2.1/lib/thor/command.rb:34:in `rescue in run'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/thor-1.2.1/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]"

I already tried re-installing and uninstalling Rails

miraclez
  • 11
  • 2
  • If you try `rails server -u webrick` instead ? Also for production switch to Puma. Much more advanced than webrick. Yet default setup is fine and `rails s` will start puma fine. – Maxence Jul 07 '22 at 20:32
  • @Maxence `bundle exec rails server -u webrick -e production` gives "Could not load server "webrick". Maybe you need to the add it to the Gemfile?" – Alex Apr 19 '23 at 13:53
  • Does this answer your question? [ruby 3.0.4, redmine 5.0.0, rails 6.1.4, test install start with webrick fails, "wrong number of arguments"](https://stackoverflow.com/questions/72332415/ruby-3-0-4-redmine-5-0-0-rails-6-1-4-test-install-start-with-webrick-fails) – Alex Apr 19 '23 at 13:55

0 Answers0