プログラミング初心者です。
もともとrails newしてHerokuへのデプロイ手前まで進んでいたのですが、
エラー解消やバージョン変更などを繰り返しているうちに
コンフリクトエラーが重なり、これはもう解決できそうにない状態だと判断しまして、
アプリを一から作り直すことにしました。
しかし今度はrails newの段階でエラーメッセージが出るようになってしまいました。
1個前のアプリのエラーが影響しているのでしょうか。
rails newの結果
rails _6.0.3_ アプリ名 exist identical README.md identical Rakefile identical .ruby-version identical config.ru conflict .gitignore Overwrite /Users/asamitakaoka/project/my_portfolio/.gitignore? (enter "h" for help) [Ynaqdhm] Y force .gitignore identical Gemfile run git init from "." Reinitialized existing Git repository in /Users/asamitakaoka/project/my_portfolio/.git/ identical package.json exist app identical app/assets/config/manifest.js identical app/assets/stylesheets/application.css identical app/channels/application_cable/channel.rb identical app/channels/application_cable/connection.rb identical app/controllers/application_controller.rb identical app/helpers/application_helper.rb identical app/javascript/channels/consumer.js identical app/javascript/channels/index.js identical app/javascript/packs/application.js identical app/jobs/application_job.rb identical app/mailers/application_mailer.rb identical app/models/application_record.rb identical app/views/layouts/application.html.erb identical app/views/layouts/mailer.html.erb identical app/views/layouts/mailer.text.erb exist app/assets/images identical app/assets/images/.keep identical app/controllers/concerns/.keep identical app/models/concerns/.keep exist bin identical bin/rails identical bin/rake identical bin/setup identical bin/yarn exist config identical config/routes.rb identical config/application.rb identical config/environment.rb identical config/cable.yml identical config/puma.rb identical config/spring.rb identical config/storage.yml exist config/environments identical config/environments/development.rb identical config/environments/production.rb identical config/environments/test.rb exist config/initializers identical config/initializers/application_controller_renderer.rb identical config/initializers/assets.rb identical config/initializers/backtrace_silencers.rb identical config/initializers/content_security_policy.rb identical config/initializers/cookies_serializer.rb create config/initializers/cors.rb identical config/initializers/filter_parameter_logging.rb identical config/initializers/inflections.rb identical config/initializers/mime_types.rb create config/initializers/new_framework_defaults_6_0.rb identical config/initializers/wrap_parameters.rb exist config/locales identical config/locales/en.yml append .gitignore identical config/boot.rb identical config/database.yml exist db identical db/seeds.rb exist lib exist lib/tasks identical lib/tasks/.keep exist lib/assets identical lib/assets/.keep exist log identical log/.keep exist public identical public/404.html identical public/422.html identical public/500.html identical public/apple-touch-icon-precomposed.png identical public/apple-touch-icon.png identical public/favicon.ico identical public/robots.txt exist tmp identical tmp/.keep exist tmp/pids identical tmp/pids/.keep exist tmp/cache exist tmp/cache/assets exist vendor identical vendor/.keep exist test/fixtures identical test/fixtures/.keep exist test/fixtures/files identical test/fixtures/files/.keep exist test/controllers identical test/controllers/.keep exist test/mailers identical test/mailers/.keep exist test/models identical test/models/.keep exist test/helpers identical test/helpers/.keep exist test/integration identical test/integration/.keep identical test/channels/application_cable/connection_test.rb identical test/test_helper.rb exist test/system identical test/system/.keep identical test/application_system_test_case.rb exist storage identical storage/.keep exist tmp/storage identical tmp/storage/.keep remove config/initializers/cors.rb remove config/initializers/new_framework_defaults_6_0.rb run bundle install Fetching gem metadata from https://rubygems.org/............ Resolving dependencies... Bundler could not find compatible versions for gem "activemodel": In snapshot (Gemfile.lock): activemodel (= 6.1.3.1) In Gemfile: rails (~> 6.0.3) was resolved to 6.0.3, which depends on activemodel (= 6.0.3) web-console (>= 3.3.0) was resolved to 4.1.0, which depends on activemodel (>= 6.0.0) Running `bundle update` will rebuild your snapshot from scratch, using only the gems in your Gemfile, which may resolve the conflict. run bundle binstubs bundler Could not find gem 'rails (~> 6.0.3)' in any of the gem sources listed in your Gemfile. run bundle exec spring binstub --all rbenv: spring: command not found The `spring' command exists in these Ruby versions: 2.7.0 rails webpacker:install Could not find gem 'rails (~> 6.0.3)' in any of the gem sources listed in your Gemfile. Run `bundle install` to install missing gems.
試したこと
エラーメッセージにbundle installやbundle updateを実行すると解決できそうなことが書かれていたため、実行しました。
しかし、「Could not locate Gemfile」と返ってくるだけでした。
どうすればエラーを解消し新しいアプリを作り直せますでしょうか。
ご教示いただけますと幸いです。
何卒よろしくお願いいたします。
回答1件
あなたの回答
tips
プレビュー