Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Can users use Gemfile support #1207
Mar 25, 2015
What?! Few small bugs not relevant for most users? Well, let’s try the most basic use case, create a new gem…
$ bundle gem foo create foo/Gemfile create foo/Rakefile create foo/LICENSE.txt create foo/README.md create foo/.gitignore create foo/foo.gemspec create foo/lib/foo.rb create foo/lib/foo/version.rb Initializing git repo in /Users/jimmy/Temp/foo $ cd foo $ gem install --file Gemfile ERROR: While executing gem ... (Gem::UnsatisfiableDependencyError) Unable to resolve dependency: user requested 'foo (= 0.0.1)'
Boom! Rubygems failed, because it’s trying to resolve the gem, we have just created, in the Rubygems repository! It obviously isn’t here and this behaviour obviously doesn’t make any sense.
You may blame
$ mkdir foo $ cd foo $ echo "Gem::Specification.new do |s|\n s.name = 'foo'\n s.version = '0.0.1'\n s.add_runtime_dependency 'activesupport', '~> 4.2'\nend" > foo.gemspec $ echo "source 'https://rubygems.org'\ngemspec" > Gemfile $ gem install --file Gemfile ERROR: While executing gem ... (Gem::UnsatisfiableDependencyError) Unable to resolve dependency: user requested 'foo (= 0.0.1)'
Aaand no surprise, it doesn’t work either. Maybe we should not use
$ gem install --file foo.gemspec
Hmm, no output at all, nothing installed. However, it created a lock file…
$ cat foo.gemspec.lock PLATFORMS DEPENDENCIES
And the lock file doesn’t contain any dependencies!
Rubygems bundle-like support fails even in the most simple example of creating a new gem. Strange that this simple use case apparently isn’t covered in your tests. However, when I look at this mess, it’s no surprise for me that you’ve forget to test it.
Exactly the same problem appears when you have already published gem, but you bump version for upcoming development. This is even more common and basic use case.
So you’re calling this a small meaningless bug and you have the courage to tell people that it’s working and they should use Rubygems instead of Bundler? Really?!
Don’t take me wrong, I would prefer to have Bundler functionality directly in Rubygems, but your attitude about this and lack of quality and testing is really shocking.
@jirutka I don't get paid to work on RubyGems.
I've fixed numerous other bugs for this feature and spend uncounted hours digging through bundler's source to create the interoperability that currently exists. While the Gemfile format is documented, Gemfile.lock's format is not, bundler's directory layout for supporting gems sourced from git is not, and probably one or two other critical components for interoperability.
Furthermore bundler has very few unit tests. Instead its tests are written more in an integration style where the API being tested is exercised by invoking
I get around to fixing bugs as I have time and willingness which depends greatly on how appreciative I feel people will be for the work I've done and the demands they're making on my time.
@mpapis people spend countless hours working on RubyGems and Bundler without getting paid a cent. If you want to offer to ponder drbrain or work on RubyGems yourself, that's great. But a negative attitude doesn't help anyone, and it actively discourages people from working on open source. At the end of the day, nobody is forcing you to use anything.
@drbrain thank you for all the work you've done (and continue to do) on RubyGems. I'm really looking forward to the day when we have everything merged and working together harmoniously.
@mpapis Ruby Together is funding work to reduce duplication. That's what is going to happen. Please chill out and have some patience.
To be perfectly clear in my attitude, as I see it, @mpapis keeps telling that Gemfile support in Rubygems already works and advises users to use it instead of Bundler. But as I demonstrated above it doesn’t work in the most basic use cases, so this isn’t even alpha version. This means that it’s not usable for average users, and in no case in production! The implication (as I see it) is that @mpapis isn’t telling truth. This is the thing that really bothers me, that’s why I’ve written my comment in this tone. Is it understandable?
@segiddins I have spent countless hours on fixing Ruby and Rubygems myself, I have more commits on RG then ... - please check first before you throw such claims
@indirect I hope you fulfill that promise, because so far I only see you work on Bundler instead of Rubygems - in fact it's the only reason I did not yet jumped on sponsoring as I love the idea to get Rubygems work sponsored
@jirutka basic use case is gem
Okay, I've talked with @drbrain and we have an official position on RubyGems support for Gemfiles:
RubyGems currently supports installing Gemfiles via
Please feel free to try RubyGems Gemfile support, but it may not work for you. If it does not work for you, please file a bug describing the issue, or better yet send a pull request with a test demonstrating the issue.
In the future, Bundler and RubyGems will ship as a single piece of software that will support Gemfiles and Rails applications. We've started working on it, and we'll let everyone know (very excitedly) when it's done.
Well, this is perhaps a good point, I’ve forgotten to distinguish between plain users and developers.
So I’ve tried to run
@mpapis Rails applications are unable to boot without Bundler. According to @drbrain, RubyGems does not have and has no plans to add the functions that are required for Rails applications to boot. Please stop saying "it works fine" when that is not actually true.
Since discussion on this ticket has drifted very far away from the original question of whether it is okay to use RubyGems' Gemfile support, I'm going to lock this ticket. Please file new issues without insults that describe bugs.