8

मेरे पास एक ऐसा एप्लिकेशन है जो विकास मोड में खूबसूरती से काम करता है। वेब्रिक या पैसेंजर/अपाचे में उत्पादन में परीक्षण करने के प्रयास में मेरी अधिकांश साइट तब तक अच्छी तरह से लोड होती है जब तक कि मैं एजेक्स फॉर्म जमा करने का प्रयास नहीं करता। मैंने सही ढंग से बंडल इंस्टॉल - तैनाती का उपयोग किया है। मैंने अपनी संपत्तियों का सही ढंग से चयन किया है। लेकिन किसी कारण से मुझे दूरस्थ रूप सबमिट करते समय निम्न त्रुटि मिल रही है। ध्यान रखें, AJAX वास्तव में काम कर रहा है क्योंकि यह डेटाबेस में रिकॉर्ड बना रहा है। एक बात जो मुझे दिलचस्प लगता है वह है कि मैं रूबी 1.9.3 के साथ एक रत्न का उपयोग कर रहा हूं लेकिन मुझे इन त्रुटि कोडों में रूबी 1.9.1 के संदर्भ मिल रहे हैं। मैं उपयोगकर्ता नियंत्रक भी शामिल कर रहा हूं ताकि आप नियंत्रक संदर्भ देख सकें। मदद!रेल 3.2 एक्शन व्यू मिसिंग टेम्पलेट केवल उत्पादन में

अद्यतन !! यह क्रिया के आधार पर कि क्या यह क्रिया क्रिया है या नहीं, कार्रवाई अद्यतन कार्रवाई संपादित करें या त्रुटि को नष्ट करें टेम्पलेट उपयोगकर्ता/निर्माण या उपयोगकर्ता/अद्यतन या उपयोगकर्ता/उपयोगकर्ता/नष्ट आदि संपादित करें। पहले जवाब पर टिप्पणी पढ़ें जैसा कि मुझे विश्वास है कि यह है जावास्क्रिप्ट फ़ाइलों के साथ एक मुद्दा precompile प्रक्रिया में शामिल नहीं किया जा रहा है।

Started GET "https://stackoverflow.com/users/5" for 24.163.20.124 at 2012-02-07 03:30:09 -0500 
Processing by UsersController#show as HTML 
    Parameters: {"id"=>"5"} 
Completed 500 Internal Server Error in 58ms 

ActionView::MissingTemplate (Missing template users/show, application/show with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder]}. Searched in: 
* "/home/ctilley/Development/RatatouilleCatering/app/views" 
* "/home/ctilley/Development/RatatouilleCatering/vendor/bundle/ruby/1.9.1/gems/wash_out-0.3.1/app/views" 
* "/home/ctilley/Development/RatatouilleCatering/vendor/bundle/ruby/1.9.1/gems/ckeditor-3.7.0.rc2/app/views" 
): 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.0/lib/action_view/path_set.rb:58:in `find' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.0/lib/action_view/lookup_context.rb:109:in `find' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.0/lib/action_view/renderer/abstract_renderer.rb:3:in `find_template' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.0/lib/action_view/renderer/template_renderer.rb:28:in `determine_template' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.0/lib/action_view/renderer/template_renderer.rb:10:in `render' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.0/lib/action_view/renderer/renderer.rb:36:in `render_template' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.0/lib/action_view/renderer/renderer.rb:17:in `render' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.0/lib/abstract_controller/rendering.rb:109:in `_render_template' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.0/lib/action_controller/metal/streaming.rb:225:in `_render_template' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.0/lib/abstract_controller/rendering.rb:103:in `render_to_body' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.0/lib/action_controller/metal/renderers.rb:28:in `render_to_body' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.0/lib/action_controller/metal/compatibility.rb:50:in `render_to_body' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.0/lib/abstract_controller/rendering.rb:88:in `render' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.0/lib/action_controller/metal/rendering.rb:16:in `render' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.0/lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render' 
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.0/lib/active_support/core_ext/benchmark.rb:5:in `block in ms' 

नियंत्रकों/users_controller.rb

class UsersController < ApplicationController 

    before_filter :require_user 
    respond_to :html, :js 
    load_and_authorize_resource 
def index 
    @users = User.search(params[:search]).order(sort_column + " " + sort_direction).paginate(:per_page => 10, :page=>params[:page]) 

    authorize! :read, @article 
end 

def show 
end 

def create 
    @user = User.new(params[:user]) 

    if @user.save 
    respond_with @user, :location => users_url 
    end 
end 

def destroy 
    @user = User.find(params[:id]) 
    @user.destroy 

    respond_with @user, :location => users_url 
end 

def edit 
    @user = User.find(params[:id]) 
    respond_with @user, :location => users_url 
end 

def update 
    @user = User.find(params[:id]) 
    @user.update_attributes(params[:user]) 

    respond_with @user, :location => users_url 
end 
private 
def sort_column 
    params[:sort] || "id" 
end 
def sort_direction 
    params[:direction] || "asc" 
end 

end 

उत्तर

16

अपने Gemfile

gem 'coffee-rails', "~> 3.2.1" 
gem 'uglifier', ">= 1.0.3" 
+0

आपने मेरा दिन बचाया। – methyl

+0

इस उत्तर के लिए बहुत बहुत धन्यवाद। मैं फंस गया था। –

+2

इसके लिए स्पष्टीकरण क्या है? – Lyudmil

0
ActionView::MissingTemplate (Missing template users/show...) 

इसका मतलब है कि दृश्य फ़ाइल एप्लिकेशन/उपयोगकर्ताओं/show.html.erb याद आ रही है। यहां एक डमी फ़ाइल बनाएं और देखें कि क्या यह समस्या हल करता है।

+0

में संपत्ति समूह के निम्नलिखित के बाहर ले जाने के मामले होने लगते हैं नहीं करता है। Respond_with कथन इंडेक्स पर इन कार्रवाइयों को मजबूर करता है। जैसा कि ऊपर बताया गया है, यह सब विकास मोड में बहुत अच्छा काम करता है। संपादित करें, अपडेट करें, रिमोट फॉर्म बनाएं जो संबंधित index.js.coffee create.js.coffee update.js.coffee और destroy.js.coffee को कॉल करें। ये उस विशेष नियंत्रक के लिए व्यू फ़ोल्डर में रहते हैं। मैं जो सोच रहा हूं वह यह है कि इन जावास्क्रिप्ट फ़ाइलों को प्रीकंपाइल प्रक्रिया के दौरान संकलित नहीं किया जा रहा है। इसलिए रिकॉर्ड पोस्ट किए गए हैं, लेकिन जावास्क्रिप्ट निष्पादित नहीं किया गया है। मुझे इन फ़ाइलों को संपत्ति/प्रीकंपाइल पथ में जोड़ने का एक तरीका ढूंढना होगा। – ctilley79

संबंधित मुद्दे