Importing Citations

165 views
Skip to first unread message

Tom

unread,
Oct 4, 2012, 10:26:44 AM10/4/12
to bib...@googlegroups.com
Hi,

I was wondering if there is anything else I need to do after uploading citations?  (Version 1.2.1)

As they have been "processing" since: 2012-10-03 20:43:48

Thanks!

Tom

Howard Ding

unread,
Oct 4, 2012, 10:29:55 AM10/4/12
to bib...@googlegroups.com
The processing happens in the background via delayed_job. Is that
running? You would have started it (and the Solr indexing) at some point
with something like:

RAILS_ENV=production bundle exec rake bibapp:start

If it is running then (assuming you're on a unix system) something like:

ps aug | grep delay

should show a line like the following (but with production):

hading 11923 0.0 2.0 298648 127944 ? S Oct02 1:19
development/delayed_job

Howard
> --
> You received this message because you are subscribed to the Google
> Groups "bibapp" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/bibapp/-/W9XaK-1z1ecJ.
> To post to this group, send email to bib...@googlegroups.com.
> To unsubscribe from this group, send email to
> bibapp+un...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/bibapp?hl=en.

Thomas Misilo

unread,
Oct 4, 2012, 10:40:52 AM10/4/12
to bib...@googlegroups.com
Howard,

I do not have anything with "delay" running. I am running Bibapp through passenger so I am not sure if I am doing that right or not?

Thanks for any help,

Tom

Howard Ding

unread,
Oct 4, 2012, 10:52:12 AM10/4/12
to bib...@googlegroups.com
On 10/4/2012 9:40 AM, Thomas Misilo wrote:
> Howard,
>
> I do not have anything with "delay" running. I am running Bibapp through passenger so I am not sure if I am doing that right or not?
>
> Thanks for any help,
>
> Tom
>
At some point you have to start up the delayed_job and solr processes.
Passenger does not (and cannot) do this.

Background:

Solr is an independent full text search engine that Bibapp uses for
search functionality and other things. It runs as a separate application
(it's a java web app) on your server and Bibapp is a client for it.

Delayed Job is used to process things (like import) in the background,
so (for example) you upload the import but Bibapp returns a response to
the browser immediately (saying it is processing or something like that)
and then goes and does the actual importing on its own time, then
notifies you when it is done. It does this by running one (or more)
instances of the rails application in the background. They poll a
database table occasionally to see if there is anything to do, and the
main (web) application schedules jobs by writing to this table.

Practical advice:

Assuming you're running in production (in Linux with bash - if you have
a different set up I may be able to advise if you tell me), you can
start it up by changing to the Bibapp directory and doing (this handles
both Solr and delayed_job, but there are separate tasks for each if you
need them):

RAILS_ENV=production bundle exec rake bibapp:start

There is a similar rake task for stopping it (bibapp:stop).

Likely you'll want to work these into start/stop/restart scripts so as
not to have to do them by hand on server restarts, etc.

I'll try to clarify some of this on the wiki page as well. It's there
under the installation instructions in the 'Start Bibapp' section, but
it's not entirely clear.

Howard

Thomas Misilo

unread,
Jun 25, 2013, 8:55:14 AM6/25/13
to bib...@googlegroups.com
After upgrading to version 2.0.1 none of the jobs are processing.

There is no delay* processes running, so I am at a loss.

I am using Passagener for the front end, and am using this command to start bibapp "RAILS_ENV=production bundle exec rake bibapp:start"

Any ideas are greatly appreciated?

Thanks,

Tom


> -----Original Message-----
> From: bib...@googlegroups.com [mailto:bib...@googlegroups.com] On
> Behalf Of Howard Ding
> Sent: Thursday, October 04, 2012 10:52 AM
> To: bib...@googlegroups.com
> Subject: Re: [bibapp] Importing Citations
>

Jason Stirnaman

unread,
Jun 25, 2013, 10:33:23 AM6/25/13
to bib...@googlegroups.com
Tom,
Do you have the directory [BibApp]/tmp/delayed_job_production_pids and is there a file "delayed_job.pid" in there? Do you also have a [BibApp]/log/delayed_job.log file.

I'm thinking that some of those were introduced within in the upgrade you did and if the tasks can't create them then delayed_job won't start.

Also you might run rake with --trace and also watch the logs to see if there's any indication why delayed_job isn't starting, e.g.
RAILS_ENV=production rake --trace bibapp:start

and tail your logs with
tail -f {log-file-path}


To unsubscribe from this group and stop receiving emails from it, send an email to bibapp+un...@googlegroups.com.

To post to this group, send email to bib...@googlegroups.com.

Thomas Misilo

unread,
Jun 25, 2013, 10:49:04 AM6/25/13
to bib...@googlegroups.com

From: bib...@googlegroups.com [mailto:bib...@googlegroups.com] On Behalf Of Jason Stirnaman
Sent: Tuesday, June 25, 2013 10:33 AM
To: bib...@googlegroups.com
Subject: Re: [bibapp] Importing Citations

 

Tom,

Do you have the directory [BibApp]/tmp/delayed_job_production_pids and is there a file "delayed_job.pid" in there? Do you also have a [BibApp]/log/delayed_job.log file.

 

Yes I have a [BibApp]/tmp/delayed_job_production_pids directory. There is no file “delayed_job.pid” it is empty.

 

Yes I have a delayed_job.log file.

 

 

I'm thinking that some of those were introduced within in the upgrade you did and if the tasks can't create them then delayed_job won't start.

 

Also you might run rake with --trace and also watch the logs to see if there's any indication why delayed_job isn't starting, e.g.

RAILS_ENV=production rake --trace bibapp:start

 

and tail your logs with

tail -f {log-file-path}

 

Output of the trace and of the log in delayed_jobs.log

 

 

 

[root@bibapp bibapp]# RAILS_ENV=production rake --trace bibapp:start

/srv/bibapp/vendor/bundle/ruby/1.9.1/gems/cmess-0.3.1/lib/cmess.rb:30:in `<top (                                   required)>': iconv will be deprecated in the future, use String#encode instead.

WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically lo                                   aded 2.7.6

** Invoke bibapp:start (first_time)

** Invoke environment (first_time)

** Execute environment

** Execute bibapp:start

 

 

== Starting all BibApp services: solr, delayed_jobs, passenger

* Starting - Solr.

** Execute solr:start

production Solr started successfully on 8983, pid: 15043.

 

 

* Starting - Delayed Job.

script/delayed_job -p production --pid-dir=/srv/bibapp/tmp/delayed_job_production_pids start

/srv/bibapp/vendor/bundle/ruby/1.9.1/gems/cmess-0.3.1/lib/cmess.rb:30:in `<top (required)>': iconv will be deprecated in the future, use String#encode instead.

WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.7.6

DELAYED JOB ENV production

ARGUMENTS: -p:production:--pid-dir=/srv/bibapp/tmp/delayed_job_production_pids:start

 

 

* Starting - Passenger.

touch tmp/restart.txt

Finished bibapp:start

 

 

 

From delayed_job.log

2013-06-25T10:46:35-0400: [Worker(delayed_job host:bibapp.lib.fit.edu pid:15085)] Starting job worker

 

 

Jason Stirnaman

unread,
Jun 25, 2013, 10:54:17 AM6/25/13
to bib...@googlegroups.com
There should be a pid file after it starts, but otherwise it appears that delayed_job is running.


--

Jason Stirnaman

unread,
Jun 25, 2013, 10:56:27 AM6/25/13
to bib...@googlegroups.com
You should be see the process in your shell if you do 
$ ps 15085

Thomas Misilo

unread,
Jun 25, 2013, 11:02:30 AM6/25/13
to bib...@googlegroups.com

[root@bibapp log]# ps 15085

  PID TTY      STAT   TIME COMMAND

Jason Stirnaman

unread,
Jun 25, 2013, 11:26:15 AM6/25/13
to bib...@googlegroups.com
I stand corrected. It's dying for some reason.
And you have the daemons gem? bundle show daemons
You might try starting up with RAILS_ENV=development and see if that gives you a clue unless Howard knows better how to turn up the logging on delayed_job.

Thomas Misilo

unread,
Jun 25, 2013, 12:04:43 PM6/25/13
to bib...@googlegroups.com

I stand corrected. It's dying for some reason.

And you have the daemons gem? bundle show daemons

 

/srv/bibapp/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9

 

You might try starting up with RAILS_ENV=development and see if that gives you a clue unless Howard knows better how to turn up the logging on delayed_job.

Is all that is in log: 2013-06-25T12:01:43-0400: [Worker(delayed_job host:bibapp.lib.fit.edu pid:17459)] Starting job worker

 

[root@bibapp bibapp]# bundle exec rake --trace bibapp:start

/srv/bibapp/vendor/bundle/ruby/1.9.1/gems/cmess-0.3.1/lib/cmess.rb:30:in `<top (required)>': iconv will be deprecated in the future, use String#encode instead.

WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.7.6

WARNING: Cucumber-rails required outside of env.rb.  The rest of loading is being deferred until env.rb is called.

  To avoid this warning, move 'gem 'cucumber-rails', :require => false' under only group :test in your Gemfile.

  If already in the :test group, be sure you are specifying ':require => false'.

** Invoke bibapp:start (first_time)

** Invoke environment (first_time)

** Execute environment

** Execute bibapp:start

 

 

== Starting all BibApp services: solr, delayed_jobs, passenger

* Starting - Solr.

** Execute solr:start

development Solr started successfully on 8982, pid: 17417.

 

 

* Starting - Delayed Job.

script/delayed_job -p development --pid-dir=/srv/bibapp/tmp/delayed_job_development_pids start

/srv/bibapp/vendor/bundle/ruby/1.9.1/gems/cmess-0.3.1/lib/cmess.rb:30:in `<top (required)>': iconv will be deprecated in the future, use String#encode instead.

WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.7.6

WARNING: Cucumber-rails required outside of env.rb.  The rest of loading is being deferred until env.rb is called.

  To avoid this warning, move 'gem 'cucumber-rails', :require => false' under only group :test in your Gemfile.

  If already in the :test group, be sure you are specifying ':require => false'.

DELAYED JOB ENV development

ARGUMENTS: -p:development:--pid-dir=/srv/bibapp/tmp/delayed_job_development_pids:start

Thomas Misilo

unread,
Jun 26, 2013, 12:12:24 PM6/26/13
to bib...@googlegroups.com

Is there a way to start the worker directly? Or a way to get more detail from the logs, as to why it might be dying?

 

Thanks!

 

Tom

Jason Stirnaman

unread,
Jun 26, 2013, 12:28:46 PM6/26/13
to bib...@googlegroups.com

You can see the script called by rake in your trace below:


script/delayed_job -p development --pid-dir=/srv/bibapp/tmp/delayed_job_development_pids start

You can execute that directly like
ruby script/delayed_job -p development --pid-dir=/srv/bibapp/tmp/delayed_job_development_pids start

You might check delayed_job project documentation for more logging options.

Thomas Misilo

unread,
Jun 26, 2013, 6:07:04 PM6/26/13
to bib...@googlegroups.com

Here is what I get when I run the delayed_job in the foreground, any ideaas?  Could the file itself be the problem?

 

[root@bibapp bibapp]# ./script/delayed_job -p production --pid-dir=/srv/bibapp/tmp/delayed_job_production_pids/ run

/srv/bibapp/vendor/bundle/ruby/1.9.1/gems/cmess-0.3.1/lib/cmess.rb:30:in `<top (required)>': iconv will be deprecated in the future, use String#encode instead.

WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.7.6

WARNING: Cucumber-rails required outside of env.rb.  The rest of loading is being deferred until env.rb is called.

  To avoid this warning, move 'gem 'cucumber-rails', :require => false' under only group :test in your Gemfile.

  If already in the :test group, be sure you are specifying ':require => false'.

DELAYED JOB ENV

ARGUMENTS: -p:production:--pid-dir=/srv/bibapp/tmp/delayed_job_production_pids/:run

delayed_job: process with pid 6718 started.

/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:203:in `parse': (<unknown>): found unexpected end of stream while scanning a quoted scalar at line 424 column 22 (Psych::SyntaxError)

        from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:203:in `parse_stream'

        from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:151:in `parse'

        from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:127:in `load'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/backend/base.rb:85:in `payload_object'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/backend/base.rb:72:in `name'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/worker.rb:251:in `handle_failed_job'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/worker.rb:212:in `block in run'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:60:in `call'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:60:in `block in initialize'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:65:in `call'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:65:in `execute'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:38:in `run_callbacks'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/worker.rb:212:in `rescue in run'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/worker.rb:202:in `run'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/worker.rb:259:in `block in reserve_and_run_one_job'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:60:in `call'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:60:in `block in initialize'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:65:in `call'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:65:in `execute'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:38:in `run_callbacks'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/worker.rb:259:in `reserve_and_run_one_job'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/worker.rb:187:in `block in work_off'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/worker.rb:186:in `times'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/worker.rb:186:in `work_off'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/worker.rb:151:in `block (4 levels) in start'

        from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/worker.rb:150:in `block (3 levels) in start'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:60:in `call'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:60:in `block in initialize'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:65:in `call'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:65:in `execute'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:38:in `run_callbacks'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/worker.rb:149:in `block (2 levels) in start'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/worker.rb:148:in `loop'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/worker.rb:148:in `block in start'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/plugins/clear_locks.rb:7:in `call'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/plugins/clear_locks.rb:7:in `block (2 levels) in <class:ClearLocks>'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:78:in `call'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:78:in `block (2 levels) in add'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:60:in `call'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:60:in `block in initialize'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:78:in `call'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:78:in `block in add'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:65:in `call'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:65:in `execute'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/lifecycle.rb:38:in `run_callbacks'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/worker.rb:147:in `start'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/command.rb:104:in `run'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/command.rb:92:in `block in run_process'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons/application.rb:255:in `call'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons/application.rb:255:in `block in start_proc'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons/application.rb:264:in `call'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons/application.rb:264:in `start_proc'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons/application.rb:296:in `start'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons/controller.rb:73:in `run'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons.rb:197:in `block in run_proc'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons/cmdline.rb:109:in `call'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons/cmdline.rb:109:in `catch_exceptions'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/daemons-1.1.9/lib/daemons.rb:196:in `run_proc'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/command.rb:90:in `run_process'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/command.rb:83:in `block in daemonize'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/command.rb:81:in `times'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/command.rb:81:in `daemonize'

        from ./script/delayed_job:7:in `<main>'

[root@bibapp bibapp]#

Thomas Misilo

unread,
Jun 27, 2013, 7:25:28 AM6/27/13
to bib...@googlegroups.com

I currently have 251 rows in my delayed jobs, is this normal? When I Truncated the table the delayed_jobs script didn’t die and stayed running, however nothing was processed. ( I have restored the table for the time being)

 

Is there a way to regenerate the delayed jobs table from the files that have been uploaded already and are waiting to be processed?

 

Thanks,

Jason Stirnaman

unread,
Jun 28, 2013, 11:47:14 AM6/28/13
to bib...@googlegroups.com
Hi, Tom. Any traction on this? Here are some things that might help:

In your --trace output, it appears there's a problem with the psych gem that's causing delayed_job to crash.
You might try this:
Update ruby gems with gem update --system then bundle install and try starting up DJ again.

This should help you re-queue your jobs:

You can add import jobs to the delayed_job queue by calling #queue_import method in app/models/import.rb. For example, you might startup rails console, retrieve an import with state = received or processing and then try calling queue_import on that import object.

Secondly, delayed job has its own set of rake tasks. You can see the code for these at https://github.com/collectiveidea/delayed_job/blob/master/lib/delayed/tasks.rb

Sorry I'm not more help at the moment.

Jason

Thomas Misilo

unread,
Nov 13, 2013, 10:32:50 AM11/13/13
to bib...@googlegroups.com

Hi Jason,

 

I must have missed this email.

 

Here is what I get after updating the gems/bundle.

 

* Starting - Delayed Job.

script/delayed_job -p production --pid-dir=/srv/bibapp/tmp/delayed_job_production_pids start

WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.7.6

/srv/bibapp/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:317:in `rescue in depend_on': No such file to load -- zip/zip (LoadError)

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:312:in `depend_on'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:225:in `require_dependency'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/railties-3.2.15/lib/rails/engine.rb:444:in `block (2 levels) in eager_load!'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/railties-3.2.15/lib/rails/engine.rb:443:in `each'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/railties-3.2.15/lib/rails/engine.rb:443:in `block in eager_load!'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/railties-3.2.15/lib/rails/engine.rb:441:in `each'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/railties-3.2.15/lib/rails/engine.rb:441:in `eager_load!'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/railties-3.2.15/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/railties-3.2.15/lib/rails/initializable.rb:30:in `instance_exec'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/railties-3.2.15/lib/rails/initializable.rb:30:in `run'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/railties-3.2.15/lib/rails/initializable.rb:55:in `block in run_initializers'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/railties-3.2.15/lib/rails/initializable.rb:54:in `each'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/railties-3.2.15/lib/rails/initializable.rb:54:in `run_initializers'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/railties-3.2.15/lib/rails/application.rb:136:in `initialize!'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/railties-3.2.15/lib/rails/railtie/configurable.rb:30:in `method_missing'

        from /srv/bibapp/config/environment.rb:2:in `<top (required)>'

        from script/delayed_job:3:in `require'

        from script/delayed_job:3:in `<main>'

### ERROR - Starting - Delayed Job.

 

Thanks for the continued help!

 

Tom

Thomas Misilo

unread,
Nov 13, 2013, 11:41:55 AM11/13/13
to bib...@googlegroups.com

Never mind fixed the zip problem, by requiring rubygem < 1.0.0

 

However, I am still getting the previous error about psych

 

ARGUMENTS: -p:production:--pid-dir=/srv/bibapp/tmp/delayed_job_production_pids/:run

delayed_job: process with pid 25277 started.

/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:203:in `parse': (<unknown>): found unexpected end of stream while scanning a quoted scalar at line 424 column 22 (Psych::SyntaxError)

        from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:203:in `parse_stream'

        from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:151:in `parse'

        from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:127:in `load'

 

Thanks

Thomas Misilo

unread,
Nov 13, 2013, 11:42:11 AM11/13/13
to bib...@googlegroups.com

rubyzip not rubygem

Jason Stirnaman

unread,
Nov 13, 2013, 12:27:55 PM11/13/13
to bib...@googlegroups.com
And you're running with `bundle exec rake bibapp:start`?
If `gem list psych` lists more than one version of psych, you might try `gem uninstall psych`. Then try restarting again with `bundle exec...`
It still sounds like local gems are getting in the way of the versions needed by BibApp.

Jason

Thomas Misilo

unread,
Nov 13, 2013, 1:24:17 PM11/13/13
to bib...@googlegroups.com

Thanks that got it to start. I use “RAILS_ENV=production bundle exec rake bibapp:start” to start bibapp.

 

However,  the delay jobs still do not seem to run.

 

[root@bibapp bibapp]# ./script/delayed_job -p production --pid-dir=/srv/bibapp/tmp/delayed_job_production_pids/ run

WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.7.6

WARNING: Cucumber-rails required outside of env.rb.  The rest of loading is being deferred until env.rb is called.

  To avoid this warning, move 'gem 'cucumber-rails', :require => false' under only group :test in your Gemfile.

  If already in the :test group, be sure you are specifying ':require => false'.

DELAYED JOB ENV

ARGUMENTS: -p:production:--pid-dir=/srv/bibapp/tmp/delayed_job_production_pids/:run

delayed_job: process with pid 27795 started.

/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:203:in `parse': (<unknown>): found unexpected end of stream while scanning a quoted scalar at line 424 column 22 (Psych::SyntaxError)

        from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:203:in `parse_stream'

        from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:151:in `parse'

        from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:127:in `load'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/backend/base.rb:85:in `payload_object'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/backend/base.rb:72:in `name'

        from /srv/bibapp/vendor/bundle/ruby/1.9.1/gems/delayed_job-3.0.5/lib/delayed/worker.rb:251:in `handle_failed_job'

 

gem list psych shows none

 

*** LOCAL GEMS ***

 

Thanks,

 

Tom

Thomas Misilo

unread,
Nov 13, 2013, 1:57:11 PM11/13/13
to bib...@googlegroups.com

Okay, I got it running by doing rake jobs:clean, is there a way to make it reprocess the submitted files? As 4 of them still talk about having a status of Processing still.

 

Or did that delete the jobs completely including the uploaded data?

Jason Stirnaman

unread,
Nov 13, 2013, 3:36:01 PM11/13/13
to bib...@googlegroups.com
Something that just occurred to me. When you need to restart BibApp, always make sure all your delayed_job processes are killed as well. That should be automatic in more recent BibApp releases, but occasionally you might get a delayed_job process that doesn't die when it's supposed to. Since delayed_job loads the Ruby environment, it has to be killed or it will still point to old code, gems, etc.

Cleaning jobs won't delete your Imports. It empties the jobs table. You should be able to requeue the Imports you want. From an earlier reply:

You can add import jobs to the delayed_job queue by calling #queue_import method in app/models/import.rb. For example, you might startup rails console, retrieve an import with state = received or processing and then try calling queue_import on that import object.

As you've seen, delayed job also has its own set of rake tasks. You can see the code for these at https://github.com/collectiveidea/delayed_job/blob/master/lib/delayed/tasks.rb
Reply all
Reply to author
Forward
0 new messages