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

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

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

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

Ruby

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

Ruby on Rails

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

Q&A

解決済

1回答

3341閲覧

Railsコマンドが効かない

t.s_k

総合スコア61

Ruby on Rails 5

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

Ruby

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

Ruby on Rails

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

0グッド

0クリップ

投稿2018/09/22 22:38

編集2018/09/22 22:45

何を境に起きたのかがわからないのですが、
railsコマンドを打つと以下のようなエラーを返されるようになってしまいました。
WARN箇所を確認したのですが gemfileで minitest のバージョン指定は既にしていました。
rakeがなぜ警告が出ているのかは分からないです。

ご教授お願い致します。

$rails Beginning in Rails 4, Rails ships with a `rails` binstub at ./bin/ rails that should be used instead of the Bundler-generated `rails` binstub. If you are seeing this message, your binstub at ./bin/rails was ge nerated by Bundler instead of Rails. You might need to regenerate your `rails` binstub locally and add it to source control: rails app:update:bin # Bear in mind this generates othe r binstubs # too that you may or may not want (like yarn) If you already have Rails binstubs in source control, you might be inadverently overwriting them during deployment by using bundle in stall with the --binstubs option. If your application was created prior to Rails 4, here's how to up grade: bundle config --delete bin # Turn off Bundler's stub generato r rails app:update:bin # Use the new Rails executables git add bin # Add bin/ to source control You may need to remove bin/ from your .gitignore as well. When you install a gem whose executable you want to use in your ap p, generate it and add it to source control: bundle binstubs some-gem-name git add bin/new-executable WARN: Unresolved specs during Gem::Specification.reset: minitest (~> 5.1) rake (>= 0.8.7) WARN: Clearing out unresolved specs. Please report a bug if this causes problems. /Library/Ruby/Gems/2.3.0/gems/bundler-1.16.5/lib/bundler/runtime.r b:313:in `check_for_activated_spec!': You have already activated a ctivesupport 5.2.1, but your Gemfile requires activesupport 5.1.6. Prepending `bundle exec` to your command may solve this. (Gem::Lo adError) from /Library/Ruby/Gems/2.3.0/gems/bundler-1.16.5/lib/bund ler/runtime.rb:31:in `block in setup' from /System/Library/Frameworks/Ruby.framework/Versions/2. 3/usr/lib/ruby/2.3.0/forwardable.rb:202:in `each' from /System/Library/Frameworks/Ruby.framework/Versions/2. ... from /usr/local/bin/rails:22:in `load' from /usr/local/bin/rails:22:in `<main>'

GemFile

source 'https://rubygems.org' gem 'rails', '5.1.6' gem 'bootstrap-sass', '3.3.7' gem 'puma', '3.9.1' gem 'sass-rails', '5.0.6' gem 'uglifier', '3.2.0' gem 'coffee-rails', '4.2.2' gem 'jquery-rails', '4.3.1' gem 'turbolinks', '5.0.1' gem 'jbuilder', '2.7.0' group :development, :test do gem 'sqlite3', '1.3.13' gem 'byebug', '9.0.6', platform: :mri end group :development do gem 'web-console', '3.5.1' gem 'listen', '3.1.5' gem 'spring', '2.0.2' gem 'spring-watcher-listen', '2.0.1' end group :test do gem 'rails-controller-testing', '1.0.2' gem 'minitest', '5.11.3' gem 'minitest-reporters', '1.1.14' gem 'guard', '2.13.0' gem 'guard-minitest', '2.4.4' end group :production do gem 'pg', '0.20.0' end # Windows環境ではtzinfo-dataというgemを含める必要があります gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

GemLockFile

