Project

General

Profile

[SOLVED] I am unable to install Redmine 2 on Debian

Added by alaca kala over 11 years ago

Hi

I have been trying to install redmine2 on Debian for last 2 days and I just wasted 2 days I realize. Here is a trace for rake db:migrate

Please bear in mind that running "gem install activerecord-mysql2-adapter" does not solve the issue. I also set mysql2 as the adapter in the database.

I am using the git version.

I really do not know much about ruby development, I just want to use Redmine. I was able to install and use previous version on redmine just fine on my Debian server.

I got rid of the official Ruby versions and installed Ruby via Rvm. The reason I moved to rvm was that I was not able to install redmine2 on this server so I thought that getting rid of dated Debian packages might have helped but it did not help me what so ever.

Anyway thanks for looking into it.

Debian “squeeze”
Server version: Apache/2.2.16 (Debian)
mysql Ver 14.14 Distrib 5.1.63, for debian-linux-gnu (i486) using readline 6.1
gem 1.8.24
rubinius 2.0.0dev (1.8.7 24adadfa yyyy-mm-dd JI) [i686-pc-linux-gnu]

  • Invoke db:migrate (first_time)
  • Invoke environment (first_time)
  • Execute environment
    rake aborted!
    Please install the mysql2 adapter: `gem install activerecord-mysql2-adapter` (mysql2 is not part of the bundle. Add it to Gemfile.)
    /usr/local/rvm/gems/rbx-head@global/gems/bundler-1.2.1/lib/bundler/rubygems_integration.rb:147:in `replace_gem'
    /usr/local/rvm/gems/rbx-head/gems/activerecord-3.2.8/lib/active_record/connection_adapters/mysql2_adapter.rb:3:in `__script__'
    kernel/common/codeloader.rb:212:in `require'
    kernel/common/kernel.rb:631:in `require'
    /usr/local/rvm/gems/rbx-head/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
    /usr/local/rvm/gems/rbx-head/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in `load_dependency'
    /usr/local/rvm/gems/rbx-head/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
    /usr/local/rvm/gems/rbx-head/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_specification.rb:50:in `resolve_hash_connection'
    /usr/local/rvm/gems/rbx-head/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_specification.rb:41:in `resolve_string_connection'
    /usr/local/rvm/gems/rbx-head/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_specification.rb:25:in `spec'
    /usr/local/rvm/gems/rbx-head/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_specification.rb:129:in `establish_connection'
    /usr/local/rvm/gems/rbx-head/gems/activerecord-3.2.8/lib/active_record/railtie.rb:82:in `Railtie'
    kernel/common/eval18.rb:45:in `instance_eval'
    /usr/local/rvm/gems/rbx-head/gems/activesupport-3.2.8/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
    /usr/local/rvm/gems/rbx-head/gems/activesupport-3.2.8/lib/active_support/lazy_load_hooks.rb:43:in `run_load_hooks'
    kernel/bootstrap/array.rb:68:in `each'
    /usr/local/rvm/gems/rbx-head/gems/activesupport-3.2.8/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
    /usr/local/rvm/gems/rbx-head/gems/activerecord-3.2.8/lib/active_record/base.rb:721:in `__script__'
    kernel/common/codeloader.rb:212:in `require'
    kernel/common/autoload.rb:46:in `resolve'
    /var/www/redmine2/lib/plugins/acts_as_activity_provider/init.rb:2:in `__block__'
    kernel/common/block_environment.rb:75:in `call_on_instance'
    kernel/common/eval.rb:75:in `eval'
    /var/www/redmine2/config/initializers/00-core_plugins.rb:12:in `__script__'
    kernel/bootstrap/array.rb:68:in `each'
    /var/www/redmine2/config/initializers/00-core_plugins.rb:2:in `__script__'
    kernel/common/kernel.rb:580:in `load'
    /usr/local/rvm/gems/rbx-head/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:245:in `load'
    /usr/local/rvm/gems/rbx-head/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in `load_dependency'
    /usr/local/rvm/gems/rbx-head/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:245:in `load'
    /usr/local/rvm/gems/rbx-head/gems/railties-3.2.8/lib/rails/engine.rb:588:in `Engine'
    kernel/bootstrap/array.rb:68:in `each'
    /usr/local/rvm/gems/rbx-head/gems/railties-3.2.8/lib/rails/engine.rb:587:in `Engine'
    kernel/common/eval18.rb:106:in `instance_exec'
    /usr/local/rvm/gems/rbx-head/gems/railties-3.2.8/lib/rails/initializable.rb:30:in `run'
    /usr/local/rvm/gems/rbx-head/gems/railties-3.2.8/lib/rails/initializable.rb:55:in `run_initializers'
    kernel/bootstrap/array.rb:68:in `each'
    /usr/local/rvm/gems/rbx-head/gems/railties-3.2.8/lib/rails/initializable.rb:54:in `run_initializers'
    /usr/local/rvm/gems/rbx-head/gems/railties-3.2.8/lib/rails/application.rb:136:in `initialize!'
    /usr/local/rvm/gems/rbx-head/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in `initialize! (method_missing)'
    /var/www/redmine2/config/environment.rb:14:in `__script__'
    kernel/common/codeloader.rb:212:in `require'
    kernel/common/kernel.rb:631:in `require'
    /usr/local/rvm/gems/rbx-head/gems/railties-3.2.8/lib/rails/application.rb:103:in `require_environment!'
    /usr/local/rvm/gems/rbx-head/gems/railties-3.2.8/lib/rails/application.rb:295:in `initialize_tasks'
    /usr/local/rvm/gems/rbx-head@global/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `execute'
    kernel/bootstrap/array.rb:68:in `each'
    /usr/local/rvm/gems/rbx-head@global/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
    /usr/local/rvm/gems/rbx-head@global/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `invoke_with_call_chain'
    /usr/local/rvm/rubies/rbx-head/lib/18/monitor.rb:191:in `synchronize (mon_synchronize)'
    /usr/local/rvm/gems/rbx-head@global/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
    /usr/local/rvm/gems/rbx-head@global/gems/rake-0.9.2.2/lib/rake/task.rb:176:in `invoke_prerequisites'
    kernel/bootstrap/array.rb:68:in `each'
    /usr/local/rvm/gems/rbx-head@global/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `invoke_prerequisites'
    /usr/local/rvm/gems/rbx-head@global/gems/rake-0.9.2.2/lib/rake/task.rb:157:in `invoke_with_call_chain'
    /usr/local/rvm/rubies/rbx-head/lib/18/monitor.rb:191:in `synchronize (mon_synchronize)'
    /usr/local/rvm/gems/rbx-head@global/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
    /usr/local/rvm/gems/rbx-head@global/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
    /usr/local/rvm/gems/rbx-head@global/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
    /usr/local/rvm/gems/rbx-head@global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `top_level'
    kernel/bootstrap/array.rb:68:in `each'
    /usr/local/rvm/gems/rbx-head@global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `top_level'
    /usr/local/rvm/gems/rbx-head@global/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
    /usr/local/rvm/gems/rbx-head@global/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
    /usr/local/rvm/gems/rbx-head@global/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `run'
    /usr/local/rvm/gems/rbx-head@global/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
    /usr/local/rvm/gems/rbx-head@global/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
    /usr/local/rvm/gems/rbx-head@global/gems/rake-0.9.2.2/bin/rake:33:in `__script__'
    kernel/common/kernel.rb:580:in `load'
    /usr/local/rvm/gems/rbx-head@global/bin/rake:19:in `__script__'
    kernel/common/block_environment.rb:75:in `call_on_instance'
    kernel/common/eval.rb:75:in `eval'
    /usr/local/rvm/gems/rbx-head/bin/ruby_noexec_wrapper:14:in `__script__'
    kernel/delta/codeloader.rb:68:in `load_script'
    kernel/delta/codeloader.rb:110:in `load_script'
    kernel/loader.rb:613:in `script'
    kernel/loader.rb:816:in `main'
    Tasks: TOP => db:migrate => environment

