前提・実現したいこと
以前まで何も問題なく動作していたのですが、新たにrails newを試みると下記のエラーメッセージが出ます。
ググった情報を頼りにgem install railsをしてみたのですが、未だ解決しておりません。
どのような対処で解決できるのでしょうか。また、何が原因でこのようなメッセージがでるようになったのでしょうか。
ご教示頂けますと幸いです。
発生している問題・エラーメッセージ
ec2-user:~/environment $ rails _4.2.2_ new hello_app Traceback (most recent call last): 4: from /home/ec2-user/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `<main>' 3: from /home/ec2-user/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `eval' 2: from /home/ec2-user/.rvm/gems/ruby-2.6.3/bin/rails:23:in `<main>' 1: from /home/ec2-user/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0/rubygems.rb:303:in `activate_bin_path' /home/ec2-user/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0/rubygems.rb:284:in `find_spec_for_exe': can't find gem railties (= 4.2.2) with executable rails (Gem::GemNotFoundException) ec2-user:~/environment $ gem install rails 4.2.2 Successfully installed rails-5.2.3 Parsing documentation for rails-5.2.3 Done installing documentation for rails after 0 seconds ERROR: Could not find a valid gem '4.2.2' (>= 0) in any repository 1 gem installed ec2-user:~/environment $ rails _4.2.2_ new hello_app Traceback (most recent call last): 4: from /home/ec2-user/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `<main>' 3: from /home/ec2-user/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `eval' 2: from /home/ec2-user/.rvm/gems/ruby-2.6.3/bin/rails:23:in `<main>' 1: from /home/ec2-user/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0/rubygems.rb:303:in `activate_bin_path' /home/ec2-user/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0/rubygems.rb:284:in `find_spec_for_exe': can't find gem railties (= 4.2.2) with executable rails (Gem::GemNotFoundException)
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/07/22 20:10