Solved -- Redmine will not start - Centos 6 Apache rvm passenger
Added by Tim N almost 12 years ago
I have installed Redmine 2.1.2 with Postgresql on a CentOS 6.3 following the wiki How-To's (and having to amend slightly on the way.) However,I tested the installation with webrick and it works fine.
I now try to run this on Apache2 and it fails to start.
I am at a loss as to where the problem lies. I get the following error:
Ruby (Rack) application could not be startedError message:
Could not find builder-3.0.0 in any of the sources (Bundler::GemNotFound)
Backtrace:
- File Line Location
0 /usr/local/rvm/gems/ruby-1.9.3-p286@rails328/gems/bundler-1.2.1/lib/bundler/spec_set.rb 90 in `block in materialize'
1 /usr/local/rvm/gems/ruby-1.9.3-p286@rails328/gems/bundler-1.2.1/lib/bundler/spec_set.rb 83 in `map!'
2 /usr/local/rvm/gems/ruby-1.9.3-p286@rails328/gems/bundler-1.2.1/lib/bundler/spec_set.rb 83 in `materialize'
3 /usr/local/rvm/gems/ruby-1.9.3-p286@rails328/gems/bundler-1.2.1/lib/bundler/definition.rb 113 in `specs'
4 /usr/local/rvm/gems/ruby-1.9.3-p286@rails328/gems/bundler-1.2.1/lib/bundler/definition.rb 158 in `specs_for'
5 /usr/local/rvm/gems/ruby-1.9.3-p286@rails328/gems/bundler-1.2.1/lib/bundler/definition.rb 147 in `requested_specs'
6 /usr/local/rvm/gems/ruby-1.9.3-p286@rails328/gems/bundler-1.2.1/lib/bundler/environment.rb 23 in `requested_specs'
7 /usr/local/rvm/gems/ruby-1.9.3-p286@rails328/gems/bundler-1.2.1/lib/bundler/runtime.rb 11 in `setup'
8 /usr/local/rvm/gems/ruby-1.9.3-p286@rails328/gems/bundler-1.2.1/lib/bundler.rb 116 in `setup'
9 /usr/local/rvm/gems/ruby-1.9.3-p286@rails328/gems/passenger-3.0.18/lib/phusion_passenger/utils.rb 326 in `prepare_app_process'
10 /usr/local/rvm/gems/ruby-1.9.3-p286@rails328/gems/passenger-3.0.18/lib/phusion_passenger/rack/application_spawner.rb 156 in `block in initialize_server'
11 /usr/local/rvm/gems/ruby-1.9.3-p286@rails328/gems/passenger-3.0.18/lib/phusion_passenger/utils.rb 563 in `report_app_init_status'
12 /usr/local/rvm/gems/ruby-1.9.3-p286@rails328/gems/passenger-3.0.18/lib/phusion_passenger/rack/application_spawner.rb 154 in `initialize_server'
13 /usr/local/rvm/gems/ruby-1.9.3-p286@rails328/gems/passenger-3.0.18/lib/phusion_passenger/abstract_server.rb 204 in `start_synchronously'
14 /usr/local/rvm/gems/ruby-1.9.3-p286@rails328/gems/passenger-3.0.18/lib/phusion_passenger/abstract_server.rb 180 in `start'
15 /usr/local/rvm/gems/ruby-1.9.3-p286@rails328/gems/passenger-3.0.18/lib/phusion_passenger/rack/application_spawner.rb 129 in `start'
16 /usr/local/rvm/gems/ruby-1.9.3-p286@rails328/gems/passenger-3.0.18/lib/phusion_passenger/spawn_manager.rb 253 in `block (2 levels) in spawn_rack_application'
17 /usr/local/rvm/gems/ruby-1.9.3-p286@rails328/gems/passenger-3.0.18/lib/phusion_passenger/abstract_server_collection.rb 132 in `lookup_or_add'
18 /usr/local/rvm/gems/ruby-1.9.3-p286@rails328/gems/passenger-3.0.18/lib/phusion_passenger/spawn_manager.rb 246 in `block in spawn_rack_application'
19 /usr/local/rvm/gems/ruby-1.9.3-p286@rails328/gems/passenger-3.0.18/lib/phusion_passenger/abstract_server_collection.rb 82 in `block in synchronize'
20 prelude> 10:in `synchronize'
21 /usr/local/rvm/gems/ruby-1.9.3-p286@rails328/gems/passenger-3.0.18/lib/phusion_passenger/abstract_server_collection.rb 79 in `synchronize'
22 /usr/local/rvm/gems/ruby-1.9.3-p286@rails328/gems/passenger-3.0.18/lib/phusion_passenger/spawn_manager.rb 244 in `spawn_rack_application'
23 /usr/local/rvm/gems/ruby-1.9.3-p286@rails328/gems/passenger-3.0.18/lib/phusion_passenger/spawn_manager.rb 137 in `spawn_application'
24 /usr/local/rvm/gems/ruby-1.9.3-p286@rails328/gems/passenger-3.0.18/lib/phusion_passenger/spawn_manager.rb 275 in `handle_spawn_application'
25 /usr/local/rvm/gems/ruby-1.9.3-p286@rails328/gems/passenger-3.0.18/lib/phusion_passenger/abstract_server.rb 357 in `server_main_loop'
26 /usr/local/rvm/gems/ruby-1.9.3-p286@rails328/gems/passenger-3.0.18/lib/phusion_passenger/abstract_server.rb 206 in `start_synchronously'
27 /usr/local/rvm/gems/ruby-1.9.3-p286@rails328/gems/passenger-3.0.18/helper-scripts/passenger-spawn-server 99 in `'
I have checked and builder is in
gem list builder
- LOCAL GEMS ***
builder (3.1.4, 3.0.4, 3.0.0)
ruby -v
ruby 1.9.3p286 (2012-10-12 revision 37165) [x86_64-linux]
rails -v
Rails 3.2.8
And in httpd.conf
#
- Modules reaquired for Ruby on Rails Support
#
LoadModule passenger_module /usr/local/rvm/gems/ruby-1.9.3-p286@rails328/gems/passenger-3.0.18/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/rvm/gems/ruby-1.9.3-p286@rails328/gems/passenger-3.0.18
PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.3-p286@rails328/ruby
#
<VirtualHost myhost.domain.com:443>
ServerName myhost.domain.com
SSLEngine on
SSLCertificateFile /etc/pki/tls/certs/ca.crt
SSLCertificateKeyFile /etc/pki/tls/private/ca.key
DocumentRoot /var/www/redmine/public
RailsEnv production
ErrorLog logs/redmine_error_log
<Directory /var/www/redmine/public>
Options Indexes ExecCGI FollowSymLinks
Order allow,deny
Allow from all
AllowOverride all
Options -MultiViews
</Directory>
</Virtualhost>
RAILS_ENV=production script/about
/usr/local/rvm/gems/ruby-1.9.3-p286/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `block in require': iconv will be deprecated in the future, use String#encode instead.
Environment:
Redmine version 2.1.2.stable
Ruby version 1.9.3 (x86_64-linux)
Rails version 3.2.8
Environment production
Database adapter PostgreSQL
Redmine plugins:
no plugin installed
Any ideas???
Cheers
Replies (2)
RE: Redmine will not start - Centos 6 Apache rvm passenger
-
Added by Tim N almost 12 years ago
I guess there are issues with RVM, Passenger and Apache.
I have tried the following too:
In my redmine directory, I created a .ruby-version file that says
ruby-1.9.3-p286@rails328
I have then, using the advice here:
https://rvm.io//integration/passenger
created a config/setup_load_paths.rb
if ENV['MY_RUBY_HOME'] && ENV['MY_RUBY_HOME'].include?('rvm')begin
rvm_path = File.dirname(File.dirname(ENV['MY_RUBY_HOME']))
rvm_lib_path = File.join(rvm_path, 'lib')
- $LOAD_PATH.unshift rvm_lib_path
require 'rvm'
RVM.use_from_path! File.dirname(File.dirname(FILE))
rescue LoadError # RVM is unavailable at this point.
raise "RVM ruby lib is currently unavailable."
end
end
- If you're not using Bundler at all, remove lines bellow
#ENV['BUNDLE_GEMFILE'] = File.expand_path('../Gemfile', File.dirname(FILE))
ENV['BUNDLE_PATH'] = '/usr/local/rvm/gems/ruby-1.9.3-p286'
require 'bundler/setup'
Note that if I leave the line
ENV['BUNDLE_GEMFILE'] = File.expand_path('../Gemfile', File.dirname(FILE))
I still get the builder not found error. If I hard code the path I get:
Page not found
The Redmine page you were trying to access doesn't exist or has been removed.
Back
I see this in the /var/log/httpd/error_log
/usr/local/rvm/gems/ruby-1.9.3-p286/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `block in require': iconv will be deprecated in the future, use String#encode instead.
Any clues???
RE: Redmine will not start - Centos 6 Apache rvm passenger
-
Added by Tim N almost 12 years ago
Solved it.
Re-installed server from scratch.
Didn't use RVM, just CentOS Ruby and Rails versions.
Did need to install mod_fcgid.
Followed this very helpful guide:
http://nguyen-vu-hung.blogspot.fr/2012/09/install-redmine-203-on-centos-63.html