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

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

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

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

Ruby on Rails

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

Q&A

解決済

2回答

3672閲覧

【緊急】Ruby on rails rails sをしてエラーで繋がらないので困っている。

kenkun777

総合スコア10

Ruby

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

Ruby on Rails

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

0グッド

0クリップ

投稿2018/09/18 01:58

編集2018/09/18 07:22

実現したいこと

Ruby on railsでrails sを実行するも
エラーが出てアクセスが出来ない。

ググって調べるものの解決せずで困っています。

発生しているエラーメッセージ

=> Booting Puma => Rails 5.2.1 application starting in development => Run `rails server -h` for more startup options Exiting /Users/space/rails/spa/config/environments/development.rb:37:in `block (2 levels) in <top (required)>': uninitialized constant Bullet (NameError) from /Users/space/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-5.2.1/lib/active_support/lazy_load_hooks.rb:69:in `block in execute_hook' from /Users/space/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-5.2.1/lib/active_support/lazy_load_hooks.rb:62:in `with_execution_control' from /Users/space/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-5.2.1/lib/active_support/lazy_load_hooks.rb:67:in `execute_hook' from /Users/space/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-5.2.1/lib/active_support/lazy_load_hooks.rb:52:in `block in run_load_hooks' from /Users/space/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-5.2.1/lib/active_support/lazy_load_hooks.rb:51:in `each' from /Users/space/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-5.2.1/lib/active_support/lazy_load_hooks.rb:51:in `run_load_hooks' from /Users/space/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/railties-5.2.1/lib/rails/application/finisher.rb:75:in `block in <module:Finisher>' from /Users/space/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/railties-5.2.1/lib/rails/initializable.rb:32:in `instance_exec' from /Users/space/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/railties-5.2.1/lib/rails/initializable.rb:32:in `run' from /Users/space/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/railties-5.2.1/lib/rails/initializable.rb:61:in `block in run_initializers' from /Users/space/.rbenv/versions/2.4.2/lib/ruby/2.4.0/tsort.rb:228:in `block in tsort_each' from /Users/space/.rbenv/versions/2.4.2/lib/ruby/2.4.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component' from /Users/space/.rbenv/versions/2.4.2/lib/ruby/2.4.0/tsort.rb:431:in `each_strongly_connected_component_from' from /Users/space/.rbenv/versions/2.4.2/lib/ruby/2.4.0/tsort.rb:349:in `block in each_strongly_connected_component' from /Users/space/.rbenv/versions/2.4.2/lib/ruby/2.4.0/tsort.rb:347:in `each' from /Users/space/.rbenv/versions/2.4.2/lib/ruby/2.4.0/tsort.rb:347:in `call' from /Users/space/.rbenv/versions/2.4.2/lib/ruby/2.4.0/tsort.rb:347:in `each_strongly_connected_component' from /Users/space/.rbenv/versions/2.4.2/lib/ruby/2.4.0/tsort.rb:226:in `tsort_each' from /Users/space/.rbenv/versions/2.4.2/lib/ruby/2.4.0/tsort.rb:205:in `tsort_each' from /Users/space/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/railties-5.2.1/lib/rails/initializable.rb:60:in `run_initializers' from /Users/space/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/railties-5.2.1/lib/rails/application.rb:361:in `initialize!' from /Users/space/rails/spa/config/environment.rb:5:in `<top (required)>' from config.ru:3:in `block in <main>' from /Users/space/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rack-2.0.5/lib/rack/builder.rb:55:in `instance_eval' from /Users/space/.rbenv/versions/2.4.2/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 /Users/space/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rack-2.0.5/lib/rack/builder.rb:49:in `eval' from /Users/space/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rack-2.0.5/lib/rack/builder.rb:49:in `new_from_string' from /Users/space/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rack-2.0.5/lib/rack/builder.rb:40:in `parse_file' from /Users/space/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rack-2.0.5/lib/rack/server.rb:319:in `build_app_and_options_from_config' from /Users/space/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rack-2.0.5/lib/rack/server.rb:219:in `app' from /Users/space/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/railties-5.2.1/lib/rails/commands/server/server_command.rb:27:in `app' from /Users/space/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rack-2.0.5/lib/rack/server.rb:354:in `wrapped_app' from /Users/space/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/railties-5.2.1/lib/rails/commands/server/server_command.rb:89:in `log_to_stdout' from /Users/space/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/railties-5.2.1/lib/rails/commands/server/server_command.rb:51:in `start' from /Users/space/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/railties-5.2.1/lib/rails/commands/server/server_command.rb:147:in `block in perform' from /Users/space/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/railties-5.2.1/lib/rails/commands/server/server_command.rb:142:in `tap' from /Users/space/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/railties-5.2.1/lib/rails/commands/server/server_command.rb:142:in `perform' from /Users/space/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run' from /Users/space/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command' from /Users/space/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch' from /Users/space/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/railties-5.2.1/lib/rails/command/base.rb:65:in `perform' from /Users/space/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/railties-5.2.1/lib/rails/command.rb:46:in `invoke' from /Users/space/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/railties-5.2.1/lib/rails/commands.rb:18:in `<top (required)>' from bin/rails:9:in `require' from bin/rails:9:in `<main>' //*---------------- 追加情報<development.rb> ---------------- *// Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # In the development environment your application's code is reloaded on # every request. This slows down response time but is perfect for development # since you don't have to restart the web server when you make code changes. config.cache_classes = false # Do not eager load code on boot. config.eager_load = false # Show full error reports and disable caching. config.consider_all_requests_local = true config.action_controller.perform_caching = false # Print deprecation notices to the Rails logger. config.active_support.deprecation = :log # Raise an error on page load if there are pending migrations. config.active_record.migration_error = :page_load # Debug mode disables concatenation and preprocessing of assets. # This option may cause significant delays in view rendering with a large # number of complex assets. config.assets.debug = true # Re-read each assets file config.assets.compile = true config.assets.digest = true # Add md5 value on every static file config.serve_static_files = true # Adds additional error checking when serving assets at runtime. # Checks for improperly declared sprockets dependencies. # Raises helpful error messages. config.assets.raise_runtime_errors = true # gem bullet config.after_initialize do Bullet.enable = true # Bulletプラグインを有効 Bullet.alert = true # JavaScriptでの通知 Bullet.bullet_logger = true # log/bullet.logへの出力 Bullet.console = true # ブラウザのコンソールログに記録 Bullet.rails_logger = true # Railsログに出力 end # Raises error for missing translations config.action_view.raise_on_missing_translations = true # Mailer Setting config.action_mailer.default_url_options = { host: 'localhost:3000' } config.action_mailer.delivery_method = :letter_opener config.action_controller.action_on_unpermitted_parameters = :raise end

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

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

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

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

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

kazto

2018/09/18 06:16

/Users/space/rails/spa/config/environments/development.rb の内容を追記できますでしょうか。
kenkun777

2018/09/18 07:25

ありがとうございます。development.rbの内容を追加しました!!
guest

回答2

0

自己解決

gem bulletを消すと動きましたが、結局原因がわかった訳ではありません。

投稿2018/09/26 22:13

kenkun777

総合スコア10

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

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

0

エラー文の一行目にuninitialized constant Bullet (NameError)とありますが、
Gemfile.rbを修正しましたでしょうか?
もしGemfile.rbの記述を修正したら、ターミナルでbundle installをし直さないと設定が反映されないです。
下記が参考になるかもしれません。違っていたらごめんなさい。
https://qiita.com/shibadai/items/561d0a943c941a61c45c

投稿2018/09/18 03:59

Malas

総合スコア112

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

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

kenkun777

2018/09/18 07:25

ありがとうございます。 Gemfile.rbのruby '2.4.2'をruby '>= 2.4.2'に変更したくらいです。 bundle installしても同じエラーが続くんです。 参考のURLを拝見して実行してみます!!
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.50%

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

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

質問する

関連した質問