前提・実現したいこと
Ruby on Rails で新規アプリケーションを作成したいけれども、railsコマンドが使えず困っています。
もともと作成していたアプリケーションは普通に使えますがなぜか別のディレクトリーに行くとrailsコマンドが使えません。
発生している問題・エラーメッセージ
$ rails new cos 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 generated 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 other binstubs # too that you may or may not want (like yarn) If you already have Rails binstubs in source control, you might be inadvertently overwriting them during deployment by using bundle install with the --binstubs option. If your application was created prior to Rails 4, here's how to upgrade: bundle config --delete bin # Turn off Bundler's stub generator 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 app, generate it and add it to source control: bundle binstubs some-gem-name git add bin/new-executable Traceback (most recent call last): 10: from /Users/nns/.rbenv/versions/2.6.5/bin/rails:23:in `<main>' 9: from /Users/nns/.rbenv/versions/2.6.5/bin/rails:23:in `load' 8: from /Users/nns/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.1/exe/rails:10:in `<top (required)>' 7: from /Users/nns/.rbenv/versions/2.6.5/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:68:in `require' 6: from /Users/nns/.rbenv/versions/2.6.5/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:68:in `require' 5: from /Users/nns/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.1/lib/rails/cli.rb:7:in `<top (required)>' 4: from /Users/nns/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.1/lib/rails/app_loader.rb:48:in `exec_app' 3: from /Users/nns/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.1/lib/rails/app_loader.rb:48:in `loop' 2: from /Users/nns/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.1/lib/rails/app_loader.rb:58:in `block in exec_app' 1: from /Users/nns/.rbenv/versions/2.6.5/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:120:in `require' /Users/nns/.rbenv/versions/2.6.5/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:120:in `require': cannot load such file -- /Users/nns/config/boot (LoadError)
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/12/11 09:24
2019/12/11 09:27
2019/12/11 09:35
2019/12/11 09:38
2019/12/11 09:44 編集
2019/12/11 14:47
2019/12/12 03:06
2019/12/12 03:43
2019/12/12 06:16 編集
2019/12/12 06:09
2019/12/12 06:09
2019/12/12 06:10
2019/12/12 06:20
2019/12/12 06:24
2019/12/12 06:29 編集
2019/12/12 08:04
2019/12/12 11:09
2019/12/12 11:13
2019/12/12 11:25