# I run these commands:
$ rvm current
[email protected]
$ gem list | grep '^rails '
rails (5.0.1, 5.0.0)
$ gem uninstall rails -v 5.0.1
Successfully uninstalled rails-5.0.1
$ gem uninstall railties -v 5.0.1
Successfully uninstalled railties-5.0.1
$ gem list | grep railties
railties (5.0.0)
$ rails -v
Rails 5.0.0
$ rails new . -m \
https://raw.github.com/RailsApps/rails-composer/master/composer.rb
# After I answer all the prompts, a Gemfile is created, which requires
# rails '~> 5.0.1'. After running to completion, Rails Composer leaves
# me with Rails 5.0.1:
$ rails -v
Rails 5.0.1
我沒有明確要求Rails 5.0.1。那我爲什麼得到它? 它似乎干擾了Rails Composer。見 https://github.com/RailsApps/rails-composer/issues/261 和 https://github.com/RailsApps/rails-composer/issues/260爲什麼Rails Composer在構建應用程序時更新Rails?
非常感謝Daniel!有一種方法可以解決它。作爲'rails _5.0.0_ new'開始'rails new'將在新應用中使用Rails 5.0.0。我嘗試過使用Rails Composer,並發現它可行。 –
對不起。我忘了用反撥標記逃避命令。非常感謝Daniel!有一種方法可以解決它。 「rails new」作爲'rails _5.0.0_ new''將在新應用中使用Rails 5.0.0。我嘗試過使用Rails Composer,並發現它可行。 –