Gentoo Archives: gentoo-dev

From: Roy Wright <royw@×××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] ruby gems vs. ebuilds
Date: Thu, 05 Oct 2006 21:07:51
Message-Id: 45257337.4080802@cisco.com
In Reply to: Re: [gentoo-dev] ruby gems vs. ebuilds by Boris Fersing
1 Boris Fersing wrote:
2 >
3 >
4 > AFAIK, the ruby related ebuilds use gem. For example rails has in his
5 > ebuild :
6 >
7 > "inherit ruby gems"
8 >
9 > and if you look in the gems eclass :
10 >
11 > [snip]
12 > And it's the same for rake !
13 >
14 > The problem might be (that's a supposition only) that gem installs the
15 > files in the image which will be merged to the system by portage and
16 > doesn't install the files directly in the "real" system.
17 >
18 > or maybe did I miss something ?
19 >
20 I stand corrected on the ebuilds. I looked at another of my systems that
21 did not show the problem but had both rake gem and ebuild installed.
22
23 I'm wondering if it is something to do with "gem update". I've been
24 running two systems in parallel, one for development, one for production.
25 The development system is running testing (~x86) while production system
26 is running stable (x86). The development system is updated daily, the
27 production about once a month. During my recent rails web app
28 development I've been careful to install the same gems at the same
29 time on both systems. I also did a "gem update" on both system about
30 a day before I noticed the problem on my production system.
31
32 I verified that gem and portage are playing with the same version
33 rake-0.7.1. Then I re-emerged rake on the production system.
34 Running: rake --tasks in the application directory gives this:
35
36 cowboy current # rake --tasks
37 (in /var/rails/rodeo/releases/20061005042627)
38 /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/validations.rb:334:
39 warning: `*' interpreted as argument prefix
40 /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/validations.rb:363:
41 warning: `*' interpreted as argument prefix
42 /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/migration.rb:224:
43 warning: instance variable @ignore_new_methods not initialized
44 /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/migration.rb:224:
45 warning: instance variable @ignore_new_methods not initialized
46 /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/abstract/connection_specification.rb:41:
47 warning: method redefined; discarding old allow_concurrency=
48 /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:456:
49 warning: method redefined; discarding old remove_column
50 /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/oracle_adapter.rb:119:
51 warning: (...) interpreted as grouped expression
52 /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/request.rb:171:
53 warning: method redefined; discarding old relative_url_root
54 /usr/lib/ruby/1.8/cgi/session/pstore.rb:17: warning: method redefined;
55 discarding old []=
56 /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/cgi_ext/raw_post_data_fix.rb:57:
57 warning: ambiguous first argument; put parentheses or even spaces
58 /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/cgi_ext/raw_post_data_fix.rb:8:
59 warning: method redefined; discarding old initialize_query
60 /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/session/active_record_store.rb:129:
61 warning: private attribute?
62 /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/session/active_record_store.rb:179:
63 warning: method redefined; discarding old connection
64 /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_view/helpers/prototype_helper.rb:641:
65 warning: ambiguous first argument; put parentheses or even spaces
66 /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_view/helpers/prototype_helper.rb:874:
67 warning: `*' interpreted as argument prefix
68 /usr/lib/ruby/gems/1.8/gems/actionmailer-1.2.5/lib/action_mailer/vendor/tmail/facade.rb:486:
69 warning: method redefined; discarding old create_reply
70 /usr/lib/ruby/gems/1.8/gems/actionwebservice-1.1.6/lib/action_web_service/protocol/xmlrpc_protocol.rb:6:
71 warning: discarding old message
72 /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:581: warning:
73 method redefined; discarding old []=
74 /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:590: warning:
75 method redefined; discarding old []
76 /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:595: warning:
77 method redefined; discarding old keys
78 /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:600: warning:
79 method redefined; discarding old find_pair
80 /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:607: warning:
81 method redefined; discarding old []=
82 /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:611: warning:
83 method redefined; discarding old []
84 /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:615: warning:
85 method redefined; discarding old method_missing
86 rake backgroundrb:remove # Remove backgroundrb from your
87 rails application
88 [snip]
89
90 unmerging rake, then installing rake via gem solves the problem:
91
92 cowboy current # emerge --unmerge rake
93 [snip]
94
95 cowboy current # gem install rake -r
96 Attempting remote installation of 'rake'
97 Successfully installed rake-0.7.1
98 Installing RDoc documentation for rake-0.7.1...
99 cowboy current # rake --tasks
100 (in /var/rails/rodeo/releases/20061005042627)
101 rake backgroundrb:remove # Remove backgroundrb from your
102 rails application
103 [snip]
104
105 So something is different between the ebuild and manual gem installs...
106
107 Sorry, I didn't mean to take this thread into what belongs on bugzilla.
108 I was more curious
109 on the philosophy on why duplicate the gems as ebuilds? But I'm
110 thinking now it is probably
111 to allow gems to be dependencies of applications in portage.
112
113 Thank you,
114 Roy
115
116 --
117
118 echo "spzxAdjtdp/dpn" | perl -pe 's/(.)/chr(ord($1)-1)/ge'
119 --
120 gentoo-dev@g.o mailing list