Aaron chatted:
>ok, it is sort of working on saildataservice... except that when it runs
>script/runner as part of the job, it always fails with the error that it can't
>find libxml-ruby. I think it's looking in /usr/lib instead of /usr/local/lib
You can use access Bj's job table from script/console:
j2 = Bj.table.job.find(:all)
a job that failed:
>> j2[13]
=> #<Bj::Table::Job bj_job_id: 14, command: "./script/runner
'Bundle.find(26178).process_bundle_...", state: "finished", priority: 0, tag:
"", is_restartable: 1, submitter: "otto.concord.org", runner:
"otto.concord.org", pid: 11116, submitted_at: "2008-04-24 21:07:33",
started_at: "2008-04-24 21:07:34", finished_at: "2008-04-24 21:07:36", env:
nil, stdin: nil, stdout: "", stderr:
"/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require...", exit_status: 256>
why it failed
>> puts j2[13].stderr
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require': no such file to load -- systemu (MissingSourceFile)
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from
/web/rails.dev.concord.org/sds/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:496:in
`require'
from
/web/rails.dev.concord.org/sds/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:342:in
`new_constants_in'
from
/web/rails.dev.concord.org/sds/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:496:in
`require'
from /web/rails.dev.concord.org/sds/vendor/gems/bj-1.0.1/lib/bj.rb:52
from
/web/rails.dev.concord.org/sds/vendor/gems/bj-1.0.1/lib/bj.rb:50:in `each'
from /web/rails.dev.concord.org/sds/vendor/gems/bj-1.0.1/lib/bj.rb:50
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from
/web/rails.dev.concord.org/sds/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:496:in
`require'
from
/web/rails.dev.concord.org/sds/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:342:in
`new_constants_in'
from
/web/rails.dev.concord.org/sds/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:496:in
`require'
from /web/rails.dev.concord.org/sds/config/environment.rb:98
from
/web/rails.dev.concord.org/sds/vendor/rails/railties/lib/commands/runner.rb:39:in
`require'
from
/web/rails.dev.concord.org/sds/vendor/rails/railties/lib/commands/runner.rb:39
from ./script/runner:3:in `require'
from ./script/runner:3
.script/runner is finding it's ruby with the initial line:
#!/usr/bin/env ruby
It is also running as lighttpd and does not have /usr/local/bin on it's path so
it's finding the ruby in /usr/bin/ruby.
Changing the first line in ./script/runner to #!/usr/local/bin/ruby starts the
process working properly.
I did this to the production SDS (change not checked in to svn).
For he dev SDS I tried changing the PATH for the fcgi process in the lighttpd
config file -- this seems to have worked.
If it keeps workingI think we should do this for all the rails apps in the
lighttpd.conf file and remove our modifications to the shell interpreter path
to public/dispatch.fcgi and script/runner.
I changed the lighttpd.conf file for the dev sds by adding
"PATH" => "/usr/local/bin"
to the bin-environment setting in the fastcgi.server block for the rails app.
Example:
fastcgi.server = ( ".fcgi" =>
(
(
"socket" => basedir + "sds/log/code.socket",
"min-procs" => 2,
"max-procs" => 8,
"bin-path" => basedir + "sds/public/dispatch.fcgi",
"bin-environment" => ( "RAILS_ENV" => "production",
"RAILS_RELATIVE_URL_ROOT" => "/sds", "PATH" => "/usr/local/bin" )
)))
fyi: this is how to run the script/runner command properly from the shell --
setting up the right rails env and running as the correct user:
RAILS_ENV=production sudo -u lighttpd ./script/runner
'Bundle.find(26177).process_bundle_contents'
postscript:
a job that worked:
>> j2[14]
=> #<Bj::Table::Job bj_job_id: 15, command: "./script/runner
'Bundle.find(26179).process_bundle_...", state: "finished", priority: 0, tag:
"", is_restartable: 1, submitter: "otto.concord.org", runner:
"otto.concord.org", pid: 11197, submitted_at: "2008-04-24 21:13:43",
started_at: "2008-04-24 21:13:44", finished_at: "2008-04-24 21:13:46", env:
nil, stdin: nil, stdout: "", stderr: "", exit_status: 0>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"SAIL-Dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/SAIL-Dev?hl=en
-~----------~----~----~----~------~----~------~--~---