Comments (6)
Could you provide the full trace please?
from refile.
I just got the same error:
Exiting
'
/Users/mt/.rvm/gems/ruby-2.2.0/gems/refile-0.4.0/lib/refile/attachment/active_record.rb:10:indup': can't dup Fixnum (TypeError) from /Users/mt/.rvm/gems/ruby-2.2.0/gems/refile-0.4.0/lib/refile/attachment/active_record.rb:10:in
attachment'
from /Users/mt/Dropbox/Sites/ruby-fun/rails-devise-pundit/app/models/user.rb:6:in<class:User>' from /Users/mt/Dropbox/Sites/ruby-fun/rails-devise-pundit/app/models/user.rb:1:in
<top (required)>'
from /Users/mt/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:457:inload' from /Users/mt/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:457:in
block in load_file'
from /Users/mt/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:647:innew_constants_in' from /Users/mt/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:456:in
load_file'
from /Users/mt/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:354:inrequire_or_load' from /Users/mt/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:494:in
load_missing_constant'
from /Users/mt/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:184:inconst_missing' from /Users/mt/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/inflector/methods.rb:261:in
const_get'
from /Users/mt/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/inflector/methods.rb:261:inblock in constantize' from /Users/mt/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/inflector/methods.rb:259:in
each'
from /Users/mt/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/inflector/methods.rb:259:ininject' from /Users/mt/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/inflector/methods.rb:259:in
constantize'
from /Users/mt/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:566:inget' from /Users/mt/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:597:in
constantize'
from /Users/mt/.rvm/gems/ruby-2.2.0/gems/devise-3.4.1/lib/devise.rb:302:inget' from /Users/mt/.rvm/gems/ruby-2.2.0/gems/devise-3.4.1/lib/devise/mapping.rb:80:in
to'
from /Users/mt/.rvm/gems/ruby-2.2.0/gems/devise-3.4.1/lib/devise/mapping.rb:75:inmodules' from /Users/mt/.rvm/gems/ruby-2.2.0/gems/devise-3.4.1/lib/devise/mapping.rb:92:in
routes'
from /Users/mt/.rvm/gems/ruby-2.2.0/gems/devise-3.4.1/lib/devise/mapping.rb:159:indefault_used_route' from /Users/mt/.rvm/gems/ruby-2.2.0/gems/devise-3.4.1/lib/devise/mapping.rb:69:in
initialize'
from /Users/mt/.rvm/gems/ruby-2.2.0/gems/devise-3.4.1/lib/devise.rb:336:innew' from /Users/mt/.rvm/gems/ruby-2.2.0/gems/devise-3.4.1/lib/devise.rb:336:in
add_mapping'
from /Users/mt/.rvm/gems/ruby-2.2.0/gems/devise-3.4.1/lib/devise/rails/routes.rb:224:inblock in devise_for' from /Users/mt/.rvm/gems/ruby-2.2.0/gems/devise-3.4.1/lib/devise/rails/routes.rb:223:in
each'
from /Users/mt/.rvm/gems/ruby-2.2.0/gems/devise-3.4.1/lib/devise/rails/routes.rb:223:indevise_for' from /Users/mt/Dropbox/Sites/ruby-fun/rails-devise-pundit/config/routes.rb:3:in
block in <top (required)>'
from /Users/mt/.rvm/gems/ruby-2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:423:ininstance_exec' from /Users/mt/.rvm/gems/ruby-2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:423:in
eval_block'
from /Users/mt/.rvm/gems/ruby-2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:401:indraw' from /Users/mt/Dropbox/Sites/ruby-fun/rails-devise-pundit/config/routes.rb:1:in
<top (required)>'
from /Users/mt/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:inload' from /Users/mt/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in
block in load'
from /Users/mt/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:inload_dependency' from /Users/mt/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in
load'
from /Users/mt/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:40:inblock in load_paths' from /Users/mt/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:40:in
each'
from /Users/mt/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:40:inload_paths' from /Users/mt/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:16:in
reload!'
from /Users/mt/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:26:inblock in updater' from /Users/mt/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/file_update_checker.rb:75:in
call'
from /Users/mt/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/file_update_checker.rb:75:inexecute' from /Users/mt/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:27:in
updater'
from /Users/mt/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:7:inexecute_if_updated' from /Users/mt/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/application/finisher.rb:69:in
block in module:Finisher'
from /Users/mt/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:ininstance_exec' from /Users/mt/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in
run'
from /Users/mt/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:55:inblock in run_initializers' from /Users/mt/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/tsort.rb:226:in
block in tsort_each'
from /Users/mt/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/tsort.rb:348:inblock (2 levels) in each_strongly_connected_component' from /Users/mt/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/tsort.rb:429:in
each_strongly_connected_component_from'
from /Users/mt/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/tsort.rb:347:inblock in each_strongly_connected_component' from /Users/mt/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/tsort.rb:345:in
each'
from /Users/mt/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/tsort.rb:345:incall' from /Users/mt/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/tsort.rb:345:in
each_strongly_connected_component'
from /Users/mt/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/tsort.rb:224:intsort_each' from /Users/mt/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/tsort.rb:203:in
tsort_each'
from /Users/mt/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:54:inrun_initializers' from /Users/mt/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/application.rb:352:in
initialize!'
from /Users/mt/Dropbox/Sites/ruby-fun/rails-devise-pundit/config/environment.rb:5:in<top (required)>' from /Users/mt/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in
require'
from /Users/mt/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:inblock in require' from /Users/mt/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in
load_dependency'
from /Users/mt/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:inrequire' from /Users/mt/Dropbox/Sites/ruby-fun/rails-devise-pundit/config.ru:3:in
block in
from /Users/mt/.rvm/gems/ruby-2.2.0/gems/rack-1.6.0/lib/rack/builder.rb:55:ininstance_eval' from /Users/mt/.rvm/gems/ruby-2.2.0/gems/rack-1.6.0/lib/rack/builder.rb:55:in
initialize'
from /Users/mt/Dropbox/Sites/ruby-fun/rails-devise-pundit/config.ru:innew' from /Users/mt/Dropbox/Sites/ruby-fun/rails-devise-pundit/config.ru:in
'
from /Users/mt/.rvm/gems/ruby-2.2.0/gems/rack-1.6.0/lib/rack/builder.rb:49:ineval' from /Users/mt/.rvm/gems/ruby-2.2.0/gems/rack-1.6.0/lib/rack/builder.rb:49:in
new_from_string'
from /Users/mt/.rvm/gems/ruby-2.2.0/gems/rack-1.6.0/lib/rack/builder.rb:40:inparse_file' from /Users/mt/.rvm/gems/ruby-2.2.0/gems/rack-1.6.0/lib/rack/server.rb:299:in
build_app_and_options_from_config'
from /Users/mt/.rvm/gems/ruby-2.2.0/gems/rack-1.6.0/lib/rack/server.rb:208:inapp' from /Users/mt/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/commands/server.rb:61:in
app'
from /Users/mt/.rvm/gems/ruby-2.2.0/gems/rack-1.6.0/lib/rack/server.rb:336:inwrapped_app' from /Users/mt/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/commands/server.rb:139:in
log_to_stdout'
from /Users/mt/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/commands/server.rb:78:instart' from /Users/mt/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:80:in
block in server'
from /Users/mt/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:intap' from /Users/mt/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in
server'
from /Users/mt/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:inrun_command!' from /Users/mt/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in
<top (required)>'
from /Users/mt/Dropbox/Sites/ruby-fun/rails-devise-pundit/bin/rails:8:inrequire' from /Users/mt/Dropbox/Sites/ruby-fun/rails-devise-pundit/bin/rails:8:in
<top (required)>'
from /Users/mt/.rvm/gems/ruby-2.2.0/gems/spring-1.2.0/lib/spring/client/rails.rb:27:inload' from /Users/mt/.rvm/gems/ruby-2.2.0/gems/spring-1.2.0/lib/spring/client/rails.rb:27:in
call'
from /Users/mt/.rvm/gems/ruby-2.2.0/gems/spring-1.2.0/lib/spring/client/command.rb:7:incall' from /Users/mt/.rvm/gems/ruby-2.2.0/gems/spring-1.2.0/lib/spring/client.rb:26:in
run'
from /Users/mt/.rvm/gems/ruby-2.2.0/gems/spring-1.2.0/bin/spring:48:in<top (required)>' from /Users/mt/.rvm/gems/ruby-2.2.0/gems/spring-1.2.0/lib/spring/binstub.rb:11:in
load'
from /Users/mt/.rvm/gems/ruby-2.2.0/gems/spring-1.2.0/lib/spring/binstub.rb:11:in<top (required)>' from /Users/mt/Dropbox/Sites/ruby-fun/rails-devise-pundit/bin/spring:16:in
require'
from /Users/mt/Dropbox/Sites/ruby-fun/rails-devise-pundit/bin/spring:16:in<top (required)>' from bin/rails:3:in
load'
from bin/rails:3:in `'
from refile.
I managed to pinpoint the problem, it's a bug in Ruby core, I just opened an issue.
https://bugs.ruby-lang.org/issues/10659
from refile.
The error happens when super
is called in Refile::ActiveRecord::Attachment#attachment
, and there is no stack trace (it just begins with that line), which signaled to me the bug might be in Ruby.
from refile.
Nice - thanks for quick resolution 👍
from refile.
Just pushed 0.4.1 which should fix this.
from refile.
Related Issues (20)
- Refile JS as an NPM package HOT 1
- Attachment URL not correct for S3 direct uploads + CloudFront HOT 1
- Can not fetch remote image with https HOT 2
- Outdated version HOT 1
- Release a new gem HOT 4
- Changing the RandomHasher to urlsafe_base64 HOT 1
- Custom processors HOT 1
- New release on RubyGems HOT 7
- CDN issue when updating to 0.6.2
- Download directly from S3 HOT 1
- Not possible to assign an attachment which previously was nil
- IO stream closed on create method only - Tempfile is being closed before save HOT 2
- attacher.size is stored as a String and compared with a number
- Empty content-type into windows
- Rail 6 credentials
- Bump rest-client dependency up to ~> 2.0.0
- [Ruby2.7] `warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call` HOT 1
- Introduce Appraisal
- Error occurs in ruby 3.0.0
- Use image_processing gem
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from refile.