Project

General

Profile

Help with Ruby 2.0 + Redmine 2.30 + thin install

Added by Miso Nope over 11 years ago

I found out that Redmine 2.3.0 supports also Ruby 2.0, but I can't find any tutorial or experience of someone who already tried it.
Moreover I want to user Thin as Ruby web server and sqlite as database.

I followed these tutorials:
[[http://files.hz6.de/redmine/InstallingRedmine_EN.pdf]]
[[http://www.redmine.org/projects/redmine/wiki/RedmineInstall]]

Here are my steps (hope I didn't miss some):
  1. Firstly install needed libraries
    apt-get install gcc build-essential zlib1g zlib1g-dev zlibc
    libzlib-ruby libssl-dev libyaml-dev libcurl4-openssl-dev
    libsqlite3-dev libapr1-dev
    
  2. install latest Ruby by RVM
    curl -L https://get.rvm.io | bash -s stable --ruby
    
  3. install gems
    gem install rdoc
    gem install rails
    gem install sqlite3
    gem install thin --prev (I also tried version 1.5.1)
    
  4. get latest redmine and install bundler
    wget ...url to latest redmine...
    tar -zvxf ...extract to /opt/redmine
    
    gem install bundler
    apt-get install libmagick9-dev
    
  5. configure redmine
    cd /opt/redmine
    bundle install --without development test rmagick
    
    cp config/configuration.yml.example config/configuration.yml
    cp config/database.yml.example config/database.yml (uncomment part with sqlite database)
    
    rake generate_secret_token
    RAILS_ENV=production rake db:migrate
    RAILS_ENV=production rake redmine:load_default_data
    
    mkdir tmp tmp/pdf public/plugin_assets
    sudo chown -R redmine:redmine files log tmp public/plugin_assets
    sudo chmod -R 755 files log tmp public/plugin_assets
    
    thin config -C /etc/thin/redmine.yml -c /opt/redmine/ --servers 2 -e production -a 127.0.0.1 -p 3000
    

PROBLEMS:
When I run thin via:

thin start -c /etc/thin/redmine.yml

I get error:
/usr/local/lib/ruby/gems/2.0.0/gems/thin-2.0.0.pre/lib/thin/runner.rb:114:in `initialize': No such file or directory - start (Errno::ENOENT)
        from /usr/local/lib/ruby/gems/2.0.0/gems/thin-2.0.0.pre/lib/thin/runner.rb:114:in `open'
        from /usr/local/lib/ruby/gems/2.0.0/gems/thin-2.0.0.pre/lib/thin/runner.rb:114:in `run'
        from /usr/local/lib/ruby/gems/2.0.0/gems/thin-2.0.0.pre/lib/thin/runner.rb:147:in `run'
        from /usr/local/lib/ruby/gems/2.0.0/gems/thin-2.0.0.pre/bin/thin:6:in `<top (required)>'
        from /usr/local/bin/thin:23:in `load'
        from /usr/local/bin/thin:23:in `<main>'

When I run thin via:

ruby script/rails server thin -e production

I get error:
/usr/local/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/handler/thin.rb:1:in `require': cannot load such file -- thin (LoadError)
        from /usr/local/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/handler/thin.rb:1:in `<top (required)>'
        from /usr/local/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/handler.rb:20:in `const_get'
        from /usr/local/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/handler.rb:20:in `block in get'
        from /usr/local/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/handler.rb:20:in `each'
        from /usr/local/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/handler.rb:20:in `inject'
        from /usr/local/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/handler.rb:20:in `get'
        from /usr/local/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/server.rb:272:in `server'
        from /usr/local/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/commands/server.rb:59:in `start'
        from /usr/local/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/commands.rb:55:in `block in <top (required)>'
        from /usr/local/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
        from /usr/local/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/commands.rb:50:in `<top (required)>'
        from script/rails:6:in `require'
        from script/rails:6:in `<main>'

I am newbie in installing ruby+redmine, so I really don't know solutions for these errors.
Can someone help me to solve this?
Or where can I found some step-by-step tutorial for latest ruby and redmine?
Thank you.


Replies (5)

RE: Help with Ruby 2.0 + Redmine 2.30 + thin install - Added by Etienne Massip over 11 years ago

Try to run basic WebRick server (bundled with rails) first?

RE: Help with Ruby 2.0 + Redmine 2.30 + thin install - Added by Miso Nope over 11 years ago

In redmine directory I have run:

ruby script/rails server webrick -e production -b 127.0.0.1 -p 3000

Result:
Webrick started without problems, but I get 502 Bad Gateway in browser. (I didn't change anything on my nginx proxy_pass to 127.0.0.1:3000 which worked on thin server)

I will look at it again later (don't have much time now) and try to figure out this problem.

RE: Help with Ruby 2.0 + Redmine 2.30 + thin install - Added by Miso Nope over 11 years ago

I finally solved this problem. I just needed to run web server under www-data user and now both servers work.

 sudo -u www-data ruby script/rails server webrick -e production -b 127.0.0.1 -p 3000

 sudo -u www-data ruby script/rails server thin -e production -b 127.0.0.1 -p 3000

But still if I run thin by command "sudo -u www-data thin start -c config_path", I get runner.rb error. Is there any difference to run thin server by thin command?

RE: Help with Ruby 2.0 + Redmine 2.30 + thin install - Added by imrej cuatrocientoycuatro over 11 years ago

I do not know if you found out why it doesn't start, i had the same error, when i looked inside redmine logs, it appears that the version of rack wasn't supported. I uninstall it and install 1.4.5, and it began to work correctly.

RE: Help with Ruby 2.0 + Redmine 2.30 + thin install - Added by Damian Dennis over 11 years ago

The reason is you need to use a capital C
"thin start -C config_path"

    (1-5/5)