Task 25 assigned to mikehale by alex
my local set up stopeed working after pulling changes. I installed the gem "ruby-debug" so the server is running again but when I hit index I get:
NoMethodError in Links#index
Showing layouts/application.rhtml where line #15 raised:
You have a nil object when you didn't expect it!
The error occurred while evaluating nil.chomp
Extracted source (around line #15):
12: <meta http-equiv="imagetoolbar" content="false" />
13: <meta name="MSSmartTagsPreventParsing" content="true" />
14:
15: <%= javascript_include_merged :base %>
16: <%= stylesheet_link_merged :base %>
17: </head>
18:
Task is done
Activity
-
alex marked this task as done 2 months ago.
-
alex added a comment 2 months ago
-
mikehale added a comment 2 months ago
I figured you would say something like that :)
Actually we can check before deploying. Just run `rake asset:packager:build_all && script/server -e production`
-
alex added a comment 2 months ago
Great - thanks for clearing that up. I think to not have it in development is fine. Which means we'll need to do a quick manual check after deployments, though to see if all is well.
I prefer that over restarting the server all the time when working locally (as I do little but css changes)
-
mikehale added a comment 2 months ago
So this was due to me installing the asset_package plugin.
I had changed the default configuration so that it was looking for compressed javascript and css in development mode as well as production. The reason that you were seeing the error after updating was because for asset_packager to work properly you have to run `rake asset_pacakger:build_all` which generates the compressed assets. I turned off asset_packager in development so you dont have to run rake and will not see this problem anymore: http://github.com/kohlhofer/rubyurl/commit/5fe689eec74fe86415fca6c93cf700e460e2310a
The only downside to turning this off in development is that it does change the css and javascript so sometimes it can cause problems that would only show up in production. We could turn it back on for development mode too, and add some code to script/server to automatically run the rake task. The only downside is that the server would have to be restarted every time you changed a javascript or css file.
-
mikehale added a comment 2 months ago
I'm only seeing this on a freshly cloned repository. I'll see what's up.
Assigned to: mikehale
Category: show stopper
Great - will add that to my cheat sheet!