Replies (20)

RE: I am unable to install Redmine 2 on Debian - Added by alaca kala over 11 years ago

Hi

"bundle show "


Gems included by the bundle:
  * actionmailer (3.2.8)
  * actionpack (3.2.8)
  * activemodel (3.2.8)
  * activerecord (3.2.8)
  * activeresource (3.2.8)
  * activesupport (3.2.8)
  * arel (3.0.2)
  * builder (3.0.0)
  * bundler (1.2.1)
  * coderay (1.0.7)
  * erubis (2.7.0)
  * hike (1.2.1)
  * i18n (0.6.1)
  * journey (1.0.4)
  * jquery-rails (2.0.3)
  * json (1.7.5)
  * mail (2.4.4)
  * metaclass (0.0.1)
  * mime-types (1.19)
  * mocha (0.12.3)
  * multi_json (1.3.6)
  * net-ldap (0.3.1)
  * polyglot (0.3.3)
  * rack (1.4.1)
  * rack-cache (1.2)
  * rack-openid (1.3.1)
  * rack-ssl (1.3.2)
  * rack-test (0.6.2)
  * rails (3.2.8)
  * railties (3.2.8)
  * rake (0.9.2.2)
  * rdoc (3.12)
  * ruby-openid (2.1.8)
  * shoulda (2.11.3)
  * sprockets (2.1.3)
  * thor (0.16.0)
  * tilt (1.3.3)
  * treetop (1.4.10)
  * tzinfo (0.3.33)
  * yard (0.8.2.1)

