After upgrading to Bibapp 2.0.1 Photos are missing

27 views
Skip to first unread message

Tom

unread,
Jun 20, 2013, 5:21:35 PM6/20/13
to bib...@googlegroups.com
Hi,

After upgrading to Bibapp 2.0.1 all the photos are missing from the users we have added. Any idea on how to get them back?

Thanks,

Tom

Jason Stirnaman

unread,
Jun 21, 2013, 7:20:51 AM6/21/13
to bib...@googlegroups.com

Have you already run the Paperclip migrations from version 1.0?
Jason

--
You received this message because you are subscribed to the Google Groups "bibapp" group.
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.
Visit this group at http://groups.google.com/group/bibapp.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Thomas Misilo

unread,
Jun 21, 2013, 8:10:54 AM6/21/13
to bib...@googlegroups.com

Probably not, where can I find those directions?

 

I didn’t notice it on here: https://github.com/BibApp/BibApp/wiki/Installation-and-upgrade

 

Tom

Jason Stirnaman

unread,
Jun 21, 2013, 10:49:11 AM6/21/13
to bib...@googlegroups.com
Make sure you run all the db migrations: bundle exec rake db:migrate

Specifically, these are the ones that migrated attachments from Attachment_Fu to Paperclip:
One of the outcomes of that second migration should be that your attachments, images and import files, move to a /system/data directory.


On Friday, June 21, 2013 7:10:54 AM UTC-5, Tom wrote:

Probably not, where can I find those directions?

 

I didn’t notice it on here: https://github.com/BibApp/BibApp/wiki/Installation-and-upgrade

 

Tom

 

From: bib...@googlegroups.com [mailto:bib...@googlegroups.com] On Behalf Of Jason Stirnaman
Sent: Friday, June 21, 2013 7:21 AM
To: bib...@googlegroups.com
Subject: Re: [bibapp] After upgrading to Bibapp 2.0.1 Photos are missing

 

Have you already run the Paperclip migrations from version 1.0?
Jason

On Jun 20, 2013 4:21 PM, "Tom" <mis...@fit.edu> wrote:

Hi,

 

After upgrading to Bibapp 2.0.1 all the photos are missing from the users we have added. Any idea on how to get them back?

 

Thanks,

 

Tom

--
You received this message because you are subscribed to the Google Groups "bibapp" group.
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 bi...@googlegroups.com.

Thomas Misilo

unread,
Jun 21, 2013, 11:09:29 AM6/21/13
to bib...@googlegroups.com

Do I need to run anything other than “bundle exec rake db:migrate”?

 

As I have run that a few times? Do I need to run those specific *.rb fils? If so how would I do that?

 

Thanks,

Jason Stirnaman

unread,
Jun 21, 2013, 11:17:37 AM6/21/13
to bib...@googlegroups.com
If you see your files under /public/system/data now then you may just need to reindex Solr.

Thomas Misilo

unread,
Jun 21, 2013, 7:00:26 PM6/21/13
to bib...@googlegroups.com

There is no system folder under public. After running the “bundle exec rake db:migrate”.

Jason Stirnaman

unread,
Jun 22, 2013, 12:56:44 PM6/22/13
to bib...@googlegroups.com, Howard Ding
Try running those migrations again, e.g.
rake db:migrate VERSION=20120229214118 RAILS_ENV=[your-environment]


If that still doesn't fix it, chances are that the database tables have been updated but the files just didn't get moved. You may have to copy them to the new location manually or run just that portion of /db/migrate/20120229214118_attachment_fu_to_paperclip.rb  as a separate script.

Howard, any suggestions?

Thomas Misilo

unread,
Jun 22, 2013, 1:36:15 PM6/22/13
to bib...@googlegroups.com, Howard Ding

I reran this the command, and got the following output:

 

Using /usr/local/rvm/gems/ruby-1.9.3-p194 with gemset bibapp

[root@bibapp bibapp]# ra^C

[root@bibapp bibapp]# rake db:migrate VERSION=20120229214118 RAILS_ENV=production

/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

==  AddIndexesToContributorships: reverting ===================================

-- remove_index(:contributorships, :contributorship_state_id)

   -> 0.0393s

-- remove_index(:contributorships, :person_id)

   -> 0.0215s

==  AddIndexesToContributorships: reverted (0.0610s) ==========================

 

==  DeletePublisherSources: reverting =========================================

-- create_table(:publisher_sources)

   -> 0.0088s

==  DeletePublisherSources: reverted (0.0089s) ================================

 

==  RemoveAttachmentColumns: reverting ========================================

-- add_column(:attachments, :thumbnail, :string)

   -> 0.0203s

-- add_column(:attachments, :height, :integer)

   -> 0.0203s

-- add_column(:attachments, :width, :integer)

   -> 0.0194s

==  RemoveAttachmentColumns: reverted (0.0603s) ===============================

 

 

My attachments table has all NULL values in data_file_name, data_content_type, data_file_size, data_updated_at, thumbnail, height, width does that matter?

 

I will try moving the files later.

Jason Stirnaman

unread,
Jun 22, 2013, 2:14:50 PM6/22/13
to bib...@googlegroups.com

Hmm... Try migrating up again and post the output. Rake db:migrate:up

