Setting up Redmine 0.8 stable on Debian 5, Mysql 5 from scratch, then restore 0.7 database, and upgrade/update.
Added by Hamish van Groeneveld almost 16 years ago
Hello,
I am writing a guide for building a 'template' redmine-server as I am leaving the company.
To this end I've compiled a document with complete instructions to do the following:
- Setup a virtual machine in VMware server 2.0.
- Install debian 5 (32b), with as little cruft as possible.
- Install required Debian packages for Redmine to function.
- Install Ruby & RubyGems from source as to avoid clashes with apt-get.
- Get the 0.8 stable version using svn.
- Prepare MySQL, restoring the most recent DB.
- Run Redmine using Webrick.
Here's a list of the packages I am installing:
- Debian using apt-get: mlocate build-essential openssl libopenssl-ruby libssl-dev mysql-server subversion
- Source: ruby-1.8.7-p72.tar.gz
- Source: libgems-ruby_1.3.1.orig.tar.gz
- Gem: rails -v=2.2.2
The version reported after this are:
debian-32b-template:/opt/redmine-0.8# ruby -v ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-linux]
debian-32b-template:/opt/redmine-0.8# gem -v 1.3.1
debian-32b-template:/opt/redmine-0.8# rake -V rake, version 0.8.3
debian-32b-template:/opt/redmine-0.8# gem stale rake-0.8.3 at Wed Mar 18 15:09:27 2009 actionpack-2.2.2 at Wed Mar 18 15:11:03 2009 activeresource-2.2.2 at Wed Mar 18 15:11:03 2009 rails-2.2.2 at Wed Mar 18 15:11:03 2009 activerecord-2.2.2 at Wed Mar 18 15:11:03 2009 actionmailer-2.2.2 at Wed Mar 18 15:11:03 2009 activesupport-2.2.2 at Wed Mar 18 15:11:03 2009These are suggested by the documentation:
- current trunk ruby 1.8.6, 1.8.7 Rails 2.2.2
- RubyGems 1.3.1
- Rake 0.8.3
debian-32b-template:/opt/redmine-0.8# rake db:migrate RAILS_ENV="production" (in /opt/redmine-0.8) rake aborted! undefined method `default_error_messages=' for ActiveRecord::Errors:Class (See full trace by running task with --trace)
Perhaps someone could shed some light on this, as I am stuck.
Thanks!,
Hamish
Replies (4)
Version reported by svn - Added by Hamish van Groeneveld almost 16 years ago
Another bit of info:
debian-32b-template:/opt/redmine-0.8# svn update At revision 2598.
RE: Setting up Redmine 0.8 stable on Debian 5, Mysql 5 from scratch, then restore 0.7 database, and upgrade/update. - Added by Eric Davis almost 16 years ago
The 0.8.x release of Redmine uses Ruby on Rails 2.1.2. The svn development version uses Ruby on Rails 2.2.2. Switch to rails 2.1.2 and you should fix the problem (your script has 2.1. but you post has 2.2.2).
I also Googled the error and the first hit had the same solution, http://www.redmine.org/boards/2/topics/show/4252
Eric
RE: Setting up Redmine 0.8 stable on Debian 5, Mysql 5 from scratch, then restore 0.7 database, and upgrade/update. - Added by Hamish van Groeneveld almost 16 years ago
Hi Eric,
Thanks for your time! I must be mistaken in reading 'current trunk' as version 0.8.x then, as the revision number for this 0.8 version is 2598, I figured I needed Rail 2.2.2. I tried 2.1.2 before (as you noticed in the script), and it partly works. Showing some issues give me a 'redMine 500 error - Internal Error'. This seems to be related to attachments.
The production.log shows:
ActionView::TemplateError (undefined method `description' for #<Attachment:0xb6efee88>) on line #4 of attachments/_links.rhtml: 1: <div class="attachments"> 2: <% for attachment in attachments %> 3: <p><%= link_to_attachment attachment, :class => 'icon icon-attachment' -%> 4: <%= h(" - #{attachment.description}") unless attachment.description.blank? %> 5: <span class="size">(<%= number_to_human_size attachment.filesize %>)</span> 6: <% if options[:deletable] %> 7: <%= link_to image_tag('delete.png'), {:controller => 'attachments', :action => 'destroy', :id => attachment}, /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/attribute_methods.rb:256:in `method_missing' app/views/attachments/_links.rhtml:4:in `_run_erb_47app47views47attachments47_links46rhtml' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/associations/association_collection.rb:277:in `method_missing' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/associations/association_proxy.rb:171:in `method_missing' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/associations/association_proxy.rb:171:in `each' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/associations/association_proxy.rb:171:in `send' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/associations/association_proxy.rb:171:in `method_missing' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/associations/association_collection.rb:277:in `method_missing' app/views/attachments/_links.rhtml:2:in `_run_erb_47app47views47attachments47_links46rhtml' ...... Rendering /opt/redmine-0.8/public/500.html (500 Internal Server Error)
How do I go about diagnosing this one?
Regards,
Hamish
RE: Setting up Redmine 0.8 stable on Debian 5, Mysql 5 from scratch, then restore 0.7 database, and upgrade/update. - Added by Eric Davis almost 16 years ago
Hamish van Groeneveld wrote:
Thanks for your time! I must be mistaken in reading 'current trunk' as version 0.8.x then, as the revision number for this 0.8 version is 2598, I figured I needed Rail 2.2.2.
No problem. The current stable release version is 0.8.x and is located in the 0.8-stable branch. The trunk branch is the development version and is the future 0.9 release.
I tried 2.1.2 before (as you noticed in the script), and it partly works. Showing some issues give me a 'redMine 500 error - Internal Error'. This seems to be related to attachments.
Looks like a missing database migration. Migration 89 added the description column to the attachments table. Check that rake db:migrate RAILS_ENV=production
was successful and that the attachments table has a description column (string).
Eric