以下の記事を参考に実行してみましたが、バージョンダウンができません。
何が間違っているかご指摘いただければ幸いです。
https://qiita.com/tosato3/items/61b8c4a5f509f44c762b
https://qiita.com/Hassan/items/eef26c870eb26a0c68e0
vagrant@localhost myblog]$ rails --version
Rails 5.2.1
[vagrant@localhost myblog]$ gem uninstall rails
Select gem to uninstall:
- rails-5.1.3
- rails-5.1.6
- rails-5.2.1
- All versions
4
Successfully uninstalled rails-5.1.3
Successfully uninstalled rails-5.1.6
Successfully uninstalled rails-5.2.1
[vagrant@localhost myblog]$ rails -v
Could not find rails-5.2.1 in any of the sources
Run bundle install
to install missing gems.
[vagrant@localhost myblog]$ gem install rails -v '5.1.3' --no-rdoc --no-ri
Fetching: rails-5.1.3.gem (100%)
Successfully installed rails-5.1.3
1 gem installed
[vagrant@localhost myblog]$ rails -v
Could not find rails-5.2.1 in any of the sources
Run bundle install
to install missing gems.
[vagrant@localhost myblog]$ gem uninstall railties -v '5.2.1'
Successfully uninstalled railties-5.2.1
[vagrant@localhost myblog]$ rails -v
Could not find railties-5.2.1 in any of the sources
Run bundle install
to install missing gems.
[vagrant@localhost myblog]$ gem uninstall activesupport -v 5.2.1
You have requested to uninstall the gem:
activesupport-5.2.1
actionpack-5.2.1 depends on activesupport (= 5.2.1)
actionview-5.2.1 depends on activesupport (= 5.2.1)
activejob-5.2.1 depends on activesupport (= 5.2.1)
activemodel-5.2.1 depends on activesupport (= 5.2.1)
activerecord-5.2.1 depends on activesupport (= 5.2.1)
If you remove this gem, these dependencies will not be met.
Continue with Uninstall? [yN] y
Successfully uninstalled activesupport-5.2.1
[vagrant@localhost myblog]$ rails -v
Could not find activesupport-5.2.1 in any of the sources
Run bundle install
to install missing gems.
[vagrant@localhost myblog]$ rails -l
Could not find activesupport-5.2.1 in any of the sources
Run bundle install
to install missing gems.
[vagrant@localhost myblog]$ gem list rails
*** LOCAL GEMS ***
coffee-rails (4.2.2)
rails (5.1.3)
rails-dom-testing (2.0.3)
rails-html-sanitizer (1.0.4)
sass-rails (5.0.7)
sprockets-rails (3.2.1)
[vagrant@localhost myblog]$ gem install rails -v "5.1.3"
Successfully installed rails-5.1.3
Parsing documentation for rails-5.1.3
Installing ri documentation for rails-5.1.3
Done installing documentation for rails after 0 seconds
1 gem installed
[vagrant@localhost myblog]$ rails -v
Could not find activesupport-5.2.1 in any of the sources
Run bundle install
to install missing gems.
[vagrant@localhost myblog]$ gem i -v 5.1.3 rails
ERROR: While executing gem ... (Gem::Requirement::BadRequirementError)
Illformed requirement ["5.1.3"]
[vagrant@localhost myblog]$ gem i -v 5.1.3 rails
Successfully installed rails-5.1.3
Parsing documentation for rails-5.1.3
Done installing documentation for rails after 0 seconds
1 gem installed
[vagrant@localhost myblog]$rails -v
Could not find activesupport-5.2.1 in any of the sources
Run bundle install
to install missing gems.
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2018/08/16 23:39