Hi, I posted this already in the Redmine forum but I get no answer there since yesterday, so therefore I am trying here now hoping that someone gets me a hint.
Searching the error with google finds solutions but none of them works for me (Mostly "seems you got no bundle installed", I have that).
I am trying the whole day to get lighttpd to run with redmine, but I can not get a solution to that error.
May 14 17:50:04 redmine lighttpd-angel: /usr/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require': cannot load such file -- bundler/setup (LoadError) May 14 17:50:04 redmine lighttpd-angel: from /usr/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require' May 14 17:50:04 redmine lighttpd-angel: from /srv/http/redmine/config/boot.rb:6:in `<top (required)>' May 14 17:50:04 redmine lighttpd-angel: from /usr/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require' May 14 17:50:04 redmine lighttpd-angel: from /usr/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require' May 14 17:50:04 redmine lighttpd-angel: from /srv/http/redmine/public/dispatch.fcgi:3:in `<main>' I searched the web for "cannot load such file -- bundler/setup (LoadError)" and I get some results but none of the solutions helped. I got all gems installed and the test with "ruby script/rails server webrick -e production" runs, bringing up a working redmine on localhost:3000 however lighttpd keeps crashing.
Here the versions that I have installed
# cd /srv/http/redmine # bundle install ... Using <various gems> Your bundle is complete! Gems in the groups development and test were not installed. Use `bundle show [gemname]` to see where a bundled gem is installed. # ruby --version ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-linux] # gem --version 2.0.0 # rake --version rake, version 10.0.4 # bundle --version Bundler version 1.3.5
I am running archlinux and that's not the first webserver I set up with arch, however the first attempt with ruby and lighttpd. Testing redmine with unicorn or webrick works, the site is up, I can login as admin and create users and content, but I can not use unicorn or webrick, because I need SSL for redmine...
I am quite lost now, how can I get the thing up?
I managed to set up lighttpd and redmine on debian now, because there was a package in the official repository. I don't know what problems the package solved, I still would like to use archlinux, but since there is no official package, my manual install failed. I still wonder what I did wrong...
You didn't include the root cause of the error - it's somewhere more up in the error log. Rerunning systemctl like this should get you better feedback.
systemctl --full -n 100 status lighttpd
Anyway no matter the cause it's likely not the only problem you can run into while setting up redmine - so i'll give you my entire step-by-step configuration with php that works (Tested it all in virtualbox with latest packages) and you might figure out what you did wrong.
Make sure you have installed the neccessary stuff - in my case following
pacman --needed --noconfirm -S mariadb mariadb-clients subversion ruby imagemagick lighttpd php php-cgi php-fpm fcgi base-devel
[ -d /srv/http ] || mkdir -p /srv/http cd /srv/http svn co http://svn.redmine.org/redmine/branches/2.3-stable redmine cd redmine
Create database access for redmine
mysql -u root -e "CREATE DATABASE redmine CHARACTER SET utf8;" mysql -u root -e "CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'my_password';" mysql -u root -e "GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';"
Copy database config and modify the desired sections of file accordingly
cp config/database.yml.example config/database.yml
production: adapter: mysql2 database: redmine host: localhost username: redmine password: my_password encoding: utf8
Install gems and setup redmine
cp public/dispatch.fcgi.example public/dispatch.fcgi gem install bundler --no-user-install echo 'gem "fcgi"' > Gemfile.local bundle install --without development test rake generate_secret_token RAILS_ENV=production rake db:migrate RAILS_ENV=production REDMINE_LANG=en rake redmine:load_default_data
mkdir -p files log tmp tmp/pdf public/plugin_assets chown -R http:http files log tmp public/plugin_assets chmod -R 755 files log tmp public/plugin_assets
ruby script/rails server webrick -e production -p 8080
Configure your /etc/lighttpd/lighttpd.conf - here is mine.
Now if your redmine runs in subdirectory (like mine) fix the routes in 'config/routes.rb' by replacing
RedmineApp::Application.routes.draw do root :to => 'welcome#index', :as => 'home'
Redmine::Utils::relative_url_root = '/redmine' RedmineApp::Application.routes.draw do scope ActionController::Base.relative_url_root do root :to => 'welcome#index', :as => 'home'
Don't forget to add an extra 'end' to the end of file and you should be done. Start your lighttpd and visit your redmine. For futher debug check what's in the following
systemctl --full -n 100 status lighttpd
your lighttpd error log
Hope i helped you - so drop me a feedback
Edit: Guess it's obvious, but make sure the user that runs lighttpd has all permissions for the folders in which you create sockets...
Last edited by markocz (2013-07-04 12:09:02)
EDIT: I missed the "echo fcgi" command in markocz's instructions. My bad. Sorry for the noise.
I followed markocz's instructions almost exactly and got this error:
# ./public/dispatch.fcgi /usr/lib/ruby/gems/2.1.0/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract/connection_specification.rb:47:in `resolve_hash_connection': database configuration does not specify adapter (ActiveRecord::AdapterNotSpecified) from /usr/lib/ruby/gems/2.1.0/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract/connection_specification.rb:41:in `resolve_string_connection' from /usr/lib/ruby/gems/2.1.0/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract/connection_specification.rb:25:in `spec' from /usr/lib/ruby/gems/2.1.0/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract/connection_specification.rb:130:in `establish_connection' from /usr/lib/ruby/gems/2.1.0/gems/activerecord-3.2.17/lib/active_record/railtie.rb:88:in `block (2 levels) in <class:Railtie>' from /usr/lib/ruby/gems/2.1.0/gems/activesupport-3.2.17/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval' from /usr/lib/ruby/gems/2.1.0/gems/activesupport-3.2.17/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook' from /usr/lib/ruby/gems/2.1.0/gems/activesupport-3.2.17/lib/active_support/lazy_load_hooks.rb:26:in `block in on_load' from /usr/lib/ruby/gems/2.1.0/gems/activesupport-3.2.17/lib/active_support/lazy_load_hooks.rb:25:in `each' from /usr/lib/ruby/gems/2.1.0/gems/activesupport-3.2.17/lib/active_support/lazy_load_hooks.rb:25:in `on_load' from /usr/lib/ruby/gems/2.1.0/gems/activerecord-3.2.17/lib/active_record/railtie.rb:80:in `block in <class:Railtie>' from /usr/lib/ruby/gems/2.1.0/gems/railties-3.2.17/lib/rails/initializable.rb:30:in `instance_exec' from /usr/lib/ruby/gems/2.1.0/gems/railties-3.2.17/lib/rails/initializable.rb:30:in `run' from /usr/lib/ruby/gems/2.1.0/gems/railties-3.2.17/lib/rails/initializable.rb:55:in `block in run_initializers' from /usr/lib/ruby/gems/2.1.0/gems/railties-3.2.17/lib/rails/initializable.rb:54:in `each' from /usr/lib/ruby/gems/2.1.0/gems/railties-3.2.17/lib/rails/initializable.rb:54:in `run_initializers' from /usr/lib/ruby/gems/2.1.0/gems/railties-3.2.17/lib/rails/application.rb:136:in `initialize!' from /usr/lib/ruby/gems/2.1.0/gems/railties-3.2.17/lib/rails/railtie/configurable.rb:30:in `method_missing' from /srv/http/sc-redmine/config/environment.rb:14:in `<top (required)>' from ./public/dispatch.fcgi:7:in `require' from ./public/dispatch.fcgi:7:in `<main>'
I found this to be the solution: add
to Gemfile.local and rerun
Last edited by falbani (2014-04-28 18:36:31)