Reputation: 317
Mix command usage looks very similar to rails command. Are they the same, what are the differences & similarities?
Upvotes: 2
Views: 143
Reputation: 1243
mix
is the equivalent of several Ruby tools in one. rake
is the task runner for Ruby (similar to gulp, grunt, make, etc. in other languages). You generally us it for things like running tests and builds. bundler
is the idiomatic dependency management tool for Ruby. It downloads your dependencies and locks them for your project. bundle gem
is commonly used for bootstrapping projects (like mix new
I think)
Phoenix also integrates with mix
and provides tools for starting your server (like rails s
) and generating components (like rails generate
). One that's a little weird is how you start up a debug shell (iex -S mix phoenix.server
vs. rails c
). The Elixir approach here requires you to start a server while rails doesn't (there's probably a way to do it without a server in Elixir, but I haven't figured it out yet)
In general Elixir seems to take the best ideas from a lot of popular Ruby libraries and gives them first-class support in the standard library for Elixir
I'd be happy to go into more detail about specific commands or features if you have questions about them
Upvotes: 4