GEM remote: https://rubygems.org/ specs: actioncable (5.1.6) actionpack (= 5.1.6) nio4r (~> 2.0) websocket-driver (~> 0.6.1) actionmailer (5.1.6) actionpack (= 5.1.6) actionview (= 5.1.6) activejob (= 5.1.6) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) actionpack (5.1.6) actionview (= 5.1.6) activesupport (= 5.1.6) rack (~> 2.0) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2) actionview (5.1.6) activesupport (= 5.1.6) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.3) activejob (5.1.6) activesupport (= 5.1.6) globalid (>= 0.3.6) activemodel (5.1.6) activesupport (= 5.1.6) activerecord (5.1.6) activemodel (= 5.1.6) activesupport (= 5.1.6) arel (~> 8.0) activesupport (5.1.6) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) ansi (1.5.0) arel (8.0.0) autoprefixer-rails (9.1.4) execjs bindex (0.5.0) bootstrap-sass (3.3.7) autoprefixer-rails (>= 5.2.1) sass (>= 3.3.4) builder (3.2.3) byebug (9.0.6) coderay (1.1.2) coffee-rails (4.2.2) coffee-script (>= 2.2.0) railties (>= 4.0.0) coffee-script (2.4.1) coffee-script-source execjs coffee-script-source (1.12.2) concurrent-ruby (1.0.5) crass (1.0.4) erubi (1.7.1) execjs (2.7.0) ffi (1.9.25) formatador (0.2.5) globalid (0.4.1) activesupport (>= 4.2.0) guard (2.13.0) formatador (>= 0.2.4) listen (>= 2.7, <= 4.0) lumberjack (~> 1.0) nenv (~> 0.1) notiffany (~> 0.0) pry (>= 0.9.12) shellany (~> 0.0) thor (>= 0.18.1) guard-compat (1.2.1) guard-minitest (2.4.4) guard-compat (~> 1.2) minitest (>= 3.0) i18n (1.1.0) concurrent-ruby (~> 1.0) jbuilder (2.7.0) activesupport (>= 4.2.0) multi_json (>= 1.2) jquery-rails (4.3.1) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) listen (3.1.5) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) ruby_dep (~> 1.2) loofah (2.2.2) crass (~> 1.0.2) nokogiri (>= 1.5.9) lumberjack (1.0.13) mail (2.7.0) mini_mime (>= 0.1.1) method_source (0.9.0) mini_mime (1.0.1) mini_portile2 (2.3.0) minitest (5.11.3) minitest-reporters (1.1.14) ansi builder minitest (>= 5.0) ruby-progressbar multi_json (1.13.1) nenv (0.3.0) nio4r (2.3.1) nokogiri (1.8.4) mini_portile2 (~> 2.3.0) notiffany (0.1.1) nenv (~> 0.1) shellany (~> 0.0) pg (0.20.0) pry (0.11.3) coderay (~> 1.1.0) method_source (~> 0.9.0) puma (3.9.1) rack (2.0.5) rack-test (1.1.0) rack (>= 1.0, < 3) rails (5.1.6) actioncable (= 5.1.6) actionmailer (= 5.1.6) actionpack (= 5.1.6) actionview (= 5.1.6) activejob (= 5.1.6) activemodel (= 5.1.6) activerecord (= 5.1.6) activesupport (= 5.1.6) bundler (>= 1.3.0) railties (= 5.1.6) sprockets-rails (>= 2.0.0) rails-controller-testing (1.0.2) actionpack (~> 5.x, >= 5.0.1) actionview (~> 5.x, >= 5.0.1) activesupport (~> 5.x) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) rails-html-sanitizer (1.0.4) loofah (~> 2.2, >= 2.2.2) railties (5.1.6) actionpack (= 5.1.6) activesupport (= 5.1.6) method_source rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) rake (12.3.1) rb-fsevent (0.10.3) rb-inotify (0.9.10) ffi (>= 0.5.0, < 2) ruby-progressbar (1.10.0) ruby_dep (1.5.0) sass (3.6.0) sass-listen (~> 4.0.0) sass-listen (4.0.0) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) sass-rails (5.0.6) railties (>= 4.0.0, < 6) sass (~> 3.1) sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) tilt (>= 1.1, < 3) shellany (0.0.1) spring (2.0.2) activesupport (>= 4.2) spring-watcher-listen (2.0.1) listen (>= 2.7, < 4.0) spring (>= 1.2, < 3.0) sprockets (3.7.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) sprockets-rails (3.2.1) actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) sqlite3 (1.3.13) thor (0.20.0) thread_safe (0.3.6) tilt (2.0.8) turbolinks (5.0.1) turbolinks-source (~> 5) turbolinks-source (5.2.0) tzinfo (1.2.5) thread_safe (~> 0.1) uglifier (3.2.0) execjs (>= 0.3.0, < 3) web-console (3.5.1) actionview (>= 5.0) activemodel (>= 5.0) bindex (>= 0.4.0) railties (>= 5.0) websocket-driver (0.6.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.3) PLATFORMS ruby DEPENDENCIES bootstrap-sass (= 3.3.7) byebug (= 9.0.6) coffee-rails (= 4.2.2) guard (= 2.13.0) guard-minitest (= 2.4.4) jbuilder (= 2.7.0) jquery-rails (= 4.3.1) listen (= 3.1.5) minitest (= 5.11.3) minitest-reporters (= 1.1.14) pg (= 0.20.0) puma (= 3.9.1) rails (= 5.1.6) rails-controller-testing (= 1.0.2) sass-rails (= 5.0.6) spring (= 2.0.2) spring-watcher-listen (= 2.0.1) sqlite3 (= 1.3.13) turbolinks (= 5.0.1) tzinfo-data uglifier (= 3.2.0) web-console (= 3.5.1) BUNDLED WITH 1.16.5

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

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

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

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

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

guest

回答1

0

ベストアンサー

私自身そのような現象になったことはないのですが、
回答依頼を頂いたので、調べたことを回答します。
(解決できるかどうかはわからないです。)

  • gem cleanupを試す(sudoが必要かも?)参考
  • bundle execをコマンドの頭に付けて実行してみる参考

投稿2018/09/23 07:05

dice142

総合スコア5158

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

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

t.s_k

2018/09/24 00:47

アドバイスありがとうございます。 結局何が原因なのかは分からないのですが、bin/railsでいちおう動作はするのでエイリアスに指定して対処してる状況です。
dice142

2018/09/24 11:05

たしか「rails」ではシステムに入ってるコマンドを使い、「bin/rails」はプロジェクトの方のrailsを使用するとかだった気がします。 gemファイルにあるものは基本的にプロジェクトに入るものなので、そっちを使った方が良さそうです。
t.s_k

2018/09/24 11:26

そもそも途中でパソコンのユーザー名を変更した時から環境が大きく変わっていたので、一度環境構築し直してるところです。
t.s_k

2018/09/24 11:27

このままさらに重症化してもあれなので。
t.s_k

2018/09/24 12:28

回答依頼に応えてくださり、ありがとうございます!
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問