3 ms·
Why is all this unnecessary with Ruby considering the languages are so similar?
by cutler 5y ago
Why is all this unnecessary with Ruby considering the languages are so similar?
- e12e 5y agoMuch similar work is required for ruby, but gem/bundler is less fraught with fragmentation than pip/poetry/venv.
- wink 5y agoI think a big part of the problem is that bundler has been around for ages whereas half of the tools mentioned here didn't even exist just 5-6 years ago. Which can be seen by this hilarious sentence: > By default, Python packages are installed with pip install. In reality nobody uses it this way. It installs all your dependencies into one version of Python interpreter which messes up dependencies. Why hilarious? Because everyone I know uses `pip install` if they're not using poetry. And because poetry is kinda new, that's a lot of people.
- dmurray 5y agoThe quote isn't clear, but I think the author means people don't generally run pip with their system python. I.e. they don't run /usr/bin/pip or whatever, but use some virtual environment solution.
- e12e 5y agoWhich is the same for "gem install" - you don't want to go "sudo gem install".
- dmurray 5y agogem catches this by default and warns you. Pip doesn't, but it would probably be good if it did and the pip guys explicitly took the position that "installing stuff on your system python is not a normal use of it".
- coffeefirst 5y agoIt's not necessary with Python either. In Ruby you've got rbenv in place of pyenv. Pytest is excellent and I'd recommend it. But literally everything else is optional or completely insane. This is not "best practice," its the entire kitchen sink. You might use a linter, or you might just try to write clean code. You might use Poetry, but frankly, the default pip installer is fine for most people most of the time. Installing and configuring something to sort imports for you is just silly, and pre-commit hooks are a terrible idea that just get in the way. My recommendation would be to avoid adding tooling until you have a problem it solves, and focus on building something useful instead. I imagine that's true of most languages.
- cutler 5y agoWith pyenv when I upgrade from 3.9.5 to 3.9.6 I have to re-install all my packages. Not so with rbenv.