I just tried to deploy to Heroku and got a 500 server error.
heroku logs:
Started GET "/" for ##.##.###.### at 2010-10-14 17:59:34 -0700
Processing by WelcomeController#index as HTML
Rendered welcome/index.html.erb within layouts/index (2.3ms)
Completed in 3ms
ActionView::Template::Error (can't convert nil into String):
5: <meta charset="utf-8">
6: <title>Hello</title>
7: <%= stylesheet_link_tag "global", "home", :cache => true %>
app/controllers/welcome_controller.rb:5:in `index'
I then tried to start my local server in production mode:
c:\Sanj\ruby>rails server production
Exiting
C:/Sanj/Ruby192/lib/ruby/gems/1.9.1/gems/rack-1.2.1/lib/rack/handler.rb:21:in `const_get': wrong constant name production (NameError)
from C:/Sanj/Ruby192/lib/ruby/gems/1.9.1/gems/rack-1.2.1/lib/rack/handler.rb:21:in `get'
from C:/Sanj/Ruby192/lib/ruby/gems/1.9.1/gems/rack-1.2.1/lib/rack/server.rb:217:in `server'
from C:/Sanj/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.0/lib/rails/commands/server.rb:54:in `start'
from C:/Sanj/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.0/lib/rails/commands.rb:30:in `block in <top (required)>'
from C:/Sanj/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.0/lib/rails/commands.rb:27:in `tap'
from C:/Sanj/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.0/lib/rails/commands.rb:27:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
These issues seem highly related - do you know what the issue might be here?
Thanks very much!
Welcome Controller#index
def index
render :layout => "index"
end
Please tell me if I can supply any more information.
Solution
Thanks to you guys for your answers. The problem was occurring because serve_static_assets was set to false in environments/production.rb. This enabled the system to find the CSS files that were apparently causing the 'nil'. The other change I tried was removing :cache => true from the stylesheets.