質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Q&A

解決済

1回答

3016閲覧

rails s ができない

sk2938

総合スコア21

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

0グッド

0クリップ

投稿2018/05/29 08:21

編集2018/05/29 08:34

入門書でrailsの勉強をしているのですが、入門書と同じようにやっているのですが動きません。

PS C:\Users\sk\sample> rails s
=> Booting Puma
=> Rails 5.2.0 application starting in development
=> Run rails server -h for more startup options
Exiting
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:50:in load': C:/Users/sk/sample/config/routes.rb:3: unknown regexp options - gd (SyntaxError) from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:50:in load'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:277:in block in load' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:249:in load_dependency'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:277:in load' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.0/lib/rails/application/routes_reloader.rb:57:in block
in load_paths'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.0/lib/rails/application/routes_reloader.rb:57:in each' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.0/lib/rails/application/routes_reloader.rb:57:in load_paths'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.0/lib/rails/application/routes_reloader.rb:20:in reload!' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.0/lib/rails/application/routes_reloader.rb:43:in block
in updater'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activesupport-5.2.0/lib/active_support/file_update_checker.rb:83:in execute' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.0/lib/rails/application/routes_reloader.rb:44:in updater'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.0/lib/rails/application/routes_reloader.rb:33:in execute_if_updated' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.0/lib/rails/application/finisher.rb:130:in block in module:Finisher'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.0/lib/rails/initializable.rb:32:in instance_exec' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.0/lib/rails/initializable.rb:32:in run'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.0/lib/rails/initializable.rb:61:in block in run_initializers' from C:/Ruby24-x64/lib/ruby/2.4.0/tsort.rb:228:in block in tsort_each'
from C:/Ruby24-x64/lib/ruby/2.4.0/tsort.rb:350:in block (2 levels) in each_strongly_connected_component' from C:/Ruby24-x64/lib/ruby/2.4.0/tsort.rb:431:in each_strongly_connected_component_from'
from C:/Ruby24-x64/lib/ruby/2.4.0/tsort.rb:349:in block in each_strongly_connected_component' from C:/Ruby24-x64/lib/ruby/2.4.0/tsort.rb:347:in each'
from C:/Ruby24-x64/lib/ruby/2.4.0/tsort.rb:347:in call' from C:/Ruby24-x64/lib/ruby/2.4.0/tsort.rb:347:in each_strongly_connected_component'
from C:/Ruby24-x64/lib/ruby/2.4.0/tsort.rb:226:in tsort_each' from C:/Ruby24-x64/lib/ruby/2.4.0/tsort.rb:205:in tsort_each'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.0/lib/rails/initializable.rb:60:in run_initializers' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.0/lib/rails/application.rb:361:in initialize!'
from C:/Users/sk/sample/config/environment.rb:5:in <top (required)>' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in require'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in block in require_with_bootsnap_lfi' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in register'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in require_with_bootsnap_lfi' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in require'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in block in require' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:249:in load_dependency'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in require' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:44:in require_relative'
from config.ru:3:in block in <main>' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rack-2.0.5/lib/rack/builder.rb:55:in instance_eval'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rack-2.0.5/lib/rack/builder.rb:55:in initialize' from config.ru:in new'
from config.ru:in <main>' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rack-2.0.5/lib/rack/builder.rb:49:in eval'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rack-2.0.5/lib/rack/builder.rb:49:in new_from_string' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rack-2.0.5/lib/rack/builder.rb:40:in parse_file'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rack-2.0.5/lib/rack/server.rb:319:in build_app_and_options_from_config' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rack-2.0.5/lib/rack/server.rb:219:in app'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:27:in app' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rack-2.0.5/lib/rack/server.rb:354:in wrapped_app'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:89:in log_to_stdout' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:51:in start'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:147:in block in perform' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:142:in tap'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:142:in perform' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/command.rb:27:in run'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in invoke_command' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor.rb:387:in dispatch'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.0/lib/rails/command/base.rb:65:in perform' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.0/lib/rails/command.rb:46:in invoke'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.0/lib/rails/commands.rb:18:in <top (required)>' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in require'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in block in require_with_bootsnap_lfi' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in register'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in require_with_bootsnap_lfi' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in require'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in block in require' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:249:in load_dependency'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in require' from bin/rails:4:in <main>'

config/route.rbの内容

Rails.application.routes.draw do

For details on the DSL available within this file,

see http://guides.rubyonrails.org/routing.html
get '/users', to: 'users#index'
end

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

kazto

2018/05/29 08:23

「load': C:/Users/sk/sample/config/routes.rb:3: unknown regexp options」から、config/route.rbに不備があると考えられます。内容の追記をお願いします。
guest

回答1

0

ベストアンサー

Ruby

1Rails.application.routes.draw do 2# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html 3 4see http://guides.rubyonrails.org/routing.html 5get '/users', to: 'users#index' 6end

まず、route.rb の状態は上記で間違いないでしょうか。
すなわち、see で始まる行はコメントになっていない認識であっていますか。

投稿2018/05/29 08:33

kazto

総合スコア7196

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

sk2938

2018/05/29 08:37

まず、route.rb の状態は上記で間違いないでしょうか。 すなわち、see で始まる行はコメントになっていない認識であっていますか。 >あっています。コピぺしたら表記がおかしくなってしまいました。すみません。
kazto

2018/05/29 08:40

であれば、seeの行をコメントアウトなり削除なりすることで、(ほかにも問題が無ければ)動くようになるはずです。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問