Babushka 0.7 update breaks gem dep?

34 views
Skip to first unread message

Piotr Zolnierek

unread,
Dec 26, 2010, 10:45:32 AM12/26/10
to babushka_app
This is what I get (MacOS) after "upgrading" from 0.6.2 to 0.7

Installing {"rake"=>"0.8.7"} via gem... $ gem install
'{"rake"=>"0.8.7"}'
ERROR: Could not find a valid gem '{"rake"=>"0.8.7"}' (>= 0) in
any repository

Also it seems some things have changed, like the helpers were
deprecated... any docs on that?
I am a little bit unhappy right now... all my installers stopped
working :(

Ben Hoskings

unread,
Dec 26, 2010, 6:47:30 PM12/26/10
to babush...@googlegroups.com
On 27 December 2010 02:45, Piotr Zolnierek <pzoln...@gmail.com> wrote:
This is what I get (MacOS) after "upgrading" from 0.6.2 to 0.7

     Installing {"rake"=>"0.8.7"} via gem...      $ gem install
'{"rake"=>"0.8.7"}'
     ERROR:  Could not find a valid gem '{"rake"=>"0.8.7"}' (>= 0) in
any repository

Yeah, the way versions are specified has changed. I didn't realise anyone was using the old way since I never really did :)

Instead of
    installs 'rake' => '0.8.7'

you should use
    installs 'rake 0.8.7'

The reason is that it's a lot nicer to specify more precise operators now, for example:
    installs 'bundler ~> 1.0.0'

Also, the change allowed me to improve the way #accepts_list_for and friends work.

Also it seems some things have changed, like the helpers were
deprecated... any docs on that?

Yep that changed. The docs for that are the ones you saw, that explain how to upgrade your deps when a helper is detected. Helpers were only necessary because those methods were defined on DepDefiner but run on DepRunner, so I needed something to straddle the gap. DepDefiner and DepRunner have been merged into a single class now, DepContext, so helpers aren't required anymore.
 

I am a little bit unhappy right now... all my installers stopped
working :(

Sorry about that. I intended to write all this up today—maybe I should have waited until the end of today to push the update. But then I've been running it on prod machines all week so it felt ready to me.

Any problems you're having will have simple fixes. If you send me the debug logs I'll sort you out.

Ben

Bodaniel Jeanes

unread,
Dec 26, 2010, 7:11:53 PM12/26/10
to babush...@googlegroups.com
As I've brought up before, I think it would be nice to have a declarative way to specify what Babs version a set of deps are known to run against. This is especially useful for project-specific deps so that if you pull down an old project and need to get it set up (either locally or on a new prod machine) you don't need to spend time fiddling around trying to find which version they worked with or having to rewrite them. Given the fast evolution of babushka (which is, of course, an otherwise fantastic thing), I think this is even more useful and necessary.

Bo



Ben Hoskings
27 December 2010 9:47 AM

On 27 December 2010 02:45, Piotr Zolnierek <pzoln...@gmail.com> wrote:
This is what I get (MacOS) after "upgrading" from 0.6.2 to 0.7

� � �Installing {"rake"=>"0.8.7"} via gem... � � �$ gem install
'{"rake"=>"0.8.7"}'
� � �ERROR: �Could not find a valid gem '{"rake"=>"0.8.7"}' (>= 0) in
any repository

Yeah, the way versions are specified has changed. I didn't realise anyone was using the old way since I never really did :)

Instead of
�� �installs 'rake' => '0.8.7'

you should use
�� �installs 'rake 0.8.7'

The reason is that it's a lot nicer to specify more precise operators now, for example:
�� �installs 'bundler ~> 1.0.0'

Also, the change allowed me to improve the way #accepts_list_for and friends work.

Also it seems some things have changed, like the helpers were
deprecated... any docs on that?

Yep that changed. The docs for that are the ones you saw, that explain how to upgrade your deps when a helper is detected. Helpers were only necessary because those methods were defined on DepDefiner but run on DepRunner, so I needed something to straddle the gap.�DepDefiner and DepRunner have been merged into a single class now, DepContext, so helpers aren't required anymore.
�

I am a little bit unhappy right now... all my installers stopped
working :(

Sorry about that. I intended to write all this up today�maybe I should have waited until the end of today to push the update. But then I've been running it on prod machines all week so it felt ready to me.

Any problems you're having will have simple fixes. If you send me the debug logs I'll sort you out.

Ben

This is what I get (MacOS) after "upgrading" from 0.6.2 to 0.7

Installing {"rake"=>"0.8.7"} via gem... $ gem install
'{"rake"=>"0.8.7"}'
ERROR: Could not find a valid gem '{"rake"=>"0.8.7"}' (>= 0) in
any repository

Also it seems some things have changed, like the helpers were
deprecated... any docs on that?

Ben Hoskings

unread,
Dec 26, 2010, 7:29:46 PM12/26/10
to babush...@googlegroups.com
On 27 December 2010 11:11, Bodaniel Jeanes <m...@bjeanes.com> wrote:
As I've brought up before, I think it would be nice to have a declarative way to specify what Babs version a set of deps are known to run against. This is especially useful for project-specific deps so that if you pull down an old project and need to get it set up (either locally or on a new prod machine) you don't need to spend time fiddling around trying to find which version they worked with or having to rewrite them. Given the fast evolution of babushka (which is, of course, an otherwise fantastic thing), I think this is even more useful and necessary.

Yep, I think this is a really good idea. I know Glen and others could really use this too. Will have a good look at it today.

—Ben

pzol

unread,
Dec 27, 2010, 2:38:55 AM12/27/10
to babush...@googlegroups.com
I updated to 0.8.0 but it still breaks (Ubuntu 10.10 with rvm), looks like there are extra quotes 

dep 'bundler.gem' do
requires '1.9.2.rvm'
  installs 'bundler ~> 1.0.7'
  provides 'bundle'
end

   Installing bundler-~> 1.0.7 via gem...      $ gem install 'bundler --version '~> 1.0.7'' 
      ERROR:  Could not find a valid gem 'bundler --version ~' (>= 0) in any repository

same for
dep 'bundler.gem' do
requires '1.9.2.rvm'
  installs 'bundler 1.0.7'
  provides 'bundle'
end


      Installing bundler-1.0.7 via gem...      $ gem install 'bundler --version '1.0.7'' 
      ERROR:  Could not find a valid gem 'bundler --version 1.0.7' (>= 0) in any repository

Ben Hoskings

unread,
Dec 27, 2010, 3:58:01 AM12/27/10
to babush...@googlegroups.com
On 27 December 2010 18:38, pzol <pzoln...@gmail.com> wrote:
I updated to 0.8.0 but it still breaks (Ubuntu 10.10 with rvm), looks like there are extra quotes 

Fixed. My bad. That was caused by a 'fix' to a problem that was reported last week, that I really shouldn't have pushed. That's what happens when you try to push a quick fix for someone without testing it properly :)

—Ben

pzol

unread,
Dec 27, 2010, 4:38:12 AM12/27/10
to babush...@googlegroups.com
Works! Thanks!

BTW have you thought about distributing Babushka as gem? That would resolve the versioning trouble

-- Piotr

Ben Hoskings

unread,
Dec 27, 2010, 5:05:17 AM12/27/10
to babush...@googlegroups.com
On 27 December 2010 20:38, pzol <pzoln...@gmail.com> wrote:
Works! Thanks!

BTW have you thought about distributing Babushka as gem? That would resolve the versioning trouble

It's worth considering. I've shied away from it because I want babushka to be able to set up rubygems. As it stands, it only depends on ruby & git.

—Ben

Piotr Zolnierek

unread,
Dec 27, 2010, 5:11:48 AM12/27/10
to babush...@googlegroups.com, babush...@googlegroups.com
True, but a lot of people including myself use rvm where you get rubygems for "free". 

Which reminds me... Can you remove the dependency on the managed ruby from gems etc? Having ruby and rubygems installed (via rvm) should suffice.

Thanks!


Piotr

Ben Hoskings

unread,
Dec 27, 2010, 5:31:30 AM12/27/10
to babush...@googlegroups.com
On 27 December 2010 21:11, Piotr Zolnierek <pzoln...@gmail.com> wrote:
True, but a lot of people including myself use rvm where you get rubygems for "free". 

Which reminds me... Can you remove the dependency on the managed ruby from gems etc? Having ruby and rubygems installed (via rvm) should suffice.


If there's a suitable ruby (i.e. >= 1.8.6) present, babushka no longer cares where it came from.

Let me know how it goes :)

—Ben

Ben Hoskings

unread,
Dec 27, 2010, 5:33:15 AM12/27/10
to babush...@googlegroups.com
On 27 December 2010 21:11, Piotr Zolnierek <pzoln...@gmail.com> wrote:
True, but a lot of people including myself use rvm where you get rubygems for "free". 

Yeah. The problem is that I want babushka to be able to set up rvm too.

If I can solve the versioning problem, would you be happy with babushka not being a gem?

—Ben

Piotr Zolnierek

unread,
Dec 27, 2010, 5:43:09 AM12/27/10
to babush...@googlegroups.com, babush...@googlegroups.com
Well... This is a chicken and egg problem ;)

