Project

General

Profile

redmine 1.4 osx10.6 cant generate production rake db:migrate

Added by Adrian Ortuzar over 12 years ago

Hello,
Im using:
redmine 1.4
ruby 1.8.7
osx 10.6

and i have this error when "RAILS_ENV=production rake db:migrate --trace":

Please install RDoc 2.4.2+ to generate documentation.
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
Object is not missing constant Project!
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:443:in `load_missing_constant'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:106:in `const_missing'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:118:in `const_missing'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:124:in `send'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:124:in `const_missing'
/Users/adrian/Sites/redmine/app/models/attachment.rb:37
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:184:in `require'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:184:in `require'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:291:in `require_or_load_without_engine_additions'
/Users/adrian/Sites/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in `require_or_load'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:451:in `load_missing_constant'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:106:in `const_missing'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:118:in `const_missing'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:463:in `load_missing_constant'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:106:in `const_missing'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:463:in `load_missing_constant'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:106:in `const_missing'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:463:in `load_missing_constant'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:106:in `const_missing'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:463:in `load_missing_constant'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:106:in `const_missing'
/Users/adrian/Sites/redmine/vendor/plugins/acts_as_attachable/lib/acts_as_attachable.rb:33:in `acts_as_attachable'
/Users/adrian/Sites/redmine/app/models/message.rb:23
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:184:in `require'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:184:in `require'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:291:in `require_or_load_without_engine_additions'
/Users/adrian/Sites/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in `require_or_load'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:451:in `load_missing_constant'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:106:in `const_missing'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:118:in `const_missing'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.14/lib/active_support/inflector.rb:364:in `constantize'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.14/lib/active_support/inflector.rb:363:in `each'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.14/lib/active_support/inflector.rb:363:in `constantize'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.14/lib/active_support/core_ext/string/inflections.rb:162:in `constantize'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.14/lib/active_record/observer.rb:157:in `observed_class'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.14/lib/active_record/observer.rb:183:in `observed_classes'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.14/lib/active_record/observer.rb:166:in `initialize'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/singleton.rb:94:in `new'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/singleton.rb:94:in `instance'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.14/lib/active_record/observer.rb:38:in `instantiate_observers'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.14/lib/active_record/observer.rb:36:in `each'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.14/lib/active_record/observer.rb:36:in `instantiate_observers'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.14/lib/action_controller/dispatcher.rb:15:in `define_dispatcher_callbacks'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.14/lib/active_support/callbacks.rb:182:in `call'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.14/lib/active_support/callbacks.rb:182:in `evaluate_method'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.14/lib/active_support/callbacks.rb:166:in `call'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.14/lib/active_support/callbacks.rb:90:in `run'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.14/lib/active_support/callbacks.rb:90:in `each'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.14/lib/active_support/callbacks.rb:90:in `send'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.14/lib/active_support/callbacks.rb:90:in `run'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.14/lib/active_support/callbacks.rb:276:in `run_callbacks'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.14/lib/action_controller/dispatcher.rb:51:in `send'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.14/lib/action_controller/dispatcher.rb:51:in `run_prepare_callbacks'
/Library/Ruby/Gems/1.8/gems/rails-2.3.14/lib/initializer.rb:631:in `prepare_dispatcher'
/Library/Ruby/Gems/1.8/gems/rails-2.3.14/lib/initializer.rb:185:in `process'
/Library/Ruby/Gems/1.8/gems/rails-2.3.14/lib/initializer.rb:113:in `send'
/Library/Ruby/Gems/1.8/gems/rails-2.3.14/lib/initializer.rb:113:in `run'
/Users/adrian/Sites/redmine/config/environment.rb:21
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:182:in `require'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:182:in `require'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:547:in `new_constants_in'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:182:in `require'
/Library/Ruby/Gems/1.8/gems/rails-2.3.14/lib/tasks/misc.rake:4
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `execute'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `invoke_with_call_chain'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:176:in `invoke_prerequisites'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `each'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `invoke_prerequisites'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:157:in `invoke_with_call_chain'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `top_level'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `top_level'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `run'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/bin/rake:33
/usr/bin/rake:23:in `load'
/usr/bin/rake:23
Tasks: TOP => db:migrate => environment

gem list:

actionmailer (3.2.3, 2.3.14, 2.3.5, 1.3.6)
actionpack (3.2.3, 2.3.14, 2.3.5, 1.13.6)
actionwebservice (1.2.6)
activemodel (3.2.3)
activerecord (3.2.3, 2.3.14, 2.3.5, 1.15.6)
activeresource (3.2.3, 2.3.14, 2.3.5)
activesupport (3.2.3, 2.3.14, 2.3.5, 1.4.4)
acts_as_ferret (0.4.3)
arel (3.0.2)
builder (3.0.0)
bundler (1.1.3)
capistrano (2.12.0, 2.5.2)
cgi_multipart_eof_fix (2.5.0)
coderay (1.0.6)
daemons (1.1.8, 1.0.10)
dnssd (2.0, 0.6.0)
erubis (2.7.0)
fastercsv (1.5.4)
fastthread (1.0.7, 1.0.1)
fcgi (0.8.8, 0.8.7)
ferret (0.11.8.4, 0.11.6)
gem_plugin (0.2.3)
highline (1.6.11, 1.5.0)
hike (1.2.1)
hpricot (0.8.6, 0.6.164)
i18n (0.6.0, 0.4.2)
journey (1.0.3)
json (1.6.6)
libxml-ruby (2.3.2, 1.1.2)
mail (2.4.4)
mime-types (1.18)
mongrel (1.1.5)
multi_json (1.3.2)
mysql (2.8.1)
mysql2 (0.3.11)
needle (1.3.0)
net-ldap (0.3.1)
net-scp (1.0.4, 1.0.1)
net-sftp (2.0.5, 2.0.1, 1.1.1)
net-ssh (2.3.0, 2.0.4, 1.1.4)
net-ssh-gateway (1.1.0, 1.0.0)
polyglot (0.3.3)
rack (1.1.3, 1.1.0, 1.0.1)
rack-cache (1.2)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (2.3.14, 2.3.5, 1.2.6)
railties (3.2.3)
rake (0.9.2.2, 0.8.3)
rdoc (3.12)
RedCloth (4.2.9, 4.1.1)
ruby-openid (2.1.8, 2.1.2)
ruby-yadis (0.3.4)
rubygems-update (1.8.0)
rubynode (0.1.5)
sprockets (2.1.2)
sqlite3 (1.3.6)
sqlite3-ruby (1.3.3, 1.2.4)
termios (0.9.4)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
tzinfo (0.3.33)
xmpp4r (0.5, 0.4)

when i do "bundle install --without development test postgresql sqlite rmagick"

Fetching gem metadata from http://rubygems.org/.......
Enter your password to install the bundled RubyGems to your system: 
Using rake (0.9.2.2) 
Using activesupport (2.3.14) 
Using rack (1.1.3) 
Using actionpack (2.3.14) 
Using actionmailer (2.3.14) 
Using activerecord (2.3.14) 
Using activeresource (2.3.14) 
Using coderay (1.0.6) 
Using fastercsv (1.5.4) 
Using i18n (0.4.2) 
Using mysql (2.8.1) 
Using net-ldap (0.3.1) 
Using rails (2.3.14) 
Using ruby-openid (2.1.8) 
Using tzinfo (0.3.33) 
Using bundler (1.1.3) 
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.

does anyone know how to solve this?
thank you


Replies (3)

RE: redmine 1.4 osx10.6 cant generate production rake db:migrate - Added by Adrian Ortuzar over 12 years ago

This is the way to install correctly mysql gem in mac osx 10.6
http://sylv3rblade.com/2010/04/installing-the-mysql-gem-on-os-x-10-6-snow-leopard/

but I did it and continue the same problem....

RE: redmine 1.4 osx10.6 cant generate production rake db:migrate - Added by Adrian Ortuzar over 12 years ago

I solved the problem installing a older version of mysql.
From mysql-5.5.23-osx10.6-x86_64 to mysql-5.0.96-osx10.6-x86_64.

I hope to have helped to make the installation easier.

RE: redmine 1.4 osx10.6 cant generate production rake db:migrate - Added by Romain LEGUAY over 12 years ago

Hello.

I had the same problem on Mac OS X Lion with mysql-5.5.23-osx10.6-x86_64. There is a bug on this mysql version they forgot to add to DYLD_LIBRARY_PATH mysql lib path.

You can add it to your .bashrc but it's not recommended.

I migrate the database like this:
DYLD_LIBRARY_PATH=/usr/local/mysql/lib RAILS_ENV=production rake db:migrate

    (1-3/3)