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

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

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

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

Ruby

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

Q&A

解決済

1回答

1582閲覧

bundle exec rails new .時のエラー

tomoaki.as

総合スコア25

Ruby on Rails 5

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

Ruby

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

0グッド

0クリップ

投稿2022/01/14 16:28

前提・実現したいこと

railsの環境構築をしたい。
rails初学者です。各サイトを調べてみましたが原因が特定できませんでした
エラーの内容も特定するのが困難でした

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

Bundler could not find compatible versions for gem "sprockets":
In snapshot (Gemfile.lock):
sprockets (= 4.0.2)

In Gemfile:
sass-rails (~> 5.0) was resolved to 5.1.0, which depends on
sprockets (< 4.0, >= 2.8)

rails (~> 5.2.6) was resolved to 5.2.6, which depends on sprockets-rails (>= 2.0.0) was resolved to 3.4.2, which depends on sprockets (>= 3.0.0)

Running bundle update will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

試したこと

エラー文のbundle updateを試してみたが下記のエラーが検出された

Bundler could not find compatible versions for gem "actionpack":
In snapshot (Gemfile.lock):
actionpack (>= 5.2.6)

In Gemfile:
rails (~> 5.2.6) was resolved to 5.2.6, which depends on
actionpack (= 5.2.6)

rails (~> 5.2.6) was resolved to 5.2.6, which depends on sprockets-rails (>= 2.0.0) was resolved to 3.4.2, which depends on actionpack (>= 5.2)

Running bundle update will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

Bundler could not find compatible versions for gem "actionview":
In snapshot (Gemfile.lock):
actionview (>= 5.2.6)

In Gemfile:
jbuilder (~> 2.5) was resolved to 2.11.5, which depends on
actionview (>= 5.0.0)

rails (~> 5.2.6) was resolved to 5.2.6, which depends on actionview (= 5.2.6)

Running bundle update will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

Bundler could not find compatible versions for gem "activesupport":
In snapshot (Gemfile.lock):
activesupport (>= 5.2.6)

In Gemfile:
rails (~> 5.2.6) was resolved to 5.2.6, which depends on
activejob (= 5.2.6) was resolved to 5.2.6, which depends on
globalid (>= 0.3.6) was resolved to 1.0.0, which depends on
activesupport (>= 5.0)

rails (~> 5.2.6) was resolved to 5.2.6, which depends on activesupport (= 5.2.6) rails (~> 5.2.6) was resolved to 5.2.6, which depends on actionpack (= 5.2.6) was resolved to 5.2.6, which depends on rails-dom-testing (~> 2.0) was resolved to 2.0.3, which depends on activesupport (>= 4.2.0) rails (~> 5.2.6) was resolved to 5.2.6, which depends on sprockets-rails (>= 2.0.0) was resolved to 3.4.2, which depends on activesupport (>= 5.2)

Running bundle update will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

Bundler could not find compatible versions for gem "railties":
In snapshot (Gemfile.lock):
railties (>= 5.2.6)

In Gemfile:
rails (~> 5.2.6) was resolved to 5.2.6, which depends on
railties (= 5.2.6)

sass-rails (~> 5.0) was resolved to 5.1.0, which depends on railties (>= 5.2.0)

Running bundle update will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

Bundler could not find compatible versions for gem "sprockets":
In snapshot (Gemfile.lock):
sprockets (>= 4.0.2)

In Gemfile:
sass-rails (~> 5.0) was resolved to 5.1.0, which depends on
sprockets (< 4.0, >= 2.8)

rails (~> 5.2.6) was resolved to 5.2.6, which depends on sprockets-rails (>= 2.0.0) was resolved to 3.4.2, which depends on sprockets (>= 3.0.0)

Running bundle update will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

補足情報(FW/ツールのバージョンなど)

ruby 2.7.2
Bundler version 2.2.30
vagrant
ここにより詳細な情報を記載してください。

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

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

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

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

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

tomoaki.as

2022/01/15 16:09

hoshi-takanori様 参考ページで試して解決できました。ありがとうございました。
guest

回答1

0

自己解決

https://qiita.com/terufumi1122/items/03edf05d4c940c361712
参考ページをもとに解決しました

投稿2022/01/15 16:10

tomoaki.as

総合スコア25

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

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

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問