Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem scaffold #81

Closed
candidosales opened this issue Jul 3, 2014 · 4 comments
Closed

Problem scaffold #81

candidosales opened this issue Jul 3, 2014 · 4 comments

Comments

@candidosales
Copy link

why this error is occurring on the scaffold?

When I disable the gem in Gemfile of responders, works normal.

rails g scaffold task message:text finally_in:datetime 
      invoke  active_record
      create    db/migrate/20140703005110_create_tasks.rb
      create    app/models/task.rb
      invoke    test_unit
      create      test/models/task_test.rb
      create      test/fixtures/tasks.yml
      invoke  resource_route
       route    resources :tasks
      invoke  responders_controller
      create    app/controllers/tasks_controller.rb
(erb):42:in `template': undefined method `update_attributes' for #<Rails::Generators::ActiveModel:0x0000000402aa40 @name="task"> (NoMethodError)
    from /home/candidosg/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/erb.rb:849:in `eval'
    from /home/candidosg/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/erb.rb:849:in `result'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.19.1/lib/thor/actions/file_manipulation.rb:116:in `block in template'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.19.1/lib/thor/actions/create_file.rb:53:in `call'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.19.1/lib/thor/actions/create_file.rb:53:in `render'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.19.1/lib/thor/actions/create_file.rb:62:in `block (2 levels) in invoke!'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.19.1/lib/thor/actions/create_file.rb:62:in `open'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.19.1/lib/thor/actions/create_file.rb:62:in `block in invoke!'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.19.1/lib/thor/actions/empty_directory.rb:116:in `call'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.19.1/lib/thor/actions/empty_directory.rb:116:in `invoke_with_conflict_check'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.19.1/lib/thor/actions/create_file.rb:60:in `invoke!'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.19.1/lib/thor/actions.rb:94:in `action'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.19.1/lib/thor/actions/create_file.rb:25:in `create_file'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.19.1/lib/thor/actions/file_manipulation.rb:115:in `template'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.2/lib/rails/generators/named_base.rb:26:in `block in template'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.2/lib/rails/generators/named_base.rb:60:in `inside_template'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.2/lib/rails/generators/named_base.rb:25:in `template'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.2/lib/rails/generators/rails/scaffold_controller/scaffold_controller_generator.rb:16:in `create_controller_files'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `block in invoke_all'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `each'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `map'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `invoke_all'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.19.1/lib/thor/group.rb:232:in `dispatch'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.19.1/lib/thor/invocation.rb:115:in `invoke'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.19.1/lib/thor/group.rb:277:in `block in _invoke_for_class_method'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.19.1/lib/thor/shell.rb:68:in `with_padding'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.19.1/lib/thor/group.rb:266:in `_invoke_for_class_method'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.19.1/lib/thor/group.rb:133:in `_invoke_from_option_scaffold_controller'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `block in invoke_all'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `each'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `map'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `invoke_all'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.19.1/lib/thor/group.rb:232:in `dispatch'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.2/lib/rails/generators.rb:157:in `invoke'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.2/lib/rails/commands/generate.rb:11:in `<top (required)>'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.1.2/lib/active_support/dependencies.rb:247:in `require'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.1.2/lib/active_support/dependencies.rb:247:in `block in require'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.1.2/lib/active_support/dependencies.rb:232:in `load_dependency'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.1.2/lib/active_support/dependencies.rb:247:in `require'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.2/lib/rails/commands/commands_tasks.rb:135:in `generate_or_destroy'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.2/lib/rails/commands/commands_tasks.rb:51:in `generate'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.2/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
    from /home/candidosg/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.2/lib/rails/commands.rb:17:in `<top (required)>'
    from bin/rails:8:in `require'
    from bin/rails:8:in `<main>'
@lucasmazza
Copy link
Contributor

Which version of the responders gem are you using?

@candidosales
Copy link
Author

0.6.5

GEM
  remote: https://rubygems.org/
  specs:
    actionmailer (4.1.2)
      actionpack (= 4.1.2)
      actionview (= 4.1.2)
      mail (~> 2.5.4)
    actionpack (4.1.2)
      actionview (= 4.1.2)
      activesupport (= 4.1.2)
      rack (~> 1.5.2)
      rack-test (~> 0.6.2)
    actionview (4.1.2)
      activesupport (= 4.1.2)
      builder (~> 3.1)
      erubis (~> 2.7.0)
    activemodel (4.1.2)
      activesupport (= 4.1.2)
      builder (~> 3.1)
    activerecord (4.1.2)
      activemodel (= 4.1.2)
      activesupport (= 4.1.2)
      arel (~> 5.0.0)
    activesupport (4.1.2)
      i18n (~> 0.6, >= 0.6.9)
      json (~> 1.7, >= 1.7.7)
      minitest (~> 5.1)
      thread_safe (~> 0.1)
      tzinfo (~> 1.1)
    arel (5.0.1.20140414130214)
    binding_of_caller (0.7.2)
      debug_inspector (>= 0.0.1)
    builder (3.2.2)
    callsite (0.0.11)
    capistrano (3.1.0)
      i18n
      rake (>= 10.0.0)
      sshkit (~> 1.3)
    capistrano-bundler (1.1.1)
      capistrano (~> 3.0)
      sshkit (>= 1.2.0)
    capistrano-rails (1.1.1)
      capistrano (~> 3.1)
      capistrano-bundler (~> 1.1)
    coffee-rails (4.0.1)
      coffee-script (>= 2.2.0)
      railties (>= 4.0.0, < 5.0)
    coffee-script (2.2.0)
      coffee-script-source
      execjs
    coffee-script-source (1.7.0)
    daemons (1.1.9)
    debug_inspector (0.0.2)
    erubis (2.7.0)
    eventmachine (1.0.3)
    execjs (2.2.1)
    hike (1.2.3)
    i18n (0.6.9)
    jbuilder (2.1.1)
      activesupport (>= 3.0.0, < 5)
      multi_json (~> 1.2)
    json (1.8.1)
    mail (2.5.4)
      mime-types (~> 1.16)
      treetop (~> 1.4.8)
    meta_request (0.3.0)
      callsite
      rack-contrib
      railties
    mime-types (1.25.1)
    minitest (5.3.5)
    multi_json (1.10.1)
    net-scp (1.1.2)
      net-ssh (>= 2.6.5)
    net-ssh (2.9.1)
    pg (0.17.1)
    polyglot (0.3.5)
    rack (1.5.2)
    rack-contrib (1.1.0)
      rack (>= 0.9.1)
    rack-test (0.6.2)
      rack (>= 1.0)
    railroady (1.1.1)
    rails (4.1.2)
      actionmailer (= 4.1.2)
      actionpack (= 4.1.2)
      actionview (= 4.1.2)
      activemodel (= 4.1.2)
      activerecord (= 4.1.2)
      activesupport (= 4.1.2)
      bundler (>= 1.3.0, < 2.0)
      railties (= 4.1.2)
      sprockets-rails (~> 2.0)
    railties (4.1.2)
      actionpack (= 4.1.2)
      activesupport (= 4.1.2)
      rake (>= 0.8.7)
      thor (>= 0.18.1, < 2.0)
    rake (10.3.2)
    rdoc (4.1.1)
      json (~> 1.4)
    responders (0.6.5)
    sass (3.2.19)
    sass-rails (4.0.3)
      railties (>= 4.0.0, < 5.0)
      sass (~> 3.2.0)
      sprockets (~> 2.8, <= 2.11.0)
      sprockets-rails (~> 2.0)
    sdoc (0.4.0)
      json (~> 1.8)
      rdoc (~> 4.0, < 5.0)
    simple_form (1.4.1)
    spring (1.1.3)
    sprockets (2.11.0)
      hike (~> 1.2)
      multi_json (~> 1.0)
      rack (~> 1.0)
      tilt (~> 1.1, != 1.3.0)
    sprockets-rails (2.1.3)
      actionpack (>= 3.0)
      activesupport (>= 3.0)
      sprockets (~> 2.8)
    sshkit (1.3.0)
      net-scp (>= 1.1.2)
      net-ssh
      term-ansicolor
    term-ansicolor (1.2.2)
      tins (~> 0.8)
    thin (1.6.2)
      daemons (>= 1.0.9)
      eventmachine (>= 1.0.0)
      rack (>= 1.0.0)
    thor (0.19.1)
    thread_safe (0.3.4)
    tilt (1.4.1)
    tins (0.13.1)
    treetop (1.4.15)
      polyglot
      polyglot (>= 0.3.1)
    turbolinks (2.2.2)
      coffee-rails
    tzinfo (1.2.1)
      thread_safe (~> 0.1)
    uglifier (2.5.1)
      execjs (>= 0.3.0)
      json (>= 1.8.0)

PLATFORMS
  ruby

DEPENDENCIES
  binding_of_caller
  capistrano-rails
  coffee-rails (~> 4.0.0)
  jbuilder (~> 2.0)
  meta_request
  pg
  railroady
  rails (= 4.1.2)
  responders
  sass-rails (~> 4.0.3)
  sdoc (~> 0.4.0)
  simple_form
  spring
  thin
  turbolinks
  uglifier (>= 1.3.0)

@candidosales
Copy link
Author

Now I realized that there is version 1.0.0 ... I will update to see if the error still persists.

@lucasmazza
Copy link
Contributor

@candidosales any news on this? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants