Git Product home page Git Product logo

multiple-file-uploads-with-paperclip-and-rails-3's Introduction

Example Application of Multiple File Uploads

Just follow the guide to get up and running:

git clone git://github.com/Emerson/Multiple-File-Uploads-with-Paperclip-and-Rails-3.git paperclip-rails3
cd paperclip-rails3
bundle install
rake db:migrate
rails server

Be sure to checkout the screencast at http://www.emersonlackey.com/article/paperclip-with-rails-3

multiple-file-uploads-with-paperclip-and-rails-3's People

Contributors

emerson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

multiple-file-uploads-with-paperclip-and-rails-3's Issues

can't upload files

Hi there, I am a begginer, I unzip your project, but I changed database (Im using mysql) but when I run your code, I just can create a new post and edit and delete it, but can't upload files, in fact, I can't see as the example in: http://root2linux.com/2011/05/multiple-file-uploading-in-rails3-application-using-papercilp/, of course Im doing something wrong or I missed something, I all ready tried other tutorials but nothing works...Im using ruby 1.9.2 and windows 7 starter, thanks in advance.

NoMethodError in PostsController#create

After cloning this project and updating rake (now up to 0.9.2) I ran into this issue when submitting a new post:

NoMethodError in PostsController#create
undefined method `path' for #ActionDispatch::Http::UploadedFile:0x00000100e94610

I am not entirely sure what exactly the issue is or exactly how to fix it. Here is the full stack trace:

paperclip (3.1.2) lib/paperclip/io_adapters/uploaded_file_adapter.rb:19:in cache_current_values' paperclip (3.1.2) lib/paperclip/io_adapters/uploaded_file_adapter.rb:5:ininitialize'
paperclip (3.1.2) lib/paperclip/io_adapters/registry.rb:29:in new' paperclip (3.1.2) lib/paperclip/io_adapters/registry.rb:29:infor'
paperclip (3.1.2) lib/paperclip/attachment.rb:91:in assign' paperclip (3.1.2) lib/paperclip.rb:195:inblock in has_attached_file'
activerecord (3.0.3) lib/active_record/base.rb:1559:in block in attributes=' activerecord (3.0.3) lib/active_record/base.rb:1555:ineach'
activerecord (3.0.3) lib/active_record/base.rb:1555:in attributes=' activerecord (3.0.3) lib/active_record/base.rb:1406:ininitialize'
activerecord (3.0.3) lib/active_record/reflection.rb:173:in new' activerecord (3.0.3) lib/active_record/reflection.rb:173:inbuild_association'
activerecord (3.0.3) lib/active_record/associations/association_collection.rb:510:in build_record' activerecord (3.0.3) lib/active_record/associations/association_collection.rb:119:inbuild'
activerecord (3.0.3) lib/active_record/nested_attributes.rb:372:in block in assign_nested_attributes_for_collection_association' activerecord (3.0.3) lib/active_record/nested_attributes.rb:367:ineach'
activerecord (3.0.3) lib/active_record/nested_attributes.rb:367:in assign_nested_attributes_for_collection_association' activerecord (3.0.3) lib/active_record/nested_attributes.rb:254:inassets_attributes='
activerecord (3.0.3) lib/active_record/base.rb:1559:in block in attributes=' activerecord (3.0.3) lib/active_record/base.rb:1555:ineach'
activerecord (3.0.3) lib/active_record/base.rb:1555:in attributes=' activerecord (3.0.3) lib/active_record/base.rb:1406:ininitialize'
app/controllers/posts_controller.rb:16:in new' app/controllers/posts_controller.rb:16:increate'
actionpack (3.0.3) lib/action_controller/metal/implicit_render.rb:4:in send_action' actionpack (3.0.3) lib/abstract_controller/base.rb:151:inprocess_action'
actionpack (3.0.3) lib/action_controller/metal/rendering.rb:11:in process_action' actionpack (3.0.3) lib/abstract_controller/callbacks.rb:18:inblock in process_action'
activesupport (3.0.3) lib/active_support/callbacks.rb:435:in _run__4588436436850707546__process_action__878718467430888215__callbacks' activesupport (3.0.3) lib/active_support/callbacks.rb:409:in_run_process_action_callbacks'
activesupport (3.0.3) lib/active_support/callbacks.rb:93:in run_callbacks' actionpack (3.0.3) lib/abstract_controller/callbacks.rb:17:inprocess_action'
actionpack (3.0.3) lib/action_controller/metal/instrumentation.rb:30:in block in process_action' activesupport (3.0.3) lib/active_support/notifications.rb:52:inblock in instrument'
activesupport (3.0.3) lib/active_support/notifications/instrumenter.rb:21:in instrument' activesupport (3.0.3) lib/active_support/notifications.rb:52:ininstrument'
actionpack (3.0.3) lib/action_controller/metal/instrumentation.rb:29:in process_action' actionpack (3.0.3) lib/action_controller/metal/rescue.rb:17:inprocess_action'
actionpack (3.0.3) lib/abstract_controller/base.rb:120:in process' actionpack (3.0.3) lib/abstract_controller/rendering.rb:40:inprocess'
actionpack (3.0.3) lib/action_controller/metal.rb:138:in dispatch' actionpack (3.0.3) lib/action_controller/metal/rack_delegation.rb:14:indispatch'
actionpack (3.0.3) lib/action_controller/metal.rb:178:in block in action' actionpack (3.0.3) lib/action_dispatch/routing/route_set.rb:62:incall'
actionpack (3.0.3) lib/action_dispatch/routing/route_set.rb:62:in dispatch' actionpack (3.0.3) lib/action_dispatch/routing/route_set.rb:27:incall'
rack-mount (0.6.14) lib/rack/mount/route_set.rb:148:in block in call' rack-mount (0.6.14) lib/rack/mount/code_generation.rb:93:inblock in recognize'
rack-mount (0.6.14) lib/rack/mount/code_generation.rb:75:in optimized_each' rack-mount (0.6.14) lib/rack/mount/code_generation.rb:92:inrecognize'
rack-mount (0.6.14) lib/rack/mount/route_set.rb:139:in call' actionpack (3.0.3) lib/action_dispatch/routing/route_set.rb:492:incall'
actionpack (3.0.3) lib/action_dispatch/middleware/best_standards_support.rb:17:in call' actionpack (3.0.3) lib/action_dispatch/middleware/head.rb:14:incall'
rack (1.2.5) lib/rack/methodoverride.rb:24:in call' actionpack (3.0.3) lib/action_dispatch/middleware/params_parser.rb:21:incall'
actionpack (3.0.3) lib/action_dispatch/middleware/flash.rb:182:in call' actionpack (3.0.3) lib/action_dispatch/middleware/session/abstract_store.rb:149:incall'
actionpack (3.0.3) lib/action_dispatch/middleware/cookies.rb:295:in call' activerecord (3.0.3) lib/active_record/query_cache.rb:32:inblock in call'
activerecord (3.0.3) lib/active_record/connection_adapters/abstract/query_cache.rb:28:in cache' activerecord (3.0.3) lib/active_record/query_cache.rb:12:incache'
activerecord (3.0.3) lib/active_record/query_cache.rb:31:in call' activerecord (3.0.3) lib/active_record/connection_adapters/abstract/connection_pool.rb:353:incall'
actionpack (3.0.3) lib/action_dispatch/middleware/callbacks.rb:46:in block in call' activesupport (3.0.3) lib/active_support/callbacks.rb:415:in_run_call_callbacks'
actionpack (3.0.3) lib/action_dispatch/middleware/callbacks.rb:44:in call' rack (1.2.5) lib/rack/sendfile.rb:106:incall'
actionpack (3.0.3) lib/action_dispatch/middleware/remote_ip.rb:48:in call' actionpack (3.0.3) lib/action_dispatch/middleware/show_exceptions.rb:46:incall'
railties (3.0.3) lib/rails/rack/logger.rb:13:in call' rack (1.2.5) lib/rack/runtime.rb:17:incall'
activesupport (3.0.3) lib/active_support/cache/strategy/local_cache.rb:72:in call' rack (1.2.5) lib/rack/lock.rb:13:inblock in call'
internal:prelude:10:in synchronize' rack (1.2.5) lib/rack/lock.rb:13:incall'
actionpack (3.0.3) lib/action_dispatch/middleware/static.rb:30:in call' railties (3.0.3) lib/rails/application.rb:168:incall'
railties (3.0.3) lib/rails/application.rb:77:in method_missing' railties (3.0.3) lib/rails/rack/log_tailer.rb:14:incall'
rack (1.2.5) lib/rack/content_length.rb:13:in call' rack (1.2.5) lib/rack/handler/webrick.rb:52:inservice'
/Users/daniel.flynn/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/webrick/httpserver.rb:138:in service' /Users/daniel.flynn/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/webrick/httpserver.rb:94:inrun'
/Users/daniel.flynn/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'

and the Application trace:
app/controllers/posts_controller.rb:16:in new' app/controllers/posts_controller.rb:16:increate'

I checked the routes and the controller but I can't seem to locate the issue. Ideas?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.