Uninstall Rails 3 with dependencies?

后端 未结 4 1598
庸人自扰
庸人自扰 2021-02-08 11:34

I like that Rails 3 is so easy to install: gem install rails --pre, and all of the dependencies are automatically installed for you. But, what about uninstalling it

4条回答
  •  不知归路
    2021-02-08 12:11

    if you're planning to upgrade to a newer version of rails, you can do:

    sudo gem clean
    

    or in newer versions

    sudo gem cleanup
    

    after the newer version has been installed, this uninstall All older versions of All your gems leaving only the latest version in your system.

    Note: these days I use RVM gemset and/or bundler to manage my gems, if you're using RVM I find it's a lot simpler this way. For example you can create a new gemset for each project:

    rvm gemset create project_name
    rvm gemset use project_name
    bundle install
    

    anything goes wrong you can just delete the gemset and start again

    rvm gemset delete project_name
    

提交回复
热议问题