Clearing Up The Whole Shoes And RubyGems Deal
So, I have a matter of Shoes business. Everybody always asks about how to get SQLite working with Shoes. Or, uh, what’s the other one: ImageMagick? No, that can’t be it. Well, krikey, I can’t remember.
At any rate, here’s my reason for stalling.
This is Shoes. Which isn’t a Ruby library. It’s not a gem. It’s a kit. Shoes has an installer. You click on a .shy file (such as Tetris) and it launches Shoes.
And Shoes does the pulling down of gems and libraries. Take this small and very contrived Shoes script:
Shoes.setup do
gem 'json >= 1.1.1'
gem 'activerecord'
end
require 'json'
require 'activerecord'
Shoes.app do
@msg = para "ALL SYSTEMS GO"
animate(20) { @msg.toggle }
end
By putting your gem list in the Shoes.setup
block, you’ll end up encountering the Shoes popup seen above if any of the gems happens to be absent. Gems are installed in ~/.shoes
, to avoid needing superuser rights. (And just to keep Shoes away from messing with your normal Ruby stuff.) Leopard has some compiling problems, but other platforms are doing good. That setup window needs a cancel button.
And that’s all. I hope you have learned something. I know I did. Because I realized the thing about the cancel button.
Yes, well, and for Ruby scripts that aren’t in a gem: no sweat. Just drop those in the same directory as your Shoes script and require them. That was probably obvious, but it still feels good to get that off my chest.
Oh, also: the SQLite lib comes with Shoes since about a week ago. See, sometimes I need these gems, too.
Now begin the comments …
nil
Can we still set something up to bootstrap Shoes from little Red Ballons?
dan
Out-frigging-standing! Well played, master!
Juixe TechKnow
Lacing up the latest release of Shoes.
evanfarrar
I noticed the sample/simple-rubygems.rb last night. This was the last thing I was waiting for in order to release a couple of little apps on the world. I just couldn’t bear to provide installation instructions with my shy files. Thanks Why!
whynot?
Why is shoes not available as a gem itself?
zerohalo
I’m still wondering the same myself
OMouse
@whynot?
@zerohalo
Shoes is self-contained. It makes sure your socks/ruby-gems are on. The point of this is that it’s easier for a user to get started using a Shoes app. No worries about dependencies, Shoes will put your socks on for you.
(At least I think that’s how it works.)
whynot?
@OMouse: I still don’t understand why shoes can’t be packaged up as a gem for those of us who prefer managing code installs that way.
_why
Shoes isn’t a gem. It’s a Ruby distro. It’s like asking why Squeak isn’t a ruby gem!
whynot?
It’s like asking why Squeak isn’t a ruby gem!
Well, why isn’t it ;)?
Ah, ok….I thought Shoes was merely a GUI library for Ruby?
kcbanner
I thought it was just a lib as well
Ian
Shoes is a way of life. You cant package this in a gem. That is blasphomius
Comments are closed for this entry.