[damagecontrol-user] Problems running damagecontrol on GNU/Debian PowerBook

View: New views
5 Messages — Rating Filter:   Alert me  

[damagecontrol-user] Problems running damagecontrol on GNU/Debian PowerBook

by Niklaus Giger :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi

I successfully installed the required gems, but now I am having problems to
see something sensible.

First I had to patch (see below) a little bit, as a GNU/Debian Linux system
has no "sound_player.rb". And I think it should be really optional whether I
want to get bored by my preferred music when a build is done.

Then I only see on the following three lines once I have called "ruby
script/damagecontrol" on http://localhost:3000/
New Project | Artifacts | Documentation
Projects
Welcome to DamageControl

As I have done the following lines before (as suggested by demo/README):
rake migrate RAILS_ENV=production
ruby script/create_demo_project
I would expect a link to "demo" somewhere below or near Project.
Calling
rake migrate RAILS_ENV=development
ruby script/create_demo_project
did not change the picture at all.

In order to test my changes to the sound driver I went into
test/unit/damagecontrol/publisher/ and called
ruby sound_test.rb
I would appreciate if somebody could tell me how to call the whole test suite.
I suggest to put this information into the top README.
May I also suggest a sentence in the top README like this:

> If you want to run a demo, please consult demo/README for the details.

I still cannot fully subscribe to your doc/PROPAGANDA but it would be very
nice to get near.

Best regards

Index: test/unit/damagecontrol/publisher/sound_test.rb
===================================================================
--- test/unit/damagecontrol/publisher/sound_test.rb     (Revision 1683)
+++ test/unit/damagecontrol/publisher/sound_test.rb     (Arbeitskopie)
@@ -6,9 +6,10 @@
       fixtures :builds, :projects, :revisions

       def test_should_play_sound_on_local_machine_on_publish
-        Sound.new.publish(@build_1)
+        Sound.new.publish(@build_1) if HasSound
         # hard to assert success. verify audibly.
       end
     end
   end
-end
+
+end
+
Index: lib/damagecontrol/publisher/sound.rb
===================================================================
--- lib/damagecontrol/publisher/sound.rb        (Revision 1683)
+++ lib/damagecontrol/publisher/sound.rb        (Arbeitskopie)
@@ -1,6 +1,11 @@
 # Load platform-specific sound player
-require File.expand_path(File.dirname(__FILE__) + "/sound/" +
DamageControl::Platform.family + "/sound_player")

+soundDriver = File.expand_path(File.dirname(__FILE__) + "/sound/" +
DamageControl::Platform.family + "/sound_player")
+HasSound = File.exists?(soundDriver)
+require soundDriver if HasSound
+
+if HasSound then
+
 module DamageControl
   module Publisher
     class Sound < Base
@@ -29,3 +34,5 @@
     end
   end
 end
+
+end

--
Niklaus Giger
Wieshoschet 6
CH-8753 Mollis
Tel. ++41 55 612 20 54 (privat)
Tel. ++41 55 618 64 68 (Geschäft)

Re: [damagecontrol-user] Problems running damagecontrol on GNU/Debian PowerBook

by Aslak Hellesoy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 11/7/05, Niklaus Giger <niklaus.giger@...> wrote:
> Hi
>
> I successfully installed the required gems, but now I am having problems to
> see something sensible.
>
> First I had to patch (see below) a little bit, as a GNU/Debian Linux system
> has no "sound_player.rb". And I think it should be really optional whether I
> want to get bored by my preferred music when a build is done.
>

I'm not a linux user, but I'd love to have a sound_player.rb that
would work with on Linux. Is there a 'de facto' audio player that is
commonly installed on linux that also has a simple command line
interface?

> Then I only see on the following three lines once I have called "ruby
> script/damagecontrol" on http://localhost:3000/
> New Project | Artifacts | Documentation
> Projects
> Welcome to DamageControl
>

That's good. There isn't much more to see yet :-) UI work is sorely
needed, but stabilizing the core functionality is what I'm focusing on
now. Help and suggestions is welcome!

