1

best_in_place gem を使い始めました。ローカルの開発マシンでは問題なく動作しましたが、コードを運用サーバーにデプロイすると、次のようになります。

ActionView::Template::Error (undefined method `best_in_place' for #<#<Class:0xc088ef8>:0xba694a0>):
    76:               <% t.each do |ticket| %>
    77:                 <tr>
    78:                   <td><%= check_box_tag "tickets[ids][]", ticket.id, false, :class => "status_change" %></td>
    79:                   <td><%= best_in_place ticket, :position, {:inner_class => "input-mini", :type => :input} %></td>
    80:                   <td><%= ticket.id %></td>
    81:                   <td><%= ticket.job_number %></td>
    82:                   <td><%= link_to ticket.name, edit_ticket_path(ticket) %></td>
  app/views/tickets/index.html.erb:79:in `block (3 levels) in _app_views_tickets_index_html_erb___947812068_98658810'
  app/views/tickets/index.html.erb:76:in `block (2 levels) in _app_views_tickets_index_html_erb___947812068_98658810'
  app/views/tickets/index.html.erb:56:in `each'
  app/views/tickets/index.html.erb:56:in `block in _app_views_tickets_index_html_erb___947812068_98658810'
  app/views/tickets/index.html.erb:50:in `_app_views_tickets_index_html_erb___947812068_98658810'
  app/controllers/tickets_controller.rb:11:in `index'

宝石がインストールされていないかのようです。私は私がしたことを確認しましたbundle install

意見:

<td><%= best_in_place ticket, :position, {:inner_class => "input-mini", :type => :input} %></td>

Gemfile:

source 'https://rubygems.org'

gem 'rails', '3.2.11'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
group :development do
    gem 'sqlite3'
end


# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'

  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  # gem 'therubyracer', :platforms => :ruby

  gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'

group :production do
    gem "mysql", "~>2.8.1"
end

# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# To use Jbuilder templates for JSON
# gem 'jbuilder'

# Use unicorn as the app server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'debugger'

gem 'devise'
gem 'best_in_place'
gem 'paper_trail'
gem 'ckeditor_rails'
gem 'bootstrap-sass'
gem 'bootstrap-datepicker-rails'
gem 'carrierwave'
gem 'ransack'
gem 'nested_form'
gem 'will_paginate'
gem 'capistrano'
gem 'therubyracer'
4

1 に答える 1