News for hackers. Stuff that matters.
Re:Engine Yard's sponsorship of RVM is coming to an end by smoyer on Monday October 28, 2013 @07:24PM (#6630562)
I hate (yes, it's that strong a word) the problems related to versioning in Ruby ... and even with RVM, you have to figure out which gems are compatible. My solution is to get rid of my Ruby applications. I'm not a Ruby developer, and my career path isn't likely to afford me the time to really learn it.

I'm a Java developer, and we have our own version of dependency hell (that I've learned to avoid and/or navigate), so I'm not trolling, but rather wanted to point out that often issues like dependency management (there are others) simply cause marginal developers to leave.

Re:Engine Yard's sponsorship of RVM is coming to an end by jrochkind1 on Monday October 28, 2013 @07:30PM (#6630588)
> often issues like dependency management (there are others) simply cause marginal developers to leave.

I think that's true, and true in just about every language/environment, it's not unique to ruby, right? Dependency management often causes marginal developers to leave, in many langauges/environments.

Dependency management itself has gotten a lot better in ruby -- bundler is pretty great.

But multiple ruby version management is still a mess. I wish ruby would have a single dictatorial-blessed solution to multiple ruby version management, like I understand python to be.

And even bundler isn't perfect, for sure -- I wish bundler was more integrated with rubygems, which would for instance make the `bundle exec` dance unneccesary.

Interestingly, both of these issues, as I see it, are related to the decentralized open source nature of the ruby ecosystem. Which has plusses and minuses.

(And both dependency management and multiple version management can be hell in Java, for sure. I am not a Java developer, and the most common barrier I run into when trying to deal with Java is... maven. And last time I had to run multiple versions of the JVM on one machine, it was hell. I hope it's gotten better.)

Re:Engine Yard's sponsorship of RVM is coming to an end by smoyer on Monday October 28, 2013 @09:12PM (#6631128)
Yes ... I specifically said I had similar issues with Java because I didn't want to appear to be targeting Ruby. I also know python, and I've gotten stuck with PIP a couple times. I'd consider myself an expert with Maven, and I don't tend to have issues with that (anymore). And I think the model used for Maven (and Ivy) is perfect (a central repository of artifacts by GAV).

But I've seen people give up due to the learning curve of learning Maven, and I agree that this is a hard problem in general. I think (as noted below) that it's an even harder problem for scripting languages that deliver packages via source ... and I don't have a solution to offer.

Perhaps the best thing we can do is help each other out with the tools we're comfortable with? An apprenticeship program?

Re:Engine Yard's sponsorship of RVM is coming to an end by dubcanada on Monday October 28, 2013 @11:46PM (#6631877)
Just saying but dependency management in PHP is pretty great. The only thing I need to really worry about is where the library requires a PHP version higher then mine.

I have yet to have trouble with composer packages to the extent I have trouble with basic ruby gems. The funny part is when you get gems that require multiple versions of the same gem. That just makes me laugh :)

Re:Engine Yard's sponsorship of RVM is coming to an end by chipotle_coyote on Tuesday October 29, 2013 @02:51AM (#6632393)
It's awfully brave of you to come out and say that around these parts. Suggesting that PHP gets anything right tends to bring out lots of people ready to tell you why you're WRONG wrong wrong wrong WRONG.

I think you're right, mind you. Actually, for all of its other quirks and misfeatures, PHP has probably given me the least difficulty with dependency management over the last decade. (Granted, that's in part because before Composer took off all we really had was PEAR, and it never seemed to grab much mindshare.)

Re:Engine Yard's sponsorship of RVM is coming to an end by twerquie on Monday October 28, 2013 @07:35PM (#6630612)
> I think that's true, and true in just about every language/environment

Agreed, although it seems as if nodejs may have solved most of the hard problems in this area by way of their unique require() module loader and the design of npm. After learning it, I wish every package manager worked that way.

Re:Engine Yard's sponsorship of RVM is coming to an end by mmgutz on Monday October 28, 2013 @08:03PM (#6630778)
Ran into same issues with nodejs. If one of your dependencies use libxy 1.2 and your app depends on libxy 1.4, you have to be careful which one gets loaded first and hope one is compatiblew with the ohter. Good luck if the APIs are different. NPM seems to solve the problem but it really doesn't.
Re:Engine Yard's sponsorship of RVM is coming to an end by nadaviv on Monday October 28, 2013 @08:15PM (#6630841)
This shouldn't be an issue at all. Your app would get libxy 1.4, and your dependency would get libxy 1.2. It shouldn't matter which is loaded first, and unless those modules somehow store something globally, they shouldn't conflict in any way.

npm does solve the "multiple versions of a library are used by different packages", unless that libxy you were using did something fishy. Can you give more details?

Re:Engine Yard's sponsorship of RVM is coming to an end by daleharvey on Monday October 28, 2013 @08:12PM (#6630823)
That is not how node / npm works, it specifically solves this problem, each module gets its own version of its dependancies
Re:Engine Yard's sponsorship of RVM is coming to an end by rubiquity on Monday October 28, 2013 @08:15PM (#6630835)
I agree about npm. Having the individual node_modules fixes a lot of dependency management issues. That said, I'm not a fan of Nodd but if I could steal two things from them it would npm and Isaac.
Re:Engine Yard's sponsorship of RVM is coming to an end by dragonwriter on Monday October 28, 2013 @07:38PM (#6630627)
> I think that's true, and true in just about every language/environment, it's not unique to ruby, right?

There's a bigger dependency management problem where you need to distribute source code to users of tools rather than distributing compiled code.

> I wish ruby would have a single dictatorial-blessed solution to multiple ruby version management, like I understand python to be.

As I understand, the competing Ruby solutions (unlike the Python solution) attempt to manage versions that are not even from the same project, which naturally makes a single dictatorial-blessed solution problematic, as there is no dictator (or even central project) for the entire Ruby ecosystem, even if there is for the mainline interpreter.

Re:Engine Yard's sponsorship of RVM is coming to an end by mitchty on Monday October 28, 2013 @09:43PM (#6631280)
This is the exact reason I'm migrating new things straight to go. Once I've gotten the updated blob (binary or script/whatever really) to where it needs to be. I'm done, at compile time I can deal with dependencies, don't need to have a metric ton of stat calls flying around from require and other nonsense.

I'm getting to the point that the troubles encountered with Python/Perl/Ruby and dependency management has basically made me go, ok fine, i'll go back to c this is getting ridiculous.

That plus clang has made me happy.

Re:Engine Yard's sponsorship of RVM is coming to an end by hox on Monday October 28, 2013 @10:58PM (#6631662)
Yet go is a dependency nightmare! Dealing with more than one developer on a project with dependencies is incredibly difficult due to the insane decision to not support locking a dependency to a specific version.
Re:Engine Yard's sponsorship of RVM is coming to an end by mitchty on Tuesday October 29, 2013 @01:22PM (#6635876)
Our quick "solution", was just tar cvf up the dependencies and use that.

Alternatively godep as noted below, or you could get creative with git submodules or clone the repos to a local cache.

The reason go is simpler is you only need to deal with this at compile time, and thats what the ci server is for. My goal is removing runtime checks for crap and dealing with package versions every time I update things.

Go is more akin to c really here, and in my not so humble opinion it is a simpler task to sort out dependencies at compile time than on every system I need to deploy to.

Re:Engine Yard's sponsorship of RVM is coming to an end by regularfry on Tuesday October 29, 2013 @06:01AM (#6632948)
I'm actually quite interested in how to fix that. The naive solution that springs to mind is sticking a local cache between my dev environment and the upstream sources, where I can control precisely what versions are available. Is that doable?
Re:Engine Yard's sponsorship of RVM is coming to an end by mh- on Tuesday October 29, 2013 @06:14AM (#6632997)
have a look at godep: https://github.com/kr/godep
Re:Engine Yard's sponsorship of RVM is coming to an end by regularfry on Tuesday October 29, 2013 @06:48AM (#6633119)
Precisely the sort of thing I'm looking for. Thanks!
Re:Engine Yard's sponsorship of RVM is coming to an end by jrochkind1 on Tuesday October 29, 2013 @12:07PM (#6635185)
> There's a bigger dependency management problem where you need to distribute source code to users of tools rather than distributing compiled code.

At first I nodded my head to myself, but after thinking about it, I'm not actually sure that's true.

You can still have dependencies with binary distribution (if using dynamic linking etc). apt, yum, etc, were invented to deal with this right?

And it can still be a nightmare if you have two different things on your system that need different versions of the same dependency -- even a binary dependency. Have you tried to deal with two different binaries that need different versions of libxml? It can be nightmarish.

Re:Engine Yard's sponsorship of RVM is coming to an end by dragonwriter on Tuesday October 29, 2013 @12:10PM (#6635219)
The dependency management issues that come with distributing interpreted source like Ruby are superset of the issues that come with binary distribution.

That's not to say that binary distributions can't also have dependency nightmares.

Re:Engine Yard's sponsorship of RVM is coming to an end by jrochkind1 on Tuesday October 29, 2013 @01:02PM (#6635703)
I'm still suspicious. What's an example of a category of dependency problem that only effects interpreted source and not binary? I can't think of any.

Whether the files on disk are machine code (binary) that will be executed directly by the machine, or some other kind of code that will be executed by an interpreter -- I can't think of any dependency issues effected by that.

Ah, wait I can think of exactly one, issues with depending on a certain version of the interpreter. That's it.

Re:Engine Yard's sponsorship of RVM is coming to an end by regularfry on Tuesday October 29, 2013 @05:59AM (#6632938)
The "bundle exec dance" is unnecessary. Bundler doesn't need to be more integrated, it needs to be less integrated. Half the mess people get into is because the boundaries between these systems break down.
Re:Engine Yard's sponsorship of RVM is coming to an end by jrochkind1 on Tuesday October 29, 2013 @05:27PM (#6637579)
What do you do instead of 'bundle exec' to execute ruby command line utilities using the desired dependency tree?
Re:Engine Yard's sponsorship of RVM is coming to an end by regularfry on Wednesday October 30, 2013 @01:14PM (#6641650)
I've literally never found myself in a situation where the dependency tree of a ruby cli utility has been incompatible with what's in the current $GEM_HOME. As and when it happens, I'll see about giving it a separate $GEM_HOME to play with. That's the only situation I can think that binstubs in addition to what `gem install` provides make sense, too.
Re:Engine Yard's sponsorship of RVM is coming to an end by michaelrkn on Tuesday October 29, 2013 @01:54AM (#6632271)
> I wish bundler was more integrated with rubygems, which would for instance make the `bundle exec` dance unneccesary.

https://github.com/mpapis/rubygems-bundler

Re:Engine Yard's sponsorship of RVM is coming to an end by philwelch on Monday October 28, 2013 @09:43PM (#6631275)
Dependency hell isn't a language issue, and the concept of RubyGems or any other language-specific dependency management system is fundamentally broken because it's impossible to manage all your dependencies with it. You resort to nested dependency management--i.e. RVM to manage your Ruby installations, then Bundler to manage the gems inside those installations, with some patchwork for the MySQL client your mysql2 gem has a dependency on (but can't declare or guarantee in RubyGems) and it works...kind of. For now.
Re:Engine Yard's sponsorship of RVM is coming to an end by schmichael on Monday October 28, 2013 @08:26PM (#6630889)
I was a full time Python developer for years and can attest that virtualenv + ... easy_install? pip? wat?! scared off a lot of marginal developers.

It's a good cautionary tale for any language/platform that wants to claim Ease of Use and Low Barrier to Entry (as it seems both Python and Ruby do).

Hopefully Python 3.4 bundling virtualenv and pip will ease the pain, but it's still a shame these otherwise easy to use scripting languages ended up with such complex sandboxing mechanisms for even trivial use cases (e.g.: my simple script has 1 third party dependency).