> As I have done the following lines before (as suggested by demo/README):
> rake migrate RAILS_ENV=production
> ruby script/create_demo_project
> I would expect a link to "demo" somewhere below or near Project.
> Calling
> rake migrate RAILS_ENV=development
> ruby script/create_demo_project
> did not change the picture at all.
>

See my other mail - hopefully works better now.

> In order to test my changes to the sound driver I went into
> test/unit/damagecontrol/publisher/ and called
> ruby sound_test.rb
> I would appreciate if somebody could tell me how to call the whole test suite.

rake

:-)

> I suggest to put this information into the top README.

done

> May I also suggest a sentence in the top README like this:
>
> > If you want to run a demo, please consult demo/README for the details.
>

done

> I still cannot fully subscribe to your doc/PROPAGANDA but it would be very
> nice to get near.
>

Hehe, I have modified it slightly. It's a bit early to claim all those
goals have been accomplished.

> Best regards
>
> Index: test/unit/damagecontrol/publisher/sound_test.rb

(snip)

sound fix applied, with a somewhat different implementation.

thanks a lot for your feedback!

cheers,
aslak

Re: [damagecontrol-user] Problems running damagecontrol on GNU/Debian PowerBook

by Niklaus Giger :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Am Mittwoch, 9. November 2005 02.38 schrieb aslak hellesoy:

> On 11/7/05, Niklaus Giger <niklaus.giger@...> wrote:
> > Hi
> >
> > I successfully installed the required gems, but now I am having problems
> > to see something sensible.
> >
> > First I had to patch (see below) a little bit, as a GNU/Debian Linux
> > system has no "sound_player.rb". And I think it should be really optional
> > whether I want to get bored by my preferred music when a build is done.
>
> I'm not a linux user, but I'd love to have a sound_player.rb that
> would work with on Linux. Is there a 'de facto' audio player that is
> commonly installed on linux that also has a simple command line
> interface?
I do not know, but I will inquire on a Debian list about this problem, maybe
they have a solution for this problem.
<...>
> > May I also suggest a sentence in the top README like this:
> > > If you want to run a demo, please consult demo/README for the details.
>
> done
Thanks, I reinstalled today in a pristine directory and have now the following
error when calling ruby init.rb
ruby init.rb
SHELL_DIR:/mnt/data.ng/src/damagecontrol_active_record
=> DamageControl parent process running [5229]
=> DamageControl data dir:/mnt/data.ng/src/damagecontrol_active_record
=> Booting WEBrick...
=> Rails application started on http://0.0.0.0:3000
=> Ctrl-C to shutdown server; call with --help for options
[2005-11-09 18:17:48] INFO  WEBrick 1.3.1
[2005-11-09 18:17:48] INFO  ruby 1.8.4 (2005-10-29) [powerpc-linux]
[2005-11-09 18:17:48] INFO  WEBrick::HTTPServer#start: pid=5231 port=3000
DamageControl builder
log: /mnt/data.ng/src/damagecontrol_active_record/log/builder_1.log
Killing WEBrick [5231]
[2005-11-09 18:17:48] ERROR SignalException: SIGHUP
        /usr/lib/ruby/1.8/webrick/server.rb:91:in `select'
./vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:67:in
`log': no such table: projects: SELECT * FROM projects  
(ActiveRecord::StatementInvalid)
       
from ./vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:133:in
`execute'
       
from ./vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:153:in
`select_all'
        from ./vendor/rails/activerecord/lib/active_record/base.rb:447:in
`find_by_sql'
        from ./vendor/rails/activerecord/lib/active_record/base.rb:411:in
`find'
        from ./lib/damagecontrol/build_daemon.rb:30:in
