railsチュートリアルを始めたのですが、第一章のサーバーを立ち上げるところで躓いています。参考書通りcloud9に登録してenviromentを作り、railsの6.0.3をインストールしました。その後書かれてある通りに行って、rails serverを立ち上げようとしたら、ターミナルには
ubuntu:~/environment/hello_app (master) $ rails server 127.0.0.1 $IP 8080 $PORT
DEPRECATION WARNING: Passing the Rack server name as a regular argument is deprecated and will be removed in the next Rails version. Please, use the -u option instead. (called from <top (required)> at /home/ubuntu/environment/hello_app/bin/rails:9)
Traceback (most recent call last):
26: from bin/rails:3:in <main>' 25: from bin/rails:3:in
load'
24: from /home/ubuntu/environment/hello_app/bin/spring:15:in <top (required)>' 23: from /home/ubuntu/environment/hello_app/bin/spring:15:in
require'
22: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/binstub.rb:11:in <top (required)>' 21: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/binstub.rb:11:in
load'
20: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/bin/spring:49:in <top (required)>' 19: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/client.rb:30:in
run'
18: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/client/command.rb:7:in call' 17: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/client/rails.rb:28:in
call'
16: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/client/rails.rb:28:in load' 15: from /home/ubuntu/environment/hello_app/bin/rails:9:in
<top (required)>'
14: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.3/lib/active_support/dependencies.rb:324:in require' 13: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.3/lib/active_support/dependencies.rb:291:in
load_dependency'
12: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.3/lib/active_support/dependencies.rb:324:in block in require' 11: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in
require'
10: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in require_with_bootsnap_lfi' 9: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in
register'
8: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in block in require_with_bootsnap_lfi' 7: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in
require'
6: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/railties-6.0.3/lib/rails/commands.rb:18:in <main>' 5: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/railties-6.0.3/lib/rails/command.rb:46:in
invoke'
4: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/railties-6.0.3/lib/rails/command/base.rb:69:in perform' 3: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/thor-1.1.0/lib/thor.rb:392:in
dispatch'
2: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/thor-1.1.0/lib/thor/invocation.rb:127:in invoke_command' 1: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/thor-1.1.0/lib/thor/command.rb:27:in
run'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/railties-6.0.3/lib/rails/commands/server/server_command.rb:133:in perform': wrong number of arguments (given 2, expected 0) (ArgumentError) 27: from bin/rails:3:in
<main>'
26: from bin/rails:3:in load' 25: from /home/ubuntu/environment/hello_app/bin/spring:15:in
<top (required)>'
24: from /home/ubuntu/environment/hello_app/bin/spring:15:in require' 23: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/binstub.rb:11:in
<top (required)>'
22: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/binstub.rb:11:in load' 21: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/bin/spring:49:in
<top (required)>'
20: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/client.rb:30:in run' 19: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/client/command.rb:7:in
call'
18: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/client/rails.rb:28:in call' 17: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/client/rails.rb:28:in
load'
16: from /home/ubuntu/environment/hello_app/bin/rails:9:in <top (required)>' 15: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.3/lib/active_support/dependencies.rb:324:in
require'
14: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.3/lib/active_support/dependencies.rb:291:in load_dependency' 13: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.3/lib/active_support/dependencies.rb:324:in
block in require'
12: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in require' 11: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in
require_with_bootsnap_lfi'
10: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in register' 9: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in
block in require_with_bootsnap_lfi'
8: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in require' 7: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/railties-6.0.3/lib/rails/commands.rb:18:in
<main>'
6: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/railties-6.0.3/lib/rails/command.rb:46:in invoke' 5: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/railties-6.0.3/lib/rails/command/base.rb:69:in
perform'
4: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/thor-1.1.0/lib/thor.rb:392:in dispatch' 3: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/thor-1.1.0/lib/thor/invocation.rb:127:in
invoke_command'
2: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/thor-1.1.0/lib/thor/command.rb:20:in run' 1: from /home/ubuntu/.rvm/gems/ruby-2.6.3/gems/thor-1.1.0/lib/thor/command.rb:34:in
rescue in run'
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/thor-1.1.0/lib/thor/base.rb:525:in `handle_argument_error': ERROR: "rails server" was called with arguments ["8080", "8080"] (Thor::InvocationError)
Usage: "rails server -u [thin/puma/webrick] [options]"という文が表示され、
ブラウザでは、No application seems to be running here!
AWS Cloud9 can't get you to your requested environment. Here are some suggestions on how to figure out what's going on:
Check that you have access to your environment and are signed into AWS Cloud9 for the environment.
Check that the server is successfully running on AWS Cloud9:
If the server hit an error, the output window will have a message telling you what it is.
If you're in the middle of debugging code, your server might be paused right now.
The server might be running on a different port; make sure it runs on port 8080.という文が出て前に進めません。
どうすればサーバーに接続することができるでしょうか。
ご教授お願いいたします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。