Bug #206
Backlog not working
| Status: | Closed | Start: | 10/14/2009 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assigned to: | % Done: | 0% |
||
| Category: | - | |||
| Target version: | Sprint 10.03 | |||
| Story points | S | |||
| Velocity based estimate | days | |||
| Remaining hours |
Description
After the install I have had to remove the
:cache => 'backlogsjs/all'
part out of the index.html.erb. I got the following error msg:
Permission denied - /var/www/redmine/public/javascripts/backlogsjs) on line #3 of vendor/plugins/redmine_backlogs/app/views/backlogs/index.html.erb
Due to this, I removed it. Now the Backlog is not working properly as seen in the screenshot.
I am using Redmine trunk and Backlog trunk as well.
History
Updated by Rupert Key 9 months ago
Markus May wrote:
Due to this, I removed it. Now the Backlog is not working properly as seen in the screenshot.
I am using Redmine trunk and Backlog trunk as well.
Seen and solved using Backlog trunk and Redmine 0.8 (but may work for trunk too):
The reference is broken, I suspect it should be backlog.js found in "vendor/plugins/redmine_backlogs/assets/javascripts/backlog.js"
I tried changing from ":cache => 'backlogsjs/all'" to ":cache => 'backlogs.js/all'" and restarted but to no avail (and I'm not a Rubyist).
Then removed it and the preceding comma (leaving end of line as ":plugin => 'redmine_backlogs' %>"). Restarted Redmine again and seems working so far.
HTH, R.
Updated by Nathan Lowrie 8 months ago
This is a permissions problem. The cache line is a way of combining all of the javascript files for the backlog into one line so a client will only need to download one js file. Whatever user your webserver is running as doesn't have permissions to create a directory or file in REDMINE_ROOT/public/javascripts. On production, your system will try to create a file called all.js in the directory REDMINE_ROOT/public/javascripts/backlogsjs and will create the backlogsjs directory if it doesn't exist. Please check that your permissions are inline and try again.
Regards,
Nate Lowrie
Updated by Nathan Lowrie 8 months ago
- Status changed from New to Closed
- Assigned to set to Nathan Lowrie
Updated by Marnen Laibow-Koser 8 months ago
This is not only a permissions issue, and it is not fixed; please reopen. I am having this same problem (Redmine 0.8.7, Rails 2.1.2, latest Backlogs plugin from Github) in dev mode, where the server is running as me, and I have read and write permissions to all files. backlogsjs/all.js is getting written, all right, but the file is blank. Something similar seems to be going on with some of the CSS files.
Note that filesystem caching is not a great way to do this in any case. If we used cache headers instead, it would make it easier to install this plugin in environments such as Heroku (which I currently use for Redmine hosting). If I have time, I'll try to submit a patch, but I don't know when I'll have time. :)
Updated by Nathan Lowrie 8 months ago
Marnen,
I can only reproduce the issue that you describe if I don't have the proper file permissions. However, maybe the better solution to this is to add a rake task to pre-generate the cache headers. Something like this solution.
Updated by Mark Maglana 8 months ago
Please note that, in dev mode, Rails doesn't actually make use of the cache. When you view the HTML code generated, it creates the following tags:
<script src="/plugin_assets/redmine_backlogs/javascripts/main.js?1259030279" type="text/javascript"></script> <script src="/plugin_assets/redmine_backlogs/javascripts/backlog.js?1259030267" type="text/javascript"></script> <script src="/plugin_assets/redmine_backlogs/javascripts/item.js?1259030272" type="text/javascript"></script> <script src="/plugin_assets/redmine_backlogs/javascripts/task.js?1259030284" type="text/javascript"></script>
Only when the app is run in production mode does the cache kick in.
Updated by Marnen Laibow-Koser 8 months ago
Nathan Lowrie wrote:
Marnen,
I can only reproduce the issue that you describe if I don't have the proper file permissions. However, maybe the better solution to this is to add a rake task to pre-generate the cache headers. Something like this solution.
That would probably be a good solution, and would also make it easier to get this plugin running on Heroku (where I keep my Redmine installation). I was only able to get it working with a couple of hacks that I'm not all that happy with.
Updated by Marnen Laibow-Koser 8 months ago
Mark Maglana wrote:
Please note that, in dev mode, Rails doesn't actually make use of the cache. When you view the HTML code generated, it creates the following tags:
[...]
Only when the app is run in production mode does the cache kick in.
Actually, I turned caching on in dev mode so I could diagnose the problem.
Updated by Mark Maglana 5 months ago
- Target version set to Sprint 10.03