`handle_all_projects_once'
        from ./lib/damagecontrol/build_daemon.rb:20:in `run'
        from ./lib/damagecontrol/build_daemon.rb:19:in `run'
        from ./script/builder:53
        from ./script/damagecontrol:161:in `start_builder'
        from ./script/damagecontrol:158:in `start_builder'
        from ./script/damagecontrol:181
        from ./script/damagecontrol:180
        from ./script/damagecontrol:179
        from init.rb:2

So I think we missed to create the initial SQL tables. This should be
documented in the README.

Calling rake to test everything terminates with a funny result. An exception
but all assertions passed. Is this correct?

Loaded suite /usr/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake/rake_test_loader
Started
/usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/lib/sqlite3/errors.rb:94:in
`check': cannot rollback - no transaction is active (SQLite3::SQLException)
       
from /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/lib/sqlite3/resultset.rb:76:in
`check'
       
from /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/lib/sqlite3/resultset.rb:68:in
`commence'
       
from /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/lib/sqlite3/resultset.rb:61:in
`initialize'
       
from /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/lib/sqlite3/statement.rb:158:in
`execute'
       
from /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/lib/sqlite3/database.rb:211:in
`execute'
       
from /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/lib/sqlite3/database.rb:186:in
`prepare'
       
from /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/lib/sqlite3/database.rb:210:in
`execute'
       
from /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/lib/sqlite3/database.rb:620:in
`rollback'
         ... 12 levels...
        from /usr/lib/ruby/1.8/test/unit/autorunner.rb:200:in `run'
        from /usr/lib/ruby/1.8/test/unit/autorunner.rb:13:in `run'
        from /usr/lib/ruby/1.8/test/unit.rb:285
       
from /usr/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake/rake_test_loader.rb:5
/usr/bin/ruby1.8 -Ilib:test
"/usr/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake/rake_test_loader.rb"
"test/functional/revision_controller_test.rb"
"test/functional/build_controller_test.rb"
"test/functional/file_system_controller_test.rb"
"test/functional/doc_controller_test.rb"
"test/functional/project_controller_test.rb"
Loaded suite /usr/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake/rake_test_loader
Started
.........
Finished in 3.10057 seconds.

9 tests, 31 assertions, 0 failures, 0 errors

Best thanks for all your prompt help and fixes. In the meantime I will take a
look at RSCM and probably add a Visual SourceSafe implementation, as we want
to get rid of it at work in favour of something better.

Best regards

--
Niklaus Giger

Re: [damagecontrol-user] Problems running damagecontrol on GNU/Debian PowerBook

by Aslak Hellesoy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> > I'm not a linux user, but I'd love to have a sound_player.rb that
> > would work with on Linux. Is there a 'de facto' audio player that is
> > commonly installed on linux that also has a simple command line
> > interface?
> I do not know, but I will inquire on a Debian list about this problem, maybe
> they have a solution for this problem.
>

all i need is a command line that will play an mp3 or wav file

