sprout not in path and error with running

6 views
Skip to first unread message

michael.prescott

unread,
Jul 24, 2009, 10:38:37 AM7/24/09
to ProjectSprouts
I stepped through the install process found at projectsprouts and have
some trouble with the install and running sprout. My platform is
Ubuntu 9.04 desktop. I installed ruby and rubygems:
sudo apt-get install ruby
sudo apt-get install rubygems

I also saw your comment about hidden dependencies so I installed:
sudo gem install net-sftp
sudo gem install net-ssh

Next I installed sprout. No errors occurred during the installation
process:
sudo gem install sprout

However, sprout was not added to the path so the following failed:
sprout -n as3 SomeProject

I located sprout
sudo updatedb
locate sprout

Then changed to the sprout directory and attempted to run from there.
The following error occured when running:
./sprout -n as3 SomeProject

developer@devmachine1:/var/lib/gems/1.8/gems/sprout-0.7.211-x86-linux/
bin$ ./sprout
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require': no such file to load -- rake (LoadError)
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from ./../lib/sprout.rb:3
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from ./sprout:13

Duncan Beevers

unread,
Jul 24, 2009, 11:53:09 AM7/24/09
to project...@googlegroups.com
Sounds like you need to install the rake gem.

Luke Bayes

unread,
Jul 24, 2009, 11:58:02 AM7/24/09
to project...@googlegroups.com
Thanks Duncan.

Michael,

I'll get that dependency added to the sprout gem so no one else will
get that particular error. But I'm curious about how the sprout
executable wasn't added to your path. This was a feature of gems that
'just worked' in the past.

Once you install the rake gem (sudo gem install rake), can you please
let me know if 'rake' was added to your path?

Thanks,

Luke

michael.prescott

unread,
Jul 24, 2009, 1:14:54 PM7/24/09
to ProjectSprouts
No, installing rake using gem did not add it to the path:

developer@devmachine1:~$ sudo gem install rake
Successfully installed rake-0.8.7
1 gem installed
Installing ri documentation for rake-0.8.7...
Installing RDoc documentation for rake-0.8.7...
developer@devmachine1:~$ rake
The program 'rake' is currently not installed. You can install it by
typing:
sudo apt-get install rake
bash: rake: command not found


So, blindly following the instrucational prompt:

developer@devmachine1:~$ sudo apt-get install rake
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
rake
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 124kB of archives.
After this operation, 1020kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com jaunty/universe rake 0.8.1-3
[124kB]
Fetched 124kB in 9s (12.9kB/s)
Selecting previously deselected package rake.
(Reading database ... 112732 files and directories currently
installed.)
Unpacking rake (from .../archives/rake_0.8.1-3_all.deb) ...
Processing triggers for man-db ...
Setting up rake (0.8.1-3) ...


Now rake is in the path:

