Problem with db:migrate
Added by Flavio C almost 15 years ago
Hello, I checked out the current stable version and I followed the instructions for installing Redmine. I'm on an hosting which has Ruby 1.8.7 and Rails 2.2.2. I modified the line in config/environment.rb from:
RAILS_GEM_VERSION = '2.1.2' unless defined? RAILS_GEM_VERSION
to:
#RAILS_GEM_VERSION = '2.1.2' unless defined? RAILS_GEM_VERSION
as the following suggest when I try:
# rake db:migrate RAILS_ENV="production"
(in /home/.../etc/rails_apps/redmine)
Missing the Rails 2.1.2 gem. Please `gem install -v=2.1.2 rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.
I hope that it's correct: I can't modify the Rails version so I apply the last part of the message, commenting the line indicated.
Now, when I try the point 5 of installation procedure I obtain:
fl...@ya... [~/etc/rails_apps/redmine]# rake db:migrate RAILS_ENV="production" --trace
(in /home/.../etc/rails_apps/redmine)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
undefined method `default_error_messages=' for ActiveRecord::Errors:Class
/home/.../etc/rails_apps/redmine/config/initializers/10-patches.rb:2
/usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:144:in `load_without_new_constant_marking'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:144:in `load'
/usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:550:in `load_application_initializers'
/usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:549:in `each'
/usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:549:in `load_application_initializers'
/usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:167:in `process'
/usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:112:in `send'
/usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:112:in `run'
/home/.../etc/rails_apps/redmine/config/environment.rb:20
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in `require'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:521:in `new_constants_in'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in `require'
/usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/tasks/misc.rake:3
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:617:in `call'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:617:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:612:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:612:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:578:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:571:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:588:in `invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:585:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:585:in `invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:577:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:571:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:564:in `invoke'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2027:in `invoke_task'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2044:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1999:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1977:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2044:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1974:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19
How can I solve this? Thanks!
Replies (3)
RE: Problem with db:migrate
-
Added by Flavio C almost 15 years ago
Ops, I forget the following.
The operating system of my hosting is Linux, the DB is MySQL 5.0.67-community, and this is the result of the requested command:
fl...@ya... [~/etc/rails_apps/redmine]# RAILS_ENV=production script/about
/home/.../etc/rails_apps/redmine/config/initializers/10-patches.rb:2: undefined method `default_error_messages=' for ActiveRecord::Errors:Class (NoMethodError)
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:144:in `load_without_new_constant_marking'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:144:in `load'
from /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:550:in `load_application_initializers'
from /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:549:in `each'
from /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:549:in `load_application_initializers'
from /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:167:in `process'
from /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:112:in `send'
from /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:112:in `run'
from /home/.../etc/rails_apps/redmine/config/environment.rb:20
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/about.rb:1
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from script/about:4
RE: Problem with db:migrate
-
Added by Eric Davis almost 15 years ago
Flavio C wrote:
Hello, I checked out the current stable version and I followed the instructions for installing Redmine. I'm on an hosting which has Ruby 1.8.7 and Rails 2.2.2. I modified the line in config/environment.rb from:
The current stable release of Redmine requires Rails 2.1.2 and it not compatible with any other version of Rails. Please revert config/environment.rb
and freeze a copy of Rails 2.1.2 by running the following:
rake rails:freeze:edge RELEASE=2.1.2
You'll end up with your own copy of Rails 2.1.2 installed in vendor/rails/
which Redmine will use instead of your host's version.
Eric Davis
RE: Problem with db:migrate
-
Added by Flavio C almost 15 years ago
Thank you! I passed correctly the point 5! _