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

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

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

Cloud9は、クラウドからのプログラミングが可能になるWebサービス。IDEとしての機能が搭載されており、GitHubやHerokuなど他ツールとの連携も可能です。ブラウザ上で動くため、デバイスに関係なく開発環境を準備できます。

Ruby

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

Ruby on Rails

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

Q&A

0回答

1049閲覧

Cloud9でrailsのwebサイトを閲覧したいのですが、出来ません

ttp111

総合スコア2

Cloud9

Cloud9は、クラウドからのプログラミングが可能になるWebサービス。IDEとしての機能が搭載されており、GitHubやHerokuなど他ツールとの連携も可能です。ブラウザ上で動くため、デバイスに関係なく開発環境を準備できます。

Ruby

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

Ruby on Rails

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

0グッド

0クリップ

投稿2020/07/21 06:32

前提・実現したいこと

クロームでCloud9を使っています。OSはwindows10です。

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

Cloud9でrails アプリケーションを作りたいのですが、rails sでサーバーを立ち上げて、Previewボタンを押してwebページを閲覧しようとしても、以下のようなエラーメッセージが表示されてうまくいきません。

Gem::LoadError Specified 'sqlite3' for database adapter, but the gem is not loaded. Add `gem 'sqlite3'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord). Extracted source (around line #176): 174 175 176 177 178 179 require path_to_adapter rescue Gem::LoadError => e raise Gem::LoadError, "Specified '#{spec[:adapter]}' for database adapter, but the gem is not loaded. Add `gem '#{e.name}'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord)." rescue LoadError => e raise LoadError, "Could not load '#{path_to_adapter}'. Make sure that the adapter in config/database.yml is valid. If you use an adapter other than 'mysql2', 'postgresql' or 'sqlite3' add the necessary adapter gem to the Gemfile.", e.backtrace end Rails.root: /home/ec2-user/environment/cravan Application Trace | Framework Trace | Full Trace activerecord (5.0.7.2) lib/active_record/connection_adapters/connection_specification.rb:176:in `rescue in spec' activerecord (5.0.7.2) lib/active_record/connection_adapters/connection_specification.rb:173:in `spec' activerecord (5.0.7.2) lib/active_record/connection_handling.rb:53:in `establish_connection' activerecord (5.0.7.2) lib/active_record/railtie.rb:125:in `block (2 levels) in <class:Railtie>' activesupport (5.0.7.2) lib/active_support/lazy_load_hooks.rb:69:in `instance_eval' activesupport (5.0.7.2) lib/active_support/lazy_load_hooks.rb:69:in `block in execute_hook' activesupport (5.0.7.2) lib/active_support/lazy_load_hooks.rb:60:in `with_execution_control' activesupport (5.0.7.2) lib/active_support/lazy_load_hooks.rb:65:in `execute_hook' activesupport (5.0.7.2) lib/active_support/lazy_load_hooks.rb:50:in `block in run_load_hooks' activesupport (5.0.7.2) lib/active_support/lazy_load_hooks.rb:49:in `each' activesupport (5.0.7.2) lib/active_support/lazy_load_hooks.rb:49:in `run_load_hooks' activerecord (5.0.7.2) lib/active_record/base.rb:324:in `<module:ActiveRecord>' activerecord (5.0.7.2) lib/active_record/base.rb:24:in `<top (required)>' activesupport (5.0.7.2) lib/active_support/dependencies.rb:293:in `require' activesupport (5.0.7.2) lib/active_support/dependencies.rb:293:in `block in require' activesupport (5.0.7.2) lib/active_support/dependencies.rb:259:in `load_dependency' activesupport (5.0.7.2) lib/active_support/dependencies.rb:293:in `require' activerecord (5.0.7.2) lib/active_record/migration.rb:559:in `connection' activerecord (5.0.7.2) lib/active_record/migration.rb:546:in `call' actionpack (5.0.7.2) lib/action_dispatch/middleware/callbacks.rb:38:in `block in call' activesupport (5.0.7.2) lib/active_support/callbacks.rb:97:in `__run_callbacks__' activesupport (5.0.7.2) lib/active_support/callbacks.rb:750:in `_run_call_callbacks' activesupport (5.0.7.2) lib/active_support/callbacks.rb:90:in `run_callbacks' actionpack (5.0.7.2) lib/action_dispatch/middleware/callbacks.rb:36:in `call' actionpack (5.0.7.2) lib/action_dispatch/middleware/executor.rb:12:in `call' actionpack (5.0.7.2) lib/action_dispatch/middleware/remote_ip.rb:79:in `call' actionpack (5.0.7.2) lib/action_dispatch/middleware/debug_exceptions.rb:49:in `call' web-console (3.7.0) lib/web_console/middleware.rb:135:in `call_app' web-console (3.7.0) lib/web_console/middleware.rb:22:in `block in call' web-console (3.7.0) lib/web_console/middleware.rb:20:in `catch' web-console (3.7.0) lib/web_console/middleware.rb:20:in `call' actionpack (5.0.7.2) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' railties (5.0.7.2) lib/rails/rack/logger.rb:36:in `call_app' railties (5.0.7.2) lib/rails/rack/logger.rb:24:in `block in call' activesupport (5.0.7.2) lib/active_support/tagged_logging.rb:69:in `block in tagged' activesupport (5.0.7.2) lib/active_support/tagged_logging.rb:26:in `tagged' activesupport (5.0.7.2) lib/active_support/tagged_logging.rb:69:in `tagged' railties (5.0.7.2) lib/rails/rack/logger.rb:24:in `call' sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:in `call' actionpack (5.0.7.2) lib/action_dispatch/middleware/request_id.rb:24:in `call' rack (2.2.3) lib/rack/method_override.rb:24:in `call' rack (2.2.3) lib/rack/runtime.rb:22:in `call' activesupport (5.0.7.2) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call' actionpack (5.0.7.2) lib/action_dispatch/middleware/executor.rb:12:in `call' actionpack (5.0.7.2) lib/action_dispatch/middleware/static.rb:136:in `call' rack (2.2.3) lib/rack/sendfile.rb:110:in `call' railties (5.0.7.2) lib/rails/engine.rb:522:in `call' puma (3.12.6) lib/puma/configuration.rb:227:in `call' puma (3.12.6) lib/puma/server.rb:706:in `handle_request' puma (3.12.6) lib/puma/server.rb:476:in `process_client' puma (3.12.6) lib/puma/server.rb:334:in `block in run' puma (3.12.6) lib/puma/thread_pool.rb:135:in `block in spawn_thread' This error occurred while loading the following files: active_record/base Request Parameters: None Toggle session dump Toggle env dump Response Headers: None

該当のソースコード

ターミナル上で、
$rails new test_app
$cd test__app
$bundle init
$bundle install
$rails s
という操作を行いました。

試したこと

bundle update をしてみましたが直りませんでした。

ご教授いただければ幸いです。

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

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

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

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

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

gouf

2020/07/23 08:11

エラーメッセージのヒントは試してみましたか? : 「Specified 'sqlite3' for database adapter, but the gem is not loaded. Add `gem 'sqlite3'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).」(Gemfile に sqlite3 の定義を追記して bundle install)
gouf

2020/07/23 08:14

実施されたターミナルでの操作を、「bundle init」の手順を抜いて試した場合になにか変化は見られますか? (※すでに test_app は作成されているので、たとえば test_app2 を作成してみる)
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問