I am using Rails 3.2.3 / Ruby 1.9.3p125 / jbuilder (0.4.0)
In my view/mycontroller
folder i got a show.json.jbuilder
file.
when I test everything on my local machine with rails s -e production
everything works fine.
The JSON gets rendered as espected.
But when I deploy to Ubuntu LTS (nginx/unicorn) I get the following Error Message:
ActionView::MissingTemplate (Missing template mycontroller/show, application/show with {:locale=>[:de, :en], :formats=>[:json], :handlers=>[:erb, :builder]}. Searched in:
* "/home/deployer/apps/myapp/releases/#############/app/views"
):
When I check on my server if the jbuilder gem is installed with bundle show jbuilder
everything seems right.
weird is that the Error message does't show :handlers=>[:erb, :builder, :jbuilder]
The jbuilder handler is obviously missing. But how do I solve the problem?
Edit: The Problem is not based on Jbuilder. I tried rabl and the same problem appears.
Does any one has a hint, how to debug this?
Here some more Information:
Gemfile
source 'https://rubygems.org'
gem 'rails', '3.2.3'
gem 'jquery-rails'
gem 'mysql2'
gem 'simple_form'
# 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'
gem 'uglifier', '>= 1.0.3'
gem 'bootstrap-sass', '2.0.2'
end
# Use unicorn as the app server
gem 'unicorn'
# Deploy with Capistrano
gem 'capistrano'
# for performance monitoring
gem 'newrelic_rpm'
# use asset pipline and flash
gem 'swf_fu', '~> 2.0'
gem 'geocoder'
# To use Jbuilder templates for JSON
gem 'jbuilder'
Controller
def show
end
show.json.jbuilder - file
json.(@map, :id)