Sunday, May 18, 2008

sprouts on linux

I've been using sprouts for AS3 on linux as a way to get straight into developing without having to learn about the tools or libraries I need. I'm not sure I'll continue using it once I get into more serious work, as it is a bit opaque (i.e. as with just about any framework, it is easy to do things it does by default, and really difficult to do anything else) and is based on ruby which is not one of my favourite languages.

It has also not been very smooth to use and install, which is what the rest of this article is about.

I'm following the instructions on:
http://www.projectsprouts.org/getting_started.html

on ubuntu. I had ruby installed, and just installed the gem package
(i.e., sudo gem --help then worked). (I also needed to install the rake package.)

But the following line fails:

sudo gem install sprout
Bulk updating Gem source index for: http://gems.rubyforge.org
ERROR: While executing gem ... (Gem::GemNotFoundException)
Could not find sprout (> 0) in any repository

Ah, simply trying it again works. Note that it will ask about all the "required" dependencies. If they are truly "required" then no choice but to say "Y"?

$ sudo gem install sprout
Bulk updating Gem source index for: http://gems.rubyforge.org
Select which gem to install for your platform (i486-linux)
1. sprout 0.7.171 (mswin32)
2. sprout 0.7.171 (darwin)
3. sprout 0.7.171 (x86-linux)
4. sprout 0.7.171 (ruby)
5. Skip this gem
6. Cancel installation
> > 3
Install required dependency rubyzip? [Yn]
Install required dependency archive-tar-minitar? [Yn]
Install required dependency rails? [Yn]
Install required dependency rake? [Yn]
Install required dependency activesupport? [Yn]
Install required dependency activerecord? [Yn]
Install required dependency actionpack? [Yn]
Install required dependency actionmailer? [Yn]
Install required dependency activeresource? [Yn]
Install required dependency net-sftp? [Yn]
Install required dependency net-ssh? [Yn]
Install required dependency needle? [Yn]
Install required dependency open4? [Yn]



Next, this line fails:
sprout -n as3 SomeProject

Run "gem contents sprout" to see it has been installed in:
/var/lib/gems/1.8/gems/sprout-0.7.171-x86-linux/bin

It is not executable so:
cd /var/lib/gems/1.8/gems/sprout-0.7.171-x86-linux/bin/
sudo chmod +x sprout

You can temporarily add it to the path with:
export PATH=$PATH:/var/lib/gems/1.8/gems/sprout-0.7.171-x86-linux/bin

This now works:
sprout -n as3 test1


But:
cd test1
rake

fails with the line: "no such file to load -- sprout".


This seems to do the trick:
rake -I /var/lib/gems/1.8/gems/sprout-0.7.171-x86-linux/lib/


Q. Where do I set that so it is a global setting??


Another problem: when I double click a swf file it tries to open it in
movie player. I try to connect to flashplayer, but that name does not
exist in /usr/bin.
Q. Where has the standalone flash player been installed??

No comments: