Bug 184748 - Upgrade of devel/rubygem-sprockets to 2.10.1 breaks www/rubygem-rails
Summary: Upgrade of devel/rubygem-sprockets to 2.10.1 breaks www/rubygem-rails
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Steve Wills
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-13 14:10 UTC by Paul Mather
Modified: 2014-03-28 17:58 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Mather 2013-12-13 14:10:00 UTC
I upgraded my packages on RELENG_9 via poudriere recently and discovered that www/rubygem-rails is now broken.  It appears the cause of the breakage is the upgrade of devel/rubygem-sprockets to 2.10.1.  The latter upgrade breaks www/rubygem-actionpack, whose gemspec depends upon V2.2.X of sprockets.  The current version of sprockets fails to satisfy this dependency, causing Rails to fail to start:

root@gromit:/home/pmather # rails
/usr/local/lib/ruby/site_ruby/1.9/rubygems/dependency.rb:247:in `to_specs': Could not find sprockets (~> 2.2.1) amongst [abstract-1.0.0, actionmailer-3.2.16, actionpack-3.2.16, activemodel-3.2.16, activerecord-3.2.16, activeresource-3.2.16, activesupport-3.2.16, ansi-1.4.3, arel-3.0.2, atomic-1.1.14, builder-3.0.4, bundler-1.3.5, classifier-1.3.3, coffee-rails-3.2.2, coffee-script-2.2.0, coffee-script-source-1.6.3, colorator-0.1, colored-1.2, commander-4.1.4, cri-2.3.0, daemon_controller-1.1.7, directory_watcher-1.4.1, erubis-2.7.0, execjs-1.4.0, fast-stemmer-1.0.2, fastthread-1.0.7, highline-1.6.20, hike-1.2.3, i18n-0.6.9, jekyll-1.0.3, journey-1.0.4, jquery-rails-3.0.1, json-1.8.0, json_pure-1.8.1, kramdown-1.0.2, liquid-2.5.0, mail-2.5.4, maruku-0.6.1, mime-types-1.23, minitest-5.0.6, minitest-4.7.5, multi_json-1.8.2, nanoc-3.6.5, passenger-4.0.27, pg-0.15.1, polyglot-0.3.3, posix-spawn-0.3.6, pygments.rb-0.5.2, rack-1.4.5, rack-1.2.3, rack-cache-1.2, rack-ssl-1.3.3, rack-test-0.6
 .2, rails-3.2.16, railties-3.2.16, rake-10.1.0, rake-10.0.4, rake-compiler-0.8.3, safe_yaml-0.9.4, sass-3.2.12, sass-rails-3.2.6, sequel-4.5.0, sprockets-2.10.1, sqlite3-1.3.8, syntax-1.0.0, thor-0.18.1, tilt-2.0.0, treetop-1.4.14, turn-0.9.6, tzinfo-0.3.38, uglifier-2.3.2, yajl-ruby-1.1.0] (Gem::LoadError)
       from /usr/local/lib/ruby/site_ruby/1.9/rubygems/specification.rb:778:in `block in activate_dependencies'
       from /usr/local/lib/ruby/site_ruby/1.9/rubygems/specification.rb:767:in `each'
       from /usr/local/lib/ruby/site_ruby/1.9/rubygems/specification.rb:767:in `activate_dependencies'
       from /usr/local/lib/ruby/site_ruby/1.9/rubygems/specification.rb:751:in `activate'
       from /usr/local/lib/ruby/site_ruby/1.9/rubygems/specification.rb:781:in `block in activate_dependencies'
       from /usr/local/lib/ruby/site_ruby/1.9/rubygems/specification.rb:767:in `each'
       from /usr/local/lib/ruby/site_ruby/1.9/rubygems/specification.rb:767:in `activate_dependencies'
       from /usr/local/lib/ruby/site_ruby/1.9/rubygems/specification.rb:751:in `activate'
       from /usr/local/lib/ruby/site_ruby/1.9/rubygems.rb:1232:in `gem'
       from /usr/local/bin/rails:22:in `<main>'
root@gromit:/home/pmather # pkg info -d rubygem-actionpack
rubygem-actionpack-3.2.16:
       rubygem-rack-test-0.6.2
       rubygem-rack-cache-1.2
       rubygem-rack-1.4.5,3
       rubygem-journey-1.0.4
       rubygem-erubis-2.7.0
       libyaml-0.1.4_2
       ruby-1.9.3.484,1
       rubygem-tilt-2.0.0
       rubygem-sprockets-2.10.1
       rubygem-multi_json-1.8.2
       rubygem-json_pure-1.8.1
       rubygem-i18n-0.6.9,2
       rubygem-hike-1.2.3
       rubygem-builder-3.0.4
       rubygem-activesupport-3.2.16
       rubygem-abstract-1.0.0_1
       ruby19-gems-1.8.29
       libffi-3.0.13
       libexecinfo-1.1_3
       rubygem-activemodel-3.2.16
       ruby19-iconv-1.9.3.484,1
       libiconv-1.14_1
root@gromit:/home/pmather # gem dependency actionpack
Gem actionpack-3.2.16
 activemodel (= 3.2.16)
 activesupport (= 3.2.16)
 builder (~> 3.0.0)
 erubis (~> 2.7.0)
 journey (~> 1.0.4)
 rack (~> 1.4.5)
 rack-cache (~> 1.2)
 rack-test (~> 0.6.1)
 sprockets (~> 2.2.1)
 tzinfo (~> 0.3.29, development)



Note that the gem spec dependency of "~> 2.2.1" is not the same semantics as the ports Makefile dependency of "rubygem-sprockets>=2.2.1:${PORTSDIR}/devel/rubygem-sprockets".  The latter will be satisfied by rubygem-sprockets-2.10.1 whereas the former will not.

Note that because Rails 3.2.15 is flagged by pkg audit as vulnerable, many people will upgrade to 3.2.16 and have their Rails install break if they also upgrade ruby gem-sprockets, so a fix for this would be nice.

Fix: 

If ruby gem-actionpack is compatible with version 2.10.1 of sprockets you could update /usr/local/lib/ruby/gems/1.9/specifications/actionpack-3.2.16.gemspec so that the sprockets gem dependencies are changed from "~> 2.2.1" to "~> 2.10.1".  I don't know whether version 2.10.1 of the sprockets gem is compatible with action pack 3.2.16, though.
How-To-Repeat: On a machine without Rails installed, do the following:

cd /usr/ports/www/rubygem-rails
make install clean
rails
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-12-13 14:10:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ruby

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Matthias Petermann 2013-12-29 12:08:37 UTC
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

rubygem-rails is not working anymore with current ports tree. Beside
the upgrade of rubygem-sprockets that breaks it, there is at least one
more broken dependency: rubygem-tilt. The current version 2.0.0 is not
compatible with rubegemy-rails 3.2.16. This breaks further
applications based on rails, e.g. www/redmine (Web Based Project
Management).

I'm not a ruby/rails expert so maybe this question appears stupid, but
does the ruby package manager (gem) support multiple gem versions at
once? So would it be possible to have e.g. two different
rubygem-tilt-versions at one and the same time? Maybe it's worth the
effort to maintain not just the latest version of rails and it's
dependencies but always have a consistent "frozen" state where
applications (like redmine) can rely on?

Best regards

  Matthias


- -- 
Matthias Petermann <matthias@petermann-it.de> | www.petermann-it.de
GnuPG: 0x5C3E6D75 | 5930 86EF 7965 2BBA 6572  C3D7 7B1D A3C3 5C3E 6D75
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (FreeBSD)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJSwBDFAAoJEHsdo8NcPm11tXMQANuaBtjizyqw0jQF0J+8uKLd
DvaKtElKSNFf5yi2W55r9AAoQYRhlaQ5rkCRcf2NK0YYKOSp8VrfIX4Uu63r9WN5
BLkfAmxQpzmj+KIkbYw+59lpR5TVjrWIaYu7yxDpWz0Ilw2SOSIE1Is1cM89i4ZH
rwhVNOqCwVN/iDJJqvGzbiDkDQ0ynqHAR6zvxndkS6Av4T744I6T+Wwf9cJmnflE
shH56jzjfZSf0rAt+VaY8m/waB/xKZgZC7b/kjgC7RwEG9Fkm+zvT9VjmGJGUl9w
5eoUibGVwPOHBalu3Bc3nyKS17nSHK7XtBedXoUSoLWM8FeWpvYCgqbT+J/bSJ2Z
UH+/vU3QhFIPRVmVvyHWtjYK36V6WrsXHdZNTz5ga3TPfMoPdiRjgGJYBDgT+hXc
pzQMZ7JGS81UjVFYmEWeI5gRvGy85hFszbeXnSpdWf+91SwzgbYeIuX6J+2oveqy
rFvizmas82+KkkcMdisSvX2iZYJEIkF5m+I95zSk6b0do9NDtIePR7y4EEc0sDrD
+djAK3RakKEayW4Tl6QWkQ1pXkpN+83mR+E5yaatBrbX8gvdyow692fS9WCPlONk
i8SvtNJB86TK+heOQyERSAG0D1QYLZGb5c9hecwGQJogjSok91iC6N2HSIoh8qxn
IwL2RIytG4hnU+nrbp+p
=K1/9
-----END PGP SIGNATURE-----
Comment 3 Steve Wills freebsd_committer freebsd_triage 2014-01-02 20:47:29 UTC
Responsible Changed
From-To: ruby->sunpoet

- Assign to sunpoet
Comment 4 Steve Wills freebsd_committer freebsd_triage 2014-01-02 20:50:56 UTC
On Sun, Dec 29, 2013 at 01:08:37PM +0100, Matthias Petermann wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hello,
> 
> rubygem-rails is not working anymore with current ports tree. Beside
> the upgrade of rubygem-sprockets that breaks it, there is at least one
> more broken dependency: rubygem-tilt. The current version 2.0.0 is not
> compatible with rubegemy-rails 3.2.16. This breaks further
> applications based on rails, e.g. www/redmine (Web Based Project
> Management).
> 
> I'm not a ruby/rails expert so maybe this question appears stupid, but
> does the ruby package manager (gem) support multiple gem versions at
> once? 

Yes, it does, but not with the way we use it in ports.

> So would it be possible to have e.g. two different
> rubygem-tilt-versions at one and the same time? 

Ports doesn't support installing multiple versions, but we can work around it
by creating a new port with the version in the name.

> Maybe it's worth the
> effort to maintain not just the latest version of rails and it's
> dependencies but always have a consistent "frozen" state where
> applications (like redmine) can rely on?

Yeah, what probably needs to be done is to just create a
devel/rubygem-sprockets22 port that rails can use.

I've assigned the PR to the person who updated sprockets, but if they don't get
to it I will try to do that soon myself.

Thanks for the report.

Steve
Comment 5 Steve Wills freebsd_committer freebsd_triage 2014-02-02 03:09:53 UTC
State Changed
From-To: open->closed

Patch for this was committed. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=184748 

Date: Sun, 23 Mar 2014 06:41:16 +0000
Comment 6 Mark Linimon freebsd_committer freebsd_triage 2014-03-23 15:23:42 UTC
State Changed
From-To: closed->feedback

reopen issue based on new feedback, and assign to interested party. 


Comment 7 Mark Linimon freebsd_committer freebsd_triage 2014-03-23 15:23:42 UTC
Responsible Changed
From-To: sunpoet->swills

reopen issue based on new feedback, and assign to interested party.
Comment 8 Steve Wills freebsd_committer freebsd_triage 2014-03-28 17:58:44 UTC
State Changed
From-To: feedback->closed

Should be fixed now, let me know if it's not.