Project

General

Profile

Problem installing Redmine 2.2

Added by Todd A over 11 years ago

I've been trying to Install Redmine on a brand new Ubuntu 12.04 server. I've been using this guide http://grandslam90.wordpress.com/2012/05/22/howto-redmine-2-0-0-passenger-subversion-repositories-in-ubuntu-12-04/ (found in the install docs on the Redmine site).

My problem is that I'm stuck at the step

sudo rake generate_secret_token

The error I get is

root@poweredge2650:/usr/share/redmine# rake generate_secret_token
rake aborted!
cannot load such file -- iconv
/usr/share/redmine/lib/tasks/migrate_from_mantis.rake:21:in `require'
/usr/share/redmine/lib/tasks/migrate_from_mantis.rake:21:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.12/lib/rails/engine.rb:425:in `load'
/usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.12/lib/rails/engine.rb:425:in `block in load_tasks'
/usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.12/lib/rails/engine.rb:425:in `each'
/usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.12/lib/rails/engine.rb:425:in `load_tasks'
/usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.12/lib/rails/application.rb:145:in `load_tasks'
/usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.12/lib/rails/railtie/configurable.rb:30:in `method_missing'
/usr/share/redmine/Rakefile:7:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.0.0-p0/bin/ruby_noexec_wrapper:14:in `eval'
/usr/local/rvm/gems/ruby-2.0.0-p0/bin/ruby_noexec_wrapper:14:in `<main>'
(See full trace by running task with --trace)

I looked through the comments and tried a few things like changing the Gemfile to read

gem “mysql2″, “~> 0.3.11″

and such but none of those fixes have worked.

Has anyone run into an issue like this or might know what I can do to fix my stopping point?

At one point running $ RAILS_ENV=development script/about was working better, but now running it throws all kinds of errors so I might have done more damage than good.

root@poweredge2650:/usr/share/redmine# RAILS_ENV=development script/about
/usr/local/rvm/gems/ruby-2.0.0-p0/gems/bundler-1.3.0/lib/bundler/rubygems_integration.rb:205:in `block in replace_gem': Please install the mysql adapter: `gem install activerecord-mysql-adapter` (mysql is not part of the bundle. Add it to Gemfile.) (LoadError)
        from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.12/lib/active_record/connection_adapters/mysql_adapter.rb:5:in `<top (required)>'
        from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require'
        from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `block in require'
        from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:236:in `load_dependency'
        from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require'
        from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_specification.rb:50:in `resolve_hash_connection'
        from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_specification.rb:41:in `resolve_string_connection'
        from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_specification.rb:25:in `spec'
        from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_specification.rb:130:in `establish_connection'
        from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.12/lib/active_record/railtie.rb:82:in `block (2 levels) in <class:Railtie>'
        from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.12/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
        from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.12/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
        from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.12/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
        from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.12/lib/active_support/lazy_load_hooks.rb:42:in `each'
        from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.12/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
        from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activerecord-3.2.12/lib/active_record/base.rb:720:in `<top (required)>'
        from /usr/share/redmine/lib/plugins/acts_as_activity_provider/init.rb:2:in `block in <top (required)>'
        from /usr/share/redmine/config/initializers/00-core_plugins.rb:12:in `eval'
        from /usr/share/redmine/config/initializers/00-core_plugins.rb:12:in `block in <top (required)>'
        from /usr/share/redmine/config/initializers/00-core_plugins.rb:2:in `each'
        from /usr/share/redmine/config/initializers/00-core_plugins.rb:2:in `<top (required)>'
        from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:245:in `load'
        from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:245:in `block in load'
        from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:236:in `load_dependency'
        from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:245:in `load'
        from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.12/lib/rails/engine.rb:588:in `block (2 levels) in <class:Engine>'
        from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.12/lib/rails/engine.rb:587:in `each'
        from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.12/lib/rails/engine.rb:587:in `block in <class:Engine>'
        from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.12/lib/rails/initializable.rb:30:in `instance_exec'
        from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.12/lib/rails/initializable.rb:30:in `run'
        from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.12/lib/rails/initializable.rb:55:in `block in run_initializers'
        from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.12/lib/rails/initializable.rb:54:in `each'
        from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.12/lib/rails/initializable.rb:54:in `run_initializers'
        from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.12/lib/rails/application.rb:136:in `initialize!'
        from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.12/lib/rails/railtie/configurable.rb:30:in `method_missing'
        from /usr/share/redmine/config/environment.rb:14:in `<top (required)>'
        from /usr/local/rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
        from /usr/local/rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
        from script/about:4:in `<main>'

Replies (4)

RE: Problem installing Redmine 2.2 - Added by Jan Niggemann (redmine.org team member) over 11 years ago

You seem to use RVM, they have a page dedicated to that issue: https://rvm.io/packages/iconv/

RE: Problem installing Redmine 2.2 - Added by Mischa The Evil over 11 years ago

Todd A wrote:

I've been trying to Install Redmine on a brand new Ubuntu 12.04 server. I've been using this guide http://grandslam90.wordpress.com/2012/05/22/howto-redmine-2-0-0-passenger-subversion-repositories-in-ubuntu-12-04/ (found in the install docs on the Redmine site).

[...]

Has anyone run into an issue like this or might know what I can do to fix my stopping point?

It seems you have diverted from that third-party howto. Looking at your stack trace you are using, not-yet-supported (#13329), bleeding-edge ruby 2.0.0-p0 as interpreter. That is not what the howto tells you to do, since:

Unknown author ("grandslam90" maybe?) wrote:

sudo apt-get install ruby1.9.3 libmysqlclient-dev

So, I suggest to start with using a supported ruby version, where 1.9.3 is most likely the most common. See for more detailed compatibility info RedmineInstall.
Maybe the fact that the howto is targeted at installing Redmine 2.0.0, is confusing is this context too?

Jan Niggemann wrote:

You seem to use RVM, they have a page dedicated to that issue: https://rvm.io/packages/iconv/

That seems to be a good resource if the problem persists after downgrading to a supported ruby version at first.

RE: Problem installing Redmine 2.2 - Added by Todd A over 11 years ago

Thanks to you two for your replies. I don't think I specified a version of ruby when installing so it sounds like I should have. I'll look up how to downgrade to 1.9.3 as well as the RVM source. Hopefully those two solutions will get the issue solved.

Thanks again.

RE: Problem installing Redmine 2.2 - Added by Todd A over 11 years ago

Just wanted to chime in and again say Thanks to you two for your replies. I did need both solutions to get my problem resolved but we are up and running now.

    (1-4/4)