You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was attempting to delete a work type in Sufia 7.3. NOTE: No items had placed in the repository of ANY type. I had previously created the MovingImage type based on the command given in the Sufia README. Using the command rails destroy sufia:work MovingImage as provided by @mjgiarlo, I got the following and the errors:
[vagrant@localhost druw]$ rails destroy sufia:work MovingImage
/usr/lib64/ruby/gems/2.4.0/gems/activesupport-5.0.1/lib/active_support/xml_mini.rb:51: warning: constant ::Fixnum is deprecated
/usr/lib64/ruby/gems/2.4.0/gems/activesupport-5.0.1/lib/active_support/xml_mini.rb:52: warning: constant ::Bignum is deprecated
/usr/lib64/ruby/gems/2.4.0/gems/activesupport-5.0.1/lib/active_support/core_ext/numeric/conversions.rb:138: warning: constant ::Fixnum is deprecated
Running via Spring preloader in process 6653
remove spec/models/moving_image_spec.rb
info GENERATING WORK MODEL
remove app/models/moving_image.rb
remove spec/controllers/curation_concerns/moving_images_controller_spec.rb
remove spec/actors/curation_concerns/actors/moving_image_actor_spec.rb
remove spec/forms/curation_concerns/moving_image_form_spec.rb
remove spec/features/create_moving_image_spec.rb
remove app/controllers/curation_concerns/moving_images_controller.rb
remove app/actors/curation_concerns/actors/moving_image_actor.rb
remove app/forms/curation_concerns/moving_image_form.rb
subtract config/initializers/sufia.rb
remove app/views/curation_concerns/moving_images/_moving_image.html.erb
===============================================================================
After creating your work you may wish to:
1. Add custom views:
By default, the views found in
CurationConcerns::Engine.root/app/views/curation_concerns/base
will be used.
2. Modify the model, actor, form or presenter.
===============================================================================
remove config/locales/moving_image.en.yml
subtract app/models/moving_image.rb
/usr/lib64/ruby/gems/2.4.0/gems/thor-0.19.4/lib/thor/actions/inject_into_file.rb:95:in `binread': No such file or directory @ rb_sysopen - /home/vagrant/druw/app/models/moving_image.rb (Errno::ENOENT)
from /usr/lib64/ruby/gems/2.4.0/gems/thor-0.19.4/lib/thor/actions/inject_into_file.rb:95:in `replace!'
from /usr/lib64/ruby/gems/2.4.0/gems/thor-0.19.4/lib/thor/actions/inject_into_file.rb:70:in `revoke!'
from /usr/lib64/ruby/gems/2.4.0/gems/thor-0.19.4/lib/thor/actions.rb:93:in `action'
from /usr/lib64/ruby/gems/2.4.0/gems/thor-0.19.4/lib/thor/actions/inject_into_file.rb:27:in `insert_into_file'
from /usr/lib64/ruby/gems/2.4.0/gems/sufia-7.3.0/lib/generators/sufia/work/work_generator.rb:46:in `inject_sufia_work_behavior'
from /usr/lib64/ruby/gems/2.4.0/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
from /usr/lib64/ruby/gems/2.4.0/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
from /usr/lib64/ruby/gems/2.4.0/gems/thor-0.19.4/lib/thor/invocation.rb:133:in `block in invoke_all'
from /usr/lib64/ruby/gems/2.4.0/gems/thor-0.19.4/lib/thor/invocation.rb:133:in `each'
from /usr/lib64/ruby/gems/2.4.0/gems/thor-0.19.4/lib/thor/invocation.rb:133:in `map'
from /usr/lib64/ruby/gems/2.4.0/gems/thor-0.19.4/lib/thor/invocation.rb:133:in `invoke_all'
from /usr/lib64/ruby/gems/2.4.0/gems/thor-0.19.4/lib/thor/group.rb:232:in `dispatch'
from /usr/lib64/ruby/gems/2.4.0/gems/thor-0.19.4/lib/thor/base.rb:444:in `start'
from /usr/lib64/ruby/gems/2.4.0/gems/railties-5.0.1/lib/rails/generators.rb:180:in `invoke'
from /usr/lib64/ruby/gems/2.4.0/gems/railties-5.0.1/lib/rails/commands/destroy.rb:11:in `<top (required)>'
from /usr/lib64/ruby/gems/2.4.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in `require'
from /usr/lib64/ruby/gems/2.4.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in `block in require'
from /usr/lib64/ruby/gems/2.4.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
from /usr/lib64/ruby/gems/2.4.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in `require'
from /usr/lib64/ruby/gems/2.4.0/gems/railties-5.0.1/lib/rails/commands/commands_tasks.rb:138:in `require_command!'
from /usr/lib64/ruby/gems/2.4.0/gems/railties-5.0.1/lib/rails/commands/commands_tasks.rb:145:in `generate_or_destroy'
from /usr/lib64/ruby/gems/2.4.0/gems/railties-5.0.1/lib/rails/commands/commands_tasks.rb:64:in `destroy'
from /usr/lib64/ruby/gems/2.4.0/gems/railties-5.0.1/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
from /usr/lib64/ruby/gems/2.4.0/gems/railties-5.0.1/lib/rails/commands.rb:18:in `<top (required)>'
from /usr/lib64/ruby/gems/2.4.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in `require'
from /usr/lib64/ruby/gems/2.4.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in `block in require'
from /usr/lib64/ruby/gems/2.4.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
from /usr/lib64/ruby/gems/2.4.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in `require'
from /home/vagrant/druw/bin/rails:9:in `<top (required)>'
from /usr/lib64/ruby/gems/2.4.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:287:in `load'
from /usr/lib64/ruby/gems/2.4.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:287:in `block in load'
from /usr/lib64/ruby/gems/2.4.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
from /usr/lib64/ruby/gems/2.4.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:287:in `load'
from /usr/lib64/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/lib64/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `<main>'
Note that the error appears to be that a subtract is being performed on the file _models/moving_image.rb _ that was deleted earlier.
Upon restarting the rails server, we also now get the following error in the browser:
I was able to fix the uninitialized constant error by removing where the add process had added the constant in config/initializers/sufia.rb. Restarting the rails server made pages work again.
Descriptive summary
I was attempting to delete a work type in Sufia 7.3. NOTE: No items had placed in the repository of ANY type. I had previously created the MovingImage type based on the command given in the Sufia README. Using the command
rails destroy sufia:work MovingImage
as provided by @mjgiarlo, I got the following and the errors:Note that the error appears to be that a subtract is being performed on the file _models/moving_image.rb _ that was deleted earlier.
Upon restarting the rails server, we also now get the following error in the browser:
Expected behavior
The MovingImage work type is deleted and everything runs okay.
Actual behavior
The delete work process fails as indicated in the steps above.
Steps to reproduce the behavior
rails destroy sufia:work MovingImage
Related work
None
The text was updated successfully, but these errors were encountered: