Redmine + Thin-Error

Added by Kaimei Kaimei about 9 years ago

I wanted to use redmine with thin and nginx. On apache with passanger it works without any problem. But when want to start thin i get these error.

Writing PID to /var/run/thin/redmine.0.pid
Changing process privilege to www-data:www-data
Using rails adapter

Missing the Rails 2.3.5 gem. Please `gem install -v=2.3.5 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.

Exiting!

  • LOCAL GEMS ***

abstract (1.0.0)
actionmailer (3.0.1, 3.0.0, 2.3.5)
actionpack (3.0.1, 3.0.0, 2.3.5)
activemodel (3.0.1)
activerecord (3.0.1, 3.0.0, 2.3.5)
activeresource (3.0.1, 3.0.0, 2.3.8, 2.3.5)
activesupport (3.0.1, 3.0.0, 2.3.8, 2.3.5)
arel (2.0.2, 1.0.1)
bluefeather (0.33)
builder (2.1.2)
bundler (1.0.5, 1.0.3)
daemons (1.1.0)
erubis (2.6.6)
eventmachine (0.12.10)
fastthread (1.0.7)
i18n (0.4.2, 0.4.1, 0.3.7)
inifile (0.3.0)
lockfile (1.4.3)
mail (2.2.9, 2.2.6.1)
mime-types (1.16)
mini_magick (3.1, 2.1)
net-ssh (2.0.23)
polyglot (0.3.1)
rack (1.2.1, 1.0.1)
rack-mount (0.6.13)
rack-test (0.5.6, 0.5.5)
rails (2.3.5)
railties (3.0.1)
rake (0.8.7)
ruby-openid (2.1.8)
rubygems-update (1.3.7)
subexec (0.0.4)
thin (1.2.7)
thor (0.14.4)
treetop (1.4.8)
tzinfo (0.3.23)

Earlier it works on thin and nginx untill i addet some plugins and have installed inifile (0.3.0) bluefeather (0.33) and lockfile (1.4.3).

Thanks,
Kaimei

Replies (13)

RE: Redmine + Thin-Error - Added by Deoren Moor about 9 years ago

What do you have in your config/environment.rb file?

RE: Redmine + Thin-Error - Added by Kaimei Kaimei about 9 years ago

@# Be sure to restart your web server when you modify this file.

  1. Uncomment below to force Rails into production mode when
  2. you don't control web/app server and can't set it the proper way
  3. ENV['RAILS_ENV'] ||= 'production'
  1. Specifies gem version of Rails to use when vendor/rails is not present
    RAILS_GEM_VERSION = '2.3.5' #unless defined? RAILS_GEM_VERSION
  1. Bootstrap the Rails environment, frameworks, and default configuration
    require File.join(File.dirname(FILE), 'boot')
  1. Load Engine plugin if available
    begin
    require File.join(File.dirname(FILE), '../vendor/plugins/engines/boot')
    rescue LoadError # Not available
    end

Rails::Initializer.run do |config| # Settings in config/environments/* take precedence those specified here

  1. Skip frameworks you're not going to use
  2. config.frameworks -= [ :action_web_service, :action_mailer ]
  1. Add additional load paths for sweepers
    config.load_paths += %W( #{RAILS_ROOT}/app/sweepers )
  1. Force all environments to use the same logger level
  2. (by default production uses :info, the others :debug)
  3. config.log_level = :debug
  1. Enable page/fragment caching by setting a file-based store
  2. (remember to create the caching directory and make it readable to the application)
  3. config.action_controller.cache_store = :file_store, "#{RAILS_ROOT}/tmp/cache"
  1. Activate observers that should always be running
  2. config.active_record.observers = :cacher, :garbage_collector
    config.active_record.observers = :message_observer, :issue_observer, :journal_observer, :news_observer, :document_observer, :wiki_content_observer
  1. Make Active Record use UTC-base instead of local time
  2. config.active_record.default_timezone = :utc
  1. Use Active Record's schema dumper instead of SQL when creating the test database
  2. (enables use of different database adapters for development and test environments)
  3. config.active_record.schema_format = :ruby
  1. Deliveries are disabled by default. Do NOT modify this section.
  2. Define your email configuration in email.yml instead.
  3. It will automatically turn deliveries on
    config.action_mailer.perform_deliveries = false
config.gem 'rubytree', :lib => 'tree'
  1. Load any local configuration that is kept out of source control
  2. (e.g. gems, patches).
    if File.exists?(File.join(File.dirname(FILE), 'additional_environment.rb'))
    instance_eval File.read(File.join(File.dirname(FILE), 'additional_environment.rb'))
    end
    end

@

RE: Redmine + Thin-Error - Added by Deoren Moor about 9 years ago

Run this from your redmine installation directory:

RAILS_ENV=production script/about

Oh, please wrap the output in pre tags so Redmine won't parse it.

RE: Redmine + Thin-Error - Added by Kaimei Kaimei about 9 years ago

 RAILS_ENV=production script/about
/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010.  Use #requirement
About your application's environment
Ruby version              1.8.7 (x86_64-linux)
RubyGems version          1.3.7
Rack version              1.0
Rails version             2.3.5
Active Record version     2.3.5
Active Resource version   2.3.5
Action Mailer version     2.3.5
Active Support version    2.3.5
Application root          /var/customers/webs/web4/vhost/kaimei-projects.ath.cx/redmine
Environment               production
Database adapter          mysql
Database schema version   20100819172912

About your Redmine plugins
Redmine Hide Emails By Default plugin   0.0.1
Redmine ezSidebar plugin                0.1.1
Stuff To Do Plugin                      0.4.0
Markdown Extra formatter                0.0.6
Redmine Blogs plugin                    0.0.3
Redmine Code Review plugin              0.3.0
Redmine My Widgets plugin               0.1.0
Redmine Gitosis plugin                  0.0.5
Redmine Checkout plugin                 0.3

RE: Redmine + Thin-Error - Added by Deoren Moor about 9 years ago

I'm not a guru, sort of learning myself actually, but I don't see anything obvious yet. What about the contents of your thin config file?

RE: Redmine + Thin-Error - Added by Kaimei Kaimei about 9 years ago

This is the thin config file but I don't think, there is the problem because with this config file it worked previously.

--- 
pid: /var/run/thin/redmine.pid
group: www-data
wait: 30
timeout: 30
log: log/thin.log
max_conns: 1024
require: []

environment: production
max_persistent_conns: 512
servers: 4
daemonize: true
user: www-data
socket: /var/run/thin/redmine.sock
chdir: /var/customers/webs/web4/vhost/kaimei-projects.ath.cx/redmine 

RE: Redmine + Thin-Error - Added by Deoren Moor about 9 years ago

Last idea:

Uncomment ENV['RAILS_ENV'] ||= 'production' within config/environment.rb and restart nginx/thin. I'll look back over everything later, but hopefully someone else spots the issue before then.

RE: Redmine + Thin-Error - Added by Kaimei Kaimei about 9 years ago

Same result.

Here is the config/environment.rb in pre tags

# Be sure to restart your web server when you modify this file.

# Uncomment below to force Rails into production mode when 
# you don't control web/app server and can't set it the proper way
# ENV['RAILS_ENV'] ||= 'production'

# Specifies gem version of Rails to use when vendor/rails is not present
RAILS_GEM_VERSION = '2.3.5' #unless defined? RAILS_GEM_VERSION

# Bootstrap the Rails environment, frameworks, and default configuration
require File.join(File.dirname(__FILE__), 'boot')

# Load Engine plugin if available
begin
  require File.join(File.dirname(__FILE__), '../vendor/plugins/engines/boot')
rescue LoadError
  # Not available
end

Rails::Initializer.run do |config|
  # Settings in config/environments/* take precedence those specified here

  # Skip frameworks you're not going to use
  # config.frameworks -= [ :action_web_service, :action_mailer ]

  # Add additional load paths for sweepers
  config.load_paths += %W( #{RAILS_ROOT}/app/sweepers )

  # Force all environments to use the same logger level 
  # (by default production uses :info, the others :debug)
  # config.log_level = :debug

  # Enable page/fragment caching by setting a file-based store
  # (remember to create the caching directory and make it readable to the application)
  # config.action_controller.cache_store = :file_store, "#{RAILS_ROOT}/tmp/cache" 

  # Activate observers that should always be running
  # config.active_record.observers = :cacher, :garbage_collector
  config.active_record.observers = :message_observer, :issue_observer, :journal_observer, :news_observer, :document_observer, :wiki_content_observer

  # Make Active Record use UTC-base instead of local time
  # config.active_record.default_timezone = :utc

  # Use Active Record's schema dumper instead of SQL when creating the test database
  # (enables use of different database adapters for development and test environments)
  # config.active_record.schema_format = :ruby

  # Deliveries are disabled by default. Do NOT modify this section.
  # Define your email configuration in email.yml instead.
  # It will automatically turn deliveries on
  config.action_mailer.perform_deliveries = false

  config.gem 'rubytree', :lib => 'tree'

  # Load any local configuration that is kept out of source control
  # (e.g. gems, patches).
  if File.exists?(File.join(File.dirname(__FILE__), 'additional_environment.rb'))
    instance_eval File.read(File.join(File.dirname(__FILE__), 'additional_environment.rb'))
  end
end

RE: Redmine + Thin-Error - Added by Deoren Moor about 9 years ago

I'm guessing that's the contents before uncommenting the line?

Do you have more than one copy of Ruby installed?

Here's a quick way to check:

for i in `find / | grep bin/gem | grep -v gemto`; do echo && echo -n $i && $i list --local; done

It's kind of an ugly one-liner, but it should show if you have more than one copy of Ruby installed. I do because I am trying out Ruby Enterprise Edition (
/usr/local/bin/gem ). Here is my output:

/usr/bin/gem1.8
  • LOCAL GEMS ***

actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (2.3.5)
daemon_controller (0.2.5)
fastthread (1.0.7)
file-tail (1.0.5)
mysql (2.8.1)
passenger (3.0.0)
rack (1.0.1)
rails (2.3.5)
rake (0.8.7)
rmagick (2.13.1)
spruz (0.2.2)

/usr/bin/gem
  • LOCAL GEMS ***

actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (2.3.5)
daemon_controller (0.2.5)
fastthread (1.0.7)
file-tail (1.0.5)
mysql (2.8.1)
passenger (3.0.0)
rack (1.0.1)
rails (2.3.5)
rake (0.8.7)
rmagick (2.13.1)
spruz (0.2.2)

/usr/local/bin/gem
  • LOCAL GEMS ***

actionmailer (2.3.8, 2.3.5)
actionpack (2.3.8, 2.3.5)
activerecord (2.3.8, 2.3.5)
activeresource (2.3.8, 2.3.5)
activesupport (2.3.8, 2.3.5)
daemon_controller (0.2.5)
fastthread (1.0.7)
file-tail (1.0.5)
mysql (2.8.1)
passenger (3.0.0)
pg (0.9.0)
rack (1.1.0, 1.0.1)
rails (2.3.8, 2.3.5)
rake (0.8.7)
rmagick (2.13.1)
spruz (0.2.2)
sqlite3-ruby (1.3.0)

RE: Redmine + Thin-Error - Added by Deoren Moor about 9 years ago

Rats. Forgot to wrap that last bit in pre tags. Oh well.

If that doesn't help, I looked around and found this:
http://www.ruby-forum.com/topic/201603

Sounds like having two versions of rack might be the culprit. Perhaps trying removing 1.2.1 (leaving just 1.0.1) and try again.

RE: Redmine + Thin-Error - Added by Deoren Moor about 9 years ago

This seems to also back it up.

RE: Redmine + Thin-Error - Added by Kaimei Kaimei about 9 years ago

Thank you.

I uinstalled rack 1.2.1 an now thin is starting without any problems.

Thank you.

RE: Redmine + Thin-Error - Added by Deoren Moor about 9 years ago

You're welcome, glad it helped!

(1-13/13)