I just upgraded webgen, and it broke. Here''s what I get when I run webgen: chadmac:thewoolleyweb.com woolley$ webgen --version An error has occurred: uninitialized constant Console chadmac:thewoolleyweb.com woolley$ gem list webgen *** LOCAL GEMS *** webgen (0.5.2, 0.4.7)
Am Sat, 23 Aug 2008 19:20:44 -0700 schrieb "Chad Woolley" <thewoolleyman at gmail.com>:> I just upgraded webgen, and it broke. Here''s what I get when I run > webgen: > > chadmac:thewoolleyweb.com woolley$ webgen --version > An error has occurred: uninitialized constant Console > chadmac:thewoolleyweb.com woolley$ gem list webgen > > *** LOCAL GEMS *** > > webgen (0.5.2, 0.4.7)You need to downgrade facets 2.4.2/3 to facets 2.4.1 since there was an incompatible API change. -- Thomas
On Sat, Aug 23, 2008 at 11:57 PM, Thomas Leitner <t_leitner at gmx.at> wrote:> You need to downgrade facets 2.4.2/3 to facets 2.4.1 since there was an > incompatible API change.If this is the case, your gemspec should specify that. For example: s.add_dependency(''facets'', ''= 2.4.1'') (not >= 2.4.3, as you currently have) ...and probably also do an explicit gem() call with the exact version spec, e.g. gem(''facets'', ''= 2.4.1''), to ensure that is the one on the load path. If you do this, I think it should not matter if the user has a higher one installed. -- Chad
Am Mon, 25 Aug 2008 22:08:11 -0700 schrieb "Chad Woolley" <thewoolleyman at gmail.com>:> On Sat, Aug 23, 2008 at 11:57 PM, Thomas Leitner <t_leitner at gmx.at> > wrote: > > You need to downgrade facets 2.4.2/3 to facets 2.4.1 since there > > was an incompatible API change. > > If this is the case, your gemspec should specify that. For example: > > s.add_dependency(''facets'', ''= 2.4.1'') > > (not >= 2.4.3, as you currently have) > > ...and probably also do an explicit gem() call with the exact version > spec, e.g. gem(''facets'', ''= 2.4.1''), to ensure that is the one on the > load path. > > If you do this, I think it should not matter if the user has a higher > one installed.Yeah, I could probably use =2.4.3 instead of >=2.4.3. However, what if a future version of facets, say 2.4.4, fixes a bug that is also useful to webgen? There is a trade-off... I have also looked through my installed gems and nearly all of them use >=. What I will definitely not do is to use the ''gem'' call since I don''t think this is the right way. Rubygems is just one way of providing libraries for Ruby, setup.rb is another one. By explicitly using the gem() command, users must have Rubygems installed and everything managed via Rubygems. Ruby already has the nice require() command which is always supported regardless of the way a library is installed. -- Thomas
On Tue, Aug 26, 2008 at 1:59 AM, Thomas Leitner <t_leitner at gmx.at> wrote:> Yeah, I could probably use =2.4.3 instead of >=2.4.3. However, what if > a future version of facets, say 2.4.4, fixes a bug that is also useful > to webgen?If this happens, you can release a minor point release of webgen which specifies the later version. In my opinion, >= is like gambling. You are making a bet that nobody ever releases a version of one of your dependencies that breaks you. Since predicting the future is hard, that''s usually a risky bet. Better to be explicit about the currently working versions of your dependencies, and explicit about upgrading them when you are sure they work with the latest version of your code. -- Chad
Am Tue, 26 Aug 2008 13:27:48 -0700 schrieb "Chad Woolley" <thewoolleyman at gmail.com>:> On Tue, Aug 26, 2008 at 1:59 AM, Thomas Leitner <t_leitner at gmx.at> > wrote: > > Yeah, I could probably use =2.4.3 instead of >=2.4.3. However, what > > if a future version of facets, say 2.4.4, fixes a bug that is also > > useful to webgen? > > If this happens, you can release a minor point release of webgen which > specifies the later version. > > In my opinion, >= is like gambling. You are making a bet that nobody > ever releases a version of one of your dependencies that breaks you. > Since predicting the future is hard, that''s usually a risky bet. > Better to be explicit about the currently working versions of your > dependencies, and explicit about upgrading them when you are sure they > work with the latest version of your code. > > -- ChadThat makes sense, thanks for the insight! It''s like shipping an application with all the dependencies included: you can only upgrade the used libraries by installing a newer version of the program. I''m leaning more and more towards the =VERSION method... ;) -- Thomas