> > > May I also suggest a sentence in the top README like this:
> > > > If you want to run a demo, please consult demo/README for the details.
> >
> > done
> Thanks, I reinstalled today in a pristine directory and have now the following
> error when calling ruby init.rb
> ruby init.rb
> SHELL_DIR:/mnt/data.ng/src/damagecontrol_active_record
> => DamageControl parent process running [5229]
> => DamageControl data dir:/mnt/data.ng/src/damagecontrol_active_record
> => Booting WEBrick...
> => Rails application started on http://0.0.0.0:3000
> => Ctrl-C to shutdown server; call with --help for options
> [2005-11-09 18:17:48] INFO  WEBrick 1.3.1
> [2005-11-09 18:17:48] INFO  ruby 1.8.4 (2005-10-29) [powerpc-linux]
> [2005-11-09 18:17:48] INFO  WEBrick::HTTPServer#start: pid=5231 port=3000
> DamageControl builder
> log: /mnt/data.ng/src/damagecontrol_active_record/log/builder_1.log
> Killing WEBrick [5231]
> [2005-11-09 18:17:48] ERROR SignalException: SIGHUP
>         /usr/lib/ruby/1.8/webrick/server.rb:91:in `select'
> ./vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:67:in
> `log': no such table: projects: SELECT * FROM projects
> (ActiveRecord::StatementInvalid)
>
> from ./vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:133:in
> `execute'
>
> from ./vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:153:in
> `select_all'
>         from ./vendor/rails/activerecord/lib/active_record/base.rb:447:in
> `find_by_sql'
>         from ./vendor/rails/activerecord/lib/active_record/base.rb:411:in
> `find'
>         from ./lib/damagecontrol/build_daemon.rb:30:in
> `handle_all_projects_once'
>         from ./lib/damagecontrol/build_daemon.rb:20:in `run'
>         from ./lib/damagecontrol/build_daemon.rb:19:in `run'
>         from ./script/builder:53
>         from ./script/damagecontrol:161:in `start_builder'
>         from ./script/damagecontrol:158:in `start_builder'
>         from ./script/damagecontrol:181
>         from ./script/damagecontrol:180
>         from ./script/damagecontrol:179
>         from init.rb:2
>
> So I think we missed to create the initial SQL tables. This should be
> documented in the README.
>

It is documented in the README. Just run 'rake migrate'

> Calling rake to test everything terminates with a funny result. An exception
> but all assertions passed. Is this correct?
>

No, you shouldn't be getting stack traces. Yesterday I upgraded the
codebase to the latest Ruby on Rails (which is one the foundation of
DamageControl - it is included in subversion). It may have something
to do with that.

I had a bunch of similar errors yesterday, but managed to get around
them. Please paste the complete ruby command that Rake executes as a
result of running rake. Mine is:

/usr/bin/ruby -Ilib:test
"/usr/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake/rake_test_loader.rb"
"test/unit/artifact_test.rb" "test/unit/build_executor_test.rb"
"test/unit/build_result_mailer_test.rb" "test/unit/build_test.rb"
"test/unit/project_test.rb" "test/unit/promotion_level_test.rb"
"test/unit/revision_file_test.rb" "test/unit/revision_test.rb"
"test/unit/damagecontrol/build_daemon_test.rb"
"test/unit/damagecontrol/scm_poller_test.rb"
"test/unit/damagecontrol/zipper_test.rb"
"test/unit/damagecontrol/diff/diff_htmlizer_test.rb"
"test/unit/damagecontrol/diff/diff_parser_test.rb"
"test/unit/damagecontrol/publisher/ambient_orb_test.rb"
"test/unit/damagecontrol/publisher/artifact_archiver_test.rb"
"test/unit/damagecontrol/publisher/base_test.rb"
"test/unit/damagecontrol/publisher/email_test.rb"
"test/unit/damagecontrol/publisher/growl_test.rb"
"test/unit/damagecontrol/publisher/jabber_test.rb"
"test/unit/damagecontrol/publisher/sound_test.rb"
"test/unit/damagecontrol/publisher/x10_cm17_a_test.rb"

(I just want to see if your order of tests is the same - it seems to
have some significance with the latest rails.)

Also, please paste the output of 'gem list --local'.

>
> Best thanks for all your prompt help and fixes. In the meantime I will take a
> look at RSCM and probably add a Visual SourceSafe implementation, as we want
> to get rid of it at work in favour of something better.
>

VSS support would be awesome! I realise it can be difficult to follow
the RSCM guide for VSS, since setting up and destroying a VSS central
repo might be tricky. In that case, I suggest you write your own tests
and set up the repo manually.

-But how woth a RSCM VSS adapter help you get rid of VSS?

Aslak

> Best regards
>
> --
> Niklaus Giger
>

Re: [damagecontrol-user] Problems running damagecontrol on GNU/Debian PowerBook

by Rick Bradley :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

* aslak hellesoy (aslak.hellesoy@...) [051109 13:10]:
> all i need is a command line that will play an mp3 or wav file

You can play an mp3 with 'mpg123' and a wav file with 'play'.  I'm not
aware immediately of a player on the command-line which will do both,
but there's probably one somewhere.

Rick
--
 http://www.rickbradley.com    MUPRN: 137
                       |  simplify things. My
   random email haiku  |  biggest issue is really
                       |  my DB, not Sablot.