Rails is giving a 500 error (in a production environment using Passenger). The production log says that the it is missing the view:
Started GET "/" for at 2012-05-12 20:34:18 +0200
Processing by EventCalendarsController#index as HTML
Completed 500 Internal Server Error in 18ms
ActionView::MissingTemplate (Missing template event_calendars/index, application/index with {:locale=>[:it], :formats=>[:html], :handlers=>[:erb, :builder]}. Searched in:
* "/home/regroup/calendar/app/views"
* "/home/regroup/.rvm/gems/ruby-1.9.3-p194/gems/devise-2.0.4/app/views"
):
app/controllers/event_calendars_controller.rb:24:in `index'
I’m sure the bundle install installed both haml and haml-rails gems. Here is my Gemfile:
source 'https://rubygems.org'
gem 'rails', '3.2.3'
gem 'mysql2'
gem 'devise'
gem 'cancan'
# 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', :platform => :ruby
gem 'uglifier', '>= 1.0.3'
gem 'haml-rails'
gem "twitter-bootstrap-rails"
end
gem 'jquery-rails'
What’s wrong here? Do I need to change something to make this work in a production environment?
Try replace the
gem 'haml-rails'out of assets group and put it under thegem 'cancan'