RE: I am unable to install Redmine 2 on Debian - Added by Etienne Massip over 11 years ago

There is no mysql2 gem included indeed, how did you run your bundle install?

RE: I am unable to install Redmine 2 on Debian - Added by Etienne Massip over 11 years ago

Ok, my bad, you're running on Rubinius.

Redmine does not suppport Rubinius althouth tests tends to prove that it could work well with it.

Just create a Gemfile.local file containing a single "gem mysql2" line aside your Gemfile. Then bundle update.

RE: I am unable to install Redmine 2 on Debian - Added by Etienne Massip over 11 years ago

Etienne Massip wrote:

Redmine does not suppport Rubinius althouth tests tends to prove that it could work well with it.

I just want to temper my words : no tests have been run on Rubinius, I mixed up with REE.

RE: I am unable to install Redmine 2 on Debian - Added by alaca kala over 11 years ago

Etienne Massip wrote:

Ok, my bad, you're running on Rubinius.

Redmine does not suppport Rubinius althouth tests tends to prove that it could work well with it.

Just create a Gemfile.local file containing a single "gem mysql2" line aside your Gemfile. Then bundle update.

Etienne, thanks for your help. I was getting the same errors even before I moved to rvm(when I was using the default Debian Ruby packages)

This is what I am getting with your suggestion

bundle update
You cannot specify the same gem twice with different version requirements. You specified: mysql2 (~> 0.3.11) and mysql2 (>= 0)

I am not sure if you have seen this in my first post but the log claims that mysql2 is not part of the bundle
"Please install the mysql2 adapter: `gem install activerecord-mysql2-adapter` (mysql2 is not part of the bundle. Add it to Gemfile.)"

And I ran this "gem install activerecord-mysql2-adapter" command hopelessly many times. It does nothing. Something is broken somewhere.

RE: I am unable to install Redmine 2 on Debian - Added by Etienne Massip over 11 years ago

Right, you have to specify the platform in your Gemfile.local:

platforms :rbx do
  gem 'mysql'
end

RE: I am unable to install Redmine 2 on Debian - Added by alaca kala over 11 years ago

thanks

I had to change mysql2 to mysql in the database.yaml to make your suggestion work. Although the redmine2 documentation suggested mysql2 as the adapter.

the current error is

"rake aborted!
no such file to load -- fastercsv
"

then I ran
"
gem install fastercsv
Fetching: fastercsv-1.5.5.gem (100%)
Successfully installed fastercsv-1.5.5
1 gem installed
Installing ri documentation for fastercsv-1.5.5...
Building YARD (yri) index for fastercsv-1.5.5...
Installing RDoc documentation for fastercsv-1.5.5...
"

It gave the same error

"rake aborted!
no such file to load -- fastercsv"

RE: I am unable to install Redmine 2 on Debian - Added by Etienne Massip over 11 years ago

Damn it, I missed the '2' in my example. Sorry:

platforms :rbx do
  gem 'mysql2'
  gem 'fastercsv'
end

RE: I am unable to install Redmine 2 on Debian - Added by alaca kala over 11 years ago

Thanks man. I was able to install it!

Now I am having another issue :)

I successfully migrate my database from Redmine 1x and everything seems to work except when I press on the settings tab of any project, which gives me internal 500 error. For a test I am running it with webrick and here is the last portion of the websick log when I press on a tab

Processing by ProjectsController#settings as HTML
  Parameters: {"id"=>"canlandirmaarastirma"}
  Current user: admin (id=1)
  Rendered projects/_form.html.erb (135.7ms)
  Rendered projects/_edit.html.erb (292.0ms)
  Rendered projects/settings/_modules.html.erb (12.9ms)
  Rendered projects/settings/_members.html.erb (76.2ms)
  Rendered common/_tabs.html.erb (440.9ms)
  Rendered projects/settings.html.erb within layouts/base (459.1ms)
Completed 500 Internal Server Error in 723ms

