How to maintain multiple version of phoenix installation?

I am following mastering the phoenix framework book, it looks like its using 1.1.x version of the framework. I did udemy course before this and used the 1.2.5 version of the phoenix framework. I was wondering the following…

Is there a way to maintain multiple version of phoenix without install/uninstall all the time, like how rvm does it with rails and ruby?

1 Like

They are just a dependency of your application, and if you specify "~> 1.1.0" in that project only >= 1.1.0 && < 1.2.0 will be used.

Thanks, after playing around for a bit. I discovered that if I used Kiex as a version manager for elixir, then i can install diff version of pheonixs. If i wanted to switch phoenix versions, I can just switch elixir versions.

One thing to note is that when you “install” phoenix, you only install the phx.new (or phoenix.new) task. Everything else is packaged in the dependency you have in your project - and that is versioned completely separately in each project and vendored in the deps folder. In general, once you generate your application, you don’t really need the archive - so you could override and install another version immediately, projects that are already generated wouldn’t be affected in any way.

3 Likes