You can install rvm in the bootstrap. Thats what I do.. Then install ruby via rvm then babushka. 

But running babs without any ruby (as on a stock ubuntu) is impossible.

I dont insist on a gem ;) but I use babs for unattended server setup and emergency repairs so I need to be sure it works every time the way I expect... Have you thought about versioning via a git tag or something like that?


Piotr

Ben Hoskings

unread,
Dec 27, 2010, 5:53:23 AM12/27/10
to babush...@googlegroups.com
On 27 December 2010 21:43, Piotr Zolnierek <pzoln...@gmail.com> wrote:
Well... This is a chicken and egg problem ;)

You can install rvm in the bootstrap. Thats what I do.. Then install ruby via rvm then babushka. 

Nice. That works really well for a server environment.


But running babs without any ruby (as on a stock ubuntu) is impossible.

Right—the 'ruby.managed' dep doesn't ever actually install ruby. The packages are listed in it so babushka can check the install is correct. For example, on some VPSes, ruby is installed but irb isn't.

The thing is, installing via the package manager is easy enough that the `babushka.me/up` script can do it cross-platform in a small amount of code. It's also a lot less invasive—installing babushka shouldn't require installing rvm + compiling ruby. On some systems that's what you want, but it's not what you want everywhere. The built-in deps have to be the absolute simplest case that is appropriate everywhere.


I dont insist on a gem ;) but I use babs for unattended server setup and emergency repairs so I need to be sure it works every time the way I expect... Have you thought about versioning via a git tag or something like that?

Yep, that's the sort of thing I'm thinking of.

—Ben

Reply all
Reply to author
Forward
0 new messages