ActionView::Template::Error (The single-table inheritance mechanism failed to locate the subclass: 'EmailWatcherUser'. This error is raised because the column 'type' is reserved for storing the class in case of inheritance. Please rename this column if you didn't intend it to be used for storing the inheritance class or overwrite Principal.inheritance_column to use another column for that information.):
    51: <% end %>
    52: </div>
    53:
    54: <% principals = Principal.active.not_member_of(@project).all(:limit => 100, :order => 'type, login, lastname ASC') %>
    55:
    56: <div class="splitcontentright">
    57: <% if roles.any? && principals.any? %>
  app/views/projects/settings/_members.html.erb:54:in `_app_views_projects_settings__members_html_erb__972131320_317916'
  app/views/common/_tabs.html.erb:24:in `_app_views_common__tabs_html_erb__902267104_315240'
  app/views/common/_tabs.html.erb:23:in `_app_views_common__tabs_html_erb__902267104_315240'
  app/helpers/application_helper.rb:259:in `render_tabs'
  app/views/projects/settings.html.erb:3:in `_app_views_projects_settings_html_erb__844433804_315180'

RE: I am unable to install Redmine 2 on Debian - Added by Etienne Massip over 11 years ago

This looks like a plugin issue since there is no such EmailWatcherUser in core AFAICR...

RE: I am unable to install Redmine 2 on Debian - Added by alaca kala over 11 years ago

Ok thanks I will take it over from this point on then.

I appreciate your help

RE: [SOLVED] I am unable to install Redmine 2 on Debian - Added by Etienne Massip over 11 years ago

FWIW I ran a ci test with Rubinius and there seems to be some issues with handling charset encodings, see http://travis-ci.org/#!/emassip/redmine/jobs/2583592.

RE: [SOLVED] I am unable to install Redmine 2 on Debian - Added by eyal R over 11 years ago

Hi,
I have the same problem:

ActionView::Template::Error (The single-table inheritance mechanism failed to locate the subclass: 'EmailWatcherUser'. This error is raised because the column 'type' is reserved for storing the class in case of inheritance. Please rename this column if you didn't intend it to be used for storing the inheritance class or overwrite Principal.inheritance_column to use another column for that information.):
    51: <% end %>
    52: </div>
    53:
    54: <% principals = Principal.active.not_member_of(@project).all(:limit => 100, :order => 'type, login, lastname ASC') %>
    55:
    56: <div class="splitcontentright">
    57: <% if roles.any? && principals.any? %>
  app/views/projects/settings/_members.html.erb:54:in `_app_views_projects_settings__members_html_erb__972131320_317916'

Did you manage to find a fix?

Thanks

RE: [SOLVED] I am unable to install Redmine 2 on Debian - Added by Chris Lockwood over 11 years ago

eyal R wrote:

Hi,
I have the same problem:

[...]

Did you manage to find a fix?

Thanks

Frustratingly I'm also experiencing this issue, was a solution ever found?

Cheers

RE: [SOLVED] I am unable to install Redmine 2 on Debian - Added by eyal R over 11 years ago

Found the solution.

Probably a plugin inserted a record to the the "users" table in the DB that caused redmine to crash.
Look for a record in the "users" table where its "Type" column has a value of "EmailWatcherUser"

RE: [SOLVED] I am unable to install Redmine 2 on Debian - Added by Chris Lockwood over 11 years ago

eyal R wrote:

Found the solution.

Probably a plugin inserted a record to the the "users" table in the DB that caused redmine to crash.
Look for a record in the "users" table where its "Type" column has a value of "EmailWatcherUser"

You sir, are quite clearly a super star! My thanks.

RE: [SOLVED] I am unable to install Redmine 2 on Debian - Added by Etienne Massip over 11 years ago

You should migrate down plugins before removing them from the plugins directory when uninstalling as explained in Plugins#Uninstalling-a-plugin.

RE: [SOLVED] I am unable to install Redmine 2 on Debian - Added by Chris Lockwood over 11 years ago

Etienne Massip wrote:

You should migrate down plugins before removing them from the plugins directory when uninstalling as explained in Plugins#Uninstalling-a-plugin.

Fair point, although technically this was a Redmine upgrade and from what I can see the Installation Guide makes no reference to de-installing (and migrating) incompatible plugins before backing up the legacy db.

RE: [SOLVED] I am unable to install Redmine 2 on Debian - Added by Etienne Massip over 11 years ago

Chris Lockwood wrote:

Etienne Massip wrote:

You should migrate down plugins before removing them from the plugins directory when uninstalling as explained in Plugins#Uninstalling-a-plugin.

Fair point, although technically this was a Redmine upgrade and from what I can see the Installation Guide makes no reference to de-installing (and migrating) incompatible plugins before backing up the legacy db.

Beware, migrating them down could simply remove all of these plugins data, so you might not want to do that.

    (1-20/20)