Thomas Misilo

unread,
Jun 22, 2013, 2:49:54 PM6/22/13
to bib...@googlegroups.com

[root@bibapp bibapp]# rake db:migrate:up RAILS_ENV=production

/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

rake aborted!

VERSION is required

/srv/bibapp/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/railties/databases.rake:229:in `block (3 levels) in <top (required)>'

Tasks: TOP => db:migrate:up

(See full trace by running task with --trace)

 

 

[root@bibapp bibapp]# rake db:migrate:up RAILS_ENV=production --trace

/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

** Invoke db:migrate:up (first_time)

** Invoke environment (first_time)

** Execute environment

** Invoke db:load_config (first_time)

** Execute db:load_config

** Execute db:migrate:up

rake aborted!

VERSION is required

/srv/bibapp/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/railties/databases.rake:229:in `block (3 levels) in <top (required)>'

/usr/local/rvm/gems/ruby-1.9.3-p194@bibapp/gems/rake-10.1.0/lib/rake/task.rb:236:in `call'

/usr/local/rvm/gems/ruby-1.9.3-p194@bibapp/gems/rake-10.1.0/lib/rake/task.rb:236:in `block in execute'

/usr/local/rvm/gems/ruby-1.9.3-p194@bibapp/gems/rake-10.1.0/lib/rake/task.rb:231:in `each'

/usr/local/rvm/gems/ruby-1.9.3-p194@bibapp/gems/rake-10.1.0/lib/rake/task.rb:231:in `execute'

/usr/local/rvm/gems/ruby-1.9.3-p194@bibapp/gems/rake-10.1.0/lib/rake/task.rb:175:in `block in invoke_with_call_chain'

/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'

/usr/local/rvm/gems/ruby-1.9.3-p194@bibapp/gems/rake-10.1.0/lib/rake/task.rb:168:in `invoke_with_call_chain'

/usr/local/rvm/gems/ruby-1.9.3-p194@bibapp/gems/rake-10.1.0/lib/rake/task.rb:161:in `invoke'

/usr/local/rvm/gems/ruby-1.9.3-p194@bibapp/gems/rake-10.1.0/lib/rake/application.rb:149:in `invoke_task'

/usr/local/rvm/gems/ruby-1.9.3-p194@bibapp/gems/rake-10.1.0/lib/rake/application.rb:106:in `block (2 levels) in top_level'

/usr/local/rvm/gems/ruby-1.9.3-p194@bibapp/gems/rake-10.1.0/lib/rake/application.rb:106:in `each'

/usr/local/rvm/gems/ruby-1.9.3-p194@bibapp/gems/rake-10.1.0/lib/rake/application.rb:106:in `block in top_level'

/usr/local/rvm/gems/ruby-1.9.3-p194@bibapp/gems/rake-10.1.0/lib/rake/application.rb:115:in `run_with_threads'

/usr/local/rvm/gems/ruby-1.9.3-p194@bibapp/gems/rake-10.1.0/lib/rake/application.rb:100:in `top_level'

/usr/local/rvm/gems/ruby-1.9.3-p194@bibapp/gems/rake-10.1.0/lib/rake/application.rb:78:in `block in run'

/usr/local/rvm/gems/ruby-1.9.3-p194@bibapp/gems/rake-10.1.0/lib/rake/application.rb:165:in `standard_exception_handling'

/usr/local/rvm/gems/ruby-1.9.3-p194@bibapp/gems/rake-10.1.0/lib/rake/application.rb:75:in `run'

/usr/local/rvm/gems/ruby-1.9.3-p194@bibapp/gems/rake-10.1.0/bin/rake:33:in `<top (required)>'

/usr/local/rvm/gems/ruby-1.9.3-p194@bibapp/bin/rake:23:in `load'

/usr/local/rvm/gems/ruby-1.9.3-p194@bibapp/bin/rake:23:in `<main>'

Tasks: TOP => db:migrate:up

Jason Stirnaman

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

Sorry about that. :up requires VERSION that you want to migrate up to. Just do rake db:migrate

Thomas Misilo

unread,
Jun 23, 2013, 11:35:28 AM6/23/13
to bib...@googlegroups.com

[root@bibapp bibapp]# rake db:migrate RAILS_ENV=production

/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

==  RemoveAttachmentColumns: migrating ========================================

-- remove_column(:attachments, :thumbnail)

   -> 0.0348s

-- remove_column(:attachments, :height)

   -> 0.0188s

-- remove_column(:attachments, :width)

   -> 0.0184s

==  RemoveAttachmentColumns: migrated (0.0722s) ===============================

 

==  DeletePublisherSources: migrating =========================================

-- drop_table(:publisher_sources)

   -> 0.0039s

==  DeletePublisherSources: migrated (0.0040s) ================================

 

==  AddIndexesToContributorships: migrating ===================================

-- add_index(:contributorships, :person_id)

   -> 0.0213s

-- add_index(:contributorships, :contributorship_state_id)

   -> 0.0208s

==  AddIndexesToContributorships: migrated (0.0423s) ==========================

 

 

Still nothing moved. And still have all the NULL’s in the attachment table

Reply all
Reply to author
Forward
0 new messages