developer@devmachine1:~$ rake
rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb,
Rakefile.rb)
/usr/lib/ruby/1.8/rake.rb:2143:in `raw_load_rakefile'
(See full trace by running task with --trace)
developer@devmachine1:~$

developer@devmachine1:~$ sudo gem install sprout
Successfully installed rubyzip-0.9.1
Successfully installed archive-tar-minitar-0.5.2
Successfully installed activesupport-2.3.3
Successfully installed rubigen-1.3.3
Successfully installed open4-0.9.6
Successfully installed sprout-0.7.211-x86-linux
6 gems installed
Installing ri documentation for archive-tar-minitar-0.5.2...
Installing ri documentation for activesupport-2.3.3...
Installing ri documentation for rubigen-1.3.3...
Installing ri documentation for sprout-0.7.211-x86-linux...
Installing RDoc documentation for archive-tar-minitar-0.5.2...
Installing RDoc documentation for activesupport-2.3.3...
Installing RDoc documentation for rubigen-1.3.3...
Installing RDoc documentation for sprout-0.7.211-x86-linux...
developer@devmachine1:~$ sprout
bash: sprout: command not found

Still not in the path, but now we have:
developer@devmachine1:/var/lib/gems/1.8/gems/sprout-0.7.211-x86-linux/
bin$ ./sprout
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require': no such file to load -- openssl (LoadError)
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /var/lib/gems/1.8/gems/net-ssh-2.0.11/lib/net/ssh/transport/
openssl.rb:1
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /var/lib/gems/1.8/gems/net-ssh-2.0.11/lib/net/ssh/buffer.rb:2
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /var/lib/gems/1.8/gems/net-ssh-2.0.11/lib/net/ssh/transport/
algorithms.rb:1
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /var/lib/gems/1.8/gems/net-ssh-2.0.11/lib/net/ssh/transport/
session.rb:7
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /var/lib/gems/1.8/gems/net-ssh-2.0.11/lib/net/ssh.rb:10
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in
`gem_original_require'
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in `require'
from ./../lib/sprout/tasks/sftp_task.rb:35
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from ./../lib/sprout/general_tasks.rb:2
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from ./../lib/sprout.rb:36

Luke Bayes

unread,
Jul 24, 2009, 1:40:20 PM7/24/09
to project...@googlegroups.com
OK -

I believe this may be your problem:

https://bugs.launchpad.net/ubuntu/+source/ruby1.8/+bug/145267

I was able to get gems running on a Vanilla install of Ubuntu a year
or two ago, but I'm guessing later versions of RubyGems became
'better' citizens of the system and no longer automatically modify the
system path.

Please let me know if this solves the problem for you.


Thanks,

Luke

michael.prescott

unread,
Jul 24, 2009, 4:43:40 PM7/24/09
to ProjectSprouts
I added /var/lib/gems/1.8/bin to my path, but results are the same.
I'm going to step away from Sprout for a bit till I have something
more than zero experience with Ruby, since it seems the problem I'm
experiencing is gem installs are failing with the latest version of
ubuntu (9.04 desktop). The bug you pointed to seems to still be
open, marked as invalid, disputed, and perhaps will not be fixed soon.

Anyhow, thanks for the help, Luke. I found your Sprouts project while
creating a build machine and learning about continuous integration,
triggered and scheduled builds, etc. I've got a small team of long-
time Flash developers and designers who work primarily in the Flash
IDE, and a couple of us working with FlexBuilder and the flex_sdk. Our
workflow is still evolving, but we seriously need something better
than Flash, Flex, or even commanded ant builds. Sprout appears to be
a way to easily and quickly get my linux build machine, macbook, and a
few windows systems all on the same page.

I know this isn't the place for it, but perhaps you can point me to
someone that can talk with me about Flash, Flex SDK, and build
automation. I want to know more about the workflow of other teams of
designers and programmers targeting the Flash Platform. For example,
many of our "modules" are stand-alone small Flash applications and
widgets that implement a specific interface and are run-time loaded
into an actionscript framework built with mxmlc. The first question
that I'd have is how to change our workflow and fla structure to
enable automated builds and unit testing yet still cater to the needs
of our designers. They need to be able to work within the Flash IDE
to test their animations and other widgets. However, programmers want
a command-line driven interface or scriptable way to build periodocaly
and run automated tests on those designer assets. We've mixed ant
into our workflow, which is helping some, but it doesn't address the
fla based widgets, and jsfl calls seem very inelegant.

Luke Bayes

unread,
Jul 24, 2009, 5:51:28 PM7/24/09
to project...@googlegroups.com
Hey Michael,

I think you're asking for something that seems reasonable given all
the other technologies out there, but for Flash, is sadly lacking.

We have solved these problems over the years (pretty well - I think)
using Sprouts and JSFL. There are a handful of simple JSFL scripts
out there that can compile your FLA files from the command line and I
generally hook them up in Rake as follows:

file 'bin/SomeFlaProject.swf' do
exec './script/SomeJSFL.jsfl fla/SomeFlaProject.fla'
end

Using the magic of Rake, this will only compile the SWF file if the
current SWF is older than the current FLA. Here's a good article from
Martin Fowler about the Rake build language:

http://www.martinfowler.com/articles/rake.html

As usual, StackOverflow has a better description of the problem you're
having along with a fix:

http://stackoverflow.com/questions/909673/gems-and-ubuntu-9-04

Here's a JSFL script if you're interested:

http://www.gskinner.com/blog/archives/2004/08/jsfl_fla_batch.html

One thing to note about compiling FLA files using JSFL - you won't be
able to automate their compilation on a Linux box, as Flash Authoring
doesn't work (unless you run WINE or some such ugliness). Another
issue with continuous integration and SWF files, is that you'll need
to make sure your CI machine has X-Windows running (and available to
your CI process user).

As far as other options go...

I know that people do use ANT all over the place, especially since
that's what Adobe tells them to do, but if you have any questions
about whether you should or should not use Ant, just ask James Duncan
Davidson, the original creator of Ant, who later confessed publicly
that:

1. He originally chose to use XML as the format for Ant scripts
because he didn't want to write a parser, and
2. He really regrets it and apologizes to the Java community at large for it.


Best of luck,

Luke

Reply all
Reply to author
Forward
0 new messages