Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I can't install paperclip

I'm new in rails, I need to install Peperclip (https://github.com/thoughtbot/paperclip) and i can't, I have looked every tutorial I can find and I haven't been able to find where is the bug. I installed the ImageMagick and follow all the instruction of github. When I run:

rails generate paperclip club imagen

I got this

/Users/Moski/.rvm/gems/ruby-2.0.0-p451@railstutorial_rails_4_0/gems/railties-4.0.4/lib/rails/generators/actions/create_migration.rb:13:in `migration_file_name': protected method `migration_file_name' called for #<PaperclipGenerator:0x000001053fbb68> (NoMethodError)
    from /Users/Moski/.rvm/gems/ruby-2.0.0-p451@railstutorial_rails_4_0/gems/railties-4.0.4/lib/rails/generators/actions/create_migration.rb:34:in `existing_migration'
    from /Users/Moski/.rvm/gems/ruby-2.0.0-p451@railstutorial_rails_4_0/gems/thor-0.19.1/lib/thor/actions/empty_directory.rb:112:in `invoke_with_conflict_check'
    from /Users/Moski/.rvm/gems/ruby-2.0.0-p451@railstutorial_rails_4_0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:60:in `invoke!'
    from /Users/Moski/.rvm/gems/ruby-2.0.0-p451@railstutorial_rails_4_0/gems/thor-0.19.1/lib/thor/actions.rb:94:in `action'
    from /Users/Moski/.rvm/gems/ruby-2.0.0-p451@railstutorial_rails_4_0/gems/railties-4.0.4/lib/rails/generators/migration.rb:36:in `create_migration'
    from /Users/Moski/.rvm/gems/ruby-2.0.0-p451@railstutorial_rails_4_0/gems/railties-4.0.4/lib/rails/generators/migration.rb:65:in `migration_template'
    from /Users/Moski/.rvm/gems/ruby-2.0.0-p451@railstutorial_rails_4_0/gems/paperclip-4.1.1/lib/generators/paperclip/paperclip_generator.rb:16:in `generate_migration'
    from /Users/Moski/.rvm/gems/ruby-2.0.0-p451@railstutorial_rails_4_0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
    from /Users/Moski/.rvm/gems/ruby-2.0.0-p451@railstutorial_rails_4_0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    from /Users/Moski/.rvm/gems/ruby-2.0.0-p451@railstutorial_rails_4_0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `block in invoke_all'
    from /Users/Moski/.rvm/gems/ruby-2.0.0-p451@railstutorial_rails_4_0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `each'
    from /Users/Moski/.rvm/gems/ruby-2.0.0-p451@railstutorial_rails_4_0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `map'
    from /Users/Moski/.rvm/gems/ruby-2.0.0-p451@railstutorial_rails_4_0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `invoke_all'
    from /Users/Moski/.rvm/gems/ruby-2.0.0-p451@railstutorial_rails_4_0/gems/thor-0.19.1/lib/thor/group.rb:232:in `dispatch'
    from /Users/Moski/.rvm/gems/ruby-2.0.0-p451@railstutorial_rails_4_0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
    from /Users/Moski/.rvm/gems/ruby-2.0.0-p451@railstutorial_rails_4_0/gems/railties-4.0.4/lib/rails/generators.rb:156:in `invoke'
    from /Users/Moski/.rvm/gems/ruby-2.0.0-p451@railstutorial_rails_4_0/gems/railties-4.0.4/lib/rails/commands/generate.rb:11:in `<top (required)>'
    from /Users/Moski/.rvm/gems/ruby-2.0.0-p451@railstutorial_rails_4_0/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:229:in `require'
    from /Users/Moski/.rvm/gems/ruby-2.0.0-p451@railstutorial_rails_4_0/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:229:in `block in require'
    from /Users/Moski/.rvm/gems/ruby-2.0.0-p451@railstutorial_rails_4_0/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:214:in `load_dependency'
    from /Users/Moski/.rvm/gems/ruby-2.0.0-p451@railstutorial_rails_4_0/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:229:in `require'
    from /Users/Moski/.rvm/gems/ruby-2.0.0-p451@railstutorial_rails_4_0/gems/railties-4.0.4/lib/rails/commands.rb:48:in `<top (required)>'
    from bin/rails:4:in `require'
    from bin/rails:4:in `<main>'

Someone can help me? Thanks

like image 633
oquevedo Avatar asked Mar 30 '14 01:03

oquevedo


1 Answers

It looks like an existing issue in paperclip. You would need to source paperclip directly from GitHub.

Refer to this open issue in Paperclip

You can source paperclip from Github by adding the following line in your Gemfile:

gem 'paperclip', github: 'thoughtbot/paperclip'

-OR-

gem 'paperclip', :git => "git://github.com/thoughtbot/paperclip.git"
like image 78
Kirti Thorat Avatar answered Oct 24 '22 21:10

Kirti Thorat