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

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

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

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

Ruby on Rails

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

Q&A

0回答

1070閲覧

rails new をすると出るエラー NameError: uninitialized constant URI::Generic

masaosan18

総合スコア64

Ruby

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

Ruby on Rails

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

0グッド

0クリップ

投稿2020/10/10 08:51

rails newをしたところ,railsアプリは作成できたもののエラーが出てしまいます。

NameError: uninitialized constant URI::Generic

ruby

1 create 2 create README.md 3 create Rakefile 4 create .ruby-version 5 create config.ru 6 create .gitignore 7 create Gemfile 8 run git init from "." 9Initialized empty Git repository in /Users/masahito/Desktop/debug_sample_app/.git/ 10 create package.json 11 create app 12 create app/assets/config/manifest.js 13 create app/assets/stylesheets/application.css 14 create app/channels/application_cable/channel.rb 15 create app/channels/application_cable/connection.rb 16 create app/controllers/application_controller.rb 17 create app/helpers/application_helper.rb 18 create app/javascript/channels/consumer.js 19 create app/javascript/channels/index.js 20 create app/javascript/packs/application.js 21 create app/jobs/application_job.rb 22 create app/mailers/application_mailer.rb 23 create app/models/application_record.rb 24 create app/views/layouts/application.html.erb 25 create app/views/layouts/mailer.html.erb 26 create app/views/layouts/mailer.text.erb 27 create app/assets/images 28 create app/assets/images/.keep 29 create app/controllers/concerns/.keep 30 create app/models/concerns/.keep 31 create bin 32 create bin/rails 33 create bin/rake 34 create bin/setup 35 create bin/yarn 36 create config 37 create config/routes.rb 38 create config/application.rb 39 create config/environment.rb 40 create config/cable.yml 41 create config/puma.rb 42 create config/spring.rb 43 create config/storage.yml 44 create config/environments 45 create config/environments/development.rb 46 create config/environments/production.rb 47 create config/environments/test.rb 48 create config/initializers 49 create config/initializers/application_controller_renderer.rb 50 create config/initializers/assets.rb 51 create config/initializers/backtrace_silencers.rb 52 create config/initializers/content_security_policy.rb 53 create config/initializers/cookies_serializer.rb 54 create config/initializers/cors.rb 55 create config/initializers/filter_parameter_logging.rb 56 create config/initializers/inflections.rb 57 create config/initializers/mime_types.rb 58 create config/initializers/new_framework_defaults_6_0.rb 59 create config/initializers/wrap_parameters.rb 60 create config/locales 61 create config/locales/en.yml 62 create config/master.key 63 append .gitignore 64 create config/boot.rb 65 create config/database.yml 66 create db 67 create db/seeds.rb 68 create lib 69 create lib/tasks 70 create lib/tasks/.keep 71 create lib/assets 72 create lib/assets/.keep 73 create log 74 create log/.keep 75 create public 76 create public/404.html 77 create public/422.html 78 create public/500.html 79 create public/apple-touch-icon-precomposed.png 80 create public/apple-touch-icon.png 81 create public/favicon.ico 82 create public/robots.txt 83 create tmp 84 create tmp/.keep 85 create tmp/pids 86 create tmp/pids/.keep 87 create tmp/cache 88 create tmp/cache/assets 89 create vendor 90 create vendor/.keep 91 create test/fixtures 92 create test/fixtures/.keep 93 create test/fixtures/files 94 create test/fixtures/files/.keep 95 create test/controllers 96 create test/controllers/.keep 97 create test/mailers 98 create test/mailers/.keep 99 create test/models 100 create test/models/.keep 101 create test/helpers 102 create test/helpers/.keep 103 create test/integration 104 create test/integration/.keep 105 create test/channels/application_cable/connection_test.rb 106 create test/test_helper.rb 107 create test/system 108 create test/system/.keep 109 create test/application_system_test_case.rb 110 create storage 111 create storage/.keep 112 create tmp/storage 113 create tmp/storage/.keep 114 remove config/initializers/cors.rb 115 remove config/initializers/new_framework_defaults_6_0.rb 116 run bundle install 117The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`. 118Fetching gem metadata from https://rubygems.org/............ 119Fetching gem metadata from https://rubygems.org/. 120Resolving dependencies... 121Using rake 13.0.1 122Using concurrent-ruby 1.1.7 123Using i18n 1.8.5 124Using minitest 5.14.2 125Using thread_safe 0.3.6 126Using tzinfo 1.2.7 127Using zeitwerk 2.4.0 128Using activesupport 6.0.3.4 129Using builder 3.2.4 130Using erubi 1.9.0 131Using mini_portile2 2.4.0 132Using nokogiri 1.10.10 133Using rails-dom-testing 2.0.3 134Using crass 1.0.6 135Using loofah 2.7.0 136Using rails-html-sanitizer 1.3.0 137Using actionview 6.0.3.4 138Using rack 2.2.3 139Using rack-test 1.1.0 140Using actionpack 6.0.3.4 141Using nio4r 2.5.4 142Using websocket-extensions 0.1.5 143Using websocket-driver 0.7.3 144Using actioncable 6.0.3.4 145Using globalid 0.4.2 146Using activejob 6.0.3.4 147Using activemodel 6.0.3.4 148Using activerecord 6.0.3.4 149Using mimemagic 0.3.5 150Using marcel 0.3.3 151Using activestorage 6.0.3.4 152Using mini_mime 1.0.2 153Using mail 2.7.1 154Using actionmailbox 6.0.3.4 155Using actionmailer 6.0.3.4 156Using actiontext 6.0.3.4 157Using public_suffix 4.0.6 158Using addressable 2.7.0 159Using bindex 0.8.1 160Using msgpack 1.3.3 161Using bootsnap 1.4.8 162Using bundler 2.1.4 163Using byebug 11.1.3 164Using regexp_parser 1.8.1 165Using xpath 3.2.0 166Using capybara 3.33.0 167Using childprocess 3.0.0 168Using ffi 1.13.1 169Using jbuilder 2.10.1 170Using rb-fsevent 0.10.4 171Using rb-inotify 0.10.1 172Using listen 3.2.1 173Using method_source 1.0.0 174Using pg 1.2.3 175Using puma 4.3.6 176Using rack-proxy 0.6.5 177Using thor 1.0.1 178Using railties 6.0.3.4 179Using sprockets 4.0.2 180Using sprockets-rails 3.2.2 181Using rails 6.0.3.4 182Using rubyzip 2.3.0 183Using sassc 2.4.0 184Using tilt 2.0.10 185Using sassc-rails 2.1.2 186Using sass-rails 6.0.0 187Using selenium-webdriver 3.142.7 188Using spring 2.1.1 189Using spring-watcher-listen 2.0.1 190Using turbolinks-source 5.2.0 191Using turbolinks 5.2.1 192Using web-console 4.0.4 193Using webdrivers 4.4.1 194Using webpacker 4.3.0 195Bundle complete! 17 Gemfile dependencies, 74 gems now installed. 196Use `bundle info [gemname]` to see where a bundled gem is installed. 197 run bundle binstubs bundler 198The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`. 199 run bundle exec spring binstub --all 200* bin/rake: Spring inserted 201* bin/rails: Spring inserted 202 rails webpacker:install 203rails aborted! 204NameError: uninitialized constant URI::Generic 205/Users/masahito/Desktop/debug_sample_app/config/application.rb:3:in `<top (required)>' 206/Users/masahito/Desktop/debug_sample_app/Rakefile:4:in `<top (required)>' 207/Users/masahito/Desktop/debug_sample_app/bin/rails:9:in `<top (required)>' 208/Users/masahito/Desktop/debug_sample_app/bin/spring:15:in `<top (required)>' 209bin/rails:3:in `load' 210bin/rails:3:in `<main>' 211Caused by: 212NameError: uninitialized constant URI::Generic 213/Users/masahito/Desktop/debug_sample_app/config/application.rb:3:in `<top (required)>' 214/Users/masahito/Desktop/debug_sample_app/Rakefile:4:in `<top (required)>' 215/Users/masahito/Desktop/debug_sample_app/bin/rails:9:in `<top (required)>' 216/Users/masahito/Desktop/debug_sample_app/bin/spring:15:in `<top (required)>' 217bin/rails:3:in `load' 218bin/rails:3:in `<main>' 219(See full trace by running task with --trace) 220

詳しい方、解決方法をご教授お願い致します。

## 参考にした記事
https://qiita.com/oudon722/items/891144726323409df255

これの記事を参考に解決を試みましたが、解決にいたりませんでした。

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

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

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

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

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